wjx 3 miesięcy temu
rodzic
commit
e5af19330e

+ 8 - 2
src/pages/gsData/gandRole/countryList.tsx

@@ -6,16 +6,17 @@ import React, { useEffect, useState } from 'react';
 interface Props {
     country: string
     serverId: string
+    countryLevel: number
 }
 /**
  * 帮派成员
  * @returns 
  */
-const CountryList: React.FC<Props> = ({ country, serverId }) => {
+const CountryList: React.FC<Props> = ({ country, serverId, countryLevel }) => {
 
     /*********************************/
     const [visible, setVisible] = useState<boolean>(false)
-    const [queryForm, setQueryForm] = useState<getGameCountryRoleListProps>({ country, serverId, pageNum: 1, pageSize: 20 })
+    const [queryForm, setQueryForm] = useState<getGameCountryRoleListProps>({ country, serverId, countryLevel, pageNum: 1, pageSize: 20 })
 
     const getGameCountryRoleList = useAjax((params) => getGameCountryRoleListApi(params))
     /*********************************/
@@ -42,6 +43,11 @@ const CountryList: React.FC<Props> = ({ country, serverId }) => {
                 loading={getGameCountryRoleList.loading}
                 rowKey={'roleId'}
                 scroll={{ x: 500 }}
+                pagination={{
+                    total: getGameCountryRoleList?.data?.total,
+                    pageSize: getGameCountryRoleList?.data?.size,
+                    current: getGameCountryRoleList?.data?.current
+                }}
                 columns={[
                     {
                         title: '角色名称',

+ 1 - 1
src/pages/gsData/gandRole/index.tsx

@@ -216,7 +216,7 @@ const GandRole: React.FC = () => {
                                             width: 70,
                                             align: 'center',
                                             render(_, record) {
-                                                return <CountryList country={record.country} serverId={record.serverId} />
+                                                return <CountryList country={record.country} serverId={record.serverId} countryLevel={record.countryLevel}/>
                                             },
                                         }
                                     ]}

+ 1 - 0
src/services/gsData/index.ts

@@ -268,6 +268,7 @@ export async function getGameCountryDataListApi(data: GetGameCountryDataListProp
 export interface getGameCountryRoleListProps extends Paging, SortProps {
     country: string
     serverId: string
+    countryLevel: number
 }
 /**
  * 游戏帮派角色列表(分页)