|
@@ -1,5 +1,5 @@
|
|
|
import { useAjax } from "@/Hook/useAjax"
|
|
|
-import { PlayerRoleListProps, getUserRoleListApi } from "@/services/gameData/player"
|
|
|
+import { PlayerRoleListProps, getUserRoleListApi, getUserRoleTotalApi } from "@/services/gameData/player"
|
|
|
import React, { useEffect, useState } from "react"
|
|
|
import TableData from "../../components/TableData"
|
|
|
import QueryForm from "@/components/QueryForm"
|
|
@@ -15,10 +15,17 @@ const Role: React.FC = () => {
|
|
|
|
|
|
/************************/
|
|
|
const [queryForm, setQueryForm] = useState<PlayerRoleListProps>({ pageNum: 1, pageSize: 50, sourceSystem: 'ZX_ONE' })
|
|
|
+ const [totalData, setTotalData] = useState<any[]>([])
|
|
|
const getUserRoleList = useAjax((params) => getUserRoleListApi(params))
|
|
|
+ const getUserRoleTotal = useAjax((params) => getUserRoleTotalApi(params))
|
|
|
/************************/
|
|
|
|
|
|
useEffect(() => {
|
|
|
+ getUserRoleTotal.run(queryForm).then((res: { id: number; zj: string; }) => {
|
|
|
+ res.id = 1
|
|
|
+ res.zj = '总计'
|
|
|
+ setTotalData([res])
|
|
|
+ })
|
|
|
getUserRoleList.run(queryForm)
|
|
|
}, [queryForm])
|
|
|
|
|
@@ -95,6 +102,8 @@ const Role: React.FC = () => {
|
|
|
isPayIntervalTime={{ tips: '充值距注册时间区间(分钟)' }}
|
|
|
isRoleCount={{ tips: '玩家等级区间' }}
|
|
|
/>}
|
|
|
+ isZj
|
|
|
+ totalData={totalData}
|
|
|
scroll={{ x: 1000, y: 600 }}
|
|
|
ajax={getUserRoleList}
|
|
|
fixed={{ left: 1, right: 0 }}
|