wjx 8 mēneši atpakaļ
vecāks
revīzija
f8cb97c481

+ 5 - 0
config/routerConfig.ts

@@ -152,6 +152,11 @@ const iaaData = {
                     name: '应用变现留存',
                     component: './iaaData/tencentIaa/appCashRetained',
                 },
+                {
+                    path: '/iaaData/tencentIaa/appCashAssay',
+                    name: '应用变现分析',
+                    component: './iaaData/tencentIaa/appCashAssay',
+                },
                 {
                     path: '/iaaData/tencentIaa/pitcherEveryDay',
                     name: '投手每日数据',

+ 9 - 0
src/global.less

@@ -407,4 +407,13 @@ body {
     border-radius: 0 !important;
     height: 100% !important;
   }
+}
+
+.goldColor1Class {
+  background-color: #fffbe6;
+
+  &.ant-table-cell-fix-left,
+  &.ant-table-cell-fix-right {
+    background-color: #fffbe6;
+  }
 }

+ 99 - 0
src/pages/iaaData/tencentIaa/appCashAssay/index.tsx

@@ -0,0 +1,99 @@
+import QueryForm from "@/components/QueryForm";
+import TablePro from "@/components/TablePro";
+import { useAjax } from "@/Hook/useAjax";
+import { getAppAnalysisListApi, GetAppAnalysisListProps, getAppAnalysisTotalApi } from "@/services/iaaData";
+import React, { useEffect, useState } from "react"
+import { useModel } from "umi";
+import moment from "moment";
+import columns12 from "./tableConfig";
+
+/**
+ * 应用变现分析
+ * @returns 
+ */
+const AppCashAssay: React.FC = () => {
+    /****************************************/
+    const { initialState } = useModel('@@initialState');
+    const [queryForm, setQueryForm] = useState<GetAppAnalysisListProps>({
+        pageNum: 1,
+        pageSize: 30,
+        costDayBegin: moment().subtract(1, 'days').format('YYYY-MM-DD'),
+        costDayEnd: moment().subtract(1, 'days').format('YYYY-MM-DD'),
+    })
+    const [totalData, setTotalData] = useState<any[]>([])
+
+    const getAppAnalysisList = useAjax((params) => getAppAnalysisListApi(params))
+    const getAppAnalysisTotal = useAjax((params) => getAppAnalysisTotalApi(params))
+    /****************************************/
+
+    useEffect(() => {
+        if (initialState?.iaaApp) {
+            const [appId, productType] = initialState.iaaApp.split('||')
+            getAppAnalysisList.run({ ...queryForm, appId, productType })
+            getAppAnalysisTotal.run({ ...queryForm, appId, productType }).then((res: { data: { id: number; dt: string, costDayBegin: string } }) => {
+                if (res?.data) {
+                    let data = res?.data
+                    data.id = 1
+                    data.costDayBegin = queryForm?.costDayBegin || moment().format('YYYY-MM-DD')
+                    data.dt = '总计'
+                    setTotalData([data])
+                } else {
+                    setTotalData([{ id: 1, dt: '总计' }])
+                }
+            })
+        }
+
+    }, [queryForm, initialState?.iaaApp])
+
+    return <div>
+        <TablePro
+            leftChild={<QueryForm
+                initialValues={{ day1: [moment().subtract(1, 'days'), moment().subtract(1, 'days')] }}
+                day1={{ placeholder: ['消耗日期开始', '消耗日期结束'] }}
+                onChange={(data: any) => {
+                    console.log(data)
+                    const { day1, ...params } = data
+                    let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                    newQueryForm.pageNum = 1
+                    if (day1 && day1?.length === 2) {
+                        newQueryForm['costDayBegin'] = moment(day1[0]).format('YYYY-MM-DD')
+                        newQueryForm['costDayEnd'] = moment(day1[1]).format('YYYY-MM-DD')
+                    } else {
+                        delete newQueryForm['costDayBegin']
+                        delete newQueryForm['costDayEnd']
+                    }
+                    setQueryForm({ ...newQueryForm, ...params })
+                }}
+            />}
+            isZj
+            totalData={totalData}
+            config={columns12()}
+            configName={'应用变现分析'}
+            fixed={{ left: 4, right: 0 }}
+            scroll={{ x: 1000, y: 620 }}
+            title='应用变现分析'
+            loading={getAppAnalysisList.loading}
+            ajax={getAppAnalysisList}
+            page={getAppAnalysisList?.data?.data?.current || 1}
+            pageSize={getAppAnalysisList?.data?.data?.size || 20}
+            total={getAppAnalysisList?.data?.data?.total || 0}
+            dataSource={getAppAnalysisList?.data?.data?.records?.map((item: any, index: number) => ({ ...item, id: Number(queryForm.pageNum.toString() + (index + '')) }))}
+            onChange={(pagination: any, _: any, sortData: any) => {
+                let { current, pageSize } = pagination
+                let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                if (sortData && sortData?.order) {
+                    newQueryForm['sortAsc'] = sortData?.order === 'ascend' ? true : false
+                    newQueryForm['sortFiled'] = sortData?.field
+                } else {
+                    delete newQueryForm['sortAsc']
+                    delete newQueryForm['sortFiled']
+                }
+                newQueryForm.pageNum = current || newQueryForm.pageNum
+                newQueryForm.pageSize = pageSize || newQueryForm.pageSize
+                setQueryForm({ ...newQueryForm })
+            }}
+        />
+    </div>
+}
+
+export default AppCashAssay

+ 213 - 0
src/pages/iaaData/tencentIaa/appCashAssay/tableConfig.tsx

@@ -0,0 +1,213 @@
+import WidthEllipsis from "@/components/widthEllipsis"
+import { Progress, Statistic } from "antd"
+import React from "react"
+import { PRODUCT_TYPE_ENUM } from "../../const"
+import style from '../appCashRetained/index.less'
+import moment from "moment"
+import { formatSecondsToTime } from "@/utils/utils"
+import { ACCOUNTTYPE, APPTYPE } from "@/pages/iaaSystem/manage/const"
+
+function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
+
+    const defaultIndex = 23
+    const days = Array(90).fill('').map((_, index) => {
+
+        const dataIndex = `d${index + 1}`
+        let day: any = {
+            title: `D${index + 1}`, dataIndex, label: '应用变现分析', width: 120,
+            children: [
+                {
+                    title: '注册用户留存',
+                    dataIndex: `trend${index + 1}`,
+                    key: `trend${index + 1}`,
+                    width: 100,
+                    align: 'center',
+                    className: index % 2 ? "goldColor1Class" : undefined,
+                    render: (_: any, b: any) => {
+                        if (moment().subtract(1, 'days') >= moment(b.dt === '总计' ? b.costDayBegin : b.dt).add(index, 'days')) {
+                            const data = b?.[dataIndex]?.split('/')
+                            return <div className={style.dbox}>
+                                <span style={{ color: '#d81b60', fontWeight: 600 }}>人数:<span><Statistic value={data?.[0] || 0} /></span></span>
+                                <span style={{ color: '#0f538a', fontWeight: 600 }}>率:<span><Statistic value={data?.[1] ? data?.[1] * 100 : 0} precision={2} valueStyle={!data?.[1] ? {} : data?.[1] >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" /></span></span>
+                            </div>
+                        }
+                        return <div style={{ height: 45.84, width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>--</div>
+                    },
+                },
+                {
+                    title: '人均',
+                    dataIndex: `income${index}`,
+                    key: `income${index}`,
+                    width: 140,
+                    align: 'center',
+                    className: index % 2 ? "goldColor1Class" : undefined,
+                    render: (_: any, b: any) => {
+                        if (moment().subtract(1, 'days') >= moment(b.dt === '总计' ? b.costDayBegin : b.dt).add(index, 'days')) {
+                            const data = b?.[dataIndex]?.split('/')
+                            return <div className={style.dbox}>
+                                <span style={{ color: '#d81b60', fontWeight: 600 }}>在线时长:<span>{formatSecondsToTime(data?.[2] ? Math.round(data?.[2]) : 0)}</span></span>
+                                <span style={{ color: '#0f538a', fontWeight: 600 }}>启动次数:<span><Statistic value={data?.[3] || 0} precision={2} /></span></span>
+                                <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>看广告数:<span><Statistic value={data?.[4] || 0} precision={2} /></span></span>
+                            </div>
+                        }
+                        return <div style={{ height: 45.84, width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>--</div>
+                    }
+                },
+                {
+                    title: '广告',
+                    dataIndex: `ad${index}`,
+                    key: `ad${index}`,
+                    width: 120,
+                    align: 'center',
+                    className: index % 2 ? "goldColor1Class" : undefined,
+                    render: (_: any, b: any) => {
+                        if (moment().subtract(1, 'days') >= moment(b.dt === '总计' ? b.costDayBegin : b.dt).add(index, 'days')) {
+                            const data = b?.[dataIndex]?.split('/')
+                            return <div className={style.dbox}>
+                                <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>渗透率:<span><Statistic value={data?.[5] ? data?.[5] * 100 : 0} precision={2} valueStyle={!data?.[5] ? {} : data?.[5] >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" /></span></span>
+                                <span style={{ color: '#ff5722', fontWeight: 600 }}>eCPM:<span><Statistic value={data?.[6] || 0} precision={2} /></span></span>
+                                <span style={{ color: '#d81b60', fontWeight: 600 }}>ARPU:<span><Statistic value={data?.[7] || 0} precision={2} /></span></span>
+                            </div>
+                        }
+                        return <div style={{ height: 45.84, width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>--</div>
+                    }
+                },
+            ]
+        }
+        if (index < 30) {
+            day.default = defaultIndex + index
+        }
+        return day
+    })
+
+    return [
+        {
+            label: '应用变现分析',
+            data: [
+                {
+                    title: '日期', dataIndex: 'dt', label: '应用变现分析', align: 'center', width: 80, default: 1,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '应用', dataIndex: 'appName', label: '应用变现分析', align: 'center', width: 120, default: 2,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '应用ID', dataIndex: 'appId', label: '应用变现分析', align: 'center', width: 80,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '小程序名称', dataIndex: 'mpName', label: '应用变现分析', align: 'center', width: 85, default: 3,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '小程序ID', dataIndex: 'mpId', label: '应用变现分析', align: 'center', width: 80,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '业务类型', dataIndex: 'productType', label: '应用变现分析', align: 'center', width: 80, default: 4,
+                    render: (a: string) => (<WidthEllipsis value={PRODUCT_TYPE_ENUM[a as keyof typeof PRODUCT_TYPE_ENUM]} />)
+                },
+                {
+                    title: '应用类型', dataIndex: 'appType', label: '应用变现分析', align: 'center', width: 80, default: 5,
+                    render: (a: string) => (<WidthEllipsis value={APPTYPE[a as keyof typeof APPTYPE]?.text} />)
+                },
+                {
+                    title: '推广媒体', dataIndex: 'accountType', label: '应用变现分析', align: 'center', width: 80, default: 6,
+                    render: (a: string) => (<WidthEllipsis value={ACCOUNTTYPE[a as keyof typeof ACCOUNTTYPE]?.text} />)
+                },
+                {
+                    title: '变现广告位', dataIndex: 'realizationAdUnit', label: '应用变现分析', align: 'center', width: 80, default: 7,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '总消耗', dataIndex: 'totalCost', label: '应用变现分析', align: 'right', width: 95, default: 8, sorter: true,
+                    className: 'padding_0',
+                    render: (a: number) => <div style={{ height: 66.27, position: 'relative' }}>
+                        <Progress
+                            strokeColor={{
+                                from: '#10c1e9',
+                                to: '#6892d0',
+                            }}
+                            status="active"
+                            showInfo={false}
+                            percent={a ? a / 20000 * 100 : 0}
+                        />
+                        <span style={{ position: 'absolute', left: '50%', top: '50%', width: '100%', padding: '0 5px', transform: 'translate(-50%, -50%)' }}><Statistic value={a || 0} precision={2} valueStyle={a >= 20000 ? { color: '#000', fontWeight: 'bold' } : { fontWeight: 'bold' }} /></span>
+                    </div>
+                },
+                {
+                    title: '消耗', dataIndex: 'cost', label: '应用变现分析', align: 'right', width: 85, default: 9, sorter: true,
+                    className: 'padding_0',
+                    render: (a: number) => <div style={{ height: 66.27, position: 'relative' }}>
+                        <Progress
+                            strokeColor={{
+                                from: '#ff5900',
+                                to: '#ffd380',
+                            }}
+                            status="active"
+                            showInfo={false}
+                            percent={a ? a / 20000 * 100 : 0}
+                        />
+                        <span style={{ position: 'absolute', left: '50%', top: '50%', width: '100%', padding: '0 5px', transform: 'translate(-50%, -50%)' }}><Statistic value={a || 0} precision={2} valueStyle={a >= 20000 ? { color: '#000', fontWeight: 'bold' } : { fontWeight: 'bold' }} /></span>
+                    </div>
+                },
+                {
+                    title: '赔付金', dataIndex: 'payout', label: '应用变现分析', align: 'right', width: 80, default: 10, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '注册人数', dataIndex: 'userRegCnt', label: '应用变现分析', align: 'center', width: 80, default: 11, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册成本', dataIndex: 'regPaid', label: '应用变现分析', align: 'center', width: 80, default: 12, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '最新留存人数', dataIndex: 'userRetentionCnt', label: '应用变现分析', align: 'center', width: 80, default: 13, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '最新留存率', dataIndex: 'userRetentionRatio', label: '应用变现分析', align: 'center', width: 80, default: 14, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '广告变现人数', dataIndex: 'adMonetizeUv', label: '应用变现分析', align: 'center', width: 75, default: 15, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '总广告ecpm', dataIndex: 'totalAdEcpm', label: '应用变现分析', align: 'center', width: 80, default: 16, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '总广告ARPU', dataIndex: 'totalAdArpu', label: '应用变现分析', align: 'center', width: 80, default: 17, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '广告曝光量', dataIndex: 'viewTotal', label: '应用变现分析', align: 'center', width: 80, default: 18, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '累计总收入', dataIndex: 'totalIncome', label: '应用变现分析', align: 'right', width: 80, default: 19, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '累计总回收', dataIndex: 'incomeRoi', label: '应用变现分析', align: 'center', width: 80, default: 20, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '分享成功人数', dataIndex: 'shareUv', label: '应用变现分析', align: 'center', width: 75, default: 21, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '分享后活跃人数', dataIndex: 'shareClkUv', label: '应用变现分析', align: 'center', width: 80, default: 22, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                ...days
+            ]
+        }
+    ]
+}
+
+export default columns12

+ 3 - 3
src/pages/iaaData/tencentIaa/appCashTrend/index.tsx

@@ -1,4 +1,4 @@
-import { getAppTrendListApi, GetAppTrendListProps, getAppTrendTotalApi } from "@/services/iaaData";
+import { getAppTrendListApi, GetAppTrendListProps, getAppTrendNewListApi, getAppTrendNewTotalApi, getAppTrendTotalApi } from "@/services/iaaData";
 import React, { useEffect, useState } from "react"
 import { useModel } from "umi";
 import moment from "moment";
@@ -23,8 +23,8 @@ const AppCashTrend: React.FC = () => {
     })
     const [totalData, setTotalData] = useState<any[]>([])
 
-    const getAppTrendList = useAjax((params) => getAppTrendListApi(params))
-    const getAppTrendTotal = useAjax((params) => getAppTrendTotalApi(params))
+    const getAppTrendList = useAjax((params) => getAppTrendNewListApi(params))
+    const getAppTrendTotal = useAjax((params) => getAppTrendNewTotalApi(params))
     /****************************************/
 
     useEffect(() => {

+ 32 - 97
src/pages/iaaData/tencentIaa/appCashTrend/tableConfig.tsx

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

+ 24 - 0
src/pages/iaaSystem/manage/const.ts

@@ -0,0 +1,24 @@
+
+/** 应用类型 */
+export const APPTYPE = {
+    APP_TYPE_TENCENT_GAME: { text: '微信小游戏' },
+    APP_TYPE_OCENAENGINE_GAME: { text: '抖音小游戏' },
+    APP_TYPE_TENCENT_MP: { text: '微信小程序' },
+    APP_TYPE_OCENAENGINE_MP: { text: '抖音小程序' },
+    APP_TYPE_ANDROID_APP: { text: 'Android应用APP' },
+    APP_TYPE_IOS_APP: { text: 'IOS应用APP' },
+    APP_TYPE_WEB_H5: { text: '网页H5应用' }
+}
+
+/** 推广媒体 */
+export const ACCOUNTTYPE = {
+    OUTSIDE_APPLICATION: {
+        text: '外部应用'
+    },
+    TENCENT_MINI_GAME: {
+        text: '腾讯小游戏'
+    },
+    OCENAENGINE_MINI_GAME: {
+        text: '头条小游戏'
+    }
+}

+ 3 - 11
src/pages/iaaSystem/manage/useApp/tableConfig.tsx

@@ -1,8 +1,8 @@
 import MyUpload from "@/components/MyUpload";
-import { UserOutlined } from "@ant-design/icons";
 import { ProColumns } from "@ant-design/pro-table";
-import { Avatar, Space } from "antd";
+import { Space } from "antd";
 import React from "react";
+import { APPTYPE } from "../const";
 
 
 const tableConfig = () => {
@@ -76,15 +76,7 @@ const tableConfig = () => {
             search: false,
             width: 90,
             align: 'center',
-            valueEnum: {
-                APP_TYPE_TENCENT_GAME: { text: '微信小游戏' },
-                APP_TYPE_OCENAENGINE_GAME: { text: '抖音小游戏' },
-                APP_TYPE_TENCENT_MP: { text: '微信小程序' },
-                APP_TYPE_OCENAENGINE_MP: { text: '抖音小程序' },
-                APP_TYPE_ANDROID_APP: { text: 'Android应用APP' },
-                APP_TYPE_IOS_APP: { text: 'IOS应用APP' },
-                APP_TYPE_WEB_H5: { text: '网页H5应用' }
-            }
+            valueEnum: APPTYPE
         },
         {
             title: '业务类型',

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

@@ -213,6 +213,60 @@ export async function getAppTrendTotalApi(data: GetAppTrendListProps) {
     });
 }
 
+/**
+ * 应用变现趋势
+ * @param data 
+ * @returns 
+ */
+export async function getAppTrendNewListApi(data: GetAppTrendListProps) {
+    return request(wapi + `/monitor/app/trend/listOfPage/new`, {
+        method: 'POST',
+        data
+    });
+}
+
+/**
+ * 应用变现总计
+ * @param data 
+ * @returns 
+ */
+export async function getAppTrendNewTotalApi(data: GetAppTrendListProps) {
+    return request(wapi + `/monitor/app/trend/total/new`, {
+        method: 'POST',
+        data
+    });
+}
+
+
+
+export interface GetAppAnalysisListProps extends Paging, SortProps{
+    costDayBegin?: string
+    costDayEnd?: string
+}
+
+/**
+ * 应用变现分析
+ * @param data 
+ * @returns 
+ */
+export async function getAppAnalysisListApi(data: GetAppAnalysisListProps) {
+    return request(wapi + `/monitor/app/analysis/listOfPage`, {
+        method: 'POST',
+        data
+    });
+}
+
+/**
+ * 应用变现分析 总计
+ * @param data 
+ * @returns 
+ */
+export async function getAppAnalysisTotalApi(data: GetAppAnalysisListProps) {
+    return request(wapi + `/monitor/app/analysis/total`, {
+        method: 'POST',
+        data
+    });
+}
 
 export interface getPutUserTxEveryDayListProps extends Paging, SortProps {
     costDayBegin?: string