import React from 'react'
import { Badge, Space, Statistic, Switch, Tooltip } from 'antd'
import '../../launchSystemNew/adq/index.less'
import { copy } from '@/utils/utils'
import { ColumnsType } from 'antd/lib/table'
import StatisticNull from '@/components/StatisticNull'
import { QuestionCircleOutlined } from '@ant-design/icons'
import { DELIVERY_MODE, DYNAMIC_CREATIVE_TYPE } from '../adqv3/const'
import { creativeTemplate } from '../tencentAdPutIn/const'
import CreativePreview from './CreativePreview'
import { AdUnitType_Enum } from '@/pages/launchSystemNew/account/const'

function tableDynamicConfig(
    suspendHandle: (b: any, suspend: '启动' | '暂停') => void
): ColumnsType<any> {

    let adArr: ColumnsType<any> = [
        {
            title: '启停',
            dataIndex: 'configured_status',
            key: 'configured_status',
            align: 'center',
            width: 40,
            fixed: 'left',
            render: (a: string, b: any) => {
                if (b?.account_id === '总计') {
                    return '--'
                }
                return <Switch size="small" checked={a === 'AD_STATUS_NORMAL'} onChange={(checked) => { suspendHandle(b, checked ? '启动' : '暂停') }} />
            }
        },
        {
            title: '所属账号',
            dataIndex: 'account_id',
            key: 'account_id',
            align: 'center',
            width: 80,
            ellipsis: true,
            render: (a: string) => {
                return <Space>
                    <a onClick={() => copy(a)} >{a}</a>
                </Space>
            }
        },
        {
            title: '广告ID',
            dataIndex: 'adgroup_id',
            key: 'adgroup_id',
            align: 'center',
            width: 100,
            ellipsis: true,
            render: (a: string, b: any) => {
                if (b?.account_id === '总计') {
                    return '--'
                }
                return <Space>
                    <a onClick={() => copy(a)} >{a}</a>
                </Space>
            }
        },
        {
            title: '创意ID',
            dataIndex: 'dynamic_creative_id',
            key: 'dynamic_creative_id',
            align: 'center',
            width: 100,
            ellipsis: true,
            render: (a: string, b: any) => {
                if (b?.account_id === '总计') {
                    return '--'
                }
                return <Space>
                    <a onClick={() => copy(a)} >{a}</a>
                </Space>
            }
        },
        {
            title: '投手',
            dataIndex: 'put_user_name',
            key: 'put_user_name',
            align: 'center',
            width: 70,
            ellipsis: true,
            render(value, record) {
                if (record?.account_id === '总计') return '--';
                return value
            },
        },
        {
            title: '广告名称',
            dataIndex: 'adgroup_name',
            key: 'adgroup_name',
            width: 280,
            ellipsis: true,
            render: (a: string, b: any) => {
                if (b?.account_id === '总计') return '--';
                return a
            }
        },
        {
            title: '创意名称',
            dataIndex: 'dynamic_creative_name',
            key: 'dynamic_creative_name',
            width: 280,
            ellipsis: true,
            render: (a: string, b: any) => {
                if (b?.account_id === '总计') return '--'
                return a
            }
        },
        {
            title: '投放模式',
            dataIndex: 'delivery_mode',
            key: 'delivery_mode',
            align: 'center',
            width: 120,
            render: (a: string) => {
                return DELIVERY_MODE[a as keyof typeof DELIVERY_MODE]
            }
        },
        {
            title: '创意形式匹配方式',
            dataIndex: 'dynamic_creative_type',
            key: 'dynamic_creative_type',
            align: 'center',
            width: 120,
            render: (a: string) => {
                return DYNAMIC_CREATIVE_TYPE[a as keyof typeof DYNAMIC_CREATIVE_TYPE]
            }
        },
        {
            title: '是否已删除',
            dataIndex: 'is_deleted',
            key: 'is_deleted',
            align: 'center',
            width: 60,
            render: (a: any, b: any) => {
                if (b?.account_id === '总计') return '--';
                return <Badge status={!a ? "processing" : "error"} text={a ? '是' : '否'} />
            }
        },
        {
            title: '创意形式',
            dataIndex: 'creative_template_id',
            key: 'creative_template_id',
            align: 'center',
            width: 120,
            ellipsis: true,
            render: (a: string) => {
                return creativeTemplate[a as keyof typeof creativeTemplate] || '--'
            }
        },
        {
            title: '创建时间',
            dataIndex: 'created_time',
            key: 'created_time',
            align: 'center',
            width: 140,
            ellipsis: true,
        },
        {
            title: '创意预览',
            dataIndex: 'creative_components_json',
            key: 'creative_components_json',
            width: 140,
            ellipsis: true,
            render: (_: any, b: any) => {
                return <CreativePreview creativePreview={b?.creative_components ? [b?.creative_components] : []} deliveryMode={[b?.delivery_mode]} />
            }
        },
        {
            title: '业务单元类型',
            dataIndex: 'ad_unit_type',
            key: 'ad_unit_type',
            align: 'center',
            width: 75,
            render: (a: string) => {
                return AdUnitType_Enum[a as keyof typeof AdUnitType_Enum] || '--'
            }
        },
        {
            title: '操作',
            dataIndex: 'cz',
            key: 'cz',
            width: 130,
            align: 'center',
            render: (a: any, b: any) => {
                if (b?.account_id === '总计') return '--';
                return <Space>
                    {/* <Dropdown overlay={<Menu>
                        <Menu.Item><a onClick={() => log(b)}>告警日志</a></Menu.Item>
                        <Menu.Item><a onClick={() => handleTag(b)}>打标记</a></Menu.Item>
                        {b?.tag_value ? <Menu.Item><a style={{ color: 'red' }} onClick={() => delTag(b)}>删除标记</a></Menu.Item> : undefined}
                    </Menu>}>
                        <a><Space size={2}>更多 <DownOutlined /></Space></a>
                    </Dropdown> */}
                    <a style={{ color: '#1890ff' }} onClick={() => window.open(`https://ad.qq.com/atlas/${b?.account_id}/admanage/index?tab=adgroup&query={%22operation_status%22:[%22CALCULATE_STATUS_EXCLUDE_DEL%22],%22system_status%22:[],%22search_name%22:%22${b.adgroup_id}%22}`)} target="_blank">腾讯广告</a>
                </Space>
            }
        }
    ]

    let adDataArr: ColumnsType<any> = [
        {
            title: '消耗',
            dataIndex: 'cost_day',
            key: 'cost_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='cost_day' />
            }
        },
        {
            title: '曝光量',
            dataIndex: 'view_count_day',
            key: 'view_count_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='view_count_day' />
            }
        },
        {
            title: '点击量',
            dataIndex: 'valid_click_count_day',
            key: 'valid_click_count_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='valid_click_count_day' />
            }
        },
        {
            title: '公众号关注人数(点击归因)',
            dataIndex: 'from_follow_by_click_uv_day',
            key: 'from_follow_by_click_uv_day',
            align: 'center',
            width: 120,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='from_follow_by_click_uv_day' />
            }
        },
        {
            title: '公众号关注成本(点击归因)',
            dataIndex: 'from_follow_by_click_cost_day',
            key: 'from_follow_by_click_cost_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='from_follow_by_click_cost_day' precision={2} />
            }
        },
        {
            title: '公众号关注人数(平台上报)',
            dataIndex: 'biz_follow_uv_day',
            key: 'biz_follow_uv_day',
            align: 'center',
            width: 120,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='biz_follow_uv_day' />
            }
        },
        {
            title: '目标转化量',
            dataIndex: 'conversions_count_day',
            key: 'conversions_count_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='conversions_count_day' />
            }
        },
        {
            title: '目标转化成本',
            dataIndex: 'conversions_cost',
            key: 'conversions_cost',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='conversions_cost' precision={2} />
            }
        },
        {
            title: '深度目标转化量',
            dataIndex: 'deep_conversions_count_day',
            key: 'deep_conversions_count_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='deep_conversions_count_day' />
            }
        },
        {
            title: '加企业微信客服次数',
            dataIndex: 'scan_follow_count_day',
            key: 'scan_follow_count_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='scan_follow_count_day' />
            }
        },
        {
            title: '加企业微信客服人数',
            dataIndex: 'scan_follow_user_count_day',
            key: 'scan_follow_user_count_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='scan_follow_user_count_day' />
            }
        },
        {
            title: '下单次数',
            dataIndex: 'order_pv_day',
            key: 'order_pv_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_pv_day' />
            }
        },
        {
            title: '下单人数',
            dataIndex: 'order_uv_day',
            key: 'order_uv_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_uv_day' />
            }
        },
        {
            title: '下单金额',
            dataIndex: 'order_amount_day',
            key: 'order_amount_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_amount_day' precision={2} />
            }
        },
        {
            title: '下单次数(点击归因)',
            dataIndex: 'order_by_click_count_day',
            key: 'order_by_click_count_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_by_click_count_day' />
            }
        },
        {
            title: '下单人数(点击归因)',
            dataIndex: 'order_by_click_amount_day',
            key: 'order_by_click_amount_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_by_click_amount_day' />
            }
        },
        {
            title: '点击首日下单次数（点击归因）',
            dataIndex: 'first_day_order_by_click_count_day',
            key: 'first_day_order_by_click_count_day',
            align: 'center',
            width: 120,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='first_day_order_by_click_count_day' />
            }
        },
        {
            title: '点击首日付费次数',
            dataIndex: 'cheout_pv1d_day',
            key: 'cheout_pv1d_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='cheout_pv1d_day' />
            }
        },
        {
            title: '点击首日付费金额',
            dataIndex: 'cheout_fd_day',
            key: 'cheout_fd_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='cheout_fd_day' precision={2} />
            }
        },
        {
            title: '点击首日付费成本',
            dataIndex: 'cheout1d_cost_day',
            key: 'cheout1d_cost_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='cheout1d_cost_day' precision={2} />
            }
        },
        {
            title: '点击首日付费金额(平台上报)',
            dataIndex: 'purchase_pla_clk1d_amount_day',
            key: 'purchase_pla_clk1d_amount_day',
            align: 'center',
            width: 120,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='purchase_pla_clk1d_amount_day' precision={2} />
            }
        },
        {
            title: '点击首日下单次数(首日新增下单量)',
            dataIndex: 'first_day_order_count_day',
            key: 'first_day_order_count_day',
            align: 'center',
            width: 120,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='first_day_order_count_day' />
            }
        },
        {
            title: '首日新增下单金额(点击归因)',
            dataIndex: 'first_day_order_by_click_amount_day',
            key: 'first_day_order_by_click_amount_day',
            align: 'center',
            width: 120,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='first_day_order_by_click_amount_day' precision={2} />
            }
        },
        {
            title: '点击首日下单金额(首日新增下单金额)',
            dataIndex: 'first_day_order_amount_day',
            key: 'first_day_order_amount_day',
            align: 'center',
            width: 120,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='first_day_order_amount_day' precision={2} />
            }
        },
        {
            title: '点击7日下单次数',
            dataIndex: 'order_clk7d_pv_day',
            key: 'order_clk7d_pv_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_clk7d_pv_day' />
            }
        },
        {
            title: '点击7日下单金额',
            dataIndex: 'order_clk7d_amount_day',
            key: 'order_clk7d_amount_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_clk7d_amount_day' precision={2} />
            }
        },
        {
            title: '点击15日下单次数',
            dataIndex: 'order_clk15d_pv_day',
            key: 'order_clk15d_pv_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_clk15d_pv_day' />
            }
        },
        {
            title: '点击15日下单金额',
            dataIndex: 'order_clk15d_amount_day',
            key: 'order_clk15d_amount_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_clk15d_amount_day' precision={2} />
            }
        },
        {
            title: '点击30日下单次数',
            dataIndex: 'order_clk30d_pv_day',
            key: 'order_clk30d_pv_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_clk30d_pv_day' />
            }
        },
        {
            title: '点击30日下单金额',
            dataIndex: 'order_clk30d_amount_day',
            key: 'order_clk30d_amount_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_clk30d_amount_day' precision={2} />
            }
        },
        {
            title: '不感兴趣点击次数',
            dataIndex: 'no_interest_count_day',
            key: 'no_interest_count_day',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='no_interest_count_day' />
            }
        },
        {
            title: '千次曝光成本',
            dataIndex: 'thousand_display_price',
            key: 'thousand_display_price',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='thousand_display_price' precision={2} />
            }
        },
        {
            title: '点击均价',
            dataIndex: 'cpc',
            key: 'cpc',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='cpc' precision={2} />
            }
        },
        {
            title: '点击率',
            dataIndex: 'ctr',
            key: 'ctr',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.ctr !== undefined && b?.ctr !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '公众号关注率(点击归因)',
            dataIndex: 'biz_follow_rate_click',
            key: 'biz_follow_rate_click',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.biz_follow_rate_click !== undefined && b?.biz_follow_rate_click !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '公众号关注成本(平台上报)',
            dataIndex: 'biz_follow_cost',
            key: 'biz_follow_cost',
            align: 'center',
            width: 120,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='biz_follow_cost' precision={2} />
            }
        },
        {
            title: '公众号关注率(平台上报)',
            dataIndex: 'biz_follow_rate',
            key: 'biz_follow_rate',
            align: 'center',
            width: 120,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.biz_follow_rate !== undefined && b?.biz_follow_rate !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '目标转化率',
            dataIndex: 'conversions_rate',
            key: 'conversions_rate',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.conversions_rate !== undefined && b?.conversions_rate !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '深度目标转化率',
            dataIndex: 'deep_conversions_rate',
            key: 'deep_conversions_rate',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.deep_conversions_rate !== undefined && b?.deep_conversions_rate !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '加企业微信客服成本(人数)',
            dataIndex: 'scan_follow_user_cost',
            key: 'scan_follow_user_cost',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='scan_follow_user_cost' precision={2} />
            }
        },
        {
            title: '加企业微信客服率(人数)',
            dataIndex: 'scan_follow_user_rate',
            key: 'scan_follow_user_rate',
            align: 'center',
            width: 120,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.scan_follow_user_rate !== undefined && b?.scan_follow_user_rate !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '下单单价',
            dataIndex: 'order_unit_price',
            key: 'order_unit_price',
            align: 'center',
            width: 80,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_unit_price' precision={2} />
            }
        },
        {
            title: '下单率',
            dataIndex: 'order_rate',
            key: 'order_rate',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.order_rate !== undefined && b?.order_rate !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '下单成本',
            dataIndex: 'order_by_display_cost',
            key: 'order_by_display_cost',
            align: 'center',
            width: 80,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_by_display_cost' precision={2} />
            }
        },
        {
            title: '下单ROI',
            dataIndex: 'order_roi',
            key: 'order_roi',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.order_roi !== undefined && b?.order_roi !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '客单价',
            dataIndex: 'unit_price',
            key: 'unit_price',
            align: 'center',
            width: 80,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='unit_price' precision={2} />
            }
        },
        {
            title: '下单率(点击归因)',
            dataIndex: 'order_by_click_rate',
            key: 'order_by_click_rate',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.order_by_click_rate !== undefined && b?.order_by_click_rate !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '下单成本(点击归因)',
            dataIndex: 'order_by_click_cost',
            key: 'order_by_click_cost',
            align: 'center',
            width: 80,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_by_click_cost' precision={2} />
            }
        },
        {
            title: '下单ROI(点击归因)',
            dataIndex: 'order_by_click_roi',
            key: 'order_by_click_roi',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.order_by_click_roi !== undefined && b?.order_by_click_roi !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '点击首日付费率',
            dataIndex: 'cheout_1d_rate',
            key: 'cheout_1d_rate',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.cheout_1d_rate !== undefined && b?.cheout_1d_rate !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '点击首日付费ROI',
            dataIndex: 'cheout_fd_reward',
            key: 'cheout_fd_reward',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.cheout_fd_reward !== undefined && b?.cheout_fd_reward !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '点击30日下单单价',
            dataIndex: 'order_clk_30d_unit_price',
            key: 'order_clk_30d_unit_price',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_clk_30d_unit_price' precision={2} />
            }
        },
        {
            title: '点击15日下单单价',
            dataIndex: 'order_clk_15d_unit_price',
            key: 'order_clk_15d_unit_price',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_clk_15d_unit_price' precision={2} />
            }
        },
        {
            title: '点击7日下单单价',
            dataIndex: 'order_clk_7d_unit_price',
            key: 'order_clk_7d_unit_price',
            align: 'center',
            width: 100,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='order_clk_7d_unit_price' precision={2} />
            }
        },
        {
            title: '点击30日下单ROI',
            dataIndex: 'order_clk_30d_roi',
            key: 'order_clk_30d_roi',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.order_clk_30d_roi !== undefined && b?.order_clk_30d_roi !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '点击15日下单ROI',
            dataIndex: 'order_clk_15d_roi',
            key: 'order_clk_15d_roi',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.order_clk_15d_roi !== undefined && b?.order_clk_15d_roi !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '点击7日下单ROI',
            dataIndex: 'order_clk_7d_roi',
            key: 'order_clk_7d_roi',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.order_clk_7d_roi !== undefined && b?.order_clk_7d_roi !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: <Space>
                <span>点击首日下单ROI</span>
                <Tooltip title="首日新增下单ROI">
                    <QuestionCircleOutlined />
                </Tooltip>
            </Space>,
            dataIndex: 'first_day_order_roi',
            key: 'first_day_order_roi',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.first_day_order_roi !== undefined && b?.first_day_order_roi !== null) {
                    return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
    ]

    let iaaDataArr: ColumnsType<any> = [
        {
            title: '激活首24小时广告变现ARPPU(平台上报)',
            dataIndex: 'first_day_ad_pur_arppu_cost24h_pla',
            key: 'first_day_ad_pur_arppu_cost24h_pla',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='first_day_ad_pur_arppu_cost24h_pla' />
            }
        },
        {
            title: '激活首24小时广告变现ROI(平台上报)',
            dataIndex: 'income_roi124h_pla',
            key: 'income_roi124h_pla',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.income_roi124h_pla !== undefined && b?.income_roi124h_pla !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '激活首24小时广告变现次数(平台上报)',
            dataIndex: 'income_pv24h_pla_day',
            key: 'income_pv24h_pla_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='income_pv24h_pla_day' />
            }
        },
        {
            title: '激活首日广告变现次数(平台上报)',
            dataIndex: 'income_pv1d_pla_day',
            key: 'income_pv1d_pla_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='income_pv1d_pla_day' />
            }
        },
        {
            title: '激活3日广告变现次数(平台上报)',
            dataIndex: 'ad_monetization_pla_dedup_active3d_pv_day',
            key: 'ad_monetization_pla_dedup_active3d_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_monetization_pla_dedup_active3d_pv_day' />
            }
        },
        {
            title: '激活7日广告变现次数(平台上报)',
            dataIndex: 'minigame7d_income_count_day',
            key: 'minigame7d_income_count_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='minigame7d_income_count_day' />
            }
        },
        {
            title: '注册3日广告变现次数(平台上报)',
            dataIndex: 'minigame3d_income_count_day',
            key: 'minigame3d_income_count_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='minigame3d_income_count_day' />
            }
        },
        {
            title: '激活首24小时广告变现金额(平台上报)',
            dataIndex: 'income_val24h_pla_day',
            key: 'income_val24h_pla_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='income_val24h_pla_day' />
            }
        },
        {
            title: '注册首日广告变现金额(平台上报)',
            dataIndex: 'mini_game_first_day_ad_monetization_amount_day',
            key: 'mini_game_first_day_ad_monetization_amount_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_first_day_ad_monetization_amount_day' />
            }
        },
        {
            title: '激活7日广告变现金额(平台上报)',
            dataIndex: 'mini_game_ad_monetization_amount_d7_day',
            key: 'mini_game_ad_monetization_amount_d7_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_ad_monetization_amount_d7_day' />
            }
        },
        {
            title: '激活14日广告变现金额(平台上报)',
            dataIndex: 'mini_game_ad_monetization_amount_d14_day',
            key: 'mini_game_ad_monetization_amount_d14_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_ad_monetization_amount_d14_day' />
            }
        },
        {
            title: '广告变现金额(平台上报)',
            dataIndex: 'mini_game_ad_monetization_amount_day',
            key: 'mini_game_ad_monetization_amount_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_ad_monetization_amount_day' />
            }
        },
        {
            title: '激活首24小时广告变现人数(平台上报)',
            dataIndex: 'ad_paying_users24h_pla_day',
            key: 'ad_paying_users24h_pla_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_paying_users24h_pla_day' />
            }
        },
        {
            title: '激活首日广告变现人数(平台上报)',
            dataIndex: 'ad_monetization_pla_dedup_active1d_pv_day',
            key: 'ad_monetization_pla_dedup_active1d_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_monetization_pla_dedup_active1d_pv_day' />
            }
        },
        {
            title: '激活7日变现人数(平台上报)',
            dataIndex: 'ad_monetization_pla_dedup_active7d_pv_day',
            key: 'ad_monetization_pla_dedup_active7d_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_monetization_pla_dedup_active7d_pv_day' />
            }
        },
        {
            title: '激活首24小时广告变现ARPPU',
            dataIndex: 'first_day_ad_pur_arppu_cost24h',
            key: 'first_day_ad_pur_arppu_cost24h',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='first_day_ad_pur_arppu_cost24h' />
            }
        },
        {
            title: '激活首日广告变现ARPPU',
            dataIndex: 'first_day_ad_pur_arppu_cost',
            key: 'first_day_ad_pur_arppu_cost',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='first_day_ad_pur_arppu_cost' />
            }
        },
        {
            title: '广告变现ARPPU',
            dataIndex: 'ad_monetization_arppu',
            key: 'ad_monetization_arppu',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_monetization_arppu' />
            }
        },
        {
            title: '激活首24小时广告变现ROI',
            dataIndex: 'income_roi124h',
            key: 'income_roi124h',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.income_roi124h !== undefined && b?.income_roi124h !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '激活首日广告变现ROI',
            dataIndex: 'income_roi1',
            key: 'income_roi1',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.income_roi1 !== undefined && b?.income_roi1 !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '激活3日广告变现ROI',
            dataIndex: 'income_roi3',
            key: 'income_roi3',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.income_roi3 !== undefined && b?.income_roi3 !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '激活7日广告变现ROI',
            dataIndex: 'income_roi7',
            key: 'income_roi7',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.income_roi7 !== undefined && b?.income_roi7 !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '激活14日广告变现ROI',
            dataIndex: 'income_roi14',
            key: 'income_roi14',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.income_roi14 !== undefined && b?.income_roi14 !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '广告变现ROI',
            dataIndex: 'ad_monetization_roi',
            key: 'ad_monetization_roi',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.ad_monetization_roi !== undefined && b?.ad_monetization_roi !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '激活首日广告变现成本(人数)',
            dataIndex: 'ad_paying_cost_d1',
            key: 'ad_paying_cost_d1',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_paying_cost_d1' />
            }
        },
        {
            title: '广告变现成本',
            dataIndex: 'ad_monetization_cost',
            key: 'ad_monetization_cost',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_monetization_cost' />
            }
        },
        {
            title: '激活3日广告变现次数',
            dataIndex: 'ad_monetization_active3d_pv_day',
            key: 'ad_monetization_active3d_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_monetization_active3d_pv_day' />
            }
        },
        {
            title: '激活7日广告变现次数',
            dataIndex: 'ad_monetization_active7d_pv_day',
            key: 'ad_monetization_active7d_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_monetization_active7d_pv_day' />
            }
        },
        {
            title: '广告变现次数(平台上报)',
            dataIndex: 'income_pv_pla_day',
            key: 'income_pv_pla_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='income_pv_pla_day' />
            }
        },
        {
            title: '激活首24小时广告变现金额',
            dataIndex: 'income_val24h_day',
            key: 'income_val24h_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='income_val24h_day' />
            }
        },
        {
            title: '激活首日广告变现金额',
            dataIndex: 'income_val1_day',
            key: 'income_val1_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='income_val1_day' />
            }
        },
        {
            title: '激活3日广告变现金额',
            dataIndex: 'income_val3_day',
            key: 'income_val3_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='income_val3_day' />
            }
        },
        {
            title: '激活7日广告变现金额',
            dataIndex: 'income_val7_day',
            key: 'income_val7_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='income_val7_day' />
            }
        },
        {
            title: '激活14日广告变现金额',
            dataIndex: 'income_val14_day',
            key: 'income_val14_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='income_val14_day' />
            }
        },
        {
            title: '广告变现金额',
            dataIndex: 'ad_monetization_amount_day',
            key: 'ad_monetization_amount_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_monetization_amount_day' />
            }
        },
        {
            title: '激活首24小时广告变现人数',
            dataIndex: 'ad_paying_users24h_day',
            key: 'ad_paying_users24h_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_paying_users24h_day' />
            }
        },
        {
            title: '激活首日广告变现人数',
            dataIndex: 'ad_paying_users_d1_day',
            key: 'ad_paying_users_d1_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_paying_users_d1_day' />
            }
        },
        {
            title: '激活3日广告变现人数',
            dataIndex: 'ad_monetization_dedup_active3d_pv_day',
            key: 'ad_monetization_dedup_active3d_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_monetization_dedup_active3d_pv_day' />
            }
        },
        {
            title: '激活7日广告变现人数',
            dataIndex: 'ad_monetization_dedup_active7d_pv_day',
            key: 'ad_monetization_dedup_active7d_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='ad_monetization_dedup_active7d_pv_day' />
            }
        },
        {
            title: '小游戏注册首日广告变现ARPU(平台上报)',
            dataIndex: 'mini_game_first_day_ad_paying_arpu',
            key: 'mini_game_first_day_ad_paying_arpu',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_first_day_ad_paying_arpu' />
            }
        },
        {
            title: '小游戏广告变现ARPU(平台上报)',
            dataIndex: 'mini_game_ad_monetization_arpu',
            key: 'mini_game_ad_monetization_arpu',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_ad_monetization_arpu' />
            }
        },
        {
            title: '小游戏注册首日广告变现ROI(平台上报)',
            dataIndex: 'mini_game_income_roi1',
            key: 'mini_game_income_roi1',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.mini_game_income_roi1 !== undefined && b?.mini_game_income_roi1 !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '小游戏注册3日广告变现ROI(平台上报)',
            dataIndex: 'minigame3d_income_roi',
            key: 'minigame3d_income_roi',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.minigame3d_income_roi !== undefined && b?.minigame3d_income_roi !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '小游戏注册7日广告变现ROI(平台上报)',
            dataIndex: 'minigame7d_income_roi',
            key: 'minigame7d_income_roi',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.minigame7d_income_roi !== undefined && b?.minigame7d_income_roi !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '小游戏广告变现ROI(平台上报)',
            dataIndex: 'mini_game_ad_monetization_roi',
            key: 'mini_game_ad_monetization_roi',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.mini_game_ad_monetization_roi !== undefined && b?.mini_game_ad_monetization_roi !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '小游戏注册首日广告变现成本(平台上报)',
            dataIndex: 'mini_game_first_day_ad_paying_cost',
            key: 'mini_game_first_day_ad_paying_cost',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_first_day_ad_paying_cost' />
            }
        },
        {
            title: '小游戏广告变现成本(平台上报)',
            dataIndex: 'mini_game_ad_monetization_cost',
            key: 'mini_game_ad_monetization_cost',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_ad_monetization_cost' />
            }
        },
        {
            title: '小游戏注册3日广告变现金额(平台上报)',
            dataIndex: 'mini_game_ad_monetization_amount_d3_day',
            key: 'mini_game_ad_monetization_amount_d3_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_ad_monetization_amount_d3_day' />
            }
        },
        {
            title: '小游戏注册首日广告变现人数(平台上报)',
            dataIndex: 'mini_game_first_day_ad_monetization_users_day',
            key: 'mini_game_first_day_ad_monetization_users_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_first_day_ad_monetization_users_day' />
            }
        },
        {
            title: '小游戏注册3日广告变现人数(平台上报)',
            dataIndex: 'minigame3d_income_uv_day',
            key: 'minigame3d_income_uv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='minigame3d_income_uv_day' />
            }
        },
        {
            title: '小游戏注册7日广告变现人数(平台上报)',
            dataIndex: 'minigame7d_income_uv_day',
            key: 'minigame7d_income_uv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='minigame7d_income_uv_day' />
            }
        },
        {
            title: '小游戏广告变现人数(平台上报)',
            dataIndex: 'mini_game_ad_monetization_users_day',
            key: 'mini_game_ad_monetization_users_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_ad_monetization_users_day' />
            }
        },
        {
            title: '注册次数',
            dataIndex: 'reg_pv_day',
            key: 'reg_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='reg_pv_day' />
            }
        },
        {
            title: '注册人数',
            dataIndex: 'reg_dedup_pv_day',
            key: 'reg_dedup_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='reg_dedup_pv_day' />
            }
        },
        {
            title: '注册成本',
            dataIndex: 'reg_cost',
            key: 'reg_cost',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='reg_cost' />
            }
        },
        {
            title: '注册次数成本',
            dataIndex: 'reg_pv_cost',
            key: 'reg_pv_cost',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='reg_pv_cost' />
            }
        },
        {
            title: '注册率',
            dataIndex: 'reg_rate',
            key: 'reg_rate',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.reg_rate !== undefined && b?.reg_rate !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '注册次数(平台上报)',
            dataIndex: 'reg_pla_pv_day',
            key: 'reg_pla_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='reg_pla_pv_day' />
            }
        },
        {
            title: '注册人数(平台上报+广告主上报)',
            dataIndex: 'reg_all_dedup_pv_day',
            key: 'reg_all_dedup_pv_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='reg_all_dedup_pv_day' />
            }
        },
        {
            title: '注册成本(平台上报+广告主上报)',
            dataIndex: 'reg_cost_pla',
            key: 'reg_cost_pla',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='reg_cost_pla' />
            }
        },
        {
            title: '注册率(平台上报+广告主上报)',
            dataIndex: 'reg_click_rate_pla',
            key: 'reg_click_rate_pla',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.reg_click_rate_pla !== undefined && b?.reg_click_rate_pla !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '激活注册率',
            dataIndex: 'activate_register_rate',
            key: 'activate_register_rate',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.activate_register_rate !== undefined && b?.activate_register_rate !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '次日留存人数',
            dataIndex: 'mini_game_retention_d1_day',
            key: 'mini_game_retention_d1_day',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_retention_d1_day' />
            }
        },
        {
            title: '次日留存成本',
            dataIndex: 'retention_cost',
            key: 'retention_cost',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='retention_cost' />
            }
        },
        {
            title: '关键页面次日留存率',
            dataIndex: 'app_key_page_retention_rate',
            key: 'app_key_page_retention_rate',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.app_key_page_retention_rate !== undefined && b?.app_key_page_retention_rate !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '小游戏次日留存率',
            dataIndex: 'mini_game_retention_d1_rate',
            key: 'mini_game_retention_d1_rate',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                if (b?.mini_game_retention_d1_rate !== undefined && b?.mini_game_retention_d1_rate !== null) {
                    return <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
                } else {
                    return '--'
                }
            }
        },
        {
            title: '小游戏次日留存成本',
            dataIndex: 'mini_game_retention_d1_cost',
            key: 'mini_game_retention_d1_cost',
            align: 'center',
            width: 110,
            sorter: true,
            render: (a: any, b: any) => {
                return <StatisticNull data={b} field='mini_game_retention_d1_cost' />
            }
        },
    ]

    return [
        ...adArr,
        ...adDataArr,
        ...iaaDataArr
    ]
}
export default tableDynamicConfig