wjx 1 år sedan
förälder
incheckning
5096726cd3

+ 13 - 0
config/routerConfig.ts

@@ -193,6 +193,19 @@ const gameDataStatistics = {
                 },
             ]
         },
+        {
+            path: '/gameDataStatistics/gameServer',
+            name: '游戏区服',
+            access: 'gameServer',
+            routes: [
+                {
+                    path: '/gameDataStatistics/gameServer/serverData',
+                    name: '区服数据',
+                    access: 'serverData',
+                    component: './gameDataStatistics/gameServer/serverData',
+                },
+            ]
+        },
         {
             path: '/gameDataStatistics/order',
             name: '订单',

+ 2 - 0
src/app.tsx

@@ -13,6 +13,7 @@ import { ReactComponent as AdLaunchSvg } from '@/assets/adLaunch.svg'
 import { ReactComponent as MaterialSvg } from '@/assets/material.svg'
 import { ReactComponent as NumberSvg } from '@/assets/number.svg'
 import { ReactComponent as GameSvg } from '@/assets/game.svg'
+import { ReactComponent as GameServerSvg } from '@/assets/gameServer.svg'
 import versions from './utils/versions';
 
 
@@ -103,6 +104,7 @@ const IconMap = {
     material: <span role="img" aria-label="fund-view" className="anticon anticon-fund-view"><MaterialSvg /></span>,
     number: <span role="img" aria-label="fund-view" className="anticon anticon-fund-view"><NumberSvg /></span>,
     game: <span role="img" aria-label="fund-view" className="anticon anticon-fund-view"><GameSvg /></span>,
+    gameServer: <span role="img" aria-label="fund-view" className="anticon anticon-fund-view"><GameServerSvg /></span>,
     eye: <EyeOutlined />
 };
 //处理菜单

+ 1 - 0
src/assets/gameServer.svg

@@ -0,0 +1 @@
+<svg viewBox="64 64 896 896" focusable="false" data-icon="fund-view" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M85.333333 0h853.333334v42.666667H85.333333zM85.333333 213.333333h853.333334v42.666667H85.333333zM85.333333 42.666667h42.666667v170.666666H85.333333zM896 42.666667h42.666667v170.666666h-42.666667z" p-id="7038"></path><path d="M213.333333 106.666667h42.666667v42.666666H213.333333z"  p-id="7039"></path><path d="M85.333333 426.666667h853.333334v42.666666H85.333333zM85.333333 256h42.666667v170.666667H85.333333zM896 256h42.666667v170.666667h-42.666667z" p-id="7040"></path><path d="M213.333333 320h42.666667v42.666667H213.333333z" p-id="7041"></path><path d="M85.333333 640h853.333334v42.666667H85.333333zM85.333333 469.333333h42.666667v170.666667H85.333333zM896 469.333333h42.666667v170.666667h-42.666667z" p-id="7042"></path><path d="M213.333333 533.333333h42.666667v42.666667H213.333333z" p-id="7043"></path><path d="M384 810.666667h42.666667v213.333333H384zM597.333333 810.666667v42.666666h-170.666666v-42.666666zM597.333333 981.333333v42.666667h-170.666666v-42.666667zM597.333333 810.666667h42.666667v213.333333h-42.666667z" p-id="7044"></path><path d="M0 896h426.666667v42.666667H0zM597.333333 896h426.666667v42.666667H597.333333z" p-id="7045"></path><path d="M490.666667 682.666667h42.666666v128h-42.666666z" p-id="7046"></path></svg>

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

@@ -121,6 +121,14 @@ interface Props {
     isAdStatus?: boolean
     /** 是否开启 展示数据类型(买量,自然,总) 搜索 */
     isUserEnterType?: boolean
+    /** 是否开启 区服名称 搜索 */
+    isServerName?: boolean
+    /** 是否开启区服ID 搜索 */
+    isServerId?: boolean
+    /** 是否开启 开服时间 搜索 */
+    isServerDay?: {
+        ranges?: any
+    }
 }
 /**
  * 游戏数据系统 请求参数
@@ -132,7 +140,7 @@ const QueryForm: React.FC<Props> = (props) => {
     const {
         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, isProjectId, isProjectName, isPromotionId, isPromotionName,
-        isSysUserName, isRechargeDate, isBGGameClassify, isGameUserId, isSysUserId, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay, isType, isAdStatus, isUserEnterType
+        isSysUserName, isRechargeDate, isBGGameClassify, isGameUserId, isSysUserId, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay, isType, isAdStatus, isUserEnterType, isServerName, isServerId, isServerDay
     } = props
     const [form] = Form.useForm()
     const [accountList, setAccountList] = useState<any[]>([])
@@ -331,6 +339,14 @@ const QueryForm: React.FC<Props> = (props) => {
                     <Radio.Button value="30days">30日排行</Radio.Button>
                 </Radio.Group>
             </Form.Item></Col>}
+            {/* 广告区服名称 */}
+            {isServerName && <Col><Form.Item name='serverName'>
+                <Input placeholder="区服名称" allowClear style={{ width: 140 }} />
+            </Form.Item></Col>}
+            {/* 广告区服ID */}
+            {isServerId && <Col><Form.Item name='serverId'>
+                <Input placeholder="区服ID" allowClear style={{ width: 140 }} />
+            </Form.Item></Col>}
             {/* 广告账户名称 */}
             {isAccount && <Col><Form.Item name='accountName'>
                 <Input placeholder="广告账号名称" allowClear style={{ width: 140 }} />
@@ -754,6 +770,11 @@ const QueryForm: React.FC<Props> = (props) => {
                 <DatePicker.RangePicker placeholder={['充值开始日期', '充值结束日期']} {...rechargeDay} />
             </Form.Item></Col>}
 
+            {/* 开服日期搜索 */}
+            {isServerDay && <Col><Form.Item name='serverDay'>
+                <DatePicker.RangePicker placeholder={['充值开始日期', '充值结束日期']} {...isServerDay} />
+            </Form.Item></Col>}
+
             {/* 单个充值日期搜索 */}
             {isRechargeDate && <Col><Form.Item name='rechargeDate'>
                 <DatePicker placeholder={'充值日期'} />

+ 15 - 11
src/pages/gameDataStatistics/extensionData/everyday/tableConfig.tsx

@@ -26,7 +26,7 @@ function columns12(rechargeTrendHandle: (data: any) => void): { label: string, f
     }
 
     // 总付费趋势
-    let defaultStart = 20
+    let defaultStart = 21
     const zC = Array(29).fill('').map((_item: string, index: number) => {
         let field = `rechargeTrendDay${index + 1}`
         let data = {
@@ -141,20 +141,24 @@ function columns12(rechargeTrendHandle: (data: any) => void): { label: string, f
             data: [
                 { title: '曝光量', dataIndex: 'viewCount', label: '广告曝光数据', align: 'center', width: 90, default: 10, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '点击量', dataIndex: 'clickCount', label: '广告曝光数据', align: 'center', width: 80, default: 11, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '转化量', dataIndex: 'convertCount', label: '广告曝光数据', align: 'center', width: 80, default: 12, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 {
-                    title: '转化率', dataIndex: 'convertRate', label: '广告曝光数据', align: 'center', width: 70, default: 13, sorter: true,
+                    title: '点击率', dataIndex: 'clickRate', label: '广告曝光数据', align: 'center', width: 70, sorter: true, default: 12,
                     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: '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: 'convertCount', label: '广告曝光数据', align: 'center', width: 80, default: 13, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 {
-                    title: '深度转化率', dataIndex: 'deepConvertRate', label: '广告曝光数据', align: 'center', width: 70, default: 17, sorter: true,
+                    title: '转化率', dataIndex: 'convertRate', label: '广告曝光数据', align: 'center', width: 70, default: 14, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
-                { title: '千次曝光成本', dataIndex: 'thousandViewCost', label: '广告曝光数据', align: 'center', width: 70, default: 18, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '平均点击均价', dataIndex: 'avgClickCost', label: '广告曝光数据', align: 'center', width: 70, default: 19, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '平均转化成本', dataIndex: 'avgConvertCost', label: '广告曝光数据', align: 'center', width: 70, default: 15, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
+                { title: '深度转化量', dataIndex: 'deepConvertCount', label: '广告曝光数据', align: 'center', width: 70, default: 16, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '深度转化成本', dataIndex: 'deepConvertCost', label: '广告曝光数据', align: 'center', width: 70, default: 17, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
+                {
+                    title: '深度转化率', dataIndex: 'deepConvertRate', label: '广告曝光数据', align: 'center', width: 70, default: 18, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                { title: '千次曝光成本', dataIndex: 'thousandViewCost', label: '广告曝光数据', align: 'center', width: 70, default: 19, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '平均点击均价', dataIndex: 'avgClickCost', label: '广告曝光数据', align: 'center', width: 70, default: 20, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '应用下载开始量', dataIndex: 'appDownloadCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '应用下载开始成本', dataIndex: 'appDownloadCost', label: '广告曝光数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 {
@@ -483,7 +487,7 @@ function columns12(rechargeTrendHandle: (data: any) => void): { label: string, f
                     },
                 }, {
                     title: "总",
-                    default: 29,
+                    default: 30,
                     dataIndex: "total",
                     label: "时间区间跨度",
                     align: "center",
@@ -516,7 +520,7 @@ function columns12(rechargeTrendHandle: (data: any) => void): { label: string, f
             label: '操作',
             data: [
                 {
-                    default: 30,
+                    default: 31,
                     title: '操作', dataIndex: 'cz', label: '操作', align: 'center', width: 70, render: (a: string, b: any) => {
                         if (b?.dt === '总计') {
                             return <span>--</span>

+ 12 - 8
src/pages/gameDataStatistics/extensionData/total/tableConfig.tsx

@@ -77,7 +77,11 @@ function columns12(gameType: any) {
             data: [
                 { title: '曝光量', dataIndex: 'viewCount', label: '广告曝光数据', align: 'center', width: 70, default: 9, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '点击量', dataIndex: 'clickCount', label: '广告曝光数据', align: 'center', width: 70, default: 10, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '转化量', dataIndex: 'convertCount', label: '广告曝光数据', align: 'center', width: 70, default: 11, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '点击率', dataIndex: 'clickRate', label: '广告曝光数据', align: 'center', width: 70, sorter: true, default: 11,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                { title: '转化量', dataIndex: 'convertCount', label: '广告曝光数据', align: 'center', width: 70, default: 12, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 {
                     title: '转化率', dataIndex: 'convertRate', 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="%" />
@@ -86,10 +90,10 @@ function columns12(gameType: any) {
                 { title: '深度转化量', dataIndex: 'deepConvertCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '深度转化成本', dataIndex: 'deepConvertCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 {
-                    title: '深度转化率', dataIndex: 'deepConvertRate', label: '广告曝光数据', align: 'center', width: 70, default: 12, sorter: true,
+                    title: '深度转化率', dataIndex: 'deepConvertRate', 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: 'thousandViewCost', label: '广告曝光数据', align: 'center', width: 70, default: 13, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
+                { title: '千次曝光成本', dataIndex: 'thousandViewCost', label: '广告曝光数据', align: 'center', width: 70, default: 14, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 { title: '平均点击均价', dataIndex: 'avgClickCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 { title: '应用下载开始量', dataIndex: 'appDownloadCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '应用下载开始成本', dataIndex: 'appDownloadCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
@@ -120,8 +124,8 @@ function columns12(gameType: any) {
         {
             label: '用户数据',
             data: [
-                { title: '注册人数', dataIndex: 'regUserCount', label: '用户数据', align: 'center', width: 70, default: 14, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70, default: 15, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
+                { title: '注册人数', dataIndex: 'regUserCount', label: '用户数据', align: 'center', width: 70, default: 15, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70, default: 16, sorter: true, render: (a: string) => <Statistic value={a || 0} precision={2} /> },
                 { title: '首日创角人数', dataIndex: 'firstRoleNum', label: '付费数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '新用户累计创角人数', dataIndex: 'newUserTotalRoleNum', label: '付费数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '创角人数', dataIndex: 'roleNum', label: '付费数据', align: 'center', width: 90, render: (a: string) => <Statistic value={a || 0} /> },
@@ -150,15 +154,15 @@ function columns12(gameType: any) {
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '回收率', tips: '回收率=新用户充值金额/实际消耗', dataIndex: 'recoveryRate', label: '付费数据', align: 'center', width: 90, default: 16,
+                    title: '回收率', tips: '回收率=新用户充值金额/实际消耗', dataIndex: 'recoveryRate', label: '付费数据', align: 'center', width: 90, default: 17,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '至今回收率', tips: '至今回收率=新用户累计充值金额/实际消耗', dataIndex: 'todayRecoveryRate', label: '付费数据', align: 'center', width: 95, default: 17, sorter: true,
+                    title: '至今回收率', tips: '至今回收率=新用户累计充值金额/实际消耗', dataIndex: 'todayRecoveryRate', label: '付费数据', align: 'center', width: 95, default: 18, sorter: true,
                     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: 110, default: 18, sorter: true,
+                    title: '毛利额', dataIndex: 'grossMargin', label: '付费数据', align: 'center', width: 110, default: 19, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} valueStyle={a > 0 ? { color: 'red' } : {}} />
                 },
                 ...roiC,

+ 0 - 2
src/pages/gameDataStatistics/gameData/again/tableConfig.tsx

@@ -26,7 +26,6 @@ function columns12(sourceSystem: string): { label: string, fieldSHow?: { label:
     }
 
     let defaultStart = 13
-    // 用户LTV
     const day = Array(30).fill('').map((_item: string, index: number) => {
         let field = `da${index + 1}Trend`
         let data = {
@@ -73,7 +72,6 @@ function columns12(sourceSystem: string): { label: string, fieldSHow?: { label:
         return data
     })
 
-    // 用户LTV月
     let defaultStartM = 43
     let month = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map((item, index) => {
         let field = `m${item}Trend`

+ 2 - 1
src/pages/gameDataStatistics/gameData/again/userInfo.tsx

@@ -41,8 +41,9 @@ const UserInfo: React.FC<Props> = ({ data, sourceSystem }) => {
             overlayInnerStyle={{ width: 600, padding: 0 }}
             content={<Table
                 size="small"
+                className="all_table content_table_body"
                 loading={getDetails.loading}
-                scroll={{ x: 600, y: 280 }}
+                scroll={{  y: 280 }}
                 dataSource={getDetails?.data?.records?.map((item: any, index: number) => ({ ...item, id: Number(queryForm.pageNum.toString() + index.toString()) }))}
                 columns={columns}
                 rowKey={'id'}

+ 9 - 9
src/pages/gameDataStatistics/gameData/flowingWater/tableConfig.tsx

@@ -11,22 +11,22 @@ function columns12() {
         {
             label: '每日流水贡献',
             data: [
-                { title: 'ID', dataIndex: 'id', label: '每日流水贡献', align: 'center', width: 75, default: 1 },
-                { title: '游戏名称', dataIndex: 'gameName', label: '每日流水贡献', align: 'center', width: 70, default: 2 },
-                { title: '游戏ID', dataIndex: 'gameId', label: '每日流水贡献', align: 'center', width: 80, default: 3, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
+                { title: 'ID', dataIndex: 'id', label: '每日流水贡献', align: 'center', width: 75 },
+                { title: '游戏名称', dataIndex: 'gameName', label: '每日流水贡献', align: 'center', width: 70, default: 1 },
+                { title: '游戏ID', dataIndex: 'gameId', label: '每日流水贡献', align: 'center', width: 80, default: 2, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 {
-                    title: '游戏类别', dataIndex: 'gameClassify', label: '每日流水贡献', align: 'center', width: 80, default: 4,
+                    title: '游戏类别', dataIndex: 'gameClassify', label: '每日流水贡献', align: 'center', width: 80, default: 3,
                     render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
                 },
-                { title: '买量充值金额', dataIndex: 'buyAmount', label: '每日流水贡献', align: 'center', width: 100, default: 5, sorter: true, render: (a: number, b: any) => (<Statistic value={a || 0} valueStyle={a >= 10000 ? { color: 'red' } : { color: '#0f990f' }} />) },
-                { title: '自然量充值金额', dataIndex: 'natureAmount', label: '每日流水贡献', align: 'center', width: 100, default: 6, sorter: true, render: (a: number, b: any) => (<Statistic value={a || 0} valueStyle={a >= 5000 ? { color: 'red' } : { color: '#0f990f' }} />) },
-                { title: '总充值金额', dataIndex: 'amount', label: '每日流水贡献', align: 'center', width: 120, default: 7, sorter: true, render: (a: number) => <Statistic value={a || 0} valueStyle={a >= 50000 ? { color: 'red' } : { color: '#0f990f' }} /> },
+                { title: '买量充值金额', dataIndex: 'buyAmount', label: '每日流水贡献', align: 'center', width: 100, default: 4, sorter: true, render: (a: number, b: any) => (<Statistic value={a || 0} valueStyle={a >= 10000 ? { color: 'red' } : { color: '#0f990f' }} />) },
+                { title: '自然量充值金额', dataIndex: 'natureAmount', label: '每日流水贡献', align: 'center', width: 100, default: 5, sorter: true, render: (a: number, b: any) => (<Statistic value={a || 0} valueStyle={a >= 5000 ? { color: 'red' } : { color: '#0f990f' }} />) },
+                { title: '总充值金额', dataIndex: 'amount', label: '每日流水贡献', align: 'center', width: 120, default: 6, sorter: true, render: (a: number) => <Statistic value={a || 0} valueStyle={a >= 50000 ? { color: 'red' } : { color: '#0f990f' }} /> },
                 {
                     title: '充值模板',
                     dataIndex: 'rechargeTemplateVOList',
                     label: '每日流水贡献',
                     align: 'center',
-                    default: 8,
+                    default: 7,
                     children: [
                         {
                             title: '充值模板排序',
@@ -133,7 +133,7 @@ function columns12() {
                     dataIndex: 'playerTemplateVOS',
                     label: '玩家模板排序',
                     align: 'center',
-                    default: 9,
+                    default: 8,
                     children: [
                         {
                             title: '玩家模板排序',

+ 15 - 0
src/pages/gameDataStatistics/gameServer/serverData/index.less

@@ -0,0 +1,15 @@
+.dbox{
+    display: flex;
+    flex-flow: column;
+    align-items: center;
+    // padding: 10px;
+    >span{
+        display: flex;
+        justify-content: left;
+        width: 100%;
+    }
+}
+
+.tabsBottom0 .ant-tabs-nav {
+    margin-bottom: 0;
+}

+ 92 - 0
src/pages/gameDataStatistics/gameServer/serverData/index.tsx

@@ -0,0 +1,92 @@
+import { GameServerListProps, getGameServerListApi, getGameServerTotalApi } from "@/services/gameData/gameServer"
+import React, { useEffect, useState } from "react"
+import moment from "moment"
+import { useAjax } from "@/Hook/useAjax"
+import TableData from "../../components/TableData"
+import QueryForm from "@/components/QueryForm"
+import columns12 from "./tableConfig"
+import { getPresets } from "@/components/QueryForm/const"
+
+/**
+ * 游戏区服
+ * @returns 
+ */
+const ServerData: React.FC = () => {
+
+    /********************************/
+    const [queryForm, setQueryForm] = useState<GameServerListProps>({ pageNum: 1, pageSize: 100, beginDate: moment().format('YYYY-MM-DD'), endDate: moment().format('YYYY-MM-DD'), sourceSystem: 'ZX_ONE' })
+    const [totalData, setTotalData] = useState<any[]>([])
+
+    const getGameServerList = useAjax((params) => getGameServerListApi(params))
+    const getGameServerTotal = useAjax((params) => getGameServerTotalApi(params))
+    /********************************/
+
+    useEffect(() => {
+        getGameServerTotal.run(queryForm).then((res: { id: number; dt?: string; gameName: string; }) => {
+            res.id = 1
+            res.dt = queryForm.beginDate
+            res.gameName = '总计'
+            setTotalData([res])
+        })
+        getGameServerList.run(queryForm)
+    }, [queryForm])
+
+    return <div>
+        <TableData
+            leftChild={<QueryForm
+                initialValues={{ sourceSystem: 'ZX_ONE', serverDay: [moment(), moment()] }}
+                onChange={(data: any) => {
+                    const { serverDay, ...params } = data
+                    let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                    if (serverDay && serverDay?.length === 2) {
+                        newQueryForm['beginDate'] = moment(serverDay[0]).format('YYYY-MM-DD')
+                        newQueryForm['endDate'] = moment(serverDay[1]).format('YYYY-MM-DD')
+                    } else {
+                        delete newQueryForm['beginDate']
+                        delete newQueryForm['endDate']
+                    }
+                    newQueryForm.pageNum = 1
+                    setQueryForm({ ...newQueryForm, ...params })
+                }}
+                isSource
+                isServerDay={{ ranges: getPresets() }}
+                isGameId
+                isServerName
+                isServerId
+            />}
+            isZj
+            totalData={totalData}
+            scroll={{ x: 1000, y: 600 }}
+            ajax={getGameServerList}
+            fixed={{ left: 5, right: 1 }}
+            dataSource={getGameServerList?.data?.records?.map((item: any, index: number) => ({ ...item, id: Number(queryForm.pageNum.toString() + index.toString()) }))}
+            total={getGameServerList?.data?.total}
+            page={queryForm.pageNum}
+            pageSize={queryForm.pageSize}
+            sortData={{
+                field: queryForm?.sortFiled,
+                order: queryForm?.sortType === 'asc' ? 'ascend' : 'descend'
+            }}
+            title='区服数据'
+            onChange={(props: any) => {
+                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 ServerData

+ 323 - 0
src/pages/gameDataStatistics/gameServer/serverData/tableConfig.tsx

@@ -0,0 +1,323 @@
+import { gameClassifyEnum } from "@/components/QueryForm/const"
+import WidthEllipsis from "@/components/widthEllipsis"
+import { Statistic } from "antd"
+import React from "react"
+import moment from "moment"
+import style from './index.less'
+import { version } from "../../components/TableData"
+
+function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
+
+    const getFieldDta = () => {
+        let defaultValue = [  // 默认展示字段
+            { label: '新用户人数', key: 'regNum', type: 'D1~Dn' },
+            { label: '创角人数', key: 'roleNum', type: 'D1~Dn' },
+            { label: '活跃人数', key: 'activeNum', type: 'D1~Dn' },
+            { label: '付费人数', key: 'amountNum', type: 'D1~Dn' },
+            { label: '付费金额', key: 'amount', type: 'D1~Dn' },
+            { label: '滚服人数', key: 'rollServerNum', type: 'D1~Dn' },
+            { label: '滚服付费人数', key: 'rollServerAmountNum', type: 'D1~Dn' },
+            { label: '滚服付费金额', key: 'rollServerAmount', type: 'D1~Dn' },
+            { label: '滚服(付费金额)占比', key: 'rollServerAmountRate', type: 'D1~Dn' },
+        ]
+        let mySelectFieldData = localStorage.getItem(`myAdFieldConfig${version}_区服数据`)
+        let newSelectFieldData: any = {}
+        if (mySelectFieldData) {
+            newSelectFieldData = JSON.parse(mySelectFieldData).date_field
+        } else {
+            newSelectFieldData = defaultValue
+        }
+        return newSelectFieldData
+    }
+
+    let defaultStart = 13
+    const day = Array(30).fill('').map((_item: string, index: number) => {
+        let field = `da${index + 1}Trend`
+        let data = {
+            title: `D${index + 1}`,
+            dataIndex: field,
+            label: "D1~Dn",
+            align: "center",
+            width: 120,
+            render: (a: any, b: any) => {
+                let date1 = moment()
+                if (b?.gameName === '总计') {
+                    if (b?.dt) {
+                        date1 = moment(b?.dt)
+                    } else {
+                        date1 = moment()
+                    }
+                } else {
+                    date1 = moment(b.dt)
+                }
+                let dt = moment()
+                let day = dt.diff(date1, 'day');
+                let fieldData = getFieldDta()
+                if (fieldData?.length > 0 && index <= day) {
+                    let data: any = {}
+                    let keyS: string[] = fieldData?.map((item: any) => item.key)
+                    switch (fieldData[0].type) {
+                        case 'D1~Dn':
+                            if (b?.[field]) {
+                                data = b?.[field]
+                                return <div className={style.dbox}>
+                                    {keyS?.includes('regNum') && <span style={{ color: '#2f54eb', fontWeight: 600 }}>新人:<span>{data?.regNum}</span></span>}
+                                    {keyS?.includes('roleNum') && <span style={{ color: '#722ed1', fontWeight: 600 }}>创人:<span>{data?.roleNum}</span></span>}
+                                    {keyS?.includes('activeNum') && <span style={{ color: '#eb2f96', fontWeight: 600 }}>活人:<span>{data?.activeNum}</span></span>}
+                                    {keyS?.includes('amountNum') && <span style={{ color: '#d81b60', fontWeight: 600 }}>付人:<span>{data?.amountNum}</span></span>}
+                                    {keyS?.includes('amount') && <span style={{ color: '#0f538a', fontWeight: 600 }}>付金:<span><Statistic value={data?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                    {keyS?.includes('rollServerNum') && <span style={{ color: '#13c2c2', fontWeight: 600 }}>滚人:<span>{data?.rollServerNum}</span></span>}
+                                    {keyS?.includes('rollServerAmountNum') && <span style={{ color: '#faad14', fontWeight: 600 }}>滚付人:<span>{data?.rollServerAmountNum}</span></span>}
+                                    {keyS?.includes('rollServerAmount') && <span style={{ color: '#0f538a', fontWeight: 600 }}>滚付金:<span><Statistic value={data?.rollServerAmount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                    {keyS?.includes('rollServerAmountRate') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>滚比:<span>{(data?.rollServerAmountRate * 100)?.toFixed(2)}%</span></span>}
+                                </div>
+                            }
+                            return '--'
+                    }
+                }
+                return '--'
+            },
+        }
+        data['default'] = defaultStart + index
+        return data
+    })
+
+    let defaultStartM = 43
+    let month = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map((item, index) => {
+        let field = `m${item}Trend`
+        let data = {
+            title: `M${item}`,
+            dataIndex: field,
+            label: "D1~Dn",
+            align: "center",
+            width: 110,
+            render: (a: any, b: any) => {
+                let date1 = moment()
+                if (b?.gameName === '总计') {
+                    if (b?.dt) {
+                        date1 = moment(b?.dt)
+                    } else {
+                        date1 = moment()
+                    }
+                } else {
+                    date1 = moment(b.dt)
+                }
+                let dt = moment()
+                let day = dt.diff(date1, 'day');
+                let fieldData = getFieldDta()
+                if (fieldData?.length > 0 && item * 30 <= day) {
+                    let data: any = {}
+                    let keyS: string[] = fieldData?.map((item: any) => item.key)
+                    switch (fieldData[0].type) {
+                        case 'D1~Dn':
+                            if (b?.[field]) {
+                                data = b?.[field]
+                                return <div className={style.dbox}>
+                                    {keyS?.includes('regNum') && <span style={{ color: '#2f54eb', fontWeight: 600 }}>新人:<span>{data?.regNum}</span></span>}
+                                    {keyS?.includes('roleNum') && <span style={{ color: '#722ed1', fontWeight: 600 }}>创人:<span>{data?.roleNum}</span></span>}
+                                    {keyS?.includes('activeNum') && <span style={{ color: '#eb2f96', fontWeight: 600 }}>活人:<span>{data?.activeNum}</span></span>}
+                                    {keyS?.includes('amountNum') && <span style={{ color: '#d81b60', fontWeight: 600 }}>付人:<span>{data?.amountNum}</span></span>}
+                                    {keyS?.includes('amount') && <span style={{ color: '#0f538a', fontWeight: 600 }}>付金:<span><Statistic value={data?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                    {keyS?.includes('rollServerNum') && <span style={{ color: '#13c2c2', fontWeight: 600 }}>滚人:<span>{data?.rollServerNum}</span></span>}
+                                    {keyS?.includes('rollServerAmountNum') && <span style={{ color: '#faad14', fontWeight: 600 }}>滚付人:<span>{data?.rollServerAmountNum}</span></span>}
+                                    {keyS?.includes('rollServerAmount') && <span style={{ color: '#0f538a', fontWeight: 600 }}>滚付金:<span><Statistic value={data?.rollServerAmount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                    {keyS?.includes('rollServerAmountRate') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>滚比:<span>{(data?.rollServerAmountRate * 100)?.toFixed(2)}%</span></span>}
+                                </div>
+                            }
+                            return '--'
+                    }
+                }
+                return '--'
+            },
+        }
+        data['default'] = defaultStartM + index
+        return data
+    })
+
+    month.push({
+        title: `Y1`,
+        dataIndex: 'y1Trend',
+        label: "D1~Dn",
+        align: "center",
+        width: 70,
+        default: 53,
+        render: (a: any, b: any) => {
+            let date1 = moment()
+            if (b?.gameName === '总计') {
+                if (b?.dt) {
+                    date1 = moment(b?.dt)
+                } else {
+                    date1 = moment()
+                }
+            } else {
+                date1 = moment(b.dt)
+            }
+            let dt = moment()
+            let day = dt.diff(date1, 'day');
+            let fieldData = getFieldDta()
+            if (fieldData?.length > 0 && 360 <= day) {
+                let data: any = {}
+                let keyS: string[] = fieldData?.map((item: any) => item.key)
+                switch (fieldData[0].type) {
+                    case 'D1~Dn':
+                        if (b?.['y1Trend']) {
+                            data = b?.['y1Trend']
+                            return <div className={style.dbox}>
+                                {keyS?.includes('regNum') && <span style={{ color: '#2f54eb', fontWeight: 600 }}>新人:<span>{data?.regNum}</span></span>}
+                                {keyS?.includes('roleNum') && <span style={{ color: '#722ed1', fontWeight: 600 }}>创人:<span>{data?.roleNum}</span></span>}
+                                {keyS?.includes('activeNum') && <span style={{ color: '#eb2f96', fontWeight: 600 }}>活人:<span>{data?.activeNum}</span></span>}
+                                {keyS?.includes('amountNum') && <span style={{ color: '#d81b60', fontWeight: 600 }}>付人:<span>{data?.amountNum}</span></span>}
+                                {keyS?.includes('amount') && <span style={{ color: '#0f538a', fontWeight: 600 }}>付金:<span><Statistic value={data?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                {keyS?.includes('rollServerNum') && <span style={{ color: '#13c2c2', fontWeight: 600 }}>滚人:<span>{data?.rollServerNum}</span></span>}
+                                {keyS?.includes('rollServerAmountNum') && <span style={{ color: '#faad14', fontWeight: 600 }}>滚付人:<span>{data?.rollServerAmountNum}</span></span>}
+                                {keyS?.includes('rollServerAmount') && <span style={{ color: '#0f538a', fontWeight: 600 }}>滚付金:<span><Statistic value={data?.rollServerAmount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                {keyS?.includes('rollServerAmountRate') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>滚比:<span>{(data?.rollServerAmountRate * 100)?.toFixed(2)}%</span></span>}
+                            </div>
+                        }
+                        return '--'
+                }
+            }
+            return '--'
+        },
+    } as any)
+
+    month.push({
+        title: `总`,
+        dataIndex: 'totalTrend',
+        label: "D1~Dn",
+        align: "center",
+        width: 110,
+        default: 54,
+        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 'D1~Dn':
+                        if (b?.['totalTrend']) {
+                            data = b?.['totalTrend']
+                            return <div className={style.dbox}>
+                                {keyS?.includes('regNum') && <span style={{ color: '#2f54eb', fontWeight: 600 }}>新人:<span>{data?.regNum}</span></span>}
+                                {keyS?.includes('roleNum') && <span style={{ color: '#722ed1', fontWeight: 600 }}>创人:<span>{data?.roleNum}</span></span>}
+                                {keyS?.includes('activeNum') && <span style={{ color: '#eb2f96', fontWeight: 600 }}>活人:<span>{data?.activeNum}</span></span>}
+                                {keyS?.includes('amountNum') && <span style={{ color: '#d81b60', fontWeight: 600 }}>付人:<span>{data?.amountNum}</span></span>}
+                                {keyS?.includes('amount') && <span style={{ color: '#0f538a', fontWeight: 600 }}>付金:<span><Statistic value={data?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                {keyS?.includes('rollServerNum') && <span style={{ color: '#13c2c2', fontWeight: 600 }}>滚人:<span>{data?.rollServerNum}</span></span>}
+                                {keyS?.includes('rollServerAmountNum') && <span style={{ color: '#faad14', fontWeight: 600 }}>滚付人:<span>{data?.rollServerAmountNum}</span></span>}
+                                {keyS?.includes('rollServerAmount') && <span style={{ color: '#0f538a', fontWeight: 600 }}>滚付金:<span><Statistic value={data?.rollServerAmount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                {keyS?.includes('rollServerAmountRate') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>滚比:<span>{(data?.rollServerAmountRate * 100)?.toFixed(2)}%</span></span>}
+                            </div>
+                        }
+                        return '--'
+                }
+            }
+            return '--'
+        },
+    } as any)
+
+    return [
+        {
+            label: '时间',
+            data: [
+                { title: '开服时间', dataIndex: 'dt', label: '时间', align: 'center', width: 90, default: 4, sorter: true },
+            ]
+        },
+        {
+            label: '游戏信息',
+            data: [
+                {
+                    title: '游戏名称', dataIndex: 'gameName', label: '游戏信息', align: 'center', width: 90, default: 1,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                { title: '游戏ID', dataIndex: 'gameId', label: '游戏信息', align: 'center', width: 90 },
+                {
+                    title: '游戏应用类型', dataIndex: 'classify', label: '游戏信息', align: 'center', width: 80, default: 2,
+                    render: (a: string) => (<WidthEllipsis value={gameClassifyEnum[a]} />)
+                },
+                {
+                    title: '区服名称', dataIndex: 'serverName', label: '游戏信息', align: 'center', width: 90, default: 3,
+                    render: (a: string) => (<WidthEllipsis value={a} />)
+                },
+                { title: '区服ID', dataIndex: 'serverId', label: '游戏信息', align: 'center', width: 90 },
+            ]
+        },
+        {
+            label: '数据',
+            data: [
+                {
+                    title: '新用户人数', dataIndex: 'totalRegNum', label: '数据', align: 'center', width: 70, sorter: true, default: 5,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '创角人数', dataIndex: 'totalRoleNum', label: '数据', align: 'center', width: 70, sorter: true, default: 6,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '滚服人数', dataIndex: 'outTotalNum', label: '数据', align: 'center', width: 70, sorter: true, default: 7,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '滚服付费人数', dataIndex: 'outTotalAmountNum', label: '数据', align: 'center', width: 70, sorter: true, default: 8,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '滚服付费金额', dataIndex: 'outTotalAmount', label: '数据', align: 'center', width: 70, sorter: true, default: 9,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '付费人数', dataIndex: 'totalAmountNum', label: '数据', align: 'center', width: 70, sorter: true, default: 10,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '付费金额', dataIndex: 'totalAmount', label: '数据', align: 'center', width: 70, sorter: true, default: 11,
+                    render: (a: number) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '滚服(付费金额)占比', dataIndex: 'outTotalRate', label: '数据', align: 'center', width: 90, sorter: true, default: 12,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+            ]
+        },
+        {
+            fieldSHow: {
+                label: 'D1~Dn区间字段展示',
+                saveField: 'date_field',
+                defaultValue: [  // 默认展示字段
+                    { label: '新用户人数', key: 'regNum', type: 'D1~Dn' },
+                    { label: '创角人数', key: 'roleNum', type: 'D1~Dn' },
+                    { label: '活跃人数', key: 'activeNum', type: 'D1~Dn' },
+                    { label: '付费人数', key: 'amountNum', type: 'D1~Dn' },
+                    { label: '付费金额', key: 'amount', type: 'D1~Dn' },
+                    { label: '滚服人数', key: 'rollServerNum', type: 'D1~Dn' },
+                    { label: '滚服付费人数', key: 'rollServerAmountNum', type: 'D1~Dn' },
+                    { label: '滚服付费金额', key: 'rollServerAmount', type: 'D1~Dn' },
+                    { label: '滚服(付费金额)占比', key: 'rollServerAmountRate', type: 'D1~Dn' },
+                ],
+                data: [
+                    {
+                        label: 'D1~Dn',
+                        data: [
+                            { label: '新用户人数', key: 'regNum', type: 'D1~Dn' },
+                            { label: '创角人数', key: 'roleNum', type: 'D1~Dn' },
+                            { label: '活跃人数', key: 'activeNum', type: 'D1~Dn' },
+                            { label: '付费人数', key: 'amountNum', type: 'D1~Dn' },
+                            { label: '付费金额', key: 'amount', type: 'D1~Dn' },
+                            { label: '滚服人数', key: 'rollServerNum', type: 'D1~Dn' },
+                            { label: '滚服付费人数', key: 'rollServerAmountNum', type: 'D1~Dn' },
+                            { label: '滚服付费金额', key: 'rollServerAmount', type: 'D1~Dn' },
+                            { label: '滚服(付费金额)占比', key: 'rollServerAmountRate', type: 'D1~Dn' },
+                        ]
+                    }
+                ]
+            },
+            label: 'D1~Dn',
+            data: [
+                ...day,
+                ...month
+            ]
+        }
+    ]
+}
+
+export default columns12

+ 35 - 0
src/services/gameData/gameServer.ts

@@ -0,0 +1,35 @@
+import { request } from 'umi';
+import { api } from '../api';
+import { Paging, SortProps } from './rankingList';
+let wapi = api + '/gameData'
+
+export interface GameServerListProps extends Paging, SortProps {
+    beginDate?: string,
+    endDate?: string,
+    gameId?: number,
+    serverId?: number,
+    serverName?: string
+}
+/**
+ * 游戏区服列表
+ * @param data 
+ * @returns 
+ */
+export async function getGameServerListApi(data: GameServerListProps) {
+    return request(wapi + `/gameServer/day`, {
+        method: 'POST',
+        data
+    });
+}
+
+/**
+ * 游戏区服总计
+ * @param data 
+ * @returns 
+ */
+export async function getGameServerTotalApi(data: GameServerListProps) {
+    return request(wapi + `/gameServer/day/total`, {
+        method: 'POST',
+        data
+    });
+}