import { Statistic } from "antd"
import style from './index.less'
import { tableDfixed } from "@/utils/tableDfixed"

function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {

    let defaultValue = [  // 默认展示字段
        // { label: '创角人数', key: 'ffcjrs', type: '付费趋势' },
        // { label: '创角数量', key: 'ffcjsl', type: '付费趋势' },
        // { label: '活跃人数', key: 'ffhyrs', type: '付费趋势' },
        { label: '充值人数', key: 'rechargeCount', type: '付费趋势' },
        { label: '充值金额', key: 'rechargeMoney', type: '付费趋势' },
        { label: '增', key: 'addPayBack', type: '付费趋势' },
        { label: '回', key: 'payBack', type: '付费趋势' },
        { label: '倍', key: 'newUserRechargeRate', type: '付费趋势' },
    ]
    let mySelectFieldData = localStorage.getItem('myAdFieldConfig1.0.0_推广每日数据')
    let newSelectFieldData: any = {}
    if (mySelectFieldData) {
        newSelectFieldData = JSON.parse(mySelectFieldData).date_field
    } else {
        newSelectFieldData = defaultValue
    }

    let arr:any = [
        {
            label: '推广账号信息',
            data: [
                { title: '推广账号名称', dataIndex: 'accountName', key: 'accountName', label: '推广账号信息', align: 'center', width: 95, default: 1 },
                { title: '推广账号ID', dataIndex: 'accountId', key: 'accountId', label: '推广账号信息', align: 'center', width: 70, default: 2 },
                { title: '推广账号类型', dataIndex: '3', key: '3', label: '推广账号信息', align: 'center', width: 70, default: 3 },
                {
                    title: '投放渠道', dataIndex: 'putAgent', key: 'putAgent', label: '推广账号信息', align: 'center', width: 130, default: 4,
                    render: (a: string, b: any) => (<div style={{ minHeight: 60, display: 'flex', alignItems: 'center' }}>{a}</div>)
                },
                { title: '推广状态', dataIndex: 'promoteStatus', key: 'promoteStatus', label: '推广账号信息', align: 'center', width: 70, default: 5 },
                { title: '充值模板', dataIndex: '6', key: '6', label: '推广账号信息', align: 'center', width: 70, default: 6 },
            ]
        },
        {
            label: '业务人员信息',
            data: [
                { title: '投手', dataIndex: 'sysUserName', key: 'sysUserName', label: '业务人员信息', align: 'center', width: 70, default: 7 },
                { title: '运营', dataIndex: '8', key: '8', label: '业务人员信息', align: 'center', width: 70, default: 8 },
                { title: '项目组', dataIndex: '9', key: '9', label: '业务人员信息', align: 'center', width: 70, default: 9 },
                { title: '期数', dataIndex: '10', key: '10', label: '业务人员信息', align: 'center', width: 70, default: 10 }
            ]
        },
        {
            label: '推广内容信息',
            data: [
                { title: '推广游戏CP名称', dataIndex: 'cpName', key: 'cpName', label: '推广内容信息', align: 'center', width: 70, default: 11 },
                { title: '推广游戏名称', dataIndex: 'gameName', key: 'gameName', label: '推广内容信息', align: 'center', width: 70, default: 12 },
                { title: '推广游戏应用类型', dataIndex: 'gameType', key: 'gameType', label: '推广内容信息', align: 'center', width: 70, default: 13 },
            ]
        },
        {
            label: '消耗时间',
            data: [
                { title: '消耗时间（小时）', dataIndex: '14', key: '14', label: '消耗时间', align: 'center', width: 110, default: 14 },
                { title: '消耗时间（天）', dataIndex: '15', key: '15', label: '消耗时间', align: 'center', width: 110, default: 15 },
            ]
        },
        {
            label: '消耗',
            data: [
                { title: '消耗', dataIndex: 'cost', key: 'cost', label: '消耗', align: 'center', width: 70, default: 16 },
                { title: '赔付金', dataIndex: 'costBack', key: 'costBack', label: '消耗', align: 'center', width: 90, default: 17 },
                { title: '实际消耗', dataIndex: 'costReal', key: 'costReal', label: '消耗', align: 'center', width: 90, default: 18 },
                { title: '推广计划数量', dataIndex: 'adPlanCount', key: 'adPlanCount', label: '消耗', align: 'center', width: 90, default: 19 },
                { title: '推广广告数量', dataIndex: 'adCount', key: 'adCount', label: '消耗', align: 'center', width: 90, default: 20 },
            ]
        },
        {
            label: '广告曝光数据',
            data: [
                { title: '曝光量', dataIndex: 'viewCount', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '点击量', dataIndex: 'clickCount', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '转化量', dataIndex: 'convertCount', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '转化率', dataIndex: 'convertRate', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '平均转化成本', dataIndex: 'avgConvertCost', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '深度转化量', dataIndex: 'deepConvertCount', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '深度转化成本', dataIndex: 'deepConvertCost', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '深度转化率', dataIndex: 'deepConvertRate', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '千次曝光成本', dataIndex: 'thousandViewCost', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '平均点击均价', dataIndex: 'avgClickCost', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用下载开始量', dataIndex: 'appDownloadCount', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用下载开始成本', dataIndex: 'appDownloadCost', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用下载开始率', dataIndex: 'appDownloadRate', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用下载完成量', dataIndex: 'downloadFinish', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用下载完成成本', dataIndex: 'downloadFinishCost', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用下载完成率', dataIndex: 'downloadFinishRate', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用安装量', dataIndex: 'appInstallCount', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用安装成本', dataIndex: 'appInstallCost', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用安装完成率', dataIndex: 'appInstallRate', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用激活量', dataIndex: 'appActiveCount', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用激活成本', dataIndex: 'appActiveCost', label: '广告曝光数据', align: 'center', width: 70 },
                { title: '应用激活率', dataIndex: 'appActiveRate', label: '广告曝光数据', align: 'center', width: 70 },
            ]
        },
        {
            label: '用户数据',
            data: [
                { title: '注册人数', dataIndex: 'regUserCount', label: '用户数据', align: 'center', width: 70 },
                { title: '活跃用户人数', dataIndex: 'activeUserCount', label: '用户数据', align: 'center', width: 70 },
                { title: '创角人数', dataIndex: 'userCountOfCreateRole', label: '用户数据', align: 'center', width: 70 },
                { title: '首日创角人数', dataIndex: 'userCountOfFirstCreateRole', label: '用户数据', align: 'center', width: 70 },
                { title: '新用户累计创角人数', dataIndex: 'firstUserCountOfFirstCreateRole', label: '用户数据', align: 'center', width: 70 },
                { title: '创角量', dataIndex: 'createRoleCount', label: '用户数据', align: 'center', width: 70 },
                { title: '首日创角量', dataIndex: 'firstCreateRoleCount', label: '用户数据', align: 'center', width: 70 },
                { title: '新用户累计创角量', dataIndex: 'roleCountOfFirstUser', label: '用户数据', align: 'center', width: 70 },
                { title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70 },
                { title: '首日创角成本', dataIndex: 'firstCreateRoleCost', label: '用户数据', align: 'center', width: 70 },
                { title: '新用户创角成本', dataIndex: 'firstUserCreateRoleCost', label: '用户数据', align: 'center', width: 70 },
                { title: '首日创角率', dataIndex: 'firstCreateRoleRate', label: '用户数据', align: 'center', width: 70 },
                { title: '新用户创角率', dataIndex: 'firstUserCreateRoleRate', label: '用户数据', align: 'center', width: 70 },
                { title: '游戏当日LTV', dataIndex: 'oneDayLTV', label: '用户数据', align: 'center', width: 70 },
                { title: '游戏当日广告变现ROI', dataIndex: 'firstRecoveryRate', label: '用户数据', align: 'center', width: 70 }
            ]
        },
        {
            label: '付费数据',
            data: [
                { title: '首日新用户充值次数', dataIndex: 'firstUserRechargeCount', label: '付费数据', align: 'center', width: 70 },
                { title: '首日新用户充值人数', dataIndex: 'firstUserRechargeUser', label: '付费数据', align: 'center', width: 70 },
                { title: '首日新用户充值金额', dataIndex: 'firstUserRechargeMoney', label: '付费数据', align: 'center', width: 70 },
                { title: '老用户充值次数', dataIndex: 'oldUserRechargeCount', label: '付费数据', align: 'center', width: 70 },
                { title: '老用户充值人数', dataIndex: 'oldUserRechargeUser', label: '付费数据', align: 'center', width: 70 },
                { title: '老用户充值金额', dataIndex: 'oldUserRechargeMoney', label: '付费数据', align: 'center', width: 70 },
                { title: '账面充值次数', dataIndex: 'showRechargeCount', label: '付费数据', align: 'center', width: 70 },
                { title: '账面充值人数', dataIndex: 'showRechargeUser', label: '付费数据', align: 'center', width: 70 },
                { title: '账面充值金额', dataIndex: 'showRechargeMoney', label: '付费数据', align: 'center', width: 70 },
                { title: '新用户累计充值次数', dataIndex: 'newUserRechargeCount', label: '付费数据', align: 'center', width: 70 },
                { title: '新用户累计充值人数', dataIndex: 'newUserRechargeUser', label: '付费数据', align: 'center', width: 70 },
                { title: '新用户累计充值金额', dataIndex: 'newUserRechargeMoney', label: '付费数据', align: 'center', width: 70 },
                { title: '首日回收率', dataIndex: 'c16', label: '付费数据', align: 'center', width: 70 },
                { title: '买量回收率', dataIndex: 'buyRecoveryRate', label: '付费数据', align: 'center', width: 70 },
                { title: '毛利额', dataIndex: 'c19', label: '付费数据', align: 'center', width: 70 },
                { title: '3日ROI', dataIndex: 'threeDayROI', label: '付费数据', align: 'center', width: 70 },
                { title: '5日ROI', dataIndex: 'fiveDayROI', label: '付费数据', align: 'center', width: 70 },
                { title: '7日ROI', dataIndex: 'sevenDayROI', label: '付费数据', align: 'center', width: 70 },
                { title: '30日ROI', dataIndex: 'thirtyDayROI', label: '付费数据', align: 'center', width: 70 },
                { title: '60日ROI', dataIndex: 'sixtyDayROI', label: '付费数据', align: 'center', width: 70 },
                { title: '180日ROI', dataIndex: 'oneHundredAndEightyDayROI', label: '付费数据', align: 'center', width: 70 },
                { title: '1年ROI', dataIndex: 'oneYearROI', label: '付费数据', align: 'center', width: 70 },
                { title: '首日付费率', dataIndex: 'firstRechargeRate', label: '付费数据', align: 'center', width: 70 },
                { title: '买量用户付费率', dataIndex: 'buyUserRechargeRate', label: '付费数据', align: 'center', width: 70 },
                { title: '新用户付费比', dataIndex: 'newUserRechargeRate', label: '付费数据', align: 'center', width: 70 },
                { title: '活跃用户付费率', dataIndex: 'activeUserRechargeRate', label: '付费数据', align: 'center', width: 70 },
                { title: '首日客单价', dataIndex: 'avgFirstUserRecharge', label: '付费数据', align: 'center', width: 70 },
                { title: '买量客单价', dataIndex: 'avgBuyUserRecharge', label: '付费数据', align: 'center', width: 70 },
                { title: '账面客单价', dataIndex: 'avgShowUserRecharge', label: '付费数据', align: 'center', width: 70 },
                { title: '首日充值成本', dataIndex: 'firstRechargeCost', label: '付费数据', align: 'center', width: 70 },
                { title: '买量充值成本', dataIndex: 'buyUserRechargeCost', label: '付费数据', align: 'center', width: 70 },
                { title: '复充率', dataIndex: 'repeatRechargeRate', label: '付费数据', align: 'center', width: 70 },
                { title: '平均活跃付费率', dataIndex: 'avgActiveRechargeRate', label: '付费数据', align: 'center', width: 70 },
                { title: '新增注册ARPU', dataIndex: 'newRegARPU', label: '付费数据', align: 'center', width: 70 },
                { title: '活跃ARPPU', dataIndex: 'activeARPU', label: '付费数据', align: 'center', width: 70 },
                { title: '首日付费ARPU', dataIndex: 'firstRechargeARPU', label: '付费数据', align: 'center', width: 70 },
                { title: '当天付费ARPU', dataIndex: 'c48', label: '付费数据', align: 'center', width: 70 },
                { title: '账面ARPU', dataIndex: 'showRechargeARPU', label: '付费数据', align: 'center', width: 70 }
            ]
        },
        {
            fieldSHow: {
                label: '日期区间字段展示',
                saveField: 'date_field',
                defaultValue,
                data: [
                    {
                        label: '付费趋势',
                        data: [
                            // { label: '创角人数', key: 'ffcjrs', type: '付费趋势' },
                            // { label: '创角数量', key: 'ffcjsl', type: '付费趋势' },
                            // { label: '活跃人数', key: 'ffhyrs', type: '付费趋势' },
                            { label: '充值人数', key: 'rechargeCount', type: '付费趋势' },
                            { label: '充值金额', key: 'rechargeMoney', type: '付费趋势' },
                            { label: '增', key: 'addPayBack', type: '付费趋势' },
                            { label: '回', key: 'payBack', type: '付费趋势' },
                            { label: '倍', key: 'newUserRechargeRate', type: '付费趋势' },
                        ]
                    },
                    {
                        label: 'LTV数据',
                        data: [
                            { label: 'LTV', key: 'LTV', type: 'LTV数据' },
                        ]
                    },
                    {
                        label: '留存分析',
                        data: [
                            { label: '活跃人数', key: 'rechargeUserRetentionRate', type: '留存分析' },
                            { label: '留存率', key: 'regUserRetentionRate', type: '留存分析' },
                        ]
                    },
                    {
                        label: '玩家90日激活数据',
                        data: [
                            { label: '创角人数', key: 'cjrs1', type: '玩家90日激活数据' },
                            { label: '付费人数', key: 'ffrs1', type: '玩家90日激活数据' },
                            { label: '创角比', key: 'cjb', type: '玩家90日激活数据' },
                            { label: '付费比', key: 'ffb1', type: '玩家90日激活数据' },
                        ]
                    }
                ]
            },
            label: '时间区间跨度',
            data: [{
                title: "D1",
                dataIndex: "D1",
                label: "时间区间跨度",
                width: 110,
                render: (a: any, b: any) => {
                    if (newSelectFieldData?.length > 0) {
                        let data: any = {}
                        let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                        switch (newSelectFieldData[0].type) {
                            case '付费趋势':
                                if (b?.oneDayRechargeTrend) {
                                    data = b?.oneDayRechargeTrend
                                    return <div className={style.dbox}>
                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人：<span>{data?.rechargeCount}</span></span>}
                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充：<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增：<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回：<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍：<span>{data?.newUserRechargeRate}</span></span>}
                                    </div>
                                }
                                return '--'
                        }
                    }
                    return '--'
                },
            }, {
                title: "D3",
                dataIndex: "D3",
                label: "时间区间跨度",
                width: 110,
                render: (a: any, b: any) => {
                    if (newSelectFieldData?.length > 0) {
                        let data: any = {}
                        let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                        switch (newSelectFieldData[0].type) {
                            case '付费趋势':
                                if (b?.threeDayRechargeTrend) {
                                    data = b?.threeDayRechargeTrend
                                    return <div className={style.dbox}>
                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人：<span>{data?.rechargeCount}</span></span>}
                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充：<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增：<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回：<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍：<span>{data?.newUserRechargeRate}</span></span>}
                                    </div>
                                }
                                return '--'
                        }
                    }
                    return '--'
                },
            }, {
                title: "D7",
                dataIndex: "D7",
                label: "时间区间跨度",
                width: 110,
                render: (a: any, b: any) => {
                    if (newSelectFieldData?.length > 0) {
                        let data: any = {}
                        let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                        switch (newSelectFieldData[0].type) {
                            case '付费趋势':
                                if (b?.sevenDayRechargeTrend) {
                                    data = b?.sevenDayRechargeTrend
                                    return <div className={style.dbox}>
                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人：<span>{data?.rechargeCount}</span></span>}
                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充：<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增：<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回：<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍：<span>{data?.newUserRechargeRate}</span></span>}
                                    </div>
                                }
                                return '--'
                        }
                    }
                    return '--'
                },
            }, {
                title: "D15",
                dataIndex: "D15",
                label: "时间区间跨度",
                width: 110,
                render: (a: any, b: any) => {
                    if (newSelectFieldData?.length > 0) {
                        let data: any = {}
                        let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                        switch (newSelectFieldData[0].type) {
                            case '付费趋势':
                                if (b?.fifteenDayRechargeTrend) {
                                    data = b?.fifteenDayRechargeTrend
                                    return <div className={style.dbox}>
                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人：<span>{data?.rechargeCount}</span></span>}
                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充：<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增：<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回：<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍：<span>{data?.newUserRechargeRate}</span></span>}
                                    </div>
                                }
                                return '--'
                        }
                    }
                    return '--'
                },
            }, {
                title: "M1",
                dataIndex: "M1",
                label: "时间区间跨度",
                width: 110,
                render: (a: any, b: any) => {
                    if (newSelectFieldData?.length > 0) {
                        let data: any = {}
                        let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                        switch (newSelectFieldData[0].type) {
                            case '付费趋势':
                                if (b?.oneMonthRechargeTrend) {
                                    data = b?.oneMonthRechargeTrend
                                    return <div className={style.dbox}>
                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人：<span>{data?.rechargeCount}</span></span>}
                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充：<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增：<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回：<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍：<span>{data?.newUserRechargeRate}</span></span>}
                                    </div>
                                }
                                return '--'
                        }
                    }
                    return '--'
                },
            }, {
                title: "M2",
                dataIndex: "M2",
                label: "时间区间跨度",
                width: 110,
                render: (a: any, b: any) => {
                    if (newSelectFieldData?.length > 0) {
                        let data: any = {}
                        let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                        switch (newSelectFieldData[0].type) {
                            case '付费趋势':
                                if (b?.twoMonthRechargeTrend) {
                                    data = b?.twoMonthRechargeTrend
                                    return <div className={style.dbox}>
                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人：<span>{data?.rechargeCount}</span></span>}
                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充：<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增：<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回：<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍：<span>{data?.newUserRechargeRate}</span></span>}
                                    </div>
                                }
                                return '--'
                        }
                    }
                    return '--'
                },
            }, {
                title: "M3",
                dataIndex: "M3",
                label: "时间区间跨度",
                width: 110,
                render: (a: any, b: any) => {
                    if (newSelectFieldData?.length > 0) {
                        let data: any = {}
                        let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                        switch (newSelectFieldData[0].type) {
                            case '付费趋势':
                                if (b?.threeMonthRechargeTrend) {
                                    data = b?.threeMonthRechargeTrend
                                    return <div className={style.dbox}>
                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人：<span>{data?.rechargeCount}</span></span>}
                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充：<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增：<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回：<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍：<span>{data?.newUserRechargeRate}</span></span>}
                                    </div>
                                }
                                return '--'
                        }
                    }
                    return '--'
                },
            }, {
                title: "总",
                dataIndex: "total",
                label: "时间区间跨度",
                align: "center",
                width: 70
            }]
        }
    ]
    return tableDfixed(arr)
}

export default columns12