wjx пре 2 година
родитељ
комит
4f5bf9f17a

+ 5 - 5
src/pages/adMonitor/adMonitorList/config.ts

@@ -16,7 +16,7 @@ const qiliangpaihang = [
             // { title: '深度优化目标', dataIndex: 'depthOptimizeTarget', label: '设置信息' },
             // { title: '曝光评估', dataIndex: 'impressionAppraise', label: '设置信息' },
             { title: '投放时间', dataIndex: 'adBeginTime', label: '设置信息', default: 12, width: 135 },
-            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', width: 75 },
+            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', width: 85 },
             // { title: '创意状态', dataIndex: 'adCreativeStatus', label: '设置信息' },
             { title: '推广目标', dataIndex: 'promotedObjectType', label: '设置信息' },
             // { title: '购买类型', dataIndex: 'adBuyType', label: '设置信息' },
@@ -112,7 +112,7 @@ const qiliangpaihanghour = [
             // { title: '深度优化目标', dataIndex: 'depthOptimizeTarget', label: '设置信息' },
             // { title: '曝光评估', dataIndex: 'impressionAppraise', label: '设置信息' },
             { title: '投放时间', dataIndex: 'adBeginTime', label: '设置信息', default: 12, width: 135 },
-            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', width: 75 },
+            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', width: 85 },
             // { title: '创意状态', dataIndex: 'adCreativeStatus', label: '设置信息' },
             { title: '推广目标', dataIndex: 'promotedObjectType', label: '设置信息' },
             // { title: '购买类型', dataIndex: 'adBuyType', label: '设置信息' },
@@ -208,7 +208,7 @@ const qiliangpaihangminute = [
             // { title: '深度优化目标', dataIndex: 'depthOptimizeTarget', label: '设置信息' },
             // { title: '曝光评估', dataIndex: 'impressionAppraise', label: '设置信息' },
             { title: '投放时间', dataIndex: 'adBeginTime', label: '设置信息', default: 12, width: 135 },
-            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', width: 75 },
+            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', width: 85 },
             // { title: '创意状态', dataIndex: 'adCreativeStatus', label: '设置信息' },
             { title: '推广目标', dataIndex: 'promotedObjectType', label: '设置信息' },
             // { title: '购买类型', dataIndex: 'adBuyType', label: '设置信息' },
@@ -297,9 +297,9 @@ const guanggao = [
             { title: '创意名称/ID', dataIndex: 'creativeName/creativeId', label: '设置信息', default: 4 },
             { title: '创意预览', dataIndex: 'creativePreview', label: '设置信息', width: 80 },
             { title: '广告账户', dataIndex: 'accountId', label: '设置信息', default: 5, width: 70 },
-            { title: '投手', dataIndex: 'putUserName', label: '设置信息', default: 6 },
+            { title: '投手', dataIndex: 'putUserName', label: '设置信息', default: 6, width: 65 },
             { title: '创建日期', dataIndex: 'adCreateTime', label: '设置信息' },
-            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', default: 7, width: 75 },
+            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', default: 7, width: 85 },
             // { title: '创意状态', dataIndex: 'adCreativeStatus', label: '设置信息', default: 11 },
             // { title: '购买类型', dataIndex: 'adBuyType', label: '设置信息' },
             // { title: '自动扩量', dataIndex: 'autoExpand', label: '设置信息' },

+ 4 - 4
src/pages/adMonitor/adMonitorList/data.tsx

@@ -4,10 +4,10 @@ import React from "react";
 /**广告状态 */
 export const GGStateData = {
     'STATUS_PENDING': '审核中',
-    'STATUS_DENIED': <Badge status="error" text="审核不通过"/>,
-    'STATUS_SUSPEND': <Badge status="warning" text="暂停中"/>,
-    'STATUS_READY': <Badge status="default" text="未到投放时间"/>,
-    'STATUS_ACTIVE': <Badge status="processing" text="投放中"/>,
+    'STATUS_DENIED': <Badge status="error" text={<span style={{ fontSize: 12 }}>审核不通过</span>}/>,
+    'STATUS_SUSPEND': <Badge status="warning" text={<span style={{ fontSize: 12 }}>暂停中</span>}/>,
+    'STATUS_READY': <Badge status="default" text={<span style={{ fontSize: 12 }}>未到投放时间</span>}/>,
+    'STATUS_ACTIVE': <Badge status="processing" text={<span style={{ fontSize: 12 }}>投放中</span>}/>,
     'STATUS_STOP': '投放结束',
     'STATUS_ACTIVE_CAMPAIGN_SUSPEND': '广告被暂停',
     'STATUS_PART_READY': '部分待投放',

+ 5 - 3
src/pages/adMonitor/adMonitorList/monitor.tsx

@@ -27,7 +27,7 @@ function Monitor(props: { onChange: () => void }) {
     const { getPlanList, getTotalCost, getPlanCost, getPlanDetailList, getMinuteList, getAdqAccountList } = useModel('useAdMonitor.useMonitor')
     const { getPicherList } = useModel('useOperating.useWxGroupList')
     // 变量开始
-    const [queryForm, setQueryForm] = useState<newListType>({ totalTimeUnit: 'day', planTimeUnit: 'hour', pageNum: 1, pageSize: 100 }) // 搜索变量//startTime: moment().format('YYYY-MM-DD'), endTime: moment().format('YYYY-MM-DD'),
+    const [queryForm, setQueryForm] = useState<newListType>({ totalTimeUnit: 'day', planTimeUnit: 'hour', sysUserId: JSON.parse(sessionStorage.getItem('SYSUSERID') || '[]'), pageNum: 1, pageSize: 100 }) // 搜索变量//startTime: moment().format('YYYY-MM-DD'), endTime: moment().format('YYYY-MM-DD'),
     const { BarMonitor, LineMonitor } = useEcharts()
     const [barDis, setBarDis] = useState<any[]>([])
     const [lineDis, setLineDis] = useState<any[]>([])
@@ -255,10 +255,12 @@ function Monitor(props: { onChange: () => void }) {
                         style={{ minWidth: 180, maxWidth: 250 }}
                         mode='multiple'
                         maxTagCount={1}
-                        allowClear placeholder="请选择投手"
+                        allowClear 
+                        placeholder="请选择投手"
                         disabled={queryForm?.adgroup || queryForm?.accountId?.length > 0}
                         onChange={(value: number[]) => {
                             setQueryForm({ ...queryForm, sysUserId: value, pageNum: 1 })
+                            sessionStorage.setItem('SYSUSERID', value ? JSON.stringify(value) : '')
                             if (mode === 'detail') {
                                 getDetailList(queryForm.adgroup, queryForm?.accountId)
                             } else if (mode === 'minute') {
@@ -330,7 +332,7 @@ function Monitor(props: { onChange: () => void }) {
             </div>
         </Card>
         {showEacharts && <Card hoverable bodyStyle={{ padding: '12px 16px' }}>
-            <span style={{ position: 'absolute', top: 10, zIndex: 100 }}>
+            <span style={{ position: 'absolute', top: 10, zIndex: 10 }}>
                 {px ?
                     <Tooltip title='左右排列'><Tag color='#f50' onClick={() => { set(false) }}><ColumnWidthOutlined /><span style={{ fontSize: 10 }}>左右排列</span></Tag></Tooltip>
                     :

+ 4 - 4
src/pages/adMonitor/adMonitorList/planList.tsx

@@ -16,7 +16,7 @@ const PlanList: React.FC = () => {
     const { getAllPlanList, getBookListAll, getAdqAccountList } = useModel('useAdMonitor.useMonitor')
     const { getPicherList } = useModel('useOperating.useWxGroupList')
     // 变量开始
-    const [queryForm, setQueryForm] = useState<allPlanProps>({ pageNum: 1, pageSize: 20, createStartTime: moment().subtract(3, 'days').format('YYYY-MM-DD'), createEndTime: moment().format('YYYY-MM-DD') }) // 搜索变量
+    const [queryForm, setQueryForm] = useState<allPlanProps>({ pageNum: 1, pageSize: 100, sysUserId: JSON.parse(sessionStorage.getItem('SYSUSERID') || '[]'), createStartTime: moment().subtract(3, 'days').format('YYYY-MM-DD'), createEndTime: moment().format('YYYY-MM-DD') }) // 搜索变量
     const [visible, setVisible] = useState<boolean>(false) // 详情弹窗控制
     const [adId, setAdId] = useState<any>()
     const [downLoadLoading, setDownLoadLoading] = useState<boolean>(false)
@@ -108,11 +108,11 @@ const PlanList: React.FC = () => {
                         style={{ minWidth: 150 }}
                         allowClear
                         placeholder="请选择投手"
-                        onChange={(value: any[]) => { setQueryForm({ ...queryForm, pageNum: 1, sysUserId: value }) }}
+                        onChange={(value: any[]) => { sessionStorage.setItem('SYSUSERID', value ? JSON.stringify(value) : ''); setQueryForm({ ...queryForm, pageNum: 1, sysUserId: value }) }}
                     >
                         {getPicherList?.data?.map((item: { nickname: string, userId: number }, index: number) =>
                             <Select.Option
-                                value={item.userId.toString()}
+                                value={item.userId}
                                 key={item.userId + '' + index}
                             >
                                 {item.nickname}
@@ -181,7 +181,7 @@ const PlanList: React.FC = () => {
             ajax={getAllPlanList}
             dataSource={getAllPlanList?.data?.data?.records}
             loading={getAllPlanList?.loading}
-            scroll={{ y: 600 }}
+            scroll={{ y: 750 }}
             fixed={{ left: 0, right: 1 }}
             total={getAllPlanList?.data?.data?.total}
             page={queryForm.pageNum}