wjx 1 year ago
parent
commit
528474f8c9

+ 2 - 2
.gitignore

@@ -10,8 +10,8 @@ _roadhog-api-doc
 /dist
 /dist1
 /.vscode
-/config/proxy.ts
-/src/services/api.ts
+# /config/proxy.ts
+# /src/services/api.ts
 # misc
 .DS_Store
 npm-debug.log*

+ 2 - 2
config/defaultSettings.ts

@@ -4,8 +4,8 @@ export default {
   // 拂晓蓝
   primaryColor: '#1890ff',//全局主色https://ant.design/docs/react/customize-theme-cn
   layout: 'mix',//导航模式
-  navTheme:'realDark',//整体风格
-  headerTheme:'dark',
+  navTheme: 'realDark',//整体风格
+  headerTheme: 'dark',
   contentWidth: 'Fluid',
   fixedHeader: true,
   fixSiderbar: true,

+ 45 - 0
config/proxy.ts

@@ -0,0 +1,45 @@
+/**
+ * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
+ * The agent cannot take effect in the production environment
+ * so there is no configuration of the production environment
+ * For details, please see
+ * https://pro.ant.design/docs/deploy
+ */
+
+
+ export default {
+  dev: {
+    '/api/': {
+      target: 'http://test.api.zanxiangwl.com',
+      // target: 'http://game.84game.cn',
+      changeOrigin: true,
+      pathRewrite: { '/api': '' },
+    },
+    '/erpApi/': {
+      target: 'http://test.api.zanxiangwl.com',
+      // target: 'http://api.zanxiangwl.com',
+      changeOrigin: true,
+      pathRewrite: { '/erpApi': '' },
+    },
+    '/gameApi/': {
+      target: 'http://test.api.zanxiangwl.com',//服务器
+      // target: 'https://game.84game.cn',//服务器
+      changeOrigin: true,
+      pathRewrite: { '^/gameApi/': '' },
+    },
+  },
+  test: {
+    '/api/': {
+      target: 'https://preview.pro.ant.design',
+      changeOrigin: true,
+      pathRewrite: { '^': '' },
+    },
+  },
+  pre: {
+    '/api/': {
+      target: 'your pre url',
+      changeOrigin: true,
+      pathRewrite: { '^': '' },
+    },
+  },
+}

+ 13 - 0
config/routerConfig.ts

@@ -137,6 +137,19 @@ const gameDataStatistics = {
                 },
             ]
         },
+        {
+            path: '/gameDataStatistics/adlist',
+            name: '广告列表',
+            access: 'adlist',
+            routes: [
+                {
+                    path: '/gameDataStatistics/adlist/monitor',
+                    name: '广告监控',
+                    access: 'monitor',
+                    component: './gameDataStatistics/adlist/monitor',
+                }
+            ]
+        },
         {
             path: '/gameDataStatistics/gameData',
             name: '游戏数据',

+ 16 - 2
src/components/QueryForm/index.tsx

@@ -64,8 +64,12 @@ interface Props {
     isProductName?: boolean
     /** 是否开启 注册渠道名 搜索 */
     isRegAgent?: boolean
+    /** 是否开启 渠道名称 搜索 */
+    isAgentName?: boolean
     /** 是否开启 注册渠道ID 搜索 */
     isAgentId?: boolean
+    /** 是否开启 渠道标识 搜索 */
+    isAgentKey?: boolean
     /** 是否开启 投放渠道名 搜索 */
     isPutAgent?: boolean
     /** 是否开启 用户注册日期 搜索 */
@@ -109,7 +113,7 @@ const QueryForm: React.FC<Props> = (props) => {
 
     /**************************/
     const {
-        onChange, initialValues, isSource, isAccount, isAccountId, isCompanyId, isCpId, isCpName, isCpOrderId, isCpStatus, isCreateDay, isDevice, isGameName, isRechargeGameName, isGameId, isOrderGameId, isGameRoleId,
+        onChange, initialValues, isSource, isAccount, isAccountId, isCompanyId, isAgentKey, isAgentName, isCpId, isCpName, isCpOrderId, isCpStatus, isCreateDay, isDevice, isGameName, isRechargeGameName, isGameId, isOrderGameId, isGameRoleId,
         isGameRoleName, isFirstRecharge, isSwitch, isMerchantNo, isOrderId, isMerchantOrderNo, isPayStatus, isPayWay, isProductName, isRegAgent, isAgentId, isPutAgent, isRegDay, isOs, isParentId,
         isSysUserName, isRechargeDate, isBGGameClassify, isGameUserId, isSysUserId, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay, isType
     } = props
@@ -295,7 +299,7 @@ const QueryForm: React.FC<Props> = (props) => {
                 </Radio.Group>
             </Form.Item></Col>}
             {/* 广告账户名称 */}
-            {isAccount && <Col><Form.Item name='account'>
+            {isAccount && <Col><Form.Item name='accountName'>
                 <Input placeholder="请输入广告账号" allowClear style={{ width: 140 }} />
             </Form.Item></Col>}
             {/* 广告账号ID */}
@@ -571,6 +575,16 @@ const QueryForm: React.FC<Props> = (props) => {
                 <Input placeholder="请输入注册渠道名" allowClear style={{ width: 140 }} />
             </Form.Item></Col>}
 
+            {/* 渠道标识 */}
+            {isAgentKey && <Col><Form.Item name='agentKey'>
+                <Input placeholder="请输入渠道标识" allowClear style={{ width: 140 }} />
+            </Form.Item></Col>}
+            
+            {/* 渠道名称 */}
+            {isAgentName && <Col><Form.Item name='agentName'>
+                <Input placeholder="请输入渠道名称" allowClear style={{ width: 140 }} />
+            </Form.Item></Col>}
+
             {/* 推广渠道id */}
             {isAgentId && <Col><Form.Item name='agentId'>
                 <Select

+ 90 - 0
src/pages/gameDataStatistics/adlist/monitor/index.tsx

@@ -0,0 +1,90 @@
+import { useAjax } from "@/Hook/useAjax"
+import { PromotionDataDay, getPromotionDataDatListApi } from "@/services/gameData/adlist"
+import React, { useEffect, useState } from "react"
+import columns12 from "./tableConfig"
+import QueryForm from "@/components/QueryForm"
+import TableData from "../../components/TableData"
+
+
+
+const Monitor = () => {
+
+    /***************************************/
+    const [queryForm, setQueryForm] = useState<PromotionDataDay>({ pageNum: 1, pageSize: 20, sourceSystem: 'ZX_ONE' })
+
+    const getPromotionDataDatList = useAjax((params) => getPromotionDataDatListApi(params))
+    /***************************************/
+
+    useEffect(() => {
+        getPromotionDataDatList.run(queryForm)
+    }, [queryForm])
+
+    return <div>
+        <TableData
+            leftChild={<QueryForm
+                initialValues={{ sourceSystem: 'ZX_ONE' }}
+                onChange={(data: any) => {
+                    const { type, gameType, costBeginDay, costEndDay, pitcherId, sysUserName, ...params } = data
+                    console.log(params, pitcherId)
+                    let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                    newQueryForm.pageNum = 1
+                    newQueryForm.zxPitcherId = pitcherId
+                    newQueryForm.pitcherName = sysUserName
+                    newQueryForm.accountType = type
+                    newQueryForm.classify = gameType
+                    if (costBeginDay && costEndDay) {
+                        newQueryForm.costBeginDate = costBeginDay
+                        newQueryForm.costEndDate = costEndDay
+                    } else {
+                        delete newQueryForm.costBeginDate
+                        delete newQueryForm.costEndDate
+                    }
+
+                    setQueryForm({ ...newQueryForm, ...params })
+                }}
+                isSource
+                isAccountId
+                isAccount
+                isType
+                isAgentId
+                isAgentKey
+                isAgentName
+                isGameType
+                isConsumeDay={{}}
+                isCpName
+                isGameId
+                isGameName
+                isSysUserId
+                isSysUserName
+            />}
+            scroll={{ x: 1000, y: 600 }}
+            ajax={getPromotionDataDatList}
+            fixed={{ left: 3, right: 2 }}
+            dataSource={getPromotionDataDatList?.data?.records?.map((item: any, index: number) => ({ ...item, id: item?.orderId?.replace(/\D/g, '') || index }))}
+            total={getPromotionDataDatList?.data?.total}
+            page={queryForm.pageNum}
+            pageSize={queryForm.pageSize}
+            title='订单明细'
+            onChange={(props: any) => {
+                console.log('props--->', props)
+                let { pagination, sortData } = props
+                let { current, pageSize } = pagination
+                let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                if (sortData && sortData?.order) {
+                    newQueryForm['sortType'] = sortData?.order === 'ascend' ? 'asc' : 'desc'
+                    newQueryForm['sortFiled'] = sortData?.field
+                } else {
+                    delete newQueryForm['sortType']
+                    delete newQueryForm['sortFiled']
+                }
+                newQueryForm.pageNum = current
+                newQueryForm.pageSize = pageSize
+                setQueryForm({ ...newQueryForm })
+            }}
+            config={columns12()}
+            configName={'订单明细'}
+        />
+    </div>
+}
+
+export default Monitor

+ 152 - 0
src/pages/gameDataStatistics/adlist/monitor/tableConfig.tsx

@@ -0,0 +1,152 @@
+import { PayStatus, gameClassifyEnum } from "@/components/QueryForm/const"
+import WidthEllipsis from "@/components/widthEllipsis"
+import { Statistic } from "antd"
+import React from "react"
+
+
+function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
+
+    return [
+        {
+            label: '订单明细',
+            data: [
+                {
+                    title: '日期(订单创建日期)', dataIndex: 'day1', label: '订单明细', align: 'center', width: 85, default: 1,
+                    render: (a: string, b: any) => (<WidthEllipsis value={b?.day} />)
+                },
+                {
+                    title: '商户订单号ID', dataIndex: 'orderId', label: '订单明细', align: 'center', width: 120, default: 2,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: 'CP订单号', dataIndex: 'cpOrderId', label: '订单明细', align: 'center', width: 130, default: 3,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '第三方支付订单号', dataIndex: 'merchantOrderNo', label: '订单明细', align: 'center', width: 85, default: 4,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                { title: '玩家ID', dataIndex: 'gameUserId', label: '订单明细', align: 'center', width: 65, default: 5 },
+                {
+                    title: '玩家账号', dataIndex: 'username', label: '订单明细', align: 'center', width: 95, default: 6,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '玩家注册时间', dataIndex: 'regTime', label: '订单明细', align: 'center', width: 135, default: 7,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '玩家注册渠道', dataIndex: 'agentName', label: '订单明细', align: 'center', width: 70, default: 8,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '玩家注册游戏', dataIndex: 'gameName', label: '订单明细', align: 'center', width: 70, default: 9,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: 'CP名称', dataIndex: 'cpName', label: '订单明细', align: 'center', width: 95, default: 10,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '玩家注册游戏应用类型', dataIndex: 'classify', label: '订单明细', align: 'center', width: 80, default: 11,
+                    render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
+                },
+                {
+                    title: '归因投放人员', dataIndex: 'zxPitcherName', label: '订单明细', align: 'center', width: 65, default: 12,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                // {
+                //     title: '归因推广账号', dataIndex: 'accountId', label: '订单明细', align: 'center', width: 80, default: 13,
+                //     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                // },
+                // {
+                //     title: '归因媒体', dataIndex: 'accountType', label: '订单明细', align: 'center', width: 70, default: 14,
+                //     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                // },
+                // {
+                //     title: '归因广告', dataIndex: 'adId', label: '订单明细', align: 'center', width: 70, default: 15,
+                //     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                // },
+                {
+                    title: '玩家充值游戏', dataIndex: 'orderGameName', label: '订单明细', align: 'center', width: 70, default: 13,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '玩家充值游戏应用类型', dataIndex: 'orderGameClassify', label: '订单明细', align: 'center', width: 80, default: 14,
+                    render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
+                },
+                {
+                    title: '充值产品名称', dataIndex: 'productName', label: '订单明细', align: 'center', width: 85, default: 15,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '订单金额', dataIndex: 'amount', label: '订单明细', align: 'center', width: 80, default: 16,
+                    render: (a: any) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '订单实付金额', dataIndex: 'realAmount', label: '订单明细', align: 'center', width: 80, default: 17,
+                    render: (a: any) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '购买商品', dataIndex: 'productName', label: '订单明细', align: 'center', width: 95, default: 18,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '支付方式', dataIndex: 'payway', label: '订单明细', align: 'center', width: 65, default: 19,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '支付场景', dataIndex: 'payScene', label: '订单明细', align: 'center', width: 95, default: 20,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '收款账户', dataIndex: 'payAccountId', label: '订单明细', align: 'center', width: 95, default: 21,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                { title: '游戏区服', dataIndex: 'serverName', label: '订单明细', align: 'center', width: 85, default: 22 },
+                {
+                    title: '游戏角色', dataIndex: 'roleName', label: '订单明细', align: 'center', width: 85, default: 23,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '角色等级', dataIndex: 'roleLevel', label: '订单明细', align: 'center', width: 50, default: 24,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '角色VIP', dataIndex: 'roleVip', label: '订单明细', align: 'center', width: 45, default: 25,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '操作系统', dataIndex: 'os', label: '订单明细', align: 'center', width: 65, default: 26,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '是否切量', dataIndex: 'orderIsSwitch', label: '订单明细', align: 'center', width: 45, default: 27,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '下单时间', dataIndex: 'orderCreateTime', label: '订单明细', align: 'center', width: 135, default: 28,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '支付时间', dataIndex: 'payTime', label: '订单明细', align: 'center', width: 135, default: 29,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '支付状态', dataIndex: 'orderStatus', label: '订单明细', align: 'center', width: 85, default: 30,
+                    render: (a: string, b: any) => {
+                        return PayStatus[a]
+                    }
+                },
+                {
+                    title: '是否首充', dataIndex: 'isFirstRecharge', label: '订单明细', align: 'center', width: 45, default: 31,
+                    render: (a: any) => {
+                        return a == 1 ? '是' : '否'
+                    }
+                },
+            ]
+        },
+    ]
+}
+
+export default columns12

+ 34 - 14
src/pages/gameDataStatistics/components/TableData/index.tsx

@@ -42,6 +42,8 @@ interface Prosp {
     rowClassName?: string | ((record: any, index: any) => string)
 }
 
+export const version = '1.0.0'
+
 function TableData(props: Prosp) {
 
     /*************************/
@@ -56,7 +58,6 @@ function TableData(props: Prosp) {
     const ref = useRef(null)
     const [isFull, { toggleFull }] = useFullscreen(ref);
     const oldName = useRef(null)
-    const version = '1.0.0'
     /*************************/
 
     /**重组选中的字段 */
@@ -96,21 +97,40 @@ function TableData(props: Prosp) {
                 setoldSelectData(() => selectData.selectData)
                 setoldFixed(() => selectData.fixed)
                 if (newArr.length > 0) {
-                    setNewColumns(newArr.map((newItem: any, index: number) => {
+                    let c: any[] = []
+                    newArr.forEach((newItem: any, index: number) => {
                         let oldItem = newConfig.find((c: { dataIndex: any }) => c.dataIndex === newItem.dataIndex)
-                        if (newItem?.width !== oldItem?.width) {
-                            oldItem.width = newItem?.width
-                        }
-                        if (index < Number(fixedData.left)) {//设置左悬浮
-                            oldItem['fixed'] = 'left'
-                        } else if (index > (newArr?.length - Number(fixedData.right) - 1)) {//设置右悬浮
-                            oldItem['fixed'] = 'right'
-                        } else {
-                            oldItem['fixed'] = false
+                        if (oldItem) {
+                            if (newItem?.width !== oldItem?.width) {
+                                oldItem.width = newItem?.width
+                            }
+                            if (index < Number(fixedData.left)) {//设置左悬浮
+                                oldItem['fixed'] = 'left'
+                            } else if (index > (newArr?.length - Number(fixedData.right) - 1)) {//设置右悬浮
+                                oldItem['fixed'] = 'right'
+                            } else {
+                                oldItem['fixed'] = false
+                            }
+                            let { label, default: a, ...ite } = oldItem
+                            c.push(ite)
                         }
-                        let { label, default: a, ...ite } = oldItem
-                        return ite
-                    }))
+                    })
+                    setNewColumns(c)
+                    // setNewColumns(newArr.map((newItem: any, index: number) => {
+                    //     let oldItem = newConfig.find((c: { dataIndex: any }) => c.dataIndex === newItem.dataIndex)
+                    //     if (newItem?.width !== oldItem?.width) {
+                    //         oldItem.width = newItem?.width
+                    //     }
+                    //     if (index < Number(fixedData.left)) {//设置左悬浮
+                    //         oldItem['fixed'] = 'left'
+                    //     } else if (index > (newArr?.length - Number(fixedData.right) - 1)) {//设置右悬浮
+                    //         oldItem['fixed'] = 'right'
+                    //     } else {
+                    //         oldItem['fixed'] = false
+                    //     }
+                    //     let { label, default: a, ...ite } = oldItem
+                    //     return ite
+                    // }))
                 }
             }
         }

+ 235 - 302
src/pages/gameDataStatistics/extensionData/everyday/tableConfig.tsx

@@ -2,6 +2,7 @@ import { Statistic } from "antd"
 import React from "react"
 import style from './index.less'
 import { gameClassifyEnum } from "@/components/QueryForm/const"
+import { version } from "../../components/TableData"
 
 function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
 
@@ -13,7 +14,7 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
         { label: '倍', key: 'newUserRechargeRate', type: '付费趋势' },
     ]
     const getFieldDta = () => {
-        let mySelectFieldData = localStorage.getItem('myAdFieldConfig1.0.0_推广每日数据')
+        let mySelectFieldData = localStorage.getItem(`myAdFieldConfig${version}_推广每日数据`)
         let newSelectFieldData: any = {}
         if (mySelectFieldData) {
             newSelectFieldData = JSON.parse(mySelectFieldData).date_field
@@ -23,6 +24,60 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
         return newSelectFieldData
     }
 
+    // 总付费趋势
+    let defaultStart = 20
+    const zC = Array(29).fill('').map((_item: string, index: number) => {
+        let field = `rechargeTrendDay${index + 1}`
+        let data = {
+            title: `D${index + 1}`,
+            dataIndex: `D${index + 1}`,
+            label: "时间区间跨度",
+            width: 110,
+            render: (a: any, b: any) => {
+                let fieldData = getFieldDta()
+                if (fieldData?.length > 0) {
+                    let data: any = {}
+                    let keyS: string[] = fieldData?.map((item: any) => item.key)
+                    switch (fieldData[0].type) {
+                        case '付费趋势':
+                            if (b?.[field]) {
+                                data = b?.[field]
+                                return <div className={style.dbox}>
+                                    {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
+                                    {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                    {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
+                                </div>
+                            }
+                            return '--'
+                    }
+                }
+                return '--'
+            },
+        }
+
+        if (index < 9) {
+            data['default'] = defaultStart + index
+        }
+        return data
+    })
+
+    const roiC = Array(30).fill('').map((_item: string, index: number) => {
+
+        let data = {
+            title: `${index + 1}日ROI`, 
+            dataIndex: `roiDay${index + 1}`, 
+            label: '付费数据', 
+            align: 'center', 
+            width: 70, 
+            sorter: true,
+            render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+        }
+
+        return data
+    })
+
 
     return [
         {
@@ -78,9 +133,9 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
                     title: '转化率', dataIndex: 'convertRate', label: '广告曝光数据', align: 'center', width: 70, default: 13, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
-                { title: '平均转化成本', dataIndex: 'avgConvertCost', label: '广告曝光数据', align: 'center', width: 70, default: 14, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
+                { title: '平均转化成本', dataIndex: 'avgConvertCost', label: '广告曝光数据', align: 'center', width: 70, default: 14, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 { title: '深度转化量', dataIndex: 'deepConvertCount', label: '广告曝光数据', align: 'center', width: 70, default: 15, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '深度转化成本', dataIndex: 'deepConvertCost', label: '广告曝光数据', align: 'center', width: 70, default: 16, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
+                { title: '深度转化成本', dataIndex: 'deepConvertCost', label: '广告曝光数据', align: 'center', width: 70, default: 16, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 {
                     title: '深度转化率', dataIndex: 'deepConvertRate', label: '广告曝光数据', align: 'center', width: 70, default: 17, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
@@ -94,19 +149,19 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 { title: '应用下载完成量', dataIndex: 'downloadFinish', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '应用下载完成成本', dataIndex: 'downloadFinishCost', label: '广告曝光数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
+                { title: '应用下载完成成本', dataIndex: 'downloadFinishCost', label: '广告曝光数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 {
                     title: '应用下载完成率', dataIndex: 'downloadFinishRate', label: '广告曝光数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 { title: '应用安装量', dataIndex: 'appInstallCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '应用安装成本', dataIndex: 'appInstallCost', label: '广告曝光数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
+                { title: '应用安装成本', dataIndex: 'appInstallCost', label: '广告曝光数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 {
                     title: '应用安装完成率', dataIndex: 'appInstallRate', label: '广告曝光数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 { title: '应用激活量', dataIndex: 'appActiveCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '应用激活成本', dataIndex: 'appActiveCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
+                { title: '应用激活成本', dataIndex: 'appActiveCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 {
                     title: '应用激活率', dataIndex: 'appActiveRate', label: '广告曝光数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
@@ -116,7 +171,7 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
         {
             label: '用户数据',
             data: [
-                { title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
+                { title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 { title: '注册人数', dataIndex: 'regUserCount', label: '用户数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
             ]
         },
@@ -144,32 +199,25 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 { title: '毛利额', dataIndex: 'grossMargin', label: '付费数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                ...roiC,
                 {
-                    title: '3日ROI', dataIndex: 'roiDay3', label: '付费数据', align: 'center', width: 70, sorter: true,
-                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
-                },
-                {
-                    title: '5日ROI', dataIndex: 'roiDay5', label: '付费数据', align: 'center', width: 70, sorter: true,
-                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
-                },
-                {
-                    title: '7日ROI', dataIndex: 'roiDay7', label: '付费数据', align: 'center', width: 70, sorter: true,
+                    title: '60日ROI', dataIndex: 'roiDay60', label: '付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '30日ROI', dataIndex: 'roiDay30', label: '付费数据', align: 'center', width: 70, sorter: true,
+                    title: '90日ROI', dataIndex: 'roiDay90', label: '付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '60日ROI', dataIndex: 'roiDay60', label: '付费数据', align: 'center', width: 70, sorter: true,
+                    title: '180日ROI', dataIndex: 'roiDay180', label: '付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '180日ROI', dataIndex: 'roiDay180', label: '付费数据', align: 'center', width: 70, sorter: true,
+                    title: '1年ROI', dataIndex: 'roiYear1', label: '付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '1年ROI', dataIndex: 'roiYear1', label: '付费数据', align: 'center', width: 70, sorter: true,
+                    title: '总ROI', dataIndex: 'roiTotal', label: '付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
@@ -184,12 +232,12 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
                 { title: '首日客单价', dataIndex: 'avgFirstUserRecharge', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '买量客单价', dataIndex: 'avgBuyUserRecharge', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '账面客单价', dataIndex: 'avgShowUserRecharge', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '首日充值成本', dataIndex: 'firstRechargeCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
-                { title: '买量充值成本', dataIndex: 'buyUserRechargeCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
-                { title: '首日充值次数成本', dataIndex: 'firstRechargeCountCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
-                { title: '老用户充值次数成本', dataIndex: 'oldUserRechargeCountCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
-                { title: '账面充值次数成本', dataIndex: 'showRechargeCountCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
-                { title: '新用户累计充值次数成本', dataIndex: 'newUserRechargeCountCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2}/> },
+                { title: '首日充值成本', dataIndex: 'firstRechargeCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
+                { title: '买量充值成本', dataIndex: 'buyUserRechargeCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
+                { title: '首日充值次数成本', dataIndex: 'firstRechargeCountCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
+                { title: '老用户充值次数成本', dataIndex: 'oldUserRechargeCountCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
+                { title: '账面充值次数成本', dataIndex: 'showRechargeCountCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
+                { title: '新用户累计充值次数成本', dataIndex: 'newUserRechargeCountCost', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 {
                     title: '复充率', dataIndex: 'repeatRechargeRate', label: '付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
@@ -219,288 +267,173 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
                 ]
             },
             label: '时间区间跨度',
-            data: [{
-                title: "D1",
-                dataIndex: "D1",
-                label: "时间区间跨度",
-                width: 110,
-                default: 20,
-                render: (a: any, b: any) => {
-                    let fieldData = getFieldDta()
-                    if (fieldData?.length > 0) {
-                        let data: any = {}
-                        let keyS: string[] = fieldData?.map((item: any) => item.key)
-                        switch (fieldData[0].type) {
-                            case '付费趋势':
-                                if (b?.rechargeTrendDay1) {
-                                    data = b?.rechargeTrendDay1
-                                    return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
-                                    </div>
-                                }
-                                return '--'
-                        }
-                    }
-                    return '--'
-                },
-            }, {
-                title: "D3",
-                dataIndex: "D3",
-                label: "时间区间跨度",
-                width: 110,
-                default: 21,
-                render: (a: any, b: any) => {
-                    let fieldData = getFieldDta()
-                    if (fieldData?.length > 0) {
-                        let data: any = {}
-                        let keyS: string[] = fieldData?.map((item: any) => item.key)
-                        switch (fieldData[0].type) {
-                            case '付费趋势':
-                                if (b?.rechargeTrendDay3) {
-                                    data = b?.rechargeTrendDay3
-                                    return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
-                                    </div>
-                                }
-                                return '--'
-                        }
-                    }
-                    return '--'
-                },
-            }, {
-                title: "D5",
-                dataIndex: "D5",
-                label: "时间区间跨度",
-                width: 110,
-                default: 22,
-                render: (a: any, b: any) => {
-                    let fieldData = getFieldDta()
-                    if (fieldData?.length > 0) {
-                        let data: any = {}
-                        let keyS: string[] = fieldData?.map((item: any) => item.key)
-                        switch (fieldData[0].type) {
-                            case '付费趋势':
-                                if (b?.rechargeTrendDay5) {
-                                    data = b?.rechargeTrendDay5
-                                    return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
-                                    </div>
-                                }
-                                return '--'
-                        }
-                    }
-                    return '--'
-                },
-            }, {
-                title: "D7",
-                dataIndex: "D7",
-                label: "时间区间跨度",
-                width: 110,
-                default: 23,
-                render: (a: any, b: any) => {
-                    let fieldData = getFieldDta()
-                    if (fieldData?.length > 0) {
-                        let data: any = {}
-                        let keyS: string[] = fieldData?.map((item: any) => item.key)
-                        switch (fieldData[0].type) {
-                            case '付费趋势':
-                                if (b?.rechargeTrendDay7) {
-                                    data = b?.rechargeTrendDay7
-                                    return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
-                                    </div>
-                                }
-                                return '--'
-                        }
-                    }
-                    return '--'
-                },
-            }, {
-                title: "D15",
-                dataIndex: "D15",
-                label: "时间区间跨度",
-                width: 110,
-                default: 24,
-                render: (a: any, b: any) => {
-                    let fieldData = getFieldDta()
-                    if (fieldData?.length > 0) {
-                        let data: any = {}
-                        let keyS: string[] = fieldData?.map((item: any) => item.key)
-                        switch (fieldData[0].type) {
-                            case '付费趋势':
-                                if (b?.rechargeTrendDay15) {
-                                    data = b?.rechargeTrendDay15
-                                    return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
-                                    </div>
-                                }
-                                return '--'
+            data: [
+                ...zC,
+                {
+                    title: "M1",
+                    dataIndex: "M1",
+                    label: "时间区间跨度",
+                    width: 110,
+                    render: (a: any, b: any) => {
+                        let fieldData = getFieldDta()
+                        if (fieldData?.length > 0) {
+                            let data: any = {}
+                            let keyS: string[] = fieldData?.map((item: any) => item.key)
+                            switch (fieldData[0].type) {
+                                case '付费趋势':
+                                    if (b?.rechargeTrendMonth1) {
+                                        data = b?.rechargeTrendMonth1
+                                        return <div className={style.dbox}>
+                                            {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
+                                        </div>
+                                    }
+                                    return '--'
+                            }
                         }
-                    }
-                    return '--'
-                },
-            }, {
-                title: "M1",
-                dataIndex: "M1",
-                label: "时间区间跨度",
-                width: 110,
-                default: 25,
-                render: (a: any, b: any) => {
-                    let fieldData = getFieldDta()
-                    if (fieldData?.length > 0) {
-                        let data: any = {}
-                        let keyS: string[] = fieldData?.map((item: any) => item.key)
-                        switch (fieldData[0].type) {
-                            case '付费趋势':
-                                if (b?.rechargeTrendMonth1) {
-                                    data = b?.rechargeTrendMonth1
-                                    return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
-                                    </div>
-                                }
-                                return '--'
+                        return '--'
+                    },
+                }, {
+                    title: "M2",
+                    dataIndex: "M2",
+                    label: "时间区间跨度",
+                    width: 110,
+                    render: (a: any, b: any) => {
+                        let fieldData = getFieldDta()
+                        if (fieldData?.length > 0) {
+                            let data: any = {}
+                            let keyS: string[] = fieldData?.map((item: any) => item.key)
+                            switch (fieldData[0].type) {
+                                case '付费趋势':
+                                    if (b?.rechargeTrendMonth2) {
+                                        data = b?.rechargeTrendMonth2
+                                        return <div className={style.dbox}>
+                                            {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
+                                        </div>
+                                    }
+                                    return '--'
+                            }
                         }
-                    }
-                    return '--'
-                },
-            }, {
-                title: "M2",
-                dataIndex: "M2",
-                label: "时间区间跨度",
-                width: 110,
-                default: 26,
-                render: (a: any, b: any) => {
-                    let fieldData = getFieldDta()
-                    if (fieldData?.length > 0) {
-                        let data: any = {}
-                        let keyS: string[] = fieldData?.map((item: any) => item.key)
-                        switch (fieldData[0].type) {
-                            case '付费趋势':
-                                if (b?.rechargeTrendMonth2) {
-                                    data = b?.rechargeTrendMonth2
-                                    return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
-                                    </div>
-                                }
-                                return '--'
+                        return '--'
+                    },
+                }, {
+                    title: "M3",
+                    dataIndex: "M3",
+                    label: "时间区间跨度",
+                    width: 110,
+                    render: (a: any, b: any) => {
+                        let fieldData = getFieldDta()
+                        if (fieldData?.length > 0) {
+                            let data: any = {}
+                            let keyS: string[] = fieldData?.map((item: any) => item.key)
+                            switch (fieldData[0].type) {
+                                case '付费趋势':
+                                    if (b?.rechargeTrendMonth3) {
+                                        data = b?.rechargeTrendMonth3
+                                        return <div className={style.dbox}>
+                                            {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
+                                        </div>
+                                    }
+                                    return '--'
+                            }
                         }
-                    }
-                    return '--'
-                },
-            }, {
-                title: "M3",
-                dataIndex: "M3",
-                label: "时间区间跨度",
-                width: 110,
-                default: 27,
-                render: (a: any, b: any) => {
-                    let fieldData = getFieldDta()
-                    if (fieldData?.length > 0) {
-                        let data: any = {}
-                        let keyS: string[] = fieldData?.map((item: any) => item.key)
-                        switch (fieldData[0].type) {
-                            case '付费趋势':
-                                if (b?.rechargeTrendMonth3) {
-                                    data = b?.rechargeTrendMonth3
-                                    return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
-                                    </div>
-                                }
-                                return '--'
+                        return '--'
+                    },
+                }, {
+                    title: "M6",
+                    dataIndex: "M6",
+                    label: "时间区间跨度",
+                    width: 110,
+                    render: (a: any, b: any) => {
+                        let fieldData = getFieldDta()
+                        if (fieldData?.length > 0) {
+                            let data: any = {}
+                            let keyS: string[] = fieldData?.map((item: any) => item.key)
+                            switch (fieldData[0].type) {
+                                case '付费趋势':
+                                    if (b?.rechargeTrendMonth6) {
+                                        data = b?.rechargeTrendMonth6
+                                        return <div className={style.dbox}>
+                                            {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
+                                        </div>
+                                    }
+                                    return '--'
+                            }
                         }
-                    }
-                    return '--'
-                },
-            }, {
-                title: "M6",
-                dataIndex: "M6",
-                label: "时间区间跨度",
-                width: 110,
-                default: 28,
-                render: (a: any, b: any) => {
-                    let fieldData = getFieldDta()
-                    if (fieldData?.length > 0) {
-                        let data: any = {}
-                        let keyS: string[] = fieldData?.map((item: any) => item.key)
-                        switch (fieldData[0].type) {
-                            case '付费趋势':
-                                if (b?.rechargeTrendMonth6) {
-                                    data = b?.rechargeTrendMonth6
-                                    return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
-                                    </div>
-                                }
-                                return '--'
+                        return '--'
+                    },
+                }, {
+                    title: "1年",
+                    dataIndex: "Y1",
+                    label: "时间区间跨度",
+                    width: 110,
+                    render: (a: any, b: any) => {
+                        let fieldData = getFieldDta()
+                        if (fieldData?.length > 0) {
+                            let data: any = {}
+                            let keyS: string[] = fieldData?.map((item: any) => item.key)
+                            switch (fieldData[0].type) {
+                                case '付费趋势':
+                                    if (b?.rechargeTrendYear1) {
+                                        data = b?.rechargeTrendYear1
+                                        return <div className={style.dbox}>
+                                            {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
+                                        </div>
+                                    }
+                                    return '--'
+                            }
                         }
-                    }
-                    return '--'
-                },
-            }, {
-                title: "总",
-                default: 29,
-                dataIndex: "total",
-                label: "时间区间跨度",
-                align: "center",
-                width: 110,
-                render: (a: any, b: any) => {
-                    let fieldData = getFieldDta()
-                    if (fieldData?.length > 0) {
-                        let data: any = {}
-                        let keyS: string[] = fieldData?.map((item: any) => item.key)
-                        switch (fieldData[0].type) {
-                            case '付费趋势':
-                                if (b?.rechargeTrendTotal) {
-                                    data = b?.rechargeTrendTotal
-                                    return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
-                                    </div>
-                                }
-                                return '--'
+                        return '--'
+                    },
+                }, {
+                    title: "总",
+                    default: 29,
+                    dataIndex: "total",
+                    label: "时间区间跨度",
+                    align: "center",
+                    width: 110,
+                    render: (a: any, b: any) => {
+                        let fieldData = getFieldDta()
+                        if (fieldData?.length > 0) {
+                            let data: any = {}
+                            let keyS: string[] = fieldData?.map((item: any) => item.key)
+                            switch (fieldData[0].type) {
+                                case '付费趋势':
+                                    if (b?.rechargeTrendTotal) {
+                                        data = b?.rechargeTrendTotal
+                                        return <div className={style.dbox}>
+                                            {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</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?.increase * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                            {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
+                                        </div>
+                                    }
+                                    return '--'
+                            }
                         }
-                    }
-                    return '--'
-                },
-            }]
+                        return '--'
+                    },
+                }]
         },
         {
             label: '操作',

+ 11 - 2
src/pages/gameDataStatistics/gameData/everyday/index.tsx

@@ -1,7 +1,7 @@
 import React, { useEffect, useState } from "react"
 import TableData from "../../components/TableData"
 import columns12 from "./tableConfig"
-import { GameDayProps, getGameDayListApi } from "@/services/gameData/game"
+import { GameDayProps, getGameDayListApi, getGameDayTotalApi } from "@/services/gameData/game"
 import { useAjax } from "@/Hook/useAjax"
 import QueryForm from "@/components/QueryForm"
 import moment from "moment"
@@ -20,14 +20,21 @@ const Everyday: React.FC = () => {
         registeredEndDate: moment().format('YYYY-MM-DD'),
         sourceSystem: 'ZX_ONE'
     })
+    const [totalData, setTotalData] = useState<any[]>([])
 
     const [rtConfig, setRtConfig] = useState<{ gameId?: number, gameName?: string, beginDate?: string, sourceSystem?: string, visible: boolean }>({ visible: false })
 
     const getGameDayList = useAjax((params) => getGameDayListApi(params))
+    const getGameDayTotal = useAjax((params) => getGameDayTotalApi(params))
     /*****************************/
 
     useEffect(() => {
         getGameDayList.run(queryForm)
+        getGameDayTotal.run(queryForm).then(res => {
+            res.id = 1
+            res.gameName = '总计'
+            setTotalData([res])
+        })
     }, [queryForm])
 
     const rechargeTrendHandle = (data: any) => {
@@ -64,9 +71,11 @@ const Everyday: React.FC = () => {
                 isGameId
                 isBGGameClassify
             />}
+            isZj
+            totalData={totalData}
             scroll={{ x: 1000, y: 600 }}
             ajax={getGameDayList}
-            fixed={{ left: 5, right: 1 }}
+            fixed={{ left: 3, right: 1 }}
             dataSource={getGameDayList?.data?.records?.map((item: any, index: number) => ({ ...item, id: Number(queryForm.pageNum.toString() + index.toString()) }))}
             total={getGameDayList?.data?.total}
             page={queryForm.pageNum}

File diff suppressed because it is too large
+ 572 - 865
src/pages/gameDataStatistics/gameData/everyday/tableConfig.tsx


+ 2 - 2
src/pages/gameDataStatistics/gameData/total/tableConfig.tsx

@@ -13,8 +13,8 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
             data: [
                 { title: '推广游戏名称', dataIndex: 'gameName', label: '游戏信息', align: 'center', width: 70, default: 1, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
                 {
-                    title: '推广游戏应用类型', dataIndex: 'gameClassify', label: '游戏信息', align: 'center', width: 80, default: 2,
-                    render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
+                    title: '推广游戏应用类型', dataIndex: 'gameClassify', label: '游戏信息', align: 'center', width: 85, default: 2,
+                    render: (a: string) => <WidthEllipsis value={gameClassifyEnum[a]} />
                 }
             ]
         },

+ 6 - 0
src/services/api.ts

@@ -0,0 +1,6 @@
+// export let api: any = process.env.NODE_ENV === 'development' ? 'api' : 'http://test.api.zanxiangwl.com'
+// export let erpApi: any = process.env.NODE_ENV === 'development' ? 'erpApi' : 'http://test.api.zanxiangwl.com'
+// export let gameApi: any = process.env.NODE_ENV === 'development' ? 'gameApi' : `http://test.api.zanxiangwl.com`
+export let api: any = process.env.NODE_ENV === 'development' ? 'api' : 'http://game.84game.cn'
+export let erpApi: any = process.env.NODE_ENV === 'development' ? 'erpApi' : 'https://api.zanxiangwl.com'
+export let gameApi: any = process.env.NODE_ENV === 'development' ? 'gameApi' : `https://game.84game.cn`

+ 50 - 0
src/services/gameData/adlist.ts

@@ -0,0 +1,50 @@
+import { request } from 'umi';
+import { api } from '../api';
+import { Paging, SortProps } from './rankingList';
+let wapi = api + '/gameData'
+
+export interface PromotionDataDay extends Paging, SortProps {
+    accountId?: number,   // 推广账号ID
+    accountName?: string, // 推广账号名称
+    accountType?: string, // 投放媒体
+    agentId?: number,     // 渠道ID
+    agentKey?: string,    // 渠道标识
+    agentName?: string,   // 渠道名称
+    classify?: number,    // 游戏应用类型
+    costBeginDate?: string, // 消耗开始时间
+    costEndDate?: string,   // 消耗结束时间
+    cpName?: string,      // CP名称
+    gameId?: number,      // 游戏ID
+    gameName?: string,    // 游戏名称
+    pitcherId?: number,   // 投手ID
+    pitcherName?: string, // 投手名称
+    projectId?: number,   // 计划ID
+    projectName?: string, // 计划名称
+    promotionId?: number, // 广告ID
+    promotionName?: string, // 广告名称
+    sourceSystem?: string,  // SDK来源
+    status?: string     //广告状态
+}
+/**
+ * 广告监控数据
+ * @param data 
+ * @returns 
+ */
+export async function getPromotionDataDatListApi(data: PromotionDataDay) {
+    return request(wapi + `/promotionData/day`, {
+        method: 'POST',
+        data
+    });
+}
+
+/**
+ * 广告监控数据总计
+ * @param data 
+ * @returns 
+ */
+export async function getPromotionDataDatTotalApi(data: PromotionDataDay) {
+    return request(wapi + `/promotionData/total`, {
+        method: 'POST',
+        data
+    });
+}

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

@@ -54,6 +54,17 @@ export async function getGameDayListApi(data: GameDayProps) {
         data
     });
 }
+/**
+ * 游戏每日数据总计
+ * @param data 
+ * @returns 
+ */
+export async function getGameDayTotalApi(data: GameDayProps) {
+    return request(wapi + `/gameData/day/total`, {
+        method: 'POST',
+        data
+    });
+}
 
 export interface GameH5Props extends Paging, SortProps {
     // 注册开始时间

Some files were not shown because too many files changed in this diff