wjx преди 1 година
родител
ревизия
f16d164c8d

+ 37 - 6
src/components/QueryForm/index.tsx

@@ -2,7 +2,7 @@ import { Button, Checkbox, Col, DatePicker, Form, Input, InputNumber, Radio, Row
 import React, { useEffect, useState } from "react"
 import moment from "moment"
 import { useAjax } from "@/Hook/useAjax"
-import { getAllOfOwnerUserApi, getChannelChoiceListApi, getGameChoiceListApi, getCpChoiceListApi, getGameChoiceParentListType1Api, getPayListApi, getSubUserWithSelfListApi, getTtAllUserListApi, getUserSystemTypeChoiceListApi, getUserVipLevelChoiceListApi, getRoleUserListApi, getGameServerListApi } from "@/services/gameData"
+import { getAllOfOwnerUserApi, getChannelChoiceListApi, getGameChoiceListApi, getCpChoiceListApi, getGameChoiceParentListType1Api, getPayListApi, getSubUserWithSelfListApi, getTtAllUserListApi, getUserSystemTypeChoiceListApi, getUserVipLevelChoiceListApi, getRoleUserListApi, getGameServerListApi, getGameListApi } from "@/services/gameData"
 import { ActiveEnum, PayStatus, TYPE, gameClassifyEnum } from "./const"
 import { ADSTATUSEnum as ADSTTTATUSEnum } from "@/pages/gameDataStatistics/adlist/monitor/const"
 import { ADSTATUSEnum } from "@/pages/gameDataStatistics/adlist/tencentMonitor/const"
@@ -50,6 +50,8 @@ interface Props {
     isOrderGameId?: boolean
     /** 是否开启 父游戏ID 搜索 */
     isParentId?: boolean
+    /** 是否开启 超父游戏ID 搜索 */
+    isSuperParentGameId?: boolean
     /** 是否开启 是否合服 搜索 */
     isIsMergeServer?: boolean
     /** 是否开启 游戏应用类型 搜索 */
@@ -207,7 +209,7 @@ const QueryForm: React.FC<Props> = (props) => {
         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, isAdTTStatus, isUserEnterType, isServerName, isServerId, isServerDay, isAdTXStatus,
         payTimeDay, placeAnOrderDay, isPayIntervalTime, isActiveTypes, isNickname, isMobile, isRegIp, isIsAuth, isIsBindMobile, isIsRecharge, isUserStatus, isCreateRole, isRoleCount, isVipLevel, isCreateRoleDay, isIsChange, isIsSendMail, isWeChatCompany, isWeChat,
-        isCustomerServerId, isOperatorId, isGsId, isServerIds, isRankingNum, isIsMergeServer
+        isCustomerServerId, isOperatorId, isGsId, isServerIds, isRankingNum, isIsMergeServer, isSuperParentGameId
     } = props
     const [form] = Form.useForm()
     const parentId = Form.useWatch('parentId', form)
@@ -217,6 +219,10 @@ const QueryForm: React.FC<Props> = (props) => {
     const [gsList, setGsList] = useState<any[]>([])
     const [customerList, setCustomerList] = useState<any[]>([])
     const [operateList, setOperateList] = useState<any[]>([])
+    const [gameList, setGameList] = useState<any[]>([])
+    const [parentGameList, setParentGameList] = useState<any[]>([])
+    const [superGameList, setSuperGameList] = useState<any[]>([])
+
 
     const getAllOfOwnerUser = useAjax(() => getAllOfOwnerUserApi())
     const getTtAllUserList = useAjax(() => getTtAllUserListApi())
@@ -228,6 +234,7 @@ const QueryForm: React.FC<Props> = (props) => {
     const getCpChoiceList = useAjax(() => getCpChoiceListApi())
     const getPayList = useAjax(() => getPayListApi())
     const getUserVipLevelChoiceList = useAjax(() => getUserVipLevelChoiceListApi())
+    const getGameList = useAjax(() => getGameListApi())
     const getRoleUserList = useAjax((params) => getRoleUserListApi(params))
     const getGameServerList = useAjax((params) => getGameServerListApi(params))
     /**************************/
@@ -273,10 +280,17 @@ const QueryForm: React.FC<Props> = (props) => {
 
     /** 游戏列表 */
     useEffect(() => {
-        if (isGameId || isOrderGameId || isParentId || isGameIds) {
+        if (isGameId || isOrderGameId || isParentId || isGameIds || isSuperParentGameId) {
+            getGameList.run().then(res => {
+                console.log('res--->', res)
+                const { gameList, parentGameList, superGameList } = res
+                setGameList(gameList)
+                setParentGameList(parentGameList)
+                setSuperGameList(superGameList)
+            })
             getGameChoiceList.run()
         }
-    }, [isGameId, isGameIds, isOrderGameId, isParentId])
+    }, [isGameId, isGameIds, isOrderGameId, isParentId, isSuperParentGameId])
 
     useEffect(() => {
         if (isCpId) {
@@ -641,6 +655,23 @@ const QueryForm: React.FC<Props> = (props) => {
                     {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
                 </Select>
             </Form.Item></Col>}
+
+            {/* 超父游戏ID */}
+            {isSuperParentGameId && <Col><Form.Item name='superParentGameId'>
+                <Select
+                    maxTagCount={1}
+                    showSearch
+                    style={{ minWidth: 140 }}
+                    allowClear
+                    placeholder={'请选择超父游戏'}
+                    filterOption={(input, option) =>
+                        (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
+                    }
+                >
+                    {superGameList?.map((item: any) => <Select.Option value={item.super_game_id} key={item.super_game_id}>{item.super_game_name}</Select.Option>)}
+                </Select>
+            </Form.Item></Col>}
+
             {/* 父游戏ID */}
             {isParentId && <Col><Form.Item name='parentId'>
                 <Select
@@ -663,7 +694,7 @@ const QueryForm: React.FC<Props> = (props) => {
                         }
                     }}
                 >
-                    {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id} data-super-id={item.superGameId}>{item.name}</Select.Option>)}
+                    {parentGameList?.map((item: any) => <Select.Option value={item.parent_game_id} key={item.parent_game_id} data-super-id={item.super_game_id}>{item.parent_game_name}</Select.Option>)}
                 </Select>
             </Form.Item></Col>}
 
@@ -980,7 +1011,7 @@ const QueryForm: React.FC<Props> = (props) => {
 
             {/* 注册IP */}
             {isRankingNum && <Col><Form.Item name='rankingNum'>
-                <InputNumber placeholder="排名范围" />
+                <InputNumber placeholder="排名范围" min={1} />
             </Form.Item></Col>}
 
             {/* 是否充值 */}

+ 1 - 0
src/pages/gameDataStatistics/roleOperate/roleFightingRanking/index.tsx

@@ -45,6 +45,7 @@ const RoleFightingRanking: React.FC = () => {
                 isSource
                 isServerDay={{ ranges: getPresetsRanking() }}
                 // isGameId
+                isSuperParentGameId
                 isParentId
                 isIsMergeServer
                 isServerIds

+ 4 - 0
src/pages/gameDataStatistics/roleOperate/roleFightingRanking/tableConfig.tsx

@@ -9,6 +9,10 @@ function columns12() {
         {
             label: '游戏',
             data: [
+                {
+                    title: '超父游戏', dataIndex: 'super_game_name', label: '游戏', align: 'center', width: 90,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
                 {
                     title: '游戏', dataIndex: 'parent_game_name', label: '游戏', align: 'center', width: 90, default: 1,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)

+ 1 - 0
src/pages/gameDataStatistics/roleOperate/roleRechargeRanking/index.tsx

@@ -97,6 +97,7 @@ const RoleRechargeRanking: React.FC = () => {
             leftChild={<QueryForm
                 initialValues={{ sourceSystem: 'ZX_ONE', rechargeDay: [moment(), moment()] }}
                 onChange={(data: any) => {
+                    setSelectedRowKeys([])
                     const { rechargeDay, createRoleDay, parentId, mobile, ...par } = data
                     let newQueryForm = JSON.parse(JSON.stringify(queryForm))
                     newQueryForm.pageNum = 1

+ 1 - 1
src/pages/gameDataStatistics/roleOperate/roleRechargeRanking/tableConfig.tsx

@@ -36,7 +36,7 @@ function columns12(
         {
             label: '玩家信息',
             data: [
-                { title: '玩家ID', dataIndex: 'user_id', label: '玩家信息', align: 'center', width: 70 },
+                { title: '玩家ID', dataIndex: 'association_user_id', label: '玩家信息', align: 'center', width: 70 },
                 { title: '玩家账号', dataIndex: 'username', label: '玩家信息', align: 'center', width: 120, default: 1, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
                 { title: '玩家注册渠道', dataIndex: 'agent_name', label: '玩家信息', align: 'center', width: 80, default: 5, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
                 { title: '玩家注册渠道ID', dataIndex: 'agent_id', label: '玩家信息', align: 'center', width: 80 },

+ 8 - 0
src/services/gameData/index.ts

@@ -128,4 +128,12 @@ export async function getPackListApi(data: { gameId?: number, giftName?: string
  */
 export async function getGameServerListApi(params: { gameId: number }) {
     return request(gameApi + `/manage/gameServer/all/server/list`, { method: 'GET', params });
+}
+
+/**
+ * 所有类型游戏列表
+ * @returns 
+ */
+export async function getGameListApi() {
+    return request(gameApi + `/gameData/gameList/list`);
 }