wjx 1 år sedan
förälder
incheckning
58e366f0fb

+ 6 - 3
src/pages/gameDataStatistics/roleOperate/roleFightingRanking/index.tsx

@@ -14,7 +14,7 @@ import columns12 from "./tableConfig"
 const RoleFightingRanking: React.FC = () => {
 
     /********************************/
-    const [queryForm, setQueryForm] = useState<GetCombatRankingProps>({ pageNum: 1, pageSize: 100, sourceSystem: 'ZX_ONE', beginDate: moment().format('YYYY-MM-DD'), endDate: moment().format('YYYY-MM-DD') })
+    const [queryForm, setQueryForm] = useState<GetCombatRankingProps>({ pageNum: 1, pageSize: 100, sourceSystem: 'ZX_ONE', beginDate: moment().format('YYYY-MM-DD'), endDate: moment().format('YYYY-MM-DD'), isMergeServer: true })
 
     const getCombatRankingList = useAjax((params) => getCombatRankingListApi(params))
     /********************************/
@@ -26,7 +26,7 @@ const RoleFightingRanking: React.FC = () => {
     return <div>
         <TableData
             leftChild={<QueryForm
-                initialValues={{ sourceSystem: 'ZX_ONE', serverDay: [moment(), moment()] }}
+                initialValues={{ sourceSystem: 'ZX_ONE', serverDay: [moment(), moment()], isMergeServer: true }}
                 onChange={(data: any) => {
                     console.log(data)
                     const { parentId, serverDay, ...params } = data
@@ -40,13 +40,16 @@ const RoleFightingRanking: React.FC = () => {
                         delete newQueryForm.beginDate
                         delete newQueryForm.endDate
                     }
+                    if (!params?.superParentGameId) {
+                        newQueryForm.isMergeServer = true
+                    }
                     setQueryForm({ ...newQueryForm, ...params })
                 }}
                 isSource
                 isServerDay={{ ranges: getPresetsRanking() }}
                 // isGameId
                 isSuperParentGameId
-                isParentId
+                // isParentId
                 isIsMergeServer
                 isServerIds
                 isGameServerName

+ 32 - 32
src/pages/gameDataStatistics/roleOperate/roleFightingRanking/tableConfig.tsx

@@ -10,11 +10,11 @@ function columns12() {
             label: '游戏',
             data: [
                 {
-                    title: '超父游戏', dataIndex: 'super_game_name', label: '游戏', align: 'center', width: 90,
+                    title: '超父游戏', dataIndex: 'super_game_name', label: '游戏', align: 'center', width: 90, default: 1,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '游戏', dataIndex: 'parent_game_name', label: '游戏', align: 'center', width: 90, default: 1,
+                    title: '游戏', dataIndex: 'parent_game_name', label: '游戏', align: 'center', width: 90, default: 2,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
             ]
@@ -23,19 +23,19 @@ function columns12() {
             label: '区服信息',
             data: [
                 {
-                    title: '主服名称', dataIndex: 'main_server_name', label: '区服信息', align: 'center', width: 70, default: 2,
+                    title: '主服名称', dataIndex: 'main_server_name', label: '区服信息', align: 'center', width: 70, default: 5,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '合服的子服ID列表', dataIndex: 'son_server_ids', label: '区服信息', align: 'center', width: 70,
+                    title: '合服的子服ID列表', dataIndex: 'son_server_ids', label: '区服信息', align: 'center', width: 120, default: 7,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '最原始子服名称列表', dataIndex: 'source_server_ids_name', label: '区服信息', align: 'center', width: 70,
+                    title: '最原始子服名称列表', dataIndex: 'source_server_ids_name', label: '区服信息', align: 'center', width: 130, default: 8,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '最原始子服ID列表', dataIndex: 'source_server_ids', label: '区服信息', align: 'center', width: 70,
+                    title: '最原始子服ID列表', dataIndex: 'source_server_ids', label: '区服信息', align: 'center', width: 120, default: 9,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
@@ -43,23 +43,23 @@ function columns12() {
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '区服ID', dataIndex: 'server_id', label: '区服信息', align: 'center', width: 70,
+                    title: '区服ID', dataIndex: 'server_id', label: '区服信息', align: 'center', width: 70, default: 4,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '开服时间', dataIndex: 'dt', label: '区服信息', align: 'center', width: 140, default: 5,
+                    title: '开服时间', dataIndex: 'dt', label: '区服信息', align: 'center', width: 140, default: 10,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '开服天数', dataIndex: 'start_day', label: '区服信息', align: 'center', width: 60, default: 6,
+                    title: '开服天数', dataIndex: 'start_day', label: '区服信息', align: 'center', width: 60,  default: 11,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '区服攻击力', dataIndex: 'server_combat_num', label: '区服信息', align: 'right', width: 90, default: 7,
+                    title: '区服攻击力', dataIndex: 'server_combat_num', label: '区服信息', align: 'right', width: 90, 
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '合服列表名', dataIndex: 'son_server_ids_name', label: '区服信息', align: 'center', width: 90, default: 4,
+                    title: '合服列表名', dataIndex: 'son_server_ids_name', label: '区服信息', align: 'center', width: 90, default: 6,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 // {
@@ -75,7 +75,7 @@ function columns12() {
                 //     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 // },
                 {
-                    title: '合服次数', dataIndex: 'sum_server_count', label: '区服信息', align: 'center', width: 60, 
+                    title: '合服次数', dataIndex: 'sum_server_count', label: '区服信息', align: 'center', width: 60, default: 12,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
             ]
@@ -84,15 +84,15 @@ function columns12() {
             label: '用户信息',
             data: [
                 {
-                    title: '新用户人数', dataIndex: 'new_user_count', label: '用户信息', align: 'center', width: 70, default: 8,
+                    title: '新用户人数', dataIndex: 'new_user_count', label: '用户信息', align: 'center', width: 70, default: 13,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '创角人数', dataIndex: 'create_role_count', label: '用户信息', align: 'center', width: 70, default: 9,
+                    title: '创角人数', dataIndex: 'create_role_count', label: '用户信息', align: 'center', width: 70, default: 14,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '角色数量', dataIndex: 'role_count', label: '用户信息', align: 'center', width: 70, default: 10,
+                    title: '角色数量', dataIndex: 'role_count', label: '用户信息', align: 'center', width: 70, default: 15,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
             ]
@@ -101,55 +101,55 @@ function columns12() {
             label: '付费数据',
             data: [
                 {
-                    title: '总付费人数', dataIndex: 'total_num', label: '付费数据', align: 'center', width: 80, default: 11,
+                    title: '总付费人数', dataIndex: 'total_num', label: '付费数据', align: 'center', width: 80, default: 16,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总付费金额', dataIndex: 'total_amount', label: '付费数据', align: 'center', width: 85, default: 12,
+                    title: '总付费金额', dataIndex: 'total_amount', label: '付费数据', align: 'center', width: 85, default: 17,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '付费ARPPU', dataIndex: 'total_arppu', label: '付费数据', align: 'center', width: 80, default: 13,
+                    title: '付费ARPPU', dataIndex: 'total_arppu', label: '付费数据', align: 'center', width: 80, default: 18,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '付费率', dataIndex: 'amount_rate', label: '付费数据', align: 'center', width: 80, default: 14,
+                    title: '付费率', dataIndex: 'amount_rate', label: '付费数据', align: 'center', width: 80, default: 19,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '今天付费人数', dataIndex: 'ba1_num', label: '付费数据', align: 'center', width: 70, default: 15, className: "redColorClass",
+                    title: '今天付费人数', dataIndex: 'ba1_num', label: '付费数据', align: 'center', width: 70, default: 20, className: "redColorClass",
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '今天付费次数', dataIndex: 'ba1_count', label: '付费数据', align: 'center', width: 65, default: 16, className: "redColorClass",
+                    title: '今天付费次数', dataIndex: 'ba1_count', label: '付费数据', align: 'center', width: 65, default: 21, className: "redColorClass",
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '今天付费金额', dataIndex: 'ba1', label: '付费数据', align: 'center', width: 75, default: 17, className: "redColorClass",
+                    title: '今天付费金额', dataIndex: 'ba1', label: '付费数据', align: 'center', width: 75, default: 22, className: "redColorClass",
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '昨天付费人数', dataIndex: 'ba2_num', label: '付费数据', align: 'center', width: 70, default: 18, className: "orangeColorClass",
+                    title: '昨天付费人数', dataIndex: 'ba2_num', label: '付费数据', align: 'center', width: 70, default: 23, className: "orangeColorClass",
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '昨天付费次数', dataIndex: 'ba2_count', label: '付费数据', align: 'center', width: 65, default: 19, className: "orangeColorClass",
+                    title: '昨天付费次数', dataIndex: 'ba2_count', label: '付费数据', align: 'center', width: 65, default: 24, className: "orangeColorClass",
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '昨天付费金额', dataIndex: 'ba2', label: '付费数据', align: 'center', width: 75, default: 20, className: "orangeColorClass",
+                    title: '昨天付费金额', dataIndex: 'ba2', label: '付费数据', align: 'center', width: 75, default: 25, className: "orangeColorClass",
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '前天付费人数', dataIndex: 'ba3_num', label: '付费数据', align: 'center', width: 65, default: 21, className: 'volcanoColorClass',
+                    title: '前天付费人数', dataIndex: 'ba3_num', label: '付费数据', align: 'center', width: 65, default: 26, className: 'volcanoColorClass',
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '前天付费次数', dataIndex: 'ba3_count', label: '付费数据', align: 'center', width: 65, default: 22, className: 'volcanoColorClass',
+                    title: '前天付费次数', dataIndex: 'ba3_count', label: '付费数据', align: 'center', width: 65, default: 27, className: 'volcanoColorClass',
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '前天付费金额', dataIndex: 'ba3', label: '付费数据', align: 'center', width: 75, default: 23, className: 'volcanoColorClass',
+                    title: '前天付费金额', dataIndex: 'ba3', label: '付费数据', align: 'center', width: 75, default: 28, className: 'volcanoColorClass',
                     render: (a: string) => <Statistic value={a || 0} />
                 },
             ]
@@ -158,15 +158,15 @@ function columns12() {
             label: '活跃数据',
             data: [
                 {
-                    title: '今日活跃人数', dataIndex: 'ba1_active_num', label: '活跃数据', align: 'center', width: 65, default: 24,
+                    title: '今日活跃人数', dataIndex: 'ba1_active_num', label: '活跃数据', align: 'center', width: 65, default: 29,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '昨天活跃人数', dataIndex: 'ba2_active_num', label: '活跃数据', align: 'center', width: 65, default: 25,
+                    title: '昨天活跃人数', dataIndex: 'ba2_active_num', label: '活跃数据', align: 'center', width: 65, default: 30,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '前天活跃人数', dataIndex: 'ba3_active_num', label: '活跃数据', align: 'center', width: 65, default: 26,
+                    title: '前天活跃人数', dataIndex: 'ba3_active_num', label: '活跃数据', align: 'center', width: 65, default: 31,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
             ]
@@ -179,7 +179,7 @@ function columns12() {
                     dataIndex: 'roleInfo',
                     label: '角色信息',
                     align: 'center',
-                    default: 27,
+                    default: 32,
                     children: [
                         {
                             title: '角色排名',

+ 1 - 0
src/services/gameData/roleOperate.ts

@@ -230,6 +230,7 @@ export interface GetCombatRankingProps extends Paging, SortProps {
     parentGameId?: number   // 主游戏ID
     rankingNum?: number     // 排名的范围
     serverIds?: number[],   // 区服
+    isMergeServer?: boolean
 }
 
 export async function getCombatRankingListApi(data: GetCombatRankingProps) {