wjx 3 months ago
parent
commit
7c468c7ce1

+ 11 - 7
src/pages/gameDataStatistics/player/list/look.tsx

@@ -24,7 +24,7 @@ const Look: React.FC<Props> = (props) => {
 
 
     /** ----------变量开始------- */
     /** ----------变量开始------- */
     const { visible, onClose, userInfo, onChange } = props
     const { visible, onClose, userInfo, onChange } = props
-    const [title, setTitle] = useState<string>('查看详情')
+    const [title] = useState<string>('查看详情')
     const [form] = Form.useForm()
     const [form] = Form.useForm()
     /** ----------变量结束------- */
     /** ----------变量结束------- */
 
 
@@ -122,7 +122,7 @@ const Look: React.FC<Props> = (props) => {
                     <Descriptions.Item label="玩家昵称" contentStyle={{ width: 300 }}>{userInfo?.nickname || '--'}</Descriptions.Item>
                     <Descriptions.Item label="玩家昵称" contentStyle={{ width: 300 }}>{userInfo?.nickname || '--'}</Descriptions.Item>
                     <Descriptions.Item label="真实姓名" contentStyle={{ width: 300 }}>{userInfo?.realName || '--'}</Descriptions.Item>
                     <Descriptions.Item label="真实姓名" contentStyle={{ width: 300 }}>{userInfo?.realName || '--'}</Descriptions.Item>
                     <Descriptions.Item label="生日" contentStyle={{ width: 300 }}>{userInfo?.birthday}</Descriptions.Item>
                     <Descriptions.Item label="生日" contentStyle={{ width: 300 }}>{userInfo?.birthday}</Descriptions.Item>
-                    <Descriptions.Item label="性别" contentStyle={{ width: 300 }}>{{ '0': '未知', '1': '男', '2': '女' }[userInfo?.sex]}</Descriptions.Item>
+                    <Descriptions.Item label="性别" contentStyle={{ width: 300 }}>{({ '0': '未知', '1': '男', '2': '女' } as any)[userInfo?.sex]}</Descriptions.Item>
                     <Descriptions.Item label="证件号" contentStyle={{ width: 300 }}>{userInfo?.idCard || '--'}</Descriptions.Item>
                     <Descriptions.Item label="证件号" contentStyle={{ width: 300 }}>{userInfo?.idCard || '--'}</Descriptions.Item>
                     <Descriptions.Item label="注册手机" contentStyle={{ width: 300 }}>{userInfo?.regMobile || '--'}</Descriptions.Item>
                     <Descriptions.Item label="注册手机" contentStyle={{ width: 300 }}>{userInfo?.regMobile || '--'}</Descriptions.Item>
                     <Descriptions.Item label="注册邮箱" contentStyle={{ width: 300 }}>{userInfo?.regEmail || '--'}</Descriptions.Item>
                     <Descriptions.Item label="注册邮箱" contentStyle={{ width: 300 }}>{userInfo?.regEmail || '--'}</Descriptions.Item>
@@ -140,7 +140,7 @@ const Look: React.FC<Props> = (props) => {
                     </Descriptions.Item>
                     </Descriptions.Item>
                     <Descriptions.Item label="注册渠道" contentStyle={{ width: 300 }}>{userInfo?.agentName || '--'}</Descriptions.Item>
                     <Descriptions.Item label="注册渠道" contentStyle={{ width: 300 }}>{userInfo?.agentName || '--'}</Descriptions.Item>
 
 
-                    <Descriptions.Item label="状态" contentStyle={{ width: 300 }}>{{ '1': <Badge status="error" text="封禁" />, '0': <Badge status="success" text="正常" /> }[userInfo?.status]}</Descriptions.Item>
+                    <Descriptions.Item label="状态" contentStyle={{ width: 300 }}>{({ '1': <Badge status="error" text="封禁" />, '0': <Badge status="success" text="正常" /> } as any)[userInfo?.status]}</Descriptions.Item>
                     <Descriptions.Item label="设备码" contentStyle={{ width: 300 }}>{userInfo?.deviceId || '--'}</Descriptions.Item>
                     <Descriptions.Item label="设备码" contentStyle={{ width: 300 }}>{userInfo?.deviceId || '--'}</Descriptions.Item>
                     <Descriptions.Item label="注册IP" contentStyle={{ width: 300 }}>{userInfo?.regIp || '--'}</Descriptions.Item>
                     <Descriptions.Item label="注册IP" contentStyle={{ width: 300 }}>{userInfo?.regIp || '--'}</Descriptions.Item>
                     <Descriptions.Item label="注册时间" contentStyle={{ width: 300 }}>{userInfo?.createTime || '--'}</Descriptions.Item>
                     <Descriptions.Item label="注册时间" contentStyle={{ width: 300 }}>{userInfo?.createTime || '--'}</Descriptions.Item>
@@ -285,7 +285,7 @@ let addressTableColumns: any = [
     },
     },
 ]
 ]
 /**游戏角色table字段*/
 /**游戏角色table字段*/
-let gameRoleTableColumns: any = [
+export const gameRoleTableColumns: any = [
     // {
     // {
     //     title: 'ID',
     //     title: 'ID',
     //     dataIndex: 'id',
     //     dataIndex: 'id',
@@ -298,7 +298,9 @@ let gameRoleTableColumns: any = [
         dataIndex: 'gameName',
         dataIndex: 'gameName',
         key: 'gameName',
         key: 'gameName',
         align: 'center',
         align: 'center',
-        fixed: 'left'
+        fixed: 'left',
+        width: 100,
+        ellipsis: true,
     },
     },
     {
     {
         title: '游戏应用类型',
         title: '游戏应用类型',
@@ -306,7 +308,8 @@ let gameRoleTableColumns: any = [
         key: 'gameCategoryName',
         key: 'gameCategoryName',
         align: 'center',
         align: 'center',
         fixed: 'left',
         fixed: 'left',
-        width: 120
+        width: 100,
+        ellipsis: true,
     },
     },
     {
     {
         title: '游戏角色名称',
         title: '游戏角色名称',
@@ -314,7 +317,8 @@ let gameRoleTableColumns: any = [
         key: 'roleName',
         key: 'roleName',
         align: 'center',
         align: 'center',
         fixed: 'left',
         fixed: 'left',
-        width: 120
+        width: 100,
+        ellipsis: true
     },
     },
     {
     {
         title: '游戏角色ID',
         title: '游戏角色ID',

+ 1 - 1
src/pages/gameDataStatistics/player/list/tableConfig.tsx

@@ -51,7 +51,7 @@ function columns12(lookHandle: (data: any) => void, exportH5: (data: any) => voi
                 {
                 {
                     title: '玩家状态', dataIndex: 'status', label: '玩家列表', align: 'center', width: 70, default: 21,
                     title: '玩家状态', dataIndex: 'status', label: '玩家列表', align: 'center', width: 70, default: 21,
                     render: (a: any) => {
                     render: (a: any) => {
-                        return { '3': <Badge status="error" text="冻结" />, '2': <Badge status="success" text="正常" />, '1': <Badge status="warning" text="试玩" /> }[a]
+                        return ({ '3': <Badge status="error" text="冻结" />, '2': <Badge status="success" text="正常" />, '1': <Badge status="warning" text="试玩" /> } as any)[a]
                     }
                     }
                 },
                 },
                 { title: '玩家最新染色时间', dataIndex: 'userLastRegTime', label: '玩家列表', align: 'center', width: 140, render: (a: string) => (<WidthEllipsis value={a} />) },
                 { title: '玩家最新染色时间', dataIndex: 'userLastRegTime', label: '玩家列表', align: 'center', width: 140, render: (a: string) => (<WidthEllipsis value={a} />) },

+ 1 - 1
src/pages/gameDataStatistics/player/role/index.tsx

@@ -106,7 +106,7 @@ const Role: React.FC = () => {
             totalData={totalData}
             totalData={totalData}
             scroll={{ x: 1000, y: 600 }}
             scroll={{ x: 1000, y: 600 }}
             ajax={getUserRoleList}
             ajax={getUserRoleList}
-            fixed={{ left: 1, right: 0 }}
+            fixed={{ left: 1, right: 1 }}
             dataSource={getUserRoleList?.data?.records}
             dataSource={getUserRoleList?.data?.records}
             page={getUserRoleList?.data?.current || 1}
             page={getUserRoleList?.data?.current || 1}
             pageSize={getUserRoleList?.data?.size || 20}
             pageSize={getUserRoleList?.data?.size || 20}

+ 43 - 0
src/pages/gameDataStatistics/player/role/lookRoleDetails.tsx

@@ -0,0 +1,43 @@
+import Tables from "@/components/Tables"
+import { useAjax } from "@/Hook/useAjax"
+import { getUserGameRoleListApi } from "@/services/gameData/player"
+import { Modal } from "antd"
+import React, { useEffect, useState } from "react"
+import { gameRoleTableColumns } from "../list/look"
+
+
+const LookRoleDetails: React.FC<{ userId: any }> = ({ userId }) => {
+
+    /*********************************/
+    const [visible, setVisible] = useState<boolean>(false)
+    const getUserGameRoleList = useAjax((id: number) => getUserGameRoleListApi(id))
+    /*********************************/
+
+    useEffect(() => {
+        if (visible) {
+            getUserGameRoleList.run(userId)
+        }
+    }, [userId, visible])
+
+    return <>
+        <a onClick={() => setVisible(true)}>角色</a>
+        {visible && <Modal
+            title={<strong>游戏角色</strong>}
+            visible={visible}
+            onCancel={() => setVisible(false)}
+            footer={null}
+            width={1100}
+        >
+            <Tables
+                columns={gameRoleTableColumns}
+                dataSource={getUserGameRoleList?.data}
+                loading={getUserGameRoleList?.loading}
+                size="small"
+                scroll={{ x: 2000 }}
+                bordered
+            />
+        </Modal>}
+    </>
+}
+
+export default React.memo(LookRoleDetails)

+ 22 - 3
src/pages/gameDataStatistics/player/role/tableConfig.tsx

@@ -1,6 +1,7 @@
 import WidthEllipsis from "@/components/widthEllipsis"
 import WidthEllipsis from "@/components/widthEllipsis"
 import { Statistic } from "antd"
 import { Statistic } from "antd"
 import React from "react"
 import React from "react"
+import LookRoleDetails from "./lookRoleDetails"
 
 
 function columns12() {
 function columns12() {
 
 
@@ -9,7 +10,7 @@ function columns12() {
             label: '玩家列表',
             label: '玩家列表',
             data: [
             data: [
                 {
                 {
-                    title: '玩家ID', dataIndex: 'userId', label: '玩家列表', align: 'center', default: 1, width: 55,
+                    title: '玩家ID', dataIndex: 'userId', label: '玩家列表', align: 'center', default: 1, width: 66,
                     render: (a: string, b: any) => {
                     render: (a: string, b: any) => {
                         if (b?.zj) {
                         if (b?.zj) {
                             return b?.zj
                             return b?.zj
@@ -36,7 +37,7 @@ function columns12() {
                 { title: '角色VIP', dataIndex: 'roleVipLevel', label: '玩家列表', align: 'center', width: 60, default: 17, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 { title: '角色VIP', dataIndex: 'roleVipLevel', label: '玩家列表', align: 'center', width: 60, default: 17, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 { title: '操作系统', dataIndex: 'os', label: '玩家列表', align: 'center', width: 65, default: 18, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 { title: '操作系统', dataIndex: 'os', label: '玩家列表', align: 'center', width: 65, default: 18, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 { title: '国家', dataIndex: 'country', label: '玩家列表', align: 'center', width: 70, default: 19, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 { title: '国家', dataIndex: 'country', label: '玩家列表', align: 'center', width: 70, default: 19, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
-                { title: '充值金额', dataIndex: 'rechargeMoney', label: '玩家列表', align: 'center', width: 80, default: 20, render: (a: string, b: any) => (<Statistic value={a || 0} />) },
+                { title: '充值金额', dataIndex: 'rechargeMoney', label: '玩家列表', align: 'center', width: 99, default: 20, render: (a: string, b: any) => (<Statistic value={a || 0} />) },
                 { title: '充值次数', dataIndex: 'rechargeCount', label: '玩家列表', align: 'center', width: 60, default: 21, render: (a: string, b: any) => (<Statistic value={a || 0} />) },
                 { title: '充值次数', dataIndex: 'rechargeCount', label: '玩家列表', align: 'center', width: 60, default: 21, render: (a: string, b: any) => (<Statistic value={a || 0} />) },
                 { title: '游戏角色创建时间', dataIndex: 'createTime', label: '玩家列表', align: 'center', width: 140, default: 22, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 { title: '游戏角色创建时间', dataIndex: 'createTime', label: '玩家列表', align: 'center', width: 140, default: 22, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 { title: '最近登录时间', dataIndex: 'lastLoginTime', label: '玩家列表', align: 'center', width: 140, default: 23, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 { title: '最近登录时间', dataIndex: 'lastLoginTime', label: '玩家列表', align: 'center', width: 140, default: 23, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
@@ -62,7 +63,25 @@ function columns12() {
                 }
                 }
             ]
             ]
         },
         },
-
+        {
+            label: '操作',
+            data: [
+                {
+                    title: '操作',
+                    dataIndex: 'cz',
+                    align: 'center',
+                    width: 60,
+                    label: '操作',
+                    default: 27,
+                    render: (_: any, b: any) => {
+                        if (b?.zj) {
+                            return '--'
+                        }
+                        return <LookRoleDetails userId={b.userId} />
+                    }
+                }
+            ]
+        }
     ]
     ]
 
 
     return newArr
     return newArr

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

@@ -1,12 +1,11 @@
 import ProgressTable from "@/components/ProgressTable"
 import ProgressTable from "@/components/ProgressTable"
 import WidthEllipsis from "@/components/widthEllipsis"
 import WidthEllipsis from "@/components/widthEllipsis"
-import { Badge, Button, Popconfirm, Space, Spin, Statistic, Tag } from "antd"
+import { Badge, Popconfirm, Space, Spin, Statistic } from "antd"
 import React from "react"
 import React from "react"
 import SendEmailDetails from "./sendEmailDetails"
 import SendEmailDetails from "./sendEmailDetails"
 import './index.less'
 import './index.less'
 import SendPackDetails from "./sendPackDetails"
 import SendPackDetails from "./sendPackDetails"
-// import IsTrue from "./isTrue"
-// import InputUpdate from "./inputUpdate"
+import LookRoleDetails from "../../player/role/lookRoleDetails"
 
 
 function columns12(
 function columns12(
     sendEmail: (data: any[]) => void,
     sendEmail: (data: any[]) => void,
@@ -342,13 +341,14 @@ function columns12(
                     dataIndex: 'cz',
                     dataIndex: 'cz',
                     label: '操作',
                     label: '操作',
                     align: 'center',
                     align: 'center',
-                    width: 160,
+                    width: 190,
                     default: 20,
                     default: 20,
                     render: (a: any, b: any) => {
                     render: (a: any, b: any) => {
                         return <Space>
                         return <Space>
                             <a style={{ fontSize: 12 }} onClick={() => { roleHandle([b]) }}>角色操作</a>
                             <a style={{ fontSize: 12 }} onClick={() => { roleHandle([b]) }}>角色操作</a>
                             <a style={{ fontSize: 12 }} onClick={() => { assignHandle([b]) }}>指派</a>
                             <a style={{ fontSize: 12 }} onClick={() => { assignHandle([b]) }}>指派</a>
                             <a style={{ fontSize: 12 }} onClick={() => { changeLog([b]) }}>变更记录</a>
                             <a style={{ fontSize: 12 }} onClick={() => { changeLog([b]) }}>变更记录</a>
+                            <LookRoleDetails userId={b.association_user_id} />
                         </Space>
                         </Space>
                     }
                     }
                 }
                 }