فهرست منبع

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage

wjx 2 سال پیش
والد
کامیت
ed0da4102e

+ 8 - 8
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: 65 },
+            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', width: 75 },
             // { title: '创意状态', dataIndex: 'adCreativeStatus', label: '设置信息' },
             { title: '推广目标', dataIndex: 'promotedObjectType', label: '设置信息' },
             // { title: '购买类型', dataIndex: 'adBuyType', label: '设置信息' },
@@ -27,7 +27,7 @@ const qiliangpaihang = [
         label: '费用',
         data: [
             { title: '广告预算', dataIndex: 'dailyBudget', label: '费用', width: 80 },
-            // { title: '出价方式', dataIndex: 'biddingMethod', label: '费用' },
+            { title: '出价方式', dataIndex: 'bidMode', label: '费用', width: 65 },
             { title: '当前出价', dataIndex: 'bidAmount', label: '费用', width: 80 },
             // { title: '计划预算', dataIndex: 'planBudget', label: '费用' },
             { title: '广告总消耗', dataIndex: 'costTotal', label: '费用', default: 24, width: 100 },
@@ -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: 65 },
+            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', width: 75 },
             // { title: '创意状态', dataIndex: 'adCreativeStatus', label: '设置信息' },
             { title: '推广目标', dataIndex: 'promotedObjectType', label: '设置信息' },
             // { title: '购买类型', dataIndex: 'adBuyType', label: '设置信息' },
@@ -123,7 +123,7 @@ const qiliangpaihanghour = [
         label: '费用',
         data: [
             { title: '广告预算', dataIndex: 'dailyBudget', label: '费用', width: 80 },
-            // { title: '出价方式', dataIndex: 'biddingMethod', label: '费用' },
+            { title: '出价方式', dataIndex: 'bidMode', label: '费用', width: 65 },
             { title: '当前出价', dataIndex: 'bidAmount', label: '费用', width: 80 },
             // { title: '计划预算', dataIndex: 'planBudget', label: '费用' },
             { title: '广告总消耗', dataIndex: 'costTotal', label: '费用', default: 24, width: 100 },
@@ -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: 65 },
+            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', width: 75 },
             // { title: '创意状态', dataIndex: 'adCreativeStatus', label: '设置信息' },
             { title: '推广目标', dataIndex: 'promotedObjectType', label: '设置信息' },
             // { title: '购买类型', dataIndex: 'adBuyType', label: '设置信息' },
@@ -219,7 +219,7 @@ const qiliangpaihangminute = [
         label: '费用',
         data: [
             { title: '广告预算', dataIndex: 'dailyBudget', label: '费用', width: 80 },
-            // { title: '出价方式', dataIndex: 'biddingMethod', label: '费用' },
+            { title: '出价方式', dataIndex: 'bidMode', label: '费用', width: 65 },
             { title: '当前出价', dataIndex: 'bidAmount', label: '费用', width: 80 },
             // { title: '计划预算', dataIndex: 'planBudget', label: '费用' },
             { title: '广告总消耗', dataIndex: 'costTotal', label: '费用', width: 100 },
@@ -299,7 +299,7 @@ const guanggao = [
             { title: '广告账户', dataIndex: 'accountId', label: '设置信息', default: 5, width: 70 },
             { title: '投手', dataIndex: 'putUserName', label: '设置信息', default: 6 },
             { title: '创建日期', dataIndex: 'adCreateTime', label: '设置信息' },
-            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', default: 7, width: 65 },
+            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', default: 7, width: 75 },
             // { title: '创意状态', dataIndex: 'adCreativeStatus', label: '设置信息', default: 11 },
             // { title: '购买类型', dataIndex: 'adBuyType', label: '设置信息' },
             // { title: '自动扩量', dataIndex: 'autoExpand', label: '设置信息' },
@@ -315,7 +315,7 @@ const guanggao = [
         label: '费用',
         data: [
             { title: '广告预算', dataIndex: 'adBudget', label: '费用', default: 10, width: 90 },
-            { title: '出价方式', dataIndex: 'bidMode', label: '费用' },
+            { title: '出价方式', dataIndex: 'bidMode', label: '费用', width: 65 },
             { title: '当前出价', dataIndex: 'bidAmount', label: '费用' },
             // { title: '计划预算', dataIndex: 'planBudget', label: '费用', default: 19 },
             { title: '广告总消耗', dataIndex: 'cost', label: '费用' },

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

@@ -1,12 +1,13 @@
+import { Badge } from "antd";
 import React from "react";
 
 /**广告状态 */
 export const GGStateData = {
     'STATUS_PENDING': '审核中',
-    'STATUS_DENIED': <span style={{ color: 'red' }}>审核不通过</span>,
-    'STATUS_SUSPEND': '暂停中',
-    'STATUS_READY': '未到投放时间',
-    'STATUS_ACTIVE': <span style={{ color: '#409EFF' }}>投放中</span>,
+    '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_STOP': '投放结束',
     'STATUS_ACTIVE_CAMPAIGN_SUSPEND': '广告被暂停',
     'STATUS_PART_READY': '部分待投放',

+ 9 - 1
src/pages/adMonitor/adMonitorList/enum.ts

@@ -118,4 +118,12 @@ enum YOUHUAMUBIAO {
     "OPTIMIZATIONGOAL_ONE_DAY_RETENTION_RATIO" = "次留率",
     "OPTIMIZATIONGOAL_PROMOTION_READ_ARTICLE" = "阅读文章"
 }
-export { GOUMAILEIXING, GUANGGAOZHUANGTAI, CHUANGYIZHUANGTAI, TUIGUANGMUBIAO, YOUHUAMUBIAO }
+
+enum CHUJIAFANGSHI {
+    "BID_MODE_CPC" = "CPC",
+    "BID_MODE_CPA" = "CPA",
+    "BID_MODE_CPM" = "CPM",
+    "BID_MODE_OCPC" = "oCPC",
+    "BID_MODE_OCPM" = "oCPM"
+}
+export { GOUMAILEIXING, GUANGGAOZHUANGTAI, CHUANGYIZHUANGTAI, TUIGUANGMUBIAO, YOUHUAMUBIAO, CHUJIAFANGSHI }

+ 11 - 11
src/pages/adMonitor/adMonitorList/tableMonitorConfig.tsx

@@ -5,7 +5,7 @@ import { ColumnsType } from 'antd/lib/table'
 import React from 'react'
 import { ReactComponent as RocketSvg } from '@/assets/rocket.svg'
 import './index.less'
-import { CHUANGYIZHUANGTAI, GOUMAILEIXING, GUANGGAOZHUANGTAI, TUIGUANGMUBIAO, YOUHUAMUBIAO } from './enum'
+import { CHUANGYIZHUANGTAI, CHUJIAFANGSHI, GOUMAILEIXING, GUANGGAOZHUANGTAI, TUIGUANGMUBIAO, YOUHUAMUBIAO } from './enum'
 import Box from './components/box'
 import { GGStateData } from './data'
 function columnsMonitor(planDetail: (id: number) => void, getDetailList: (adId: any, accountId: any[]) => void, details: (id: number) => void, getMinuList: (id: number, accountId: any[]) => void, mode: string) {
@@ -191,16 +191,16 @@ function columnsMonitor(planDetail: (id: number) => void, getDetailList: (adId:
                     return <Statistic value={a || 0} />
                 }
             },
-            // {
-            //     title: '出价方式',
-            //     dataIndex: 'biddingMethod',
-            //     key: 'biddingMethod',
-            //     width: 110,
-            //     align: 'center',
-            //     render: (a: any) => {
-            //         return a
-            //     }
-            // },
+            {
+                title: '出价方式',
+                dataIndex: 'bidMode',
+                key: 'bidMode',
+                align: 'center',
+                width: 80,
+                render: (a: any) => {
+                    return CHUJIAFANGSHI[a] || '--'
+                }
+            },
             {
                 title: '当前出价',
                 dataIndex: 'bidAmount',

+ 7 - 5
src/pages/adMonitor/adMonitorList/tablePlanListConfig.tsx

@@ -2,9 +2,10 @@ import { Statistic, Tooltip } from 'antd'
 import React from 'react'
 import './index.less'
 import { ReactComponent as RocketSvg } from '@/assets/rocket.svg'
-import { GOUMAILEIXING, GUANGGAOZHUANGTAI, TUIGUANGMUBIAO, CHUANGYIZHUANGTAI, YOUHUAMUBIAO } from './enum'
+import { GOUMAILEIXING, GUANGGAOZHUANGTAI, TUIGUANGMUBIAO, CHUANGYIZHUANGTAI, YOUHUAMUBIAO, CHUJIAFANGSHI } from './enum'
 import Box from './components/box'
 import { GGStateData } from './data'
+import { copy } from '@/utils/utils'
 function columnsMonitor(details: (id: number) => void) {
     return function columns() {
         let newArr: any = [
@@ -25,7 +26,7 @@ function columnsMonitor(details: (id: number) => void) {
                 ellipsis: true,
                 render: (str: any, b: any) => {
                     return <div style={{ display: 'flex', flexFlow: 'column nowrap', fontSize: 12 }}>
-                        <div style={{ color: '#459ae9', fontSize: 10 }} className='oneText'>{b.adgroupName}</div>
+                        <div style={{ color: '#459ae9', fontSize: 10 }} className='oneText' onClick={() => copy(b.adgroupName)}>{b.adgroupName}</div>
                         <div style={{ color: '#888' }}>广告ID:{b?.adgroupId}</div>
                     </div>
                 }
@@ -39,7 +40,7 @@ function columnsMonitor(details: (id: number) => void) {
                 ellipsis: true,
                 render: (str: any, b: any) => {
                     return <div style={{ display: 'flex', flexFlow: 'column nowrap', fontSize: 12 }}>
-                        <div style={{ color: '#459ae9', fontSize: 10 }} className='oneText'>{b.campaignName}</div>
+                        <div style={{ color: '#459ae9', fontSize: 10 }} className='oneText' onClick={() => copy(b.campaignName)}>{b.campaignName}</div>
                         <div style={{ color: '#888' }}>计划ID:{b?.campaignId}</div>
                     </div>
                 }
@@ -52,7 +53,7 @@ function columnsMonitor(details: (id: number) => void) {
                 width: 210,
                 render: (str: any, b: any) => {
                     return <div style={{ display: 'flex', flexFlow: 'column nowrap', fontSize: 12 }}>
-                        <div style={{ color: '#459ae9', fontSize: 10 }} className='oneText'>{b.creativeName}</div>
+                        <div style={{ color: '#459ae9', fontSize: 10 }} className='oneText' onClick={() => copy(b.creativeName)}>{b.creativeName}</div>
                         <div style={{ color: '#888' }}>创意ID:{b?.creativeId}</div>
                     </div>
                 }
@@ -98,6 +99,7 @@ function columnsMonitor(details: (id: number) => void) {
                 key: 'adStatus',
                 align: 'center',
                 width: 105,
+                ellipsis: true,
                 render: (a: any) => {
                     return GGStateData[a] || '--'
                 }
@@ -203,7 +205,7 @@ function columnsMonitor(details: (id: number) => void) {
                 align: 'center',
                 width: 80,
                 render: (a: any) => {
-                    return a || '--'
+                    return CHUJIAFANGSHI[a] || '--'
                 }
             },
             {