wjx 8 kuukautta sitten
vanhempi
commit
8a1e011163

+ 36 - 3
src/components/QueryForm/index.tsx

@@ -1,5 +1,5 @@
 import { useAjax } from "@/Hook/useAjax"
-import { AD_STATUS_ENUM, BID_MODE_ENUM } from "@/pages/iaaData/const"
+import { AD_STATUS_ENUM, ADSTATUSEnum, BID_MODE_ENUM } from "@/pages/iaaData/const"
 import { getPutUserListApi } from "@/services/iaaData"
 import { Button, Col, Form, Row, Space, DatePicker, Select, Input, InputNumber } from "antd"
 import { RangePickerProps } from "antd/lib/date-picker"
@@ -25,8 +25,12 @@ interface Props {
     isPutUserIdList?: boolean
     /** 是否开启 出价方式 搜索 */
     isPricing?: boolean,
+    /** 是否开启 头条出价方式 搜索 */
+    isTTPricing?: boolean,
     /** 是否开启 广告状态 搜索 */
     isStatus?: boolean,
+    /** 是否开启 头条广告状态 搜索 */
+    isTTStatus?: boolean,
     /** 是否开启 删除状态 搜索 */
     isDeleted?: boolean,
 
@@ -45,7 +49,7 @@ const QueryForm: React.FC<Props> = (props) => {
 
     /**************************/
     const {
-        onChange, initialValues, isAccountId, isPromotionName, isPromotionId, isDynamicCreativeId, isCpaBid, isPutUserIdList, isPricing, isStatus, isDeleted, day1, day2, day3
+        onChange, initialValues, isAccountId, isPromotionName, isPromotionId, isDynamicCreativeId, isCpaBid, isPutUserIdList, isPricing, isTTPricing, isStatus, isTTStatus, isDeleted, day1, day2, day3
     } = props
     const [form] = Form.useForm()
     const [putUserList, setPutUserList] = useState<{ label: string, value: string }[]>([])
@@ -130,6 +134,20 @@ const QueryForm: React.FC<Props> = (props) => {
                 />
             </Form.Item></Col>}
 
+            {/* 头条出价方式 */}
+            {isTTPricing && <Col><Form.Item name='pricing'>
+                <Select
+                    showSearch
+                    allowClear
+                    style={{ width: 120 }}
+                    placeholder={'出价方式'}
+                    filterOption={(input, option) =>
+                        (option?.label as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
+                    }
+                    options={Object.keys(BID_MODE_ENUM).map(key => ({ label: BID_MODE_ENUM[key as keyof typeof BID_MODE_ENUM], value: key }))}
+                />
+            </Form.Item></Col>}
+
 
             {/* 广告状态 */}
             {isStatus && <Col><Form.Item name='status'>
@@ -145,7 +163,22 @@ const QueryForm: React.FC<Props> = (props) => {
                 />
             </Form.Item></Col>}
 
-            {/* 是否退游 */}
+
+            {/* 头条广告状态 */}
+            {isTTStatus && <Col><Form.Item name='adStatus'>
+                <Select
+                    showSearch
+                    allowClear
+                    style={{ width: 120 }}
+                    placeholder={'广告状态'}
+                    filterOption={(input, option) =>
+                        (option?.label as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
+                    }
+                    options={Object.keys(ADSTATUSEnum).map(key => ({ label: ADSTATUSEnum[key as keyof typeof ADSTATUSEnum], value: key }))}
+                />
+            </Form.Item></Col>}
+
+            {/* 是否删除 */}
             {isDeleted && <Col><Form.Item name='deleted'>
                 <Select
                     showSearch

+ 0 - 37
src/pages/iaaData/const.ts

@@ -1,37 +0,0 @@
-
-/** 出价方式 */
-export enum BID_MODE_ENUM {
-	BID_MODE_OCPM = 'oCPM',
-	BID_MODE_CPM = 'CPM',
-	BID_MODE_CPC = 'CPC',
-	BID_MODE_CPA = 'CPA',
-	BID_MODE_OCPC = 'oCPC',
-}
-
-/**广告状态*/
-export enum AD_STATUS_ENUM {
-	ADGROUP_STATUS_FROZEN = '已冻结',
-	ADGROUP_STATUS_SUSPEND = '暂停中',
-	ADGROUP_STATUS_NOT_IN_DELIVERY_TIME = '广告未到投放时间',
-	ADGROUP_STATUS_ACTIVE = '投放中',
-	ADGROUP_STATUS_DELETED = '已删除',
-	ADGROUP_STATUS_ACCOUNT_BALANCE_NOT_ENOUGH = '账户余额不足',
-	ADGROUP_STATUS_DAILY_BUDGET_REACHED = '广告达到日预算上限',
-	ADGROUP_STATUS_PARTIAL_ACTIVE = '部分投放中',
-	ADGROUP_STATUS_WECHAT_CHANNELS_STOP = '投放结束(直播结束)',
-	ADGROUP_STATUS_CREATIVE_STATUS_PENDING = '创意未投放',
-	ADGROUP_STATUS_CREATIVE_EMPTY = '创意准备中',
-	ADGROUP_STATUS_JOINT_BUDGET_REACHED = '广告被暂停(联合预算达上限)',
-	ADGROUP_STATUS_TOTAL_BUDGET_REACHED = '广告达到总预算上限',
-	ADGROUP_STATUS_PRE_LOCK = '待锁定预算',
-	ADGROUP_STATUS_UNLOCKING = '解锁预算中',
-	ADGROUP_STATUS_STOP = '投放结束',
-}
-
-
-/** 业务类型 */
-export enum PRODUCT_TYPE_ENUM {
-	PRODUCT_TYPE_GAME = '游戏业务',
-	PRODUCT_TYPE_NOVEL = '小说业务',
-	PRODUCT_TYPE_PLAYLET = '短剧业务',
-}

+ 105 - 0
src/pages/iaaData/const.tsx

@@ -0,0 +1,105 @@
+import { Badge } from "antd";
+import React from "react"
+
+/** 出价方式 */
+export enum BID_MODE_ENUM {
+    BID_MODE_OCPM = 'oCPM',
+    BID_MODE_CPM = 'CPM',
+    BID_MODE_CPC = 'CPC',
+    BID_MODE_CPA = 'CPA',
+    BID_MODE_OCPC = 'oCPC',
+}
+
+/**广告状态*/
+export enum AD_STATUS_ENUM {
+    ADGROUP_STATUS_FROZEN = '已冻结',
+    ADGROUP_STATUS_SUSPEND = '暂停中',
+    ADGROUP_STATUS_NOT_IN_DELIVERY_TIME = '广告未到投放时间',
+    ADGROUP_STATUS_ACTIVE = '投放中',
+    ADGROUP_STATUS_DELETED = '已删除',
+    ADGROUP_STATUS_ACCOUNT_BALANCE_NOT_ENOUGH = '账户余额不足',
+    ADGROUP_STATUS_DAILY_BUDGET_REACHED = '广告达到日预算上限',
+    ADGROUP_STATUS_PARTIAL_ACTIVE = '部分投放中',
+    ADGROUP_STATUS_WECHAT_CHANNELS_STOP = '投放结束(直播结束)',
+    ADGROUP_STATUS_CREATIVE_STATUS_PENDING = '创意未投放',
+    ADGROUP_STATUS_CREATIVE_EMPTY = '创意准备中',
+    ADGROUP_STATUS_JOINT_BUDGET_REACHED = '广告被暂停(联合预算达上限)',
+    ADGROUP_STATUS_TOTAL_BUDGET_REACHED = '广告达到总预算上限',
+    ADGROUP_STATUS_PRE_LOCK = '待锁定预算',
+    ADGROUP_STATUS_UNLOCKING = '解锁预算中',
+    ADGROUP_STATUS_STOP = '投放结束',
+}
+
+
+/** 业务类型 */
+export enum PRODUCT_TYPE_ENUM {
+    PRODUCT_TYPE_GAME = '游戏业务',
+    PRODUCT_TYPE_NOVEL = '小说业务',
+    PRODUCT_TYPE_PLAYLET = '短剧业务',
+}
+
+
+/**********************头条*************************/
+/** 广告状态 */
+export const ADSTATUSEnum = {
+    'NOT_DELETED': <Badge color={'cyan'} text='不限' />,
+    'ALL': <Badge color={'cyan'} text='不限(包含已删除)' />,
+    'OK': <Badge status="processing" text='投放中' />,
+    'DELETED': <Badge status="error" text='已删除' />,
+    'PROJECT_OFFLINE_BUDGET': <Badge status="error" text='项目超出预算' />,
+    'PROJECT_PREOFFLINE_BUDGET': <Badge status="warning" text='项目接近预算' />,
+    'TIME_NO_REACH': <Badge color={'purple'} text='未到达投放时间' />,
+    'TIME_DONE': <Badge status="success" text='已完成' />,
+    'NO_SCHEDULE': <Badge color={'volcano'} text='不在投放时段' />,
+    'AUDIT': <Badge status="success" text='新建审核中' />,
+    'REAUDIT': <Badge status="success" text='修改审核中' />,
+    'FROZEN': <Badge status="error" text='已终止' />,
+    'AUDIT_DENY': <Badge status="error" text='审核不通过' />,
+    'OFFLINE_BUDGET': <Badge status="error" text='广告超出预算' />,
+    'OFFLINE_BALANCE': <Badge status="error" text='账户余额不足' />,
+    'PREOFFLINE_BUDGET': <Badge status="warning" text='广告接近预算' />,
+    'DISABLED': <Badge status="default" text='已暂停' />,
+    'PROJECT_DISABLED': <Badge status="default" text='已被项目暂停' />,
+    'LIVE_ROOM_OFF': '关联直播间不可投',
+    'PRODUCT_OFFLINE': '关联商品不可投',
+    'AWEME_ACCOUNT_DISABLED': '关联抖音账号不可投',
+    'AWEME_ANCHOR_DISABLED': '锚点不可投',
+    'DISABLE_BY_QUOTA': <Badge status="default" text='已暂停(配额达限)' />,
+    'CREATE': <Badge status="default" text='新建' />,
+    'ADVERTISER_OFFLINE_BUDGET': <Badge status="error" text='账号超出预算' />,
+    'ADVERTISER_PREOFFLINE_BUDGET': <Badge status="warning" text='账号接近预算' />
+}
+
+/** 项目状态 */
+export const PROJECTSTATUs = {
+    PROJECT_STATUS_ENABLE: '启用',
+    PROJECT_STATUS_DISABLE: '暂停',
+    PROJECT_STATUS_DELETE: '删除',
+    PROJECT_STATUS_ALL: '所有包含已删除',
+    PROJECT_STATUS_NOT_DELETE: '所有不包含已删除',
+    PROJECT_STATUS_BUDGET_EXCEED: '项目超出预算',
+    PROJECT_STATUS_BUDGET_PRE_OFFLINE_BUDGET: '项目接近预算',
+    PROJECT_STATUS_NOT_START: '未达投放时间',
+    PROJECT_STATUS_DONE: '已完成',
+    PROJECT_STATUS_NO_SCHEDULE: '不在投放时段'
+}
+
+/** 推广目标 */
+export const LANDINGTYPE = {
+    APP: '应用推广',
+    LINK: '销售线索推广',
+    MICRO_GAME: '小程序',
+    QUICK_APP: '快应用'
+}
+
+
+/** 出价方式 */
+export enum PRICINGEnum {
+    PRICING_CPC = 'CPC(点击付费)',
+    PRICING_CPM = 'CPM(展示付费)',
+    PRICING_OCPC = 'OCPC(已下线)',
+    PRICING_OCPM = 'OCPM(转化量付费)',
+    PRICING_CPV = 'CPV',
+    PRICING_CPA = 'CPA(已下线)',
+    PRICING_CPC_OCPM = 'CPC - OCPM两阶段出价(仅搜索广告可用)'
+}

+ 94 - 0
src/pages/iaaData/ocenaengineIaa/adList/dayAd.tsx

@@ -0,0 +1,94 @@
+import { useAjax } from "@/Hook/useAjax"
+import { Button, Drawer } from "antd"
+import React, { useEffect, useState } from "react"
+import QueryForm from "@/components/QueryForm"
+import { CloseOutlined } from "@ant-design/icons"
+import TablePro from "@/components/TablePro"
+import moment from "moment"
+import { getByteAdEveryListApi } from "@/services/iaaData"
+import columns12 from "./tableConfigDay"
+
+interface Props {
+    queryForm: {
+        costDayBegin?: string,
+        costDayEnd?: string
+    }
+    iaaApp: string,
+    adName: string,
+    promotionId?: number
+    onClose?: () => void
+    visible?: boolean
+}
+
+/**
+ * 广告每日监控
+ * @returns 
+ */
+const DayAd: React.FC<Props> = ({ iaaApp, adName, queryForm, promotionId, onClose, visible }) => {
+
+    /***********************************/
+    const [data, setData] = useState<{ pageSize: number, pageNum: number, sortFiled?: string, sortType?: string }>({ pageNum: 1, pageSize: 30 })
+    const [date, setDate] = useState<[string, string] | undefined>((queryForm?.costDayBegin && queryForm.costDayEnd) ? [queryForm.costDayBegin, queryForm.costDayEnd] : undefined)
+    const getByteAdEveryList = useAjax((params) => getByteAdEveryListApi(params))
+    /***********************************/
+
+    useEffect(() => {
+        let params: any = {}
+        const [appId, productType] = iaaApp.split('||')
+        if (promotionId) {
+            params.adId = promotionId
+        }
+        if (date && date?.length > 0) {
+            params.costDayBegin = date[0]
+            params.costDayEnd = date[1]
+        } else {
+            delete params?.costDayBegin
+            delete params?.costDayEnd
+        }
+        getByteAdEveryList.run({ ...params, ...data, appId, productType })
+    }, [promotionId, queryForm, data, date, iaaApp])
+
+    return <Drawer title={<div style={{ display: 'flex', justifyContent: 'space-between' }}><span>{`${adName} 腾讯广告每日数据`}</span> <Button type="text" icon={<CloseOutlined />} onClick={() => onClose?.()}></Button> </div>} closable={false} placement="right" width={'90%'} onClose={onClose} open={visible}>
+        <TablePro
+            leftChild={<QueryForm
+                initialValues={{ day1: queryForm?.costDayBegin ? [moment(queryForm?.costDayBegin), moment(queryForm?.costDayEnd)] : null }}
+                onChange={(data: any) => {
+                    const { day1 } = data
+                    if (day1 && day1?.length === 2) {
+                        setDate([moment(day1[0]).format('YYYY-MM-DD'), moment(day1[1]).format('YYYY-MM-DD')])
+                    } else {
+                        setDate(undefined)
+                    }
+                }}
+                day1={{ placeholder: ['消耗日期开始', '消耗日期结束'] }}
+            />}
+            scroll={{ x: 1000, y: 600 }}
+            ajax={getByteAdEveryList}
+            loading={getByteAdEveryList.loading}
+            fixed={{ left: 3, right: 0 }}
+            dataSource={getByteAdEveryList?.data?.data?.records?.map((item: any, index: number) => ({ ...item, id: Number(data.pageNum.toString() + index.toString()) }))}
+            page={getByteAdEveryList?.data?.data?.current || 1}
+            pageSize={getByteAdEveryList?.data?.data?.size || 20}
+            total={getByteAdEveryList?.data?.data?.total || 0}
+            title='头条广告每日监控'
+            onChange={(pagination: any, _: any, sortData: any) => {
+                let { current, pageSize } = pagination
+                let newQueryForm = JSON.parse(JSON.stringify(data))
+                if (sortData && sortData?.order) {
+                    newQueryForm['sortAsc'] = sortData?.order === 'ascend' ? true : false
+                    newQueryForm['sortFiled'] = sortData?.field
+                } else {
+                    delete newQueryForm['sortAsc']
+                    delete newQueryForm['sortFiled']
+                }
+                newQueryForm.pageNum = current || newQueryForm.pageNum
+                newQueryForm.pageSize = pageSize || newQueryForm.pageSize
+                setData({ ...newQueryForm })
+            }}
+            config={columns12()}
+            configName={'头条广告每日监控'}
+        />
+    </Drawer>
+}
+
+export default React.memo(DayAd)

+ 7 - 0
src/pages/iaaData/ocenaengineIaa/adList/index.less

@@ -0,0 +1,7 @@
+.adDataBackColorClass {
+    background-color: #fff2e8;
+}
+
+.payDataBackColorClass {
+    background-color: #f9f0ff;
+}

+ 242 - 2
src/pages/iaaData/ocenaengineIaa/adList/index.tsx

@@ -1,10 +1,250 @@
-import React from "react"
+import QueryForm from "@/components/QueryForm";
+import TablePro from "@/components/TablePro";
+import { Button, message, Modal, notification, Space, Table } from "antd";
+import React, { useEffect, useState } from "react"
+import { useModel } from "umi";
+import moment from "moment";
+import { getByteAdListApi, GetByteAdListProps, getByteAdTotalApi } from "@/services/iaaData";
+import { useAjax } from "@/Hook/useAjax";
+import columns12 from "./tableConfig";
+import { PauseCircleOutlined, PlayCircleOutlined } from "@ant-design/icons";
+import DayAd from "./dayAd";
+import { newEditTTAdgroupsDataApi } from "@/services/gameData";
 
 
+/**
+ * 头条广告列表
+ * @returns 
+ */
 const AdList: React.FC = () => {
+    /****************************************/
+    const { initialState } = useModel('@@initialState');
+    const [selectedRows, setSelectedRows] = useState<any[]>([])
+    const [queryForm, setQueryForm] = useState<GetByteAdListProps>({
+        pageNum: 1,
+        pageSize: 30,
+        costDayBegin: moment().format('YYYY-MM-DD'),
+        costDayEnd: moment().format('YYYY-MM-DD'),
+    })
+    const [totalData, setTotalData] = useState<any[]>([])
+    const [visible, setVisible] = useState<boolean>(false)
+    const [promotionId, setPromotionId] = useState<number>()
+    const [adName, setAdName] = useState<string>('')
+    const [failIdList, setFailIdList] = useState<{ adgroupId: number, code: number, message: string, messageCn: string }[]>([])
+    const [failVisible, setFailVisible] = useState<boolean>(false)
 
+    // const editAdqAdgroupsData = useAjax((params) => newEditAdqAdgroupsDataApi(params))
+    const getByteAdList = useAjax((params) => getByteAdListApi(params))
+    const getByteAdTotal = useAjax((params) => getByteAdTotalApi(params))
+    const newEditTTAdgroupsData = useAjax((params) => newEditTTAdgroupsDataApi(params))
+    /****************************************/
 
-    return <div>111111</div>
+    useEffect(() => {
+        if (initialState?.iaaApp) {
+            const [appId, productType] = initialState.iaaApp.split('||')
+            getByteAdList.run({ ...queryForm, appId, productType })
+            getByteAdTotal.run({ ...queryForm, appId, productType }).then((res: { data: { id: number; accountId: string } }) => {
+                if (res?.data) {
+                    let data = res?.data
+                    data.id = 1
+                    data.accountId = '总计'
+                    setTotalData([data])
+                } else {
+                    setTotalData([{ id: 1, accountId: '总计' }])
+                }
+            })
+        }
+
+    }, [queryForm, initialState?.iaaApp])
+
+    const dayHandle = (data: any) => {
+        setVisible(true)
+        setAdName(data.adName)
+        setPromotionId(data.adId)
+    }
+
+    // 批量启停
+    const adStatus = (type: 'play' | 'suspend') => {
+        let params: any = {}
+        params.suspend = type === 'play' ? false : true
+        params.adgroupIds = selectedRows.map(item => item.accountId + ',' + item.adId)
+        if (params.adgroupIds.length === 0) {
+            message.warn(`所以账号都是${type === 'play' ? '启动' : '暂停'}状态,无需${type === 'play' ? '启动' : '暂停'}操作`)
+            return
+        }
+        let hide =  message.loading(`正在设置...`, 0, () => {
+            message.success('设置成功');
+        });
+        newEditTTAdgroupsData.run(params).then((res: any) => {
+            if (res?.failIdList?.length === 0) {
+                message.success(`操作完成!`)
+                getByteAdList.refresh()
+                setSelectedRows([])
+            } else {
+                setFailIdList(res?.list || [])
+                setFailVisible(true)
+            }
+            hide()
+        })
+    }
+
+    return <div>
+        <TablePro
+            czChild={<Space>
+                {/* <Switch checkedChildren="开启全选" unCheckedChildren="关闭全选" checked={!isZj} onChange={(e) => { setIsZj(!e); }} /> */}
+                <Button type='primary' size="small" style={{ background: '#67c23a', borderColor: '#67c23a' }} loading={newEditTTAdgroupsData.loading} icon={<PlayCircleOutlined />} disabled={selectedRows.length === 0} onClick={() => adStatus('play')}>启动</Button>
+                <Button type='primary' size="small" style={{ background: '#e6a23c', borderColor: '#e6a23c' }} loading={newEditTTAdgroupsData.loading} icon={<PauseCircleOutlined />} disabled={selectedRows.length === 0} onClick={() => adStatus('suspend')}>暂停</Button>
+                <span style={{ color: 'red' }}>操作完数据结果延时5分钟之内,即时结果去腾讯后台查看</span>
+            </Space>}
+            leftChild={<QueryForm
+                initialValues={{ day3: [moment(), moment()] }}
+                isAccountId
+                isPromotionName
+                isPutUserIdList
+                isCpaBid
+                isDeleted
+                isTTPricing
+                isTTStatus
+                isPromotionId
+                day1={{ placeholder: ['广告创建日期开始', '广告创建日期结束'] }}
+                day2={{ placeholder: ['投放日期开始', '投放日期结束'] }}
+                day3={{ placeholder: ['消耗日期开始', '消耗日期结束'] }}
+                onChange={(data: any) => {
+                    console.log(data)
+                    const { promotionId, promotionName, day1, day2, day3, ...params } = data
+                    let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                    newQueryForm.adId = promotionId
+                    newQueryForm.adName = promotionName
+                    newQueryForm.pageNum = 1
+                    if (day1 && day1?.length === 2) {
+                        newQueryForm['adCreateBegin'] = moment(day1[0]).format('YYYY-MM-DD')
+                        newQueryForm['adCreateEnd'] = moment(day1[1]).format('YYYY-MM-DD')
+                    } else {
+                        delete newQueryForm['adCreateBegin']
+                        delete newQueryForm['adCreateEnd']
+                    }
+
+                    if (day2 && day2?.length === 2) {
+                        newQueryForm['putDayBegin'] = moment(day2[0]).format('YYYY-MM-DD')
+                        newQueryForm['putDayEnd'] = moment(day2[1]).format('YYYY-MM-DD')
+                    } else {
+                        delete newQueryForm['putDayBegin']
+                        delete newQueryForm['putDayEnd']
+                    }
+
+                    if (day3 && day3?.length === 2) {
+                        newQueryForm['costDayBegin'] = moment(day3[0]).format('YYYY-MM-DD')
+                        newQueryForm['costDayEnd'] = moment(day3[1]).format('YYYY-MM-DD')
+                    } else {
+                        delete newQueryForm['costDayBegin']
+                        delete newQueryForm['costDayEnd']
+                    }
+                    setQueryForm({ ...newQueryForm, ...params })
+                }}
+            />}
+            isZj
+            totalData={totalData}
+            config={columns12(dayHandle)}
+            configName={'头条广告列表'}
+            fixed={{ left: 4, right: 2 }}
+            scroll={{ x: 1000, y: 620 }}
+            title='头条广告列表'
+            loading={getByteAdList.loading}
+            ajax={getByteAdList}
+            page={getByteAdList?.data?.data?.current || 1}
+            pageSize={getByteAdList?.data?.data?.size || 20}
+            total={getByteAdList?.data?.data?.total || 0}
+            dataSource={getByteAdList?.data?.data?.records?.map((item: any, index: number) => ({ ...item, id: item.adId.toString(16) }))}
+            rowKey={'id'}
+            onChange={(pagination: any, _: any, sortData: any) => {
+                let { current, pageSize } = pagination
+                let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                if (sortData && sortData?.order) {
+                    newQueryForm['sortAsc'] = sortData?.order === 'ascend' ? true : false
+                    newQueryForm['sortFiled'] = sortData?.field
+                } else {
+                    delete newQueryForm['sortAsc']
+                    delete newQueryForm['sortFiled']
+                }
+                newQueryForm.pageNum = current || newQueryForm.pageNum
+                newQueryForm.pageSize = pageSize || newQueryForm.pageSize
+                setQueryForm({ ...newQueryForm })
+            }}
+            rowSelection={{
+                selectedRowKeys: selectedRows.map(item => item.id),
+                getCheckboxProps: (record: any) => ({
+                    disabled: record.adStatus === 'PROJECT_STATUS_DELETE' || record?.accountId === '总计'
+                }),
+                onSelect: (record: { adId: string }, selected: boolean) => {
+                    if (selected) {
+                        selectedRows.push({ ...record })
+                        setSelectedRows([...selectedRows])
+                    } else {
+                        let newSelectAccData = selectedRows.filter((item: { adId: string }) => item.adId !== record.adId)
+                        setSelectedRows([...newSelectAccData])
+                    }
+                },
+                onSelectAll: (selected: boolean, selectedRowss: { adId: number }[], changeRows: { adId: number }[]) => {
+                    if (selected) {
+                        let newSelectAccData = [...selectedRows]
+                        changeRows.forEach((item: { adId: number }) => {
+                            let index = newSelectAccData.findIndex((ite: { adId: number }) => ite.adId === item.adId)
+                            if (index === -1) {
+                                newSelectAccData.push({ ...item })
+                            }
+                        })
+                        setSelectedRows([...newSelectAccData])
+                    } else {
+                        let newSelectAccData = selectedRows.filter((item: { adId: number }) => {
+                            let index = changeRows.findIndex((ite: { adId: number }) => ite.adId === item.adId)
+                            if (index !== -1) {
+                                return false
+                            } else {
+                                return true
+                            }
+                        })
+                        setSelectedRows([...newSelectAccData])
+                    }
+                }
+            }}
+        />
+
+        {visible && <DayAd iaaApp={initialState?.iaaApp as string} adName={adName} visible={visible} onClose={() => { setVisible(false); setPromotionId(undefined) }} queryForm={queryForm} promotionId={promotionId} />}
+        {failVisible && <Modal
+            title={<strong>报错信息</strong>}
+            open={failVisible}
+            className='modalResetCss'
+            width={650}
+            onCancel={() => { setFailVisible(false); setFailIdList([]) }}
+            footer={null}
+        >
+            <Table
+                size="small"
+                bordered
+                rowKey={'creativeId'}
+                columns={[{
+                    title: '创意ID',
+                    dataIndex: 'creativeId',
+                    key: 'creativeId',
+                    width: 110,
+                    render: (value) => <span style={{ fontSize: 12 }}>{value}</span>,
+                }, {
+                    title: 'code',
+                    dataIndex: 'code',
+                    key: 'code',
+                    width: 70,
+                    align: 'center',
+                    render: (value) => <span style={{ fontSize: 12 }}>{value}</span>,
+                }, {
+                    title: '错误信息',
+                    dataIndex: 'messageCn',
+                    key: 'messageCn',
+                    render: (value) => <span style={{ fontSize: 12 }}>{value}</span>,
+                }]}
+                dataSource={failIdList}
+            />
+        </Modal>}
+    </div>
 }
 
 export default AdList

+ 561 - 0
src/pages/iaaData/ocenaengineIaa/adList/tableConfig.tsx

@@ -0,0 +1,561 @@
+import WidthEllipsis from "@/components/widthEllipsis"
+import { Progress, Space, Statistic } from "antd"
+import React from "react"
+import { ADSTATUSEnum, LANDINGTYPE, PRICINGEnum, PRODUCT_TYPE_ENUM, PROJECTSTATUs } from "../../const"
+import { APPTYPE } from "@/pages/iaaSystem/manage/const"
+import './index.less'
+
+function columns12(dayHandle: (data: any) => void): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
+
+
+    return [
+        {
+            label: '账户信息',
+            data: [
+                {
+                    title: '推广账号名称', dataIndex: 'accountName', label: '账户信息', align: 'center', width: 100, default: 3,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '推广账号ID', dataIndex: 'accountId', label: '账户信息', align: 'center', width: 100, default: 2,
+                    render: (a: string) => (<WidthEllipsis value={a} isCopy />)
+                },
+                {
+                    title: '备注', dataIndex: 'notes', label: '账户信息', align: 'center', width: 100, default: 4,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '服务商', dataIndex: 'service', label: '账户信息', align: 'center', width: 100, default: 5,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '渠道名称', dataIndex: 'agentName', label: '账户信息', align: 'center', width: 80, default: 16,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '渠道ID', dataIndex: 'agentId', label: '账户信息', align: 'center', width: 80,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '投手', dataIndex: 'zxPitcherName', label: '账户信息', align: 'center', width: 60, default: 15,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '余额', dataIndex: 'balance', label: '账户信息', align: 'right', width: 75, sorter: true, default: 21,
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '业务类型', dataIndex: 'productType', label: '账户信息', align: 'center', width: 80, default: 11,
+                    render: (a: string) => (<WidthEllipsis value={PRODUCT_TYPE_ENUM[a as keyof typeof PRODUCT_TYPE_ENUM]} />)
+                },
+                {
+                    title: '应用类型', dataIndex: 'appType', label: '账户信息', align: 'center', width: 80, default: 12,
+                    render: (a: string) => (<WidthEllipsis value={APPTYPE[a as keyof typeof APPTYPE]?.text} />)
+                },
+                {
+                    title: '应用', dataIndex: 'appName', label: '账户信息', align: 'center', width: 100, default: 13,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '应用ID', dataIndex: 'appId', label: '账户信息', align: 'center', width: 100,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '小程序名称', dataIndex: 'mpName', label: '账户信息', align: 'center', width: 100, default: 14,
+                    render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
+                },
+                {
+                    title: '小程序ID', dataIndex: 'mpId', label: '账户信息', align: 'center', width: 100,
+                    render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
+                }
+            ]
+        },
+        {
+            label: '广告信息',
+            data: [
+                {
+                    title: '广告组', dataIndex: 'campaignId', label: '广告信息', align: 'center', width: 100, default: 7,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '广告组名称', dataIndex: 'campaignName', label: '广告信息', align: 'center', width: 100, default: 8,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '广告名称', dataIndex: 'adName', label: '广告信息', align: 'center', width: 100, default: 9,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '广告ID', dataIndex: 'adId', label: '广告信息', align: 'center', width: 80, default: 6,
+                    render: (a: string) => (<WidthEllipsis value={a} isCopy />)
+                },
+                {
+                    title: '广告状态', dataIndex: 'adStatus', label: '广告信息', align: 'center', width: 95, default: 17,
+                    render: (a: string) => (<WidthEllipsis value={(ADSTATUSEnum as any)[a]} />)
+                },
+                {
+                    title: '项目名称', dataIndex: 'projectName', label: '广告信息', align: 'center', width: 75, default: 18,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '项目ID', dataIndex: 'projectId', label: '广告信息', align: 'center', width: 75,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '项目类型', dataIndex: 'adType', label: '广告信息', align: 'center', width: 75, default: 19,
+                    render: (a: string) => (<WidthEllipsis value={a === 'ALL' ? '所有广告' : a === 'SEARCH' ? '搜索广告' : '--'} />)
+                },
+                {
+                    title: '项目状态', dataIndex: 'proStatus', label: '广告信息', align: 'center', width: 75, default: 20,
+                    render: (a: string) => (<WidthEllipsis value={(PROJECTSTATUs as any)[a]} />)
+                },
+                {
+                    title: '推广目标', dataIndex: 'landingType', label: '广告信息', align: 'center', width: 100, default: 10,
+                    render: (a: string) => (<WidthEllipsis value={(LANDINGTYPE as any)[a]} />)
+                },
+                {
+                    title: '媒体平台', dataIndex: 'mediaPlatform', label: '广告信息', align: 'center', width: 80,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '出价方式', dataIndex: 'pricing', label: '广告信息', align: 'center', width: 80, default: 22,
+                    render: (a: string) => (<WidthEllipsis value={(PRICINGEnum as any)[a]} />)
+                },
+                {
+                    title: '当前出价', dataIndex: 'cpaBid', label: '广告信息', align: 'center', width: 75, default: 23, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '广告日预算', dataIndex: 'dayBudget', label: '广告信息', align: 'right', width: 75, default: 24, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '投放时间', dataIndex: 'startTime', label: '广告信息', align: 'center', width: 180, default: 31,
+                    render: (a: string, b: any) => b?.accountId === '总计' ? '--' : <WidthEllipsis value={a + (b?.endTime ? '~' + b?.endTime : '')} />
+                },
+                {
+                    title: '广告创建时间', dataIndex: 'promotionCreateTime', label: '广告信息', align: 'center', width: 130, default: 32,
+                    render: (a: string, b: any) => <WidthEllipsis value={a} />
+                },
+            ]
+        },
+        {
+            label: '消耗数据',
+            data: [
+                {
+                    title: '今日消耗', dataIndex: 'cost', label: '消耗数据', align: 'center', width: 85, default: 33, sorter: true,
+                    className: 'padding_0',
+                    render: (a: number) => <div style={{ height: 27, position: 'relative' }}>
+                        <Progress
+                            strokeColor={{
+                                from: '#ff5900',
+                                to: '#ffd380',
+                            }}
+                            status="active"
+                            showInfo={false}
+                            percent={a ? a / 20000 * 100 : 0}
+                        />
+                        <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0, padding: '0 5px' }}><Statistic value={a || 0} valueStyle={a >= 20000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }} /></span>
+                    </div>
+                },
+                {
+                    title: '广告总消耗', dataIndex: 'adTotalCost', label: '消耗数据', align: 'center', width: 85, default: 34, sorter: true,
+                    className: 'padding_0',
+                    render: (a: number) => <div style={{ height: 27, position: 'relative' }}>
+                        <Progress
+                            strokeColor={{
+                                from: '#10c1e9',
+                                to: '#6892d0',
+                            }}
+                            status="active"
+                            showInfo={false}
+                            percent={a ? a / 20000 * 100 : 0}
+                        />
+                        <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0, padding: '0 5px' }}><Statistic value={a || 0} valueStyle={a >= 20000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }} /></span>
+                    </div>
+                }
+            ]
+        },
+        {
+            label: '广告媒体端数据',
+            data: [
+                {
+                    title: '转化目标', dataIndex: 'convertTarget', label: '广告媒体端数据', align: 'center', width: 65, default: 25, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a} />
+                },
+                {
+                    title: '转化目标量', dataIndex: 'convertCount', label: '广告媒体端数据', align: 'center', width: 65, default: 40, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '转化目标成本', dataIndex: 'convertCost', label: '广告媒体端数据', align: 'center', width: 65, default: 27, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '转化目标率', dataIndex: 'convertRate', label: '广告媒体端数据', align: 'center', width: 70, default: 26, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '激活数', dataIndex: 'active', label: '广告媒体端数据', align: 'center', width: 65, default: 41, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活成本', dataIndex: 'activeCost', label: '广告媒体端数据', align: 'right', width: 75, default: 42, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活率', dataIndex: 'activeRate', label: '广告媒体端数据', align: 'center', width: 70, default: 43, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '注册数', dataIndex: 'register', label: '广告媒体端数据', align: 'center', width: 65, default: 49, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册成本(广告)', dataIndex: 'activeRegisterCost', label: '广告媒体端数据', align: 'right', width: 75, default: 50, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册率', dataIndex: 'activeRegisterRate', label: '广告媒体端数据', align: 'center', width: 70, default: 51, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '关键行为数', dataIndex: 'gameAddiction', label: '广告媒体端数据', align: 'center', width: 65, default: 46, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '关键行为成本', dataIndex: 'gameAddictionCost', label: '广告媒体端数据', align: 'right', width: 75, default: 44, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '关键行为率', dataIndex: 'gameAddictionRate', label: '广告媒体端数据', align: 'center', width: 70, default: 45, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '次留成本', dataIndex: 'attributionNextDayOpenCost', label: '广告媒体端数据', align: 'right', width: 75, default: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '次日留存数', dataIndex: 'attributionNextDayOpenCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '次留率(广告)', dataIndex: 'attributionNextDayOpenRate', label: '广告媒体端数据', align: 'center', width: 70, default: 72, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '次留回传数', dataIndex: 'nextDayOpen', label: '广告媒体端数据', align: 'center', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '2日留存数', dataIndex: 'attributionRetention2dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '2日留存成本', dataIndex: 'attributionRetention2dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '2日留存率', dataIndex: 'attributionRetention2dRate', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '3日留存数', dataIndex: 'attributionRetention3dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '3日留存成本', dataIndex: 'attributionRetention3dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '3日留存率', dataIndex: 'attributionRetention3dRate', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '4日留存数', dataIndex: 'attributionRetention4dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '4日留存成本', dataIndex: 'attributionRetention4dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '4日留存率', dataIndex: 'attributionRetention4dRate', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '5日留存数', dataIndex: 'attributionRetention5dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '5日留存成本', dataIndex: 'attributionRetention5dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '5日留存率', dataIndex: 'attributionRetention5dRate', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '6日留存数', dataIndex: 'attributionRetention6dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '6日留存成本', dataIndex: 'attributionRetention6dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '6日留存率', dataIndex: 'attributionRetention6dRate', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '7日留存数', dataIndex: 'attributionRetention7dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '7日留存成本', dataIndex: 'attributionRetention7dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '7日留存总数', dataIndex: 'attributionRetention7dSumCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, default: 74, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '7日留存率', dataIndex: 'attributionRetention7dTotalCost', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '7日留存总成本', dataIndex: 'attributionRetention7dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, default: 73, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+            ]
+        },
+        {
+            label: '小程序/小游戏变现指标',
+            data: [
+                {
+                    title: '小程序/小游戏当日LTV(首日)', dataIndex: 'attributionMicroGame0dLtv', label: '小程序/小游戏变现指标', align: 'center', width: 85,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '小程序/小游戏激活后三日LTV', dataIndex: 'attributionMicroGame3dLtv', label: '小程序/小游戏变现指标', align: 'center', width: 85,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '小程序/小游戏当日(首日)广告变现ROI', dataIndex: 'attributionMicroGame0dRoi', label: '小程序/小游戏变现指标', align: 'center', width: 95, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '小程序/小游戏激活后三日广告变现ROI', dataIndex: 'attributionMicroGame3dRoi', label: '小程序/小游戏变现指标', align: 'center', width: 95, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '小程序/小游戏激活后七日广告变现ROI', dataIndex: 'attributionMicroGame7dRoi', label: '小程序/小游戏变现指标', align: 'center', width: 95, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '小程序/小游戏激活后七日LTV', dataIndex: 'attributionMicroGame7dLtv', label: '小程序/小游戏变现指标', align: 'center', width: 85,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+            ]
+        },
+        {
+            label: '应用端数据指标',
+            data: [
+                {
+                    title: '项目预算', dataIndex: 'proBudget', label: '应用端数据指标', align: 'right', width: 75, default: 28, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '预算类型', dataIndex: 'budgetMode', label: '应用端数据指标', align: 'center', width: 70, default: 29, className: 'payDataBackColorClass',
+                    render: (a: string) => (<WidthEllipsis value={a === 'BUDGET_MODE_DAY' ? '日预算' : a === 'BUDGET_MODE_TOTAL' ? '总预算' : '--'} />)
+                },
+                {
+                    title: '深度转化ROI系数', dataIndex: 'roiGoal', label: '应用端数据指标', align: 'center', width: 75, default: 30, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '曝光量', dataIndex: 'showCount', label: '应用端数据指标', align: 'center', width: 70, default: 35, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '点击量', dataIndex: 'click', label: '应用端数据指标', align: 'center', width: 70, default: 36, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '点击率', dataIndex: 'ctr', label: '应用端数据指标', align: 'center', width: 70, default: 37, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '点击均价', dataIndex: 'avgClickCost', label: '应用端数据指标', align: 'center', width: 65, default: 38, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '千次曝光成本', dataIndex: 'avgShowCost', label: '应用端数据指标', align: 'right', width: 65, default: 39, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '今日注册人数', dataIndex: 'todayRegUser', label: '应用端数据指标', align: 'center', width: 65, default: 47, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '广告总注册人数', dataIndex: 'totalRegUser', label: '应用端数据指标', align: 'center', width: 65, default: 48, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册成本(应用)', dataIndex: 'regCost', label: '应用端数据指标', align: 'right', width: 75, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '人均新增成本', dataIndex: 'totalRegCost', label: '应用端数据指标', align: 'right', width: 75, default: 52, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册首日广告变现人数', dataIndex: 'regFirstUser', label: '应用端数据指标', align: 'center', width: 85, default: 53, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册首日广告变现次数', dataIndex: 'regFirstCnt', label: '应用端数据指标', align: 'center', width: 85, default: 54, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册首日广告变现金额', dataIndex: 'regFirstAmount', label: '应用端数据指标', align: 'right', width: 85, default: 55, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册首日变现ROI', dataIndex: 'regFirstRoi', label: '应用端数据指标', align: 'center', width: 70, default: 56, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '注册24小时广告变现人数', dataIndex: 'regTwentyFourUser', label: '应用端数据指标', align: 'center', width: 85, default: 57, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册24小时广告变现次数', dataIndex: 'regTwentyFourCnt', label: '应用端数据指标', align: 'center', width: 85, default: 58, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册24小时广告变现金额', dataIndex: 'regTwentyFourAmount', label: '应用端数据指标', align: 'right', width: 85, default: 59, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册24小时变现ROI', dataIndex: 'regTwentyFourRoi', label: '应用端数据指标', align: 'center', width: 70, default: 60, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '注册3日广告变现人数', dataIndex: 'regThreeUser', label: '应用端数据指标', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册3日广告变现次数', dataIndex: 'regThreeCnt', label: '应用端数据指标', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册3日广告变现金额', dataIndex: 'regThreeAmount', label: '应用端数据指标', align: 'right', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册3日变现ROI', dataIndex: 'regThreeRoi', label: '应用端数据指标', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '注册7日广告变现人数', dataIndex: 'regSevenUser', label: '应用端数据指标', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册7日广告变现次数', dataIndex: 'regSevenCnt', label: '应用端数据指标', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册7日广告变现金额', dataIndex: 'regSevenAmount', label: '应用端数据指标', align: 'right', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册7日变现ROI', dataIndex: 'regSevenRoi', label: '应用端数据指标', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '累计首日广告变现人数', dataIndex: 'regTotalUser', label: '应用端数据指标', align: 'center', width: 85, default: 61, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '累计广告变现次数', dataIndex: 'regTotalCnt', label: '应用端数据指标', align: 'center', width: 85, default: 62, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '累计广告变现金额', dataIndex: 'regTotalAmount', label: '应用端数据指标', align: 'right', width: 85, default: 63, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '累计广告变现ROI', dataIndex: 'regTotalRoi', label: '应用端数据指标', align: 'center', width: 70, default: 64, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '首日新增ARPU', dataIndex: 'firstNewArpu', label: '应用端数据指标', align: 'center', width: 80, default: 65, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '广告总ARPU', dataIndex: 'adTotalArpu', label: '应用端数据指标', align: 'center', width: 80, default: 66, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '首日ecpm', dataIndex: 'firstEcpm', label: '应用端数据指标', align: 'center', width: 80, default: 67, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number, b: any) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '总ecpm', dataIndex: 'totalEcpm', label: '应用端数据指标', align: 'center', width: 80, default: 68, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number, b: any) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '人均广告有效观看次数', dataIndex: 'userAvgLookCnt', label: '应用端数据指标', align: 'center', width: 85, default: 69, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '用户广告转化率', dataIndex: 'userAdConvertRate', label: '应用端数据指标', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+
+                {
+                    title: '次日留存率(应用)', dataIndex: 'active2Rate', label: '应用端数据指标', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '次日留存人数', dataIndex: 'active2User', label: '应用端数据指标', align: 'center', width: 75, default: 71, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                }
+            ]
+        },
+        {
+            label: '操作',
+            data: [
+                {
+                    title: '操作', dataIndex: 'cz', label: '操作', align: 'center', width: 150, default: 75,
+                    render: (_: number, b: any) => {
+                        if (b?.accountId === '总计') return '--'
+                        return <Space>
+                            <a onClick={() => dayHandle(b)} style={{ fontSize: 12 }}>广告每日监控</a>
+                            <a onClick={() => {
+                                window.open(`https://ad.oceanengine.com/superior/promote-manage/ad?aadvid=${b?.accountId}&searchInput=%2522${b?.adId}%2522&searchType=%25229%2522`)
+                            }} style={{ fontSize: 12 }}>头条广告</a>
+                        </Space>
+                    }
+                },
+                // {
+                //     title: '启停',
+                //     dataIndex: 'configuredStatus',
+                //     label: '操作',
+                //     align: 'center',
+                //     width: 45,
+                //     default: 1,
+                //     render: (a: string, b: any) => {
+                //         if (b?.accountId === '总计') {
+                //             return '--'
+                //         }
+                //         return <SwitchStatus configuredStatus={a} isDeleted={b?.isDeleted} adgroupId={b?.promotionId} onChange={onChange} />
+                //     }
+                // }
+            ]
+        }
+    ]
+}
+
+export default columns12

+ 530 - 0
src/pages/iaaData/ocenaengineIaa/adList/tableConfigDay.tsx

@@ -0,0 +1,530 @@
+import WidthEllipsis from "@/components/widthEllipsis"
+import { Progress, Statistic } from "antd"
+import React from "react"
+import { ADSTATUSEnum, LANDINGTYPE, PRICINGEnum, PRODUCT_TYPE_ENUM, PROJECTSTATUs } from "../../const"
+import { APPTYPE } from "@/pages/iaaSystem/manage/const"
+import './index.less'
+
+function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
+
+
+    return [
+        {
+            label: '账户信息',
+            data: [
+                {
+                    title: '推广账号名称', dataIndex: 'accountName', label: '账户信息', align: 'center', width: 100, default: 3,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '推广账号ID', dataIndex: 'accountId', label: '账户信息', align: 'center', width: 100, default: 2,
+                    render: (a: string) => (<WidthEllipsis value={a} isCopy />)
+                },
+                {
+                    title: '备注', dataIndex: 'notes', label: '账户信息', align: 'center', width: 100, default: 4,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '服务商', dataIndex: 'service', label: '账户信息', align: 'center', width: 100, default: 5,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '渠道名称', dataIndex: 'agentName', label: '账户信息', align: 'center', width: 80, default: 16,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '渠道ID', dataIndex: 'agentId', label: '账户信息', align: 'center', width: 80,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '投手', dataIndex: 'zxPitcherName', label: '账户信息', align: 'center', width: 60, default: 15,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '余额', dataIndex: 'balance', label: '账户信息', align: 'right', width: 75, sorter: true, default: 21,
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '业务类型', dataIndex: 'productType', label: '账户信息', align: 'center', width: 80, default: 11,
+                    render: (a: string) => (<WidthEllipsis value={PRODUCT_TYPE_ENUM[a as keyof typeof PRODUCT_TYPE_ENUM]} />)
+                },
+                {
+                    title: '应用类型', dataIndex: 'appType', label: '账户信息', align: 'center', width: 80, default: 12,
+                    render: (a: string) => (<WidthEllipsis value={APPTYPE[a as keyof typeof APPTYPE]?.text} />)
+                },
+                {
+                    title: '应用', dataIndex: 'appName', label: '账户信息', align: 'center', width: 100, default: 13,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '应用ID', dataIndex: 'appId', label: '账户信息', align: 'center', width: 100,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '小程序名称', dataIndex: 'mpName', label: '账户信息', align: 'center', width: 100, default: 14,
+                    render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
+                },
+                {
+                    title: '小程序ID', dataIndex: 'mpId', label: '账户信息', align: 'center', width: 100,
+                    render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
+                }
+            ]
+        },
+        {
+            label: '广告信息',
+            data: [
+                {
+                    title: '广告组', dataIndex: 'campaignId', label: '广告信息', align: 'center', width: 100, default: 7,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '广告组名称', dataIndex: 'campaignName', label: '广告信息', align: 'center', width: 100, default: 8,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '广告名称', dataIndex: 'adName', label: '广告信息', align: 'center', width: 100, default: 9,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '广告ID', dataIndex: 'adId', label: '广告信息', align: 'center', width: 80, default: 6,
+                    render: (a: string) => (<WidthEllipsis value={a} isCopy />)
+                },
+                {
+                    title: '广告状态', dataIndex: 'adStatus', label: '广告信息', align: 'center', width: 95, default: 17,
+                    render: (a: string) => (<WidthEllipsis value={(ADSTATUSEnum as any)[a]} />)
+                },
+                {
+                    title: '项目名称', dataIndex: 'projectName', label: '广告信息', align: 'center', width: 75, default: 18,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '项目ID', dataIndex: 'projectId', label: '广告信息', align: 'center', width: 75,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '项目类型', dataIndex: 'adType', label: '广告信息', align: 'center', width: 75, default: 19,
+                    render: (a: string) => (<WidthEllipsis value={a === 'ALL' ? '所有广告' : a === 'SEARCH' ? '搜索广告' : '--'} />)
+                },
+                {
+                    title: '项目状态', dataIndex: 'proStatus', label: '广告信息', align: 'center', width: 75, default: 20,
+                    render: (a: string) => (<WidthEllipsis value={(PROJECTSTATUs as any)[a]} />)
+                },
+                {
+                    title: '推广目标', dataIndex: 'landingType', label: '广告信息', align: 'center', width: 100, default: 10,
+                    render: (a: string) => (<WidthEllipsis value={(LANDINGTYPE as any)[a]} />)
+                },
+                {
+                    title: '媒体平台', dataIndex: 'mediaPlatform', label: '广告信息', align: 'center', width: 80,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '出价方式', dataIndex: 'pricing', label: '广告信息', align: 'center', width: 80, default: 22,
+                    render: (a: string) => (<WidthEllipsis value={(PRICINGEnum as any)[a]} />)
+                },
+                {
+                    title: '当前出价', dataIndex: 'cpaBid', label: '广告信息', align: 'center', width: 75, default: 23, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '广告日预算', dataIndex: 'dayBudget', label: '广告信息', align: 'right', width: 75, default: 24, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '投放时间', dataIndex: 'startTime', label: '广告信息', align: 'center', width: 180, default: 31,
+                    render: (a: string, b: any) => b?.accountId === '总计' ? '--' : <WidthEllipsis value={a + (b?.endTime ? '~' + b?.endTime : '')} />
+                },
+                {
+                    title: '广告创建时间', dataIndex: 'promotionCreateTime', label: '广告信息', align: 'center', width: 130, default: 32,
+                    render: (a: string, b: any) => <WidthEllipsis value={a} />
+                },
+            ]
+        },
+        {
+            label: '消耗数据',
+            data: [
+                {
+                    title: '今日消耗', dataIndex: 'cost', label: '消耗数据', align: 'center', width: 85, default: 33, sorter: true,
+                    className: 'padding_0',
+                    render: (a: number) => <div style={{ height: 27, position: 'relative' }}>
+                        <Progress
+                            strokeColor={{
+                                from: '#ff5900',
+                                to: '#ffd380',
+                            }}
+                            status="active"
+                            showInfo={false}
+                            percent={a ? a / 20000 * 100 : 0}
+                        />
+                        <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0, padding: '0 5px' }}><Statistic value={a || 0} valueStyle={a >= 20000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }} /></span>
+                    </div>
+                },
+                {
+                    title: '广告总消耗', dataIndex: 'adTotalCost', label: '消耗数据', align: 'center', width: 85, default: 34, sorter: true,
+                    className: 'padding_0',
+                    render: (a: number) => <div style={{ height: 27, position: 'relative' }}>
+                        <Progress
+                            strokeColor={{
+                                from: '#10c1e9',
+                                to: '#6892d0',
+                            }}
+                            status="active"
+                            showInfo={false}
+                            percent={a ? a / 20000 * 100 : 0}
+                        />
+                        <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0, padding: '0 5px' }}><Statistic value={a || 0} valueStyle={a >= 20000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }} /></span>
+                    </div>
+                }
+            ]
+        },
+        {
+            label: '广告媒体端数据',
+            data: [
+                {
+                    title: '转化目标', dataIndex: 'convertTarget', label: '广告媒体端数据', align: 'center', width: 65, default: 25, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a} />
+                },
+                {
+                    title: '转化目标量', dataIndex: 'convertCount', label: '广告媒体端数据', align: 'center', width: 65, default: 40, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '转化目标成本', dataIndex: 'convertCost', label: '广告媒体端数据', align: 'center', width: 65, default: 27, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '转化目标率', dataIndex: 'convertRate', label: '广告媒体端数据', align: 'center', width: 70, default: 26, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '激活数', dataIndex: 'active', label: '广告媒体端数据', align: 'center', width: 65, default: 41, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活成本', dataIndex: 'activeCost', label: '广告媒体端数据', align: 'right', width: 75, default: 42, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活率', dataIndex: 'activeRate', label: '广告媒体端数据', align: 'center', width: 70, default: 43, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '注册数', dataIndex: 'register', label: '广告媒体端数据', align: 'center', width: 65, default: 49, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册成本(广告)', dataIndex: 'activeRegisterCost', label: '广告媒体端数据', align: 'right', width: 75, default: 50, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册率', dataIndex: 'activeRegisterRate', label: '广告媒体端数据', align: 'center', width: 70, default: 51, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '关键行为数', dataIndex: 'gameAddiction', label: '广告媒体端数据', align: 'center', width: 65, default: 46, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '关键行为成本', dataIndex: 'gameAddictionCost', label: '广告媒体端数据', align: 'right', width: 75, default: 44, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '关键行为率', dataIndex: 'gameAddictionRate', label: '广告媒体端数据', align: 'center', width: 70, default: 45, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '次留成本', dataIndex: 'attributionNextDayOpenCost', label: '广告媒体端数据', align: 'right', width: 75, default: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '次日留存数', dataIndex: 'attributionNextDayOpenCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '次留率(广告)', dataIndex: 'attributionNextDayOpenRate', label: '广告媒体端数据', align: 'center', width: 70, default: 72, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '次留回传数', dataIndex: 'nextDayOpen', label: '广告媒体端数据', align: 'center', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '2日留存数', dataIndex: 'attributionRetention2dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '2日留存成本', dataIndex: 'attributionRetention2dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '2日留存率', dataIndex: 'attributionRetention2dRate', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '3日留存数', dataIndex: 'attributionRetention3dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '3日留存成本', dataIndex: 'attributionRetention3dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '3日留存率', dataIndex: 'attributionRetention3dRate', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '4日留存数', dataIndex: 'attributionRetention4dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '4日留存成本', dataIndex: 'attributionRetention4dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '4日留存率', dataIndex: 'attributionRetention4dRate', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '5日留存数', dataIndex: 'attributionRetention5dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '5日留存成本', dataIndex: 'attributionRetention5dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '5日留存率', dataIndex: 'attributionRetention5dRate', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '6日留存数', dataIndex: 'attributionRetention6dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '6日留存成本', dataIndex: 'attributionRetention6dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '6日留存率', dataIndex: 'attributionRetention6dRate', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '7日留存数', dataIndex: 'attributionRetention7dCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '7日留存成本', dataIndex: 'attributionRetention7dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '7日留存总数', dataIndex: 'attributionRetention7dSumCnt', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, default: 74, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '7日留存率', dataIndex: 'attributionRetention7dTotalCost', label: '广告媒体端数据', align: 'center', width: 70, sorter: true, className: "adDataBackColorClass",
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '7日留存总成本', dataIndex: 'attributionRetention7dCost', label: '广告媒体端数据', align: 'right', width: 75, sorter: true, default: 73, className: "adDataBackColorClass",
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+            ]
+        },
+        {
+            label: '小程序/小游戏变现指标',
+            data: [
+                {
+                    title: '小程序/小游戏当日LTV(首日)', dataIndex: 'attributionMicroGame0dLtv', label: '小程序/小游戏变现指标', align: 'center', width: 85,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '小程序/小游戏激活后三日LTV', dataIndex: 'attributionMicroGame3dLtv', label: '小程序/小游戏变现指标', align: 'center', width: 85,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '小程序/小游戏当日(首日)广告变现ROI', dataIndex: 'attributionMicroGame0dRoi', label: '小程序/小游戏变现指标', align: 'center', width: 95, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '小程序/小游戏激活后三日广告变现ROI', dataIndex: 'attributionMicroGame3dRoi', label: '小程序/小游戏变现指标', align: 'center', width: 95, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '小程序/小游戏激活后七日广告变现ROI', dataIndex: 'attributionMicroGame7dRoi', label: '小程序/小游戏变现指标', align: 'center', width: 95, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '小程序/小游戏激活后七日LTV', dataIndex: 'attributionMicroGame7dLtv', label: '小程序/小游戏变现指标', align: 'center', width: 85,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+            ]
+        },
+        {
+            label: '应用端数据指标',
+            data: [
+                {
+                    title: '项目预算', dataIndex: 'proBudget', label: '应用端数据指标', align: 'right', width: 75, default: 28, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '预算类型', dataIndex: 'budgetMode', label: '应用端数据指标', align: 'center', width: 70, default: 29, className: 'payDataBackColorClass',
+                    render: (a: string) => (<WidthEllipsis value={a === 'BUDGET_MODE_DAY' ? '日预算' : a === 'BUDGET_MODE_TOTAL' ? '总预算' : '--'} />)
+                },
+                {
+                    title: '深度转化ROI系数', dataIndex: 'roiGoal', label: '应用端数据指标', align: 'center', width: 75, default: 30, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '曝光量', dataIndex: 'showCount', label: '应用端数据指标', align: 'center', width: 70, default: 35, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '点击量', dataIndex: 'click', label: '应用端数据指标', align: 'center', width: 70, default: 36, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '点击率', dataIndex: 'ctr', label: '应用端数据指标', align: 'center', width: 70, default: 37, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '点击均价', dataIndex: 'avgClickCost', label: '应用端数据指标', align: 'center', width: 65, default: 38, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '千次曝光成本', dataIndex: 'avgShowCost', label: '应用端数据指标', align: 'right', width: 65, default: 39, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '今日注册人数', dataIndex: 'todayRegUser', label: '应用端数据指标', align: 'center', width: 65, default: 47, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '广告总注册人数', dataIndex: 'totalRegUser', label: '应用端数据指标', align: 'center', width: 65, default: 48, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册成本(应用)', dataIndex: 'regCost', label: '应用端数据指标', align: 'right', width: 75, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '人均新增成本', dataIndex: 'totalRegCost', label: '应用端数据指标', align: 'right', width: 75, default: 52, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册首日广告变现人数', dataIndex: 'regFirstUser', label: '应用端数据指标', align: 'center', width: 85, default: 53, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册首日广告变现次数', dataIndex: 'regFirstCnt', label: '应用端数据指标', align: 'center', width: 85, default: 54, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册首日广告变现金额', dataIndex: 'regFirstAmount', label: '应用端数据指标', align: 'right', width: 85, default: 55, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册首日变现ROI', dataIndex: 'regFirstRoi', label: '应用端数据指标', align: 'center', width: 70, default: 56, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '注册24小时广告变现人数', dataIndex: 'regTwentyFourUser', label: '应用端数据指标', align: 'center', width: 85, default: 57, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册24小时广告变现次数', dataIndex: 'regTwentyFourCnt', label: '应用端数据指标', align: 'center', width: 85, default: 58, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册24小时广告变现金额', dataIndex: 'regTwentyFourAmount', label: '应用端数据指标', align: 'right', width: 85, default: 59, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册24小时变现ROI', dataIndex: 'regTwentyFourRoi', label: '应用端数据指标', align: 'center', width: 70, default: 60, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '注册3日广告变现人数', dataIndex: 'regThreeUser', label: '应用端数据指标', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册3日广告变现次数', dataIndex: 'regThreeCnt', label: '应用端数据指标', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册3日广告变现金额', dataIndex: 'regThreeAmount', label: '应用端数据指标', align: 'right', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册3日变现ROI', dataIndex: 'regThreeRoi', label: '应用端数据指标', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '注册7日广告变现人数', dataIndex: 'regSevenUser', label: '应用端数据指标', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册7日广告变现次数', dataIndex: 'regSevenCnt', label: '应用端数据指标', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册7日广告变现金额', dataIndex: 'regSevenAmount', label: '应用端数据指标', align: 'right', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册7日变现ROI', dataIndex: 'regSevenRoi', label: '应用端数据指标', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '累计首日广告变现人数', dataIndex: 'regTotalUser', label: '应用端数据指标', align: 'center', width: 85, default: 61, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '累计广告变现次数', dataIndex: 'regTotalCnt', label: '应用端数据指标', align: 'center', width: 85, default: 62, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '累计广告变现金额', dataIndex: 'regTotalAmount', label: '应用端数据指标', align: 'right', width: 85, default: 63, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '累计广告变现ROI', dataIndex: 'regTotalRoi', label: '应用端数据指标', align: 'center', width: 70, default: 64, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '首日新增ARPU', dataIndex: 'firstNewArpu', label: '应用端数据指标', align: 'center', width: 80, default: 65, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '广告总ARPU', dataIndex: 'adTotalArpu', label: '应用端数据指标', align: 'center', width: 80, default: 66, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '首日ecpm', dataIndex: 'firstEcpm', label: '应用端数据指标', align: 'center', width: 80, default: 67, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number, b: any) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '总ecpm', dataIndex: 'totalEcpm', label: '应用端数据指标', align: 'center', width: 80, default: 68, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number, b: any) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '人均广告有效观看次数', dataIndex: 'userAvgLookCnt', label: '应用端数据指标', align: 'center', width: 85, default: 69, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '用户广告转化率', dataIndex: 'userAdConvertRate', label: '应用端数据指标', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                
+                {
+                    title: '次日留存率(应用)', dataIndex: 'active2Rate', label: '应用端数据指标', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '次日留存人数', dataIndex: 'active2User', label: '应用端数据指标', align: 'center', width: 75, default: 71, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: string) => <Statistic value={a || 0} />
+                }
+            ]
+        }
+    ]
+}
+
+export default columns12

+ 3 - 3
src/pages/iaaData/tencentIaa/adList/tableConfig.tsx

@@ -105,7 +105,7 @@ function columns12(dayHandle: (data: any) => void, onChange?: () => void): { lab
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '今日消耗', dataIndex: 'cost', label: '腾讯广告列表', align: 'center', width: 85, default: 20, sorter: true, 
+                    title: '今日消耗', dataIndex: 'cost', label: '腾讯广告列表', align: 'center', width: 85, default: 20, sorter: true,
                     className: 'padding_0',
                     render: (a: number) => <div style={{ height: 27, position: 'relative' }}>
                         <Progress
@@ -563,10 +563,10 @@ function columns12(dayHandle: (data: any) => void, onChange?: () => void): { lab
                     render: (_: number, b: any) => {
                         if (b?.accountId === '总计') return '--'
                         return <Space>
-                            <a onClick={() => dayHandle(b)}>广告每日监控</a>
+                            <a onClick={() => dayHandle(b)} style={{ fontSize: 12 }}>广告每日监控</a>
                             <a onClick={() => {
                                 window.open(`https://ad.qq.com/atlas/${b?.accountId}/admanage/adgroup?tab=adgroup&query={%22operation_status%22:[%22CALCULATE_STATUS_EXCLUDE_DEL%22],%22system_status%22:[],%22search_name%22:%22${b.promotionId}%22}`)
-                            }}>腾讯广告</a>
+                            }} style={{ fontSize: 12 }}>腾讯广告</a>
                         </Space>
                     }
                 },

+ 33 - 49
src/pages/iaaData/tencentIaa/appCashRetained/tableConfig.tsx

@@ -5,10 +5,11 @@ import { PRODUCT_TYPE_ENUM } from "../../const"
 import { formatSecondsToTime } from "@/utils/utils"
 import style from './index.less'
 import moment from "moment"
+import { ACCOUNTTYPE, APPTYPE } from "@/pages/iaaSystem/manage/const"
 
 function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
 
-    const defaultIndex = 26
+    const defaultIndex = 23
     const trend = [1, 2, 3, 4, 5, 6, 7, 14, 30, 45, 60, 75, 90].map((index, count) => {
 
         const dataIndex = `d${index}`
@@ -56,12 +57,20 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     title: '业务类型', dataIndex: 'productType', label: '基本信息', align: 'center', width: 80, default: 4,
                     render: (a: string) => (<WidthEllipsis value={PRODUCT_TYPE_ENUM[a as keyof typeof PRODUCT_TYPE_ENUM]} />)
                 },
-                // {
-                //     title: '变现广告位', dataIndex: 'realizationAdUnit', label: '基本信息', align: 'center', width: 90, default: 5,
-                //     render: (a: string) => <WidthEllipsis value={a} />
-                // },
                 {
-                    title: '总消耗', dataIndex: 'totalCost', label: '基本信息', align: 'right', width: 95, default: 6, sorter: true,
+                    title: '应用类型', dataIndex: 'appType', label: '基本信息', align: 'center', width: 80, default: 5,
+                    render: (a: string) => (<WidthEllipsis value={APPTYPE[a as keyof typeof APPTYPE]?.text} />)
+                },
+                {
+                    title: '推广媒体', dataIndex: 'accountType', label: '基本信息', align: 'center', width: 80, default: 6,
+                    render: (a: string) => (<WidthEllipsis value={ACCOUNTTYPE[a as keyof typeof ACCOUNTTYPE]?.text} />)
+                },
+                {
+                    title: '变现广告位', dataIndex: 'realizationAdUnit', label: '基本信息', align: 'center', width: 80, default: 7,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '总消耗', dataIndex: 'totalCost', label: '基本信息', align: 'right', width: 95, default: 8, sorter: true,
                     className: 'padding_0',
                     render: (a: number) => <div style={{ height: 53.8, position: 'relative' }}>
                         <Progress
@@ -73,11 +82,11 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                             showInfo={false}
                             percent={a ? a / 20000 * 100 : 0}
                         />
-                        <span style={{ position: 'absolute', left: '50%', top: '50%', width: '100%', padding: '0 5px', transform: 'translate(-50%, -50%)' }}><Statistic value={a || 0} precision={2} valueStyle={a >= 20000 ? { color: '#000', fontWeight: 'bold' } : { fontWeight: 'bold' }} /></span>
+                        <span style={{ position: 'absolute', left: '50%', top: '50%', width: '100%', padding: '0 5px', transform: 'translate(-50%, -50%)' }}><Statistic style={{ fontWeight: 'bold' }} value={a || 0} precision={2} valueStyle={a >= 20000 ? { color: '#000', fontWeight: 'bold' } : { fontWeight: 'bold' }} /></span>
                     </div>
                 },
                 {
-                    title: '消耗', dataIndex: 'cost', label: '基本信息', align: 'right', width: 85, default: 7, sorter: true,
+                    title: '消耗', dataIndex: 'cost', label: '基本信息', align: 'right', width: 85, default: 9, sorter: true,
                     className: 'padding_0',
                     render: (a: number) => <div style={{ height: 53.8, position: 'relative' }}>
                         <Progress
@@ -93,81 +102,56 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     </div>
                 },
                 {
-                    title: '赔付金', dataIndex: 'payout', label: '基本信息', align: 'right', width: 80, default: 8, sorter: true,
+                    title: '赔付金', dataIndex: 'payout', label: '基本信息', align: 'right', width: 80, default: 10, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '注册人数', dataIndex: 'userRegCnt', label: '基本信息', align: 'center', width: 80, default: 9, sorter: true,
+                    title: '注册人数', dataIndex: 'userRegCnt', label: '基本信息', align: 'center', width: 80, default: 11, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '注册成本', dataIndex: 'regPaid', label: '基本信息', align: 'center', width: 80, default: 10, sorter: true,
+                    title: '注册成本', dataIndex: 'regPaid', label: '基本信息', align: 'center', width: 80, default: 12, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '注册用户留存人数', dataIndex: 'userRetentionCnt', label: '基本信息', align: 'center', width: 80, default: 11, sorter: true,
+                    title: '今日留存人数', dataIndex: 'userRetentionCnt', label: '基本信息', align: 'center', width: 80, default: 13, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '注册用户留存率', dataIndex: 'userRetentionRatio', label: '基本信息', align: 'center', width: 80, default: 12, sorter: true,
+                    title: '今日留存率', dataIndex: 'userRetentionCntRatio', label: '基本信息', align: 'center', width: 80, default: 14, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '广告变现人数', dataIndex: 'appAdPayingUsers', label: '基本信息', align: 'center', width: 75, default: 13, sorter: true,
+                    title: '首日广告变现人数', dataIndex: 'appAdPayingUsers', label: '基本信息', align: 'center', width: 75, default: 15, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} />
                 },
+
                 {
-                    title: '人均在线时长', dataIndex: 'avgDuration', label: '基本信息', align: 'center', width: 110, default: 14, sorter: true,
-                    render: (a: number, b: any) => {
-                        return b.dt === '总计' ? '--' : formatSecondsToTime(a ? Math.round(a) : 0)
-                    }
-                },
-                {
-                    title: '人均启动次数', dataIndex: 'avgStartTimes', label: '基本信息', align: 'center', width: 70, default: 15, sorter: true,
-                    render: (a: number, b: any) => b.dt === '总计' ? '--' : <Statistic value={a || 0} />
-                },
-                {
-                    title: '人均观看广告次数', dataIndex: 'avgAdViewTimes', label: '基本信息', align: 'center', width: 80, default: 16, sorter: true,
-                    render: (a: number, b: any) => b.dt === '总计' ? '--' : <Statistic value={a || 0} />
-                },
-                {
-                    title: '广告变现UV', dataIndex: 'adMonetizeUv', label: '基本信息', align: 'center', width: 75, default: 17, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} precision={2} />
-                },
-                {
-                    title: 'ecpm', dataIndex: 'ecpm', label: '基本信息', align: 'center', width: 80, default: 18, sorter: true,
-                    render: (a: number, b: any) => b.dt === '总计' ? '--' : <Statistic value={a || 0} precision={2} />
-                },
-                {
-                    title: '广告渗透率', dataIndex: 'adPermeability', label: '基本信息', align: 'center', width: 75, default: 19, sorter: true,
-                    render: (a: number, b: any) => b.dt === '总计' ? '--' : <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                    title: '总ecpm', dataIndex: 'totalEcpm', label: '基本信息', align: 'center', width: 80, default: 16, sorter: true,
+                    render: (a: number, b: any) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '广告ARPU', dataIndex: 'adArpu', label: '基本信息', align: 'center', width: 80, default: 20, sorter: true,
+                    title: '总arpu', dataIndex: 'totalArpu', label: '基本信息', align: 'center', width: 80, default: 17, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '广告曝光量', tips: '总收入/ecpm*1000', dataIndex: 'adViewCount', label: '基本信息', align: 'center', width: 80, default: 21, sorter: true,
-                    render: (a: number, b: any) => b.dt === '总计' ? '--' : <Statistic value={a || 0} />
+                    title: '广告总曝光量', dataIndex: 'viewTotal', label: '基本信息', align: 'center', width: 80, default: 18, sorter: true,
+                    render: (a: number, b: any) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总收入', dataIndex: 'income', label: '基本信息', align: 'right', width: 80, default: 22, sorter: true,
+                    title: '累计总收入', dataIndex: 'totalIncome', label: '基本信息', align: 'right', width: 80, default: 19, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '总回收', dataIndex: 'incomeRoi', label: '基本信息', align: 'right', width: 80, default: 23, sorter: true,
+                    title: '累计总回收', dataIndex: 'totalIncomRoi', label: '基本信息', align: 'right', width: 80, default: 20, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '广告变现收入', dataIndex: 'adIncome', label: '基本信息', align: 'center', width: 75, default: 24, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} precision={2} />
-                },
-                {
-                    title: '分享成功人数', dataIndex: 'shareUv', label: '基本信息', align: 'center', width: 75, default: 25, sorter: true,
+                    title: '分享成功人数', dataIndex: 'shareUv', label: '基本信息', align: 'center', width: 75, default: 21, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '分享后活跃人数', dataIndex: 'shareClkUv', label: '基本信息', align: 'center', width: 80, default: 26, sorter: true,
+                    title: '分享后活跃人数', dataIndex: 'shareClkUv', label: '基本信息', align: 'center', width: 80, default: 22, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} />
                 },
                 ...trend

+ 11 - 0
src/services/gameData/index.ts

@@ -227,6 +227,17 @@ export async function newEditAdqAdgroupsDataApi(data: EditAdqAdgroupsProps) {
     });
 }
 
+export interface EditTTAdgroupsProps {
+    suspend: boolean
+    accountAdgroupMaps: string[] // "广告id和广告账号id的映射关系字符串 (逗号拼接)"
+}
+export async function newEditTTAdgroupsDataApi(data: EditTTAdgroupsProps) {
+    return request(api + `/oceanengine/ad/modifyStatusBatch`, {
+        method: 'POST',
+        data
+    });
+}
+
 /**
  * 批量修改创意信息
  * @param data 

+ 60 - 0
src/services/iaaData/index.ts

@@ -295,4 +295,64 @@ export async function getPutUserTxEveryDayTotalApi(data: getPutUserTxEveryDayLis
         method: 'POST',
         data
     });
+}
+
+
+/**********************头条************************/
+
+export interface GetByteAdListProps extends Paging, SortProps {
+    accountId?: string
+    putUserIdList?: number[]   // 投手ID列表
+    adId?: number       // 广告ID
+    adName?: string     // 广告账名称
+    adStatus?: string            // 广告状态
+    pricing?: string           // 出价方式
+    adCreateBegin?: string     // 广告创建时间
+    adCreateEnd?: string
+    deleted?: boolean          // 删除状态
+    putDayBegin?: string       // 投放时间
+    putDayEnd?: string
+    costDayBegin?: string      // 消耗时间
+    costDayEnd?: string
+}
+/**
+ * 头条广告列表
+ * @param data 
+ * @returns 
+ */
+export async function getByteAdListApi(data: GetByteAdListProps) {
+    return request(wapi + `/monitor/byte/ad/listOfPage`, {
+        method: 'POST',
+        data
+    });
+}
+
+/**
+ * 总计
+ * @param data 
+ * @returns 
+ */
+export async function getByteAdTotalApi(data: GetByteAdListProps) {
+    return request(wapi + `/monitor/byte/ad/total`, {
+        method: 'POST',
+        data
+    });
+}
+
+
+export interface GetByteAdEveryListProps extends Paging, SortProps {
+    adId: string,
+    costDayBegin?: string
+    costDayEnd?: string
+}
+/**
+ * 没日数据
+ * @param data 
+ * @returns 
+ */
+export async function getByteAdEveryListApi(data: GetByteAdEveryListProps) {
+    return request(wapi + `/monitor/byte/ad/daily/detail`, {
+        method: 'POST',
+        data
+    });
 }