wjx 7 mēneši atpakaļ
vecāks
revīzija
bfcbd95b83

+ 12 - 0
config/routerConfig.ts

@@ -92,6 +92,12 @@ const iaaSystem = {
             name: 'IAA后台管理',
             access: 'manage',
             routes: [
+                {
+                    path: '/iaaSystem/manage/useApp',
+                    name: '应用管理',
+                    access: 'useApp',
+                    component: './iaaSystem/manage/useApp',
+                },
                 {
                     path: '/iaaSystem/manage/power',
                     name: '角色分配',
@@ -141,6 +147,12 @@ const iaaData = {
                     access: 'appEveryDayData',
                     component: './iaaData/tencentIaa/appEveryDayData',
                 },
+                {
+                    path: '/iaaData/tencentIaa/pitcherEveryDay',
+                    name: '投手每日数据',
+                    access: 'pitcherEveryDay',
+                    component: './iaaData/tencentIaa/pitcherEveryDay',
+                },
             ]
         }
     ]

+ 10 - 1
src/Hook/useAjax.tsx

@@ -22,7 +22,7 @@ export interface AjaxPromise {
  * @returns data 请求结果数据
  * @returns initData 初始data
  * */
-export function useAjax(fnc: (params?: any) => Promise<any>, options?: { type: 'table' }): AjaxPromise {
+export function useAjax(fnc: (params?: any) => Promise<any>, options?: { type: 'table' | "noPage" }): AjaxPromise {
     // const {message}= App.useApp()
     const [loading, setLoding] = useState(false)//状态
     const [data, setData] = useState<any>()//数据
@@ -51,6 +51,15 @@ export function useAjax(fnc: (params?: any) => Promise<any>, options?: { type: '
                     success: res.success
                 }
             }
+            if(options?.type === 'noPage'){
+                return {
+                    current: 1,
+                    data: res.data,
+                    pageSize: 20,
+                    total: res.data.length,
+                    success: true
+                }
+            }
             return res//返回data
         }).catch(err => {
             console.log(err)

+ 1 - 1
src/components/QueryForm/index.tsx

@@ -96,7 +96,7 @@ const QueryForm: React.FC<Props> = (props) => {
                     showSearch
                     allowClear
                     mode="multiple"
-                    style={{ width: 120 }}
+                    style={{ minWidth: 120 }}
                     placeholder={'投手'}
                     filterOption={(input, option) =>
                         (option?.label as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 59 - 54
src/pages/iaaData/tencentIaa/appEveryDayData/tableConfig.tsx

@@ -2,6 +2,7 @@ import WidthEllipsis from "@/components/widthEllipsis"
 import { Badge, Statistic } from "antd"
 import React from "react"
 import { PRODUCT_TYPE_ENUM } from "../../const"
+import { formatSecondsToTime } from "@/utils/utils"
 
 function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
 
@@ -36,19 +37,19 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '累计消耗', dataIndex: 'costToday', label: '基本信息', align: 'center', width: 95, default: 5, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} />
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '消耗', dataIndex: 'costTotal', label: '基本信息', align: 'center', width: 90, default: 6, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} />
+                    title: '每日真实消耗', dataIndex: 'costTotal', label: '基本信息', align: 'center', width: 90, default: 6, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '消耗', dataIndex: 'cost', label: '基本信息', align: 'center', width: 85, default: 7, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} />
+                    title: '每日消耗', dataIndex: 'cost', label: '基本信息', align: 'center', width: 85, default: 7, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '赔付金', dataIndex: 'payout', label: '基本信息', align: 'center', width: 80, default: 8, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} />
+                    title: '每日赔付金', dataIndex: 'payout', label: '基本信息', align: 'center', width: 80, default: 8, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '推广广告账号数量', tips: '消耗大于0', dataIndex: 'accountCount', label: '基本信息', align: 'center', width: 80, default: 9, sorter: true,
@@ -73,7 +74,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: 'DAU', tips: '日活用户人数', dataIndex: 'dau', label: '应用端指标', align: 'center', width: 80, default: 13, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '新增占比', tips: '新增注册人数/DAU', dataIndex: 'newProportion', label: '应用端指标', align: 'center', width: 90, default: 14, sorter: true,
@@ -81,31 +82,31 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '累计利润', tips: '广告变现累计收入-累计消耗', dataIndex: 'totalProfit', label: '应用端指标', align: 'center', width: 100, default: 15, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '利润率', tips: '(广告变现累计收入-累计消耗)/广告变现累计收入*100%', dataIndex: 'profitRate', label: '应用端指标', align: 'center', width: 80, default: 16, sorter: true,
+                    title: '利润率', tips: '(广告变现累计收入-累计消耗)/累计消耗*100%', dataIndex: 'profitRate', label: '应用端指标', align: 'center', width: 80, default: 16, 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: 'adMonRevenue', label: '应用端指标', align: 'center', width: 80, default: 17, sorter: true,
-                    render: (a: number) => <Statistic value={(a || 0) / 100} />
+                    render: (a: number) => <Statistic value={(a || 0) / 100} precision={2} />
                 },
                 {
                     title: '广告变现累计收入', dataIndex: 'adMonRevenueTotal', label: '应用端指标', align: 'center', width: 85, default: 18, sorter: true,
-                    render: (a: number) => <Statistic value={(a || 0) / 100} />
+                    render: (a: number) => <Statistic value={(a || 0) / 100} precision={2} />
                 },
                 {
                     title: '新增用户成本', tips: '总消耗/新增注册人数', dataIndex: 'newUserRate', label: '应用端指标', align: 'center', width: 80, default: 19, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '人均新增成本', tips: '累计消耗/累计注册人数', dataIndex: 'avgUserRate', label: '应用端指标', align: 'center', width: 80, default: 20, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '人均活跃成本', tips: '累计消耗/DAU', dataIndex: 'avgActiveRate', label: '应用端指标', align: 'center', width: 80, default: 21, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '分享用户人数', dataIndex: 'shareUser', label: '应用端指标', align: 'center', width: 70, default: 22, sorter: true,
@@ -145,30 +146,34 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '活跃用户停留总时长', tips: '活跃用户人均停留时长*活跃用户人数', dataIndex: 'activeDuration', label: '应用端指标', align: 'center', width: 90, default: 31, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => {
+                        return formatSecondsToTime(a || 0)
+                    }
                 },
                 {
                     title: '活跃用户人均停留时长', tips: '活跃用户停留总时长/活跃用户人数', dataIndex: 'avgActiveDuration', label: '应用端指标', align: 'center', width: 100, default: 32, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => {
+                        return formatSecondsToTime(a || 0)
+                    }
                 },
                 {
                     title: '广告新增ARPU', tips: '广告变现收入/新增注册人数', dataIndex: 'nweAdArpu', label: '应用端指标', align: 'center', width: 80, default: 33, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '广告总ARPU', tips: '广告累计变现收入/累计注册人数', dataIndex: 'adArpuTotal', label: '应用端指标', align: 'center', width: 80, default: 34,sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    title: '广告总ARPU', tips: '广告累计变现收入/累计注册人数', dataIndex: 'adArpuTotal', label: '应用端指标', align: 'center', width: 80, default: 34, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '激励视频广告收入', dataIndex: 'videoAdIncome', label: '应用端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '激励视频广告ecpm', dataIndex: 'videoAdEcpm', label: '应用端指标', align: 'center', width: 80,sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    title: '激励视频广告ecpm', dataIndex: 'videoAdEcpm', label: '应用端指标', align: 'center', width: 80, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '激励视频拉取量', dataIndex: 'videoAdCount', label: '应用端指标', align: 'center', width: 80,sorter: true,
+                    title: '激励视频拉取量', dataIndex: 'videoAdCount', label: '应用端指标', align: 'center', width: 80, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} />
                 },
                 {
@@ -177,11 +182,11 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '插屏广告收入', dataIndex: 'plaqueAdIncome', label: '应用端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '插屏广告ecpm', dataIndex: 'plaqueAdEcpm', label: '应用端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '插屏广告拉取量', dataIndex: 'plaqueAdCount', label: '应用端指标', align: 'center', width: 80, sorter: true,
@@ -213,11 +218,11 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: 'Banner广告收入', dataIndex: 'bannerIncome', label: '应用端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: 'Banner广告ecpm', dataIndex: 'bannerEcpm', label: '应用端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: 'banner广告拉取量', dataIndex: 'bannerReqSuccCount', label: '应用端指标', align: 'center', width: 80, sorter: true,
@@ -225,11 +230,11 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '人均Banner广告广告收益', dataIndex: 'avgUserBannerIncome', label: '应用端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '人均激励视频收益', dataIndex: 'avgUserVideoIncome', label: '应用端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '人均插屏广告次数', dataIndex: 'avgUserInterstitialCount', label: '应用端指标', align: 'center', width: 80, sorter: true,
@@ -254,11 +259,11 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '小游戏注册率', dataIndex: 'miniGameRegisterRate', label: '广告媒体端指标', align: 'center', width: 80, default: 37, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
                     title: '小游戏注册成本', dataIndex: 'miniGameRegisterCost', label: '广告媒体端指标', align: 'center', width: 80, default: 38, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '小游戏注册首日广告变现人数(平台上报)', dataIndex: 'miniGameFirstDayAdMonetizationUsers', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
@@ -274,23 +279,23 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '注册首日广告变现金额(平台上报)', dataIndex: 'miniGameFirstDayAdMonetizationAmount', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '首日变现ARPPU', tips: '注册首日广告变现金额(平台上报)/小游戏注册首日广告变现人数(平台上报)', dataIndex: 'miniGameFirstDayAdPayingArpu', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '首日变现ARPU', tips: '小游戏注册首日广告变现金额(平台上报)/小游戏注册人数', dataIndex: 'miniGameFirstDayAdPayingArppu', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '首日广告变现成本(平台上报)', dataIndex: 'miniGameFirstDayAdPayingCost', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '首日ROI', tips: '小游戏注册首日广告变现金额(平台上报)/消耗*100%', dataIndex: 'miniGameFirstDayAdPayingRoi', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
                     title: '激活首24小时广告变现人数(平台上报)', dataIndex: 'adPayingUsers24hPla', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
@@ -302,19 +307,19 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '激活首24小时广告变现金额(平台上报)', dataIndex: 'incomeVal24hPla', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '激活首24小时广告变现ARPPU(平台上报)', dataIndex: 'firstDayAdPurArppuCost24hPla', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '24小时广告变现ARPU(平台上报)', dataIndex: 'firstDayAdPurArpuCost24hPla', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '24小时广告变现成本', dataIndex: 'firstDayAdPurArpuCost24hPlaCost', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '24小时广告变现ROI', dataIndex: 'firstDayAdPurArpuCost24hPlaRoi', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
@@ -334,19 +339,19 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '小游戏注册3日广告变现金额(平台上报)', dataIndex: 'miniGameAdMonetizationAmountD3', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '3日广告变现ARPPU(平台上报)', dataIndex: 'adPurArppuDay3Cost', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '3日广告变现ARPU(平台上报)', dataIndex: 'adPurArpuDay3Cost', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '3日广告变现成本(平台上报)', dataIndex: 'adPurDay3Cost', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '3日广告变现ROI', dataIndex: 'adPurDay3Roi', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
@@ -366,19 +371,19 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '小游戏注册7日广告变现金额(平台上报)', dataIndex: 'miniGameRegD7Amount', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '7日广告变现ARPPU(平台上报)', dataIndex: 'miniGameRegD7Arppu', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '7日广告变现ARPU(平台上报)', dataIndex: 'miniGameRegD7Arpu', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '7日广告变现成本(平台上报', dataIndex: 'miniGameRegD7Cost', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '7日广告变现ROI', dataIndex: 'miniGameRegD7Roi', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
@@ -394,23 +399,23 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '小游戏广告变现金额(平台上报)', dataIndex: 'miniGameAdMonetizationAmount', label: '广告媒体端指标', align: 'center', width: 100, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '广告变现ARPPU(平台上报)', dataIndex: 'miniGameAdMonetizationArppu', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '广告变现ARPU(平台上报)', dataIndex: 'miniGameAdMonetizationArpu', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '广告变现成本(平台上报)', dataIndex: 'miniGameAdMonetizationCost', label: '广告媒体端指标', align: 'center', width: 80, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '广告变现总ROI', dataIndex: 'miniGameAdMonetizationRoi', label: '广告媒体端指标', align: 'center', width: 80, default: 39, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} />
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 }
             ]
         }

+ 100 - 0
src/pages/iaaData/tencentIaa/pitcherEveryDay/index.tsx

@@ -0,0 +1,100 @@
+import { useAjax } from "@/Hook/useAjax";
+import { getPutUserTxEveryDayListApi, getPutUserTxEveryDayListProps, getPutUserTxEveryDayTotalApi } from "@/services/iaaData";
+import React, { useEffect, useState } from "react"
+import { useModel } from "umi";
+import moment from "moment";
+import TablePro from "@/components/TablePro";
+import QueryForm from "@/components/QueryForm";
+import columns12 from "./tableConfig";
+
+/**
+ * 投手每日数据
+ * @returns 
+ */
+const PitcherEveryDay: React.FC = () => {
+
+
+    /****************************************/
+    const { initialState } = useModel('@@initialState');
+    const [queryForm, setQueryForm] = useState<getPutUserTxEveryDayListProps>({
+        pageNum: 1,
+        pageSize: 30,
+        costDayBegin: moment().format('YYYY-MM-DD'),
+        costDayEnd: moment().format('YYYY-MM-DD'),
+    })
+    const [totalData, setTotalData] = useState<any[]>([])
+
+    const getPutUserTxEveryDayList = useAjax((params) => getPutUserTxEveryDayListApi(params))
+    const getPutUserTxEveryDayTotal = useAjax((params) => getPutUserTxEveryDayTotalApi(params))
+    /****************************************/
+
+    useEffect(() => {
+        if (initialState?.iaaApp) {
+            const [appId, productType] = initialState.iaaApp.split('||')
+            getPutUserTxEveryDayList.run({ ...queryForm, appId, productType })
+            getPutUserTxEveryDayTotal.run({ ...queryForm, appId, productType }).then((res: { data: { id: number; pitcher: string } }) => {
+                if (res?.data) {
+                    let data = res?.data
+                    data.id = 1
+                    data.pitcher = '总计'
+                    setTotalData([data])
+                } else {
+                    setTotalData([{ id: 1, pitcher: '总计' }])
+                }
+            })
+        }
+
+    }, [queryForm, initialState?.iaaApp])
+
+    return <div>
+        <TablePro
+            leftChild={<QueryForm
+                initialValues={{ day1: [moment(), moment()] }}
+                day1={{ placeholder: ['消耗日期开始', '消耗日期结束'] }}
+                isPutUserIdList
+                onChange={(data: any) => {
+                    console.log(data)
+                    const { day1, ...params } = data
+                    let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                    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={getPutUserTxEveryDayList.loading}
+            ajax={getPutUserTxEveryDayList}
+            page={getPutUserTxEveryDayList?.data?.data?.current || 1}
+            pageSize={getPutUserTxEveryDayList?.data?.data?.size || 20}
+            total={getPutUserTxEveryDayList?.data?.data?.total || 0}
+            dataSource={getPutUserTxEveryDayList?.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 PitcherEveryDay

+ 276 - 0
src/pages/iaaData/tencentIaa/pitcherEveryDay/tableConfig.tsx

@@ -0,0 +1,276 @@
+import WidthEllipsis from "@/components/widthEllipsis"
+import { Badge, Statistic } from "antd"
+import React from "react"
+import { PRODUCT_TYPE_ENUM } from "../../const"
+
+function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
+
+
+    return [
+        {
+            label: '基本信息',
+            data: [
+                {
+                    title: '投手', dataIndex: 'pitcher', label: '基本信息', align: 'center', width: 120, default: 1,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '业务类型', dataIndex: 'productType', label: '基本信息', align: 'center', width: 80, default: 2,
+                    render: (a: string) => (<WidthEllipsis value={PRODUCT_TYPE_ENUM[a as keyof typeof PRODUCT_TYPE_ENUM]} />)
+                },
+                {
+                    title: '应用名称', dataIndex: 'appName', label: '基本信息', align: 'center', width: 80, default: 3,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '应用ID', dataIndex: 'appId', label: '基本信息', align: 'center', width: 80,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '小程序ID', dataIndex: 'mpId', label: '基本信息', align: 'center', width: 80, default: 4,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '消耗时间', dataIndex: 'dt', label: '基本信息', align: 'center', width: 80, default: 5,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '总消耗', dataIndex: 'cost', label: '基本信息', align: 'center', width: 90, default: 6, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '消耗', dataIndex: 'costToday', label: '基本信息', align: 'center', width: 85, default: 7, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '赔付金', dataIndex: 'payout', label: '基本信息', align: 'center', width: 80, default: 8, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '推广广告账号数量', tips: '消耗大于0', dataIndex: 'accountCount', label: '基本信息', align: 'center', width: 80, default: 9, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '推广广告数量', tips: '消耗大于0', dataIndex: 'adCount', label: '基本信息', align: 'center', width: 80, default: 10, sorter: true,
+                    render: (a: string) => <Statistic value={a || 0} />
+                },
+            ]
+        },
+        {
+            label: '基础数据',
+            data: [
+                {
+                    title: '点击量', dataIndex: 'validClickCount', label: '基础数据', align: 'center', width: 80, default: 11, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '曝光量', dataIndex: 'viewCount', label: '基础数据', align: 'center', width: 80, default: 12, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '千次曝光成本', dataIndex: 'thousandDisplayPrice', label: '基础数据', align: 'center', width: 80, default: 13, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '点击均价', dataIndex: 'cpc', label: '基础数据', align: 'center', width: 80, default: 14, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '小游戏注册人数', dataIndex: 'miniGameRegisterUsers', label: '基础数据', align: 'center', width: 80, default: 15, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '小游戏注册成本', dataIndex: 'miniGameRegisterCost', label: '基础数据', align: 'center', width: 80, default: 16, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '小游戏注册率', dataIndex: 'miniGameRegisterRate', label: '基础数据', align: 'center', width: 80, default: 17, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+            ]
+        },
+        {
+            label: 'D1数据',
+            data: [
+                {
+                    title: '小游戏注册首日广告变现人数(平台上报)', dataIndex: 'miniGameFirstDayAdMonetizationUsers', label: 'D1数据', align: 'center', width: 100, default: 18, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活首日广告变现人数(平台上报)', dataIndex: 'adMonetizationPlaDedupActive1dPv', label: 'D1数据', align: 'center', width: 90, default: 19, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活首日广告变现次数(平台上报)', dataIndex: 'incomePv1dPla', label: 'D1数据', align: 'center', width: 90, default: 20, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '注册首日广告变现金额(平台上报)', dataIndex: 'miniGameFirstDayAdMonetizationAmount', label: 'D1数据', align: 'center', width: 90, default: 21, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '首日变现ARPPU', dataIndex: 'miniGameFirstDayAdPayingArppu', label: 'D1数据', align: 'center', width: 80, default: 22, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '首日变现ARPU', dataIndex: 'miniGameFirstDayAdPayingArpu', label: 'D1数据', align: 'center', width: 80, default: 23, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '首日广告变现成本(平台上报)', dataIndex: 'miniGameFirstDayAdPayingCost', label: 'D1数据', align: 'center', width: 80, default: 24, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '首日ROI', dataIndex: 'miniGameFirstDayAdPayingRoi', label: 'D1数据', align: 'center', width: 80, default: 25, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+            ]
+        },
+        {
+            label: '24小时数据',
+            data: [
+                {
+                    title: '激活首24小时广告变现人数(平台上报)', dataIndex: 'adPayingUsers24hPla', label: '24小时数据', align: 'center', width: 90, default: 26, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活首24小时广告变现次数(平台上报)', dataIndex: 'incomePv24hPla', label: '24小时数据', align: 'center', width: 90, default: 27, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活首24小时广告变现金额(平台上报)', dataIndex: 'incomeVal24hPla', label: '24小时数据', align: 'center', width: 90, default: 28, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '激活首24小时广告变现ARPPU(平台上报)', dataIndex: 'firstDayAdPurArppuCost24hPla', label: '24小时数据', align: 'center', width: 100, default: 29, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '24小时广告变现ARPU(平台上报)', dataIndex: 'firstDayAdPurArpuCost24hPla', label: '24小时数据', align: 'center', width: 90, default: 30, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '24小时广告变现成本', dataIndex: 'firstDayAdPurArpuCost24hPlaCost', label: '24小时数据', align: 'center', width: 80, default: 31, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '24小时广告变现ROI', dataIndex: 'firstDayAdPurArpuCost24hPlaRoi', label: '24小时数据', align: 'center', width: 80, default: 32, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+            ]
+        },
+        {
+            label: 'D3数据',
+            data: [
+                {
+                    title: '小游戏注册3日广告变现人数(平台上报)', dataIndex: 'minigame3dIncomeUv', label: 'D3数据', align: 'center', width: 90, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活3日广告变现人数(平台上报)', dataIndex: 'regUserTotal', label: 'D3数据', align: 'center', width: 90, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '小游戏注册3日广告变现次数(平台上报)', dataIndex: 'minigame3dIncomeCount', label: 'D3数据', align: 'center', width: 90, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活3日广告变现次数(平台上报)', dataIndex: 'adMonetizationPlaDedupActive3dPv', label: 'D3数据', align: 'center', width: 90, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '小游戏注册3日广告变现金额(平台上报)', dataIndex: 'miniGameAdMonetizationAmountD3', label: 'D3数据', align: 'center', width: 90, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '3日广告变现ARPPU(平台上报)', dataIndex: 'adPurArppuDay3Cost', label: 'D3数据', align: 'center', width: 90, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '3日广告变现ARPU(平台上报)', dataIndex: 'adPurArpuDay3Cost', label: 'D3数据', align: 'center', width: 80, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '3日广告变现成本(平台上报)', dataIndex: 'adPurDay3Cost', label: 'D3数据', align: 'center', width: 80, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '3日广告变现ROI', dataIndex: 'adPurDay3Roi', label: 'D3数据', align: 'center', width: 80, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+            ]
+        },
+        {
+            label: 'D7数据',
+            data: [
+                {
+                    title: '小游戏注册7日广告变现人数(平台上报)', dataIndex: 'minigame7dIncomeUv', label: 'D7数据', align: 'center', width: 90, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活7日变现人数(平台上报)', dataIndex: 'adMonetizationPlaDedupActive7dPv', label: 'D7数据', align: 'center', width: 80, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '激活7日广告变现次数(平台上报)', dataIndex: 'minigame7dIncomeCount', label: 'D7数据', align: 'center', width: 80, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '小游戏注册7日广告变现金额(平台上报)', dataIndex: 'miniGameRegD7Amount', label: 'D7数据', align: 'center', width: 90, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '7日广告变现ARPPU(平台上报)', dataIndex: 'miniGameRegD7Arppu', label: 'D7数据', align: 'center', width: 80, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '7日广告变现ARPU(平台上报)', dataIndex: 'miniGameRegD7Arpu', label: 'D7数据', align: 'center', width: 80, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '7日广告变现成本(平台上报)', dataIndex: 'miniGameRegD7Cost', label: 'D7数据', align: 'center', width: 80, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '7日广告变现ROI', dataIndex: 'miniGameRegD7Roi', label: 'D7数据', align: 'center', width: 80, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                }
+            ]
+        },
+        {
+            label: 'D总数据',
+            data: [
+                {
+                    title: '广告变现人数(平台上报)', dataIndex: 'miniGameAdMonetizationUsers', label: 'D总数据', align: 'center', width: 80, default: 33, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '广告变现次数(平台上报)', dataIndex: 'incomePvPla', label: 'D总数据', align: 'center', width: 80, default: 34, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '广告变现金额(平台上报)', dataIndex: 'miniGameAdMonetizationAmount', label: 'D总数据', align: 'center', width: 80, default: 35, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '广告变现ARPPU(平台上报)', dataIndex: 'miniGameAdMonetizationArppu', label: 'D总数据', align: 'center', width: 80, default: 36, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '广告变现ARPU(平台上报)', dataIndex: 'miniGameAdMonetizationArpu', label: 'D总数据', align: 'center', width: 80, default: 37, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '广告变现成本(平台上报)', dataIndex: 'miniGameAdMonetizationCost', label: 'D总数据', align: 'center', width: 80, default: 38, sorter: true,
+                    render: (a: number) => <Statistic value={a || 0} precision={2}/>
+                },
+                {
+                    title: '广告变现总ROI', dataIndex: 'miniGameAdMonetizationRoi', label: 'D总数据', align: 'center', width: 80, default: 39, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+            ]
+        }
+    ]
+}
+
+export default columns12

+ 36 - 0
src/pages/iaaSystem/manage/useApp/index.tsx

@@ -0,0 +1,36 @@
+import { useAjax } from "@/Hook/useAjax"
+import { getAppAllApi } from "@/services/iaaSystem/application"
+import ProTable from "@ant-design/pro-table"
+import React from "react"
+import tableConfig from "./tableConfig"
+
+
+/**
+ * 应用管理
+ * @returns 
+ */
+const UseApp: React.FC = () => {
+
+
+    /********************************/
+    const getAppAll = useAjax(() => getAppAllApi(), { type: 'noPage' })
+    /********************************/
+
+    return <>
+        <ProTable<any>
+            columns={tableConfig()}
+            cardBordered
+            request={async (params) => {
+                return await getAppAll.run(params)
+            }}
+            editable={{
+                type: 'multiple',
+            }}
+            rowKey="id"
+            search={false}
+            headerTitle={<strong>应用管理</strong>}
+        />
+    </>
+}
+
+export default UseApp

+ 36 - 0
src/pages/iaaSystem/manage/useApp/tableConfig.tsx

@@ -0,0 +1,36 @@
+import { ProColumns } from "@ant-design/pro-table";
+import React from "react";
+
+
+const tableConfig = () => {
+
+    const columns: ProColumns<any>[] = [
+        {
+            title: '应用',
+            dataIndex: 'name',
+            key: 'name',
+            search: false
+        },
+        {
+            title: 'CP',
+            key: 'cpName',
+            dataIndex: 'cpName',
+            search: false
+        },
+        {
+            title: 'MP名称',
+            key: 'mpName',
+            dataIndex: 'mpName',
+            search: false
+        },
+        {
+            title: 'MPID',
+            key: 'mpId',
+            dataIndex: 'mpId',
+            search: false
+        }
+    ];
+    return columns
+}
+
+export default tableConfig

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

@@ -123,4 +123,35 @@ export async function getAppTxEveryDayTotalApi(data: GetAppTxEveryDayListProps)
         method: 'POST',
         data
     });
+}
+
+
+
+export interface getPutUserTxEveryDayListProps extends Paging, SortProps {
+    costDayBegin?: string
+    costDayEnd?: string
+    putUserIdList?: number[]
+}
+/**
+ * 投手每日数据
+ * @param data 
+ * @returns 
+ */
+export async function getPutUserTxEveryDayListApi(data: getPutUserTxEveryDayListProps) {
+    return request(wapi + `/monitor/putUser/gdt/listOfPage`, {
+        method: 'POST',
+        data
+    });
+}
+
+/**
+ * 投手每日数据 总计
+ * @param data 
+ * @returns 
+ */
+export async function getPutUserTxEveryDayTotalApi(data: getPutUserTxEveryDayListProps) {
+    return request(wapi + `/monitor/putUser/gdt/total`, {
+        method: 'POST',
+        data
+    });
 }

+ 14 - 0
src/utils/utils.ts

@@ -124,4 +124,18 @@ export const getVideoImgUrl = (videoUrl: string) => {
         return videoUrl + "?x-oss-process=video/snapshot,t_0,f_jpg,w_0,h_0,m_fast,ar_auto"
     }
     return videoUrl
+}
+
+/**
+ * 秒数格式化
+ * @param seconds 秒
+ * @returns 
+ */
+export function formatSecondsToTime(seconds: number): string {
+    const hours = Math.floor(seconds / 3600);
+    const minutes = Math.floor((seconds % 3600) / 60);
+    const secs = seconds % 60;
+
+    // 使用 padStart 确保每个部分都是两位数  
+    return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(secs).padStart(2, '0')}`;
 }