wjx 1 rok temu
rodzic
commit
7c5abf2e9a

+ 29 - 0
src/components/ProgressTable/index.tsx

@@ -0,0 +1,29 @@
+import { Progress, Statistic } from "antd"
+import { ProgressGradient } from "antd/lib/progress/progress"
+import React from "react"
+
+interface Props {
+    value?: number
+    strokeColor?: string | ProgressGradient
+    percent?: number
+    valueStyle?: React.CSSProperties
+}
+/**
+ * table 表格 progress
+ * @param param0 
+ * @returns 
+ */
+const ProgressTable: React.FC<Props> = ({ strokeColor, percent, valueStyle, value }) => {
+
+    return <div style={{ height: 25, position: 'relative' }}>
+        <Progress
+            strokeColor={strokeColor}
+            status="active"
+            showInfo={false}
+            percent={percent}
+        />
+        <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0 }}><Statistic value={value} valueStyle={valueStyle} /></span>
+    </div>
+}
+
+export default React.memo(ProgressTable)

+ 11 - 2
src/components/QueryForm/index.tsx

@@ -115,6 +115,7 @@ const QueryForm: React.FC<Props> = (props) => {
     } = props
     const [form] = Form.useForm()
     const [accountList, setAccountList] = useState<any[]>([])
+    const [userIdList, setUserIdList] = useState<any[]>([])
 
     const getAllOfOwnerUser = useAjax(() => getAllOfOwnerUserApi())
     const getTtAllUserList = useAjax(() => getTtAllUserListApi())
@@ -153,7 +154,15 @@ const QueryForm: React.FC<Props> = (props) => {
     /** 投手列表 */
     useEffect(() => {
         if (isSysUserId) {
-            getSubUserWithSelfList.run()
+            getSubUserWithSelfList.run().then(res => {
+                let loginUserId = localStorage.getItem('userId')
+                let nameList = ['杨安明', '曹春林', '杨泽健', '金勇旭', '杨雨霏', '毛斌峰']
+                if (loginUserId && ['158', '120', '119'].includes(loginUserId)) {
+                    setUserIdList(res.filter((item: any) => nameList.includes(item.nickname)))
+                } else {
+                    setUserIdList(res)
+                }
+            })
         }
     }, [isSysUserId])
 
@@ -594,7 +603,7 @@ const QueryForm: React.FC<Props> = (props) => {
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
                     }
                 >
-                    {getSubUserWithSelfList?.data?.map((item: any) => <Select.Option value={item.userId} key={item.userId}>{item.nickname}</Select.Option>)}
+                    {userIdList.map((item: any) => <Select.Option value={item.userId} key={item.userId}>{item.nickname}</Select.Option>)}
                 </Select>
             </Form.Item></Col>}
 

+ 31 - 2
src/components/RightContent/index.tsx

@@ -1,21 +1,35 @@
 import { Tag, Space, Badge, Modal } from 'antd';
-import React, { useCallback } from 'react';
+import React, { useCallback, useEffect, useState } from 'react';
 import { useModel } from 'umi';
 import Avatar from './AvatarDropdown';
 import styles from './index.less';
 import { exitFullScreen, requestFullScreen, isFull } from '@/utils/fullScreen'
 import { BellOutlined } from '@ant-design/icons';
+import { ReactComponent as GameSvg } from '@/assets/game.svg'
 
 export type SiderTheme = 'light' | 'dark';
 
 
 const GlobalHeaderRight: React.FC<{}> = () => {
+
+  const [left, setLeft] = useState(0)
   const { initialState } = useModel('@@initialState');
   const { state: { versionsOpen }, dispatch, getversions } = useModel('useOperating.useWxGroupList')
   if (!initialState || !initialState.settings) {
     return null;
   }
 
+  useEffect(() => {
+    let nav: any = document.querySelector('.top-nav-menu')
+    let navLi: any = document.querySelectorAll('.top-nav-menu > li')
+    if (nav && navLi) {
+      let l = nav.offsetLeft
+      let lw = navLi[0].offsetWidth
+      let length = navLi.length - 1
+      setLeft(l + lw * length + 20)
+    }
+  }, [])
+
   const { navTheme, layout } = initialState.settings;
   let className = styles.right;
 
@@ -37,7 +51,7 @@ const GlobalHeaderRight: React.FC<{}> = () => {
       let content: any = ''//版本更新内容
       if (res) {
         fwqVersions = res?.configValue
-        content = <div dangerouslySetInnerHTML={{ __html: res?.remark?.replace(/\n/ig,'<br/>') }}></div >
+        content = <div dangerouslySetInnerHTML={{ __html: res?.remark?.replace(/\n/ig, '<br/>') }}></div >
         if (fwqVersions && bdVersions !== fwqVersions) {//不一样
           //执行逻辑
           Modal.confirm({
@@ -59,8 +73,23 @@ const GlobalHeaderRight: React.FC<{}> = () => {
       }
     })
   }, [])
+
+  const open = () => {
+    let token = sessionStorage.getItem('Admin-Token')
+    window.open(`http://gg.84game.cn/#/login?token=${token}`)
+    return
+  }
+
   return (
     <div style={{ display: 'flex', justifyContent: 'space-between' }}>
+
+      <div style={{ cursor: 'pointer', position: 'absolute', left: left, top: 1 }} onClick={open}>
+        <Space>
+          <span role="img" aria-label="fund-view" className="anticon anticon-fund-view"><GameSvg /></span>
+          <span style={{ color: 'rgba(255, 255, 255, 0.65)' }}>游戏SDK</span>
+        </Space>
+      </div>
+
       <Space className={className}>
         {versionsOpen && <div onClick={versionsOpen && inform}>
           <Badge count={versionsOpen && 1} size='small' offset={[2, 0]}>

+ 29 - 0
src/global.less

@@ -294,6 +294,35 @@ body {
 .ant-radio-button-wrapper:first-child {
   border-radius: 6px 0 0 6px !important;
 }
+
 .ant-radio-button-wrapper:last-child {
   border-radius: 0 6px 6px 0 !important;
+}
+.ant-table-cell {
+  padding: 2px 5px !important;
+}
+.progress {
+  padding: 0 !important;
+
+  .ant-progress {
+    height: 100%;
+
+    .ant-progress-outer {
+      height: 100%;
+
+      .ant-progress-inner {
+        height: 100%;
+        border-radius: 0;
+
+        .ant-progress-bg {
+          height: 100% !important;
+          border-radius: 0;
+        }
+      }
+    }
+  }
+}
+
+.header_table_body td{
+  font-weight: 600;
 }

+ 3 - 3
src/pages/gameDataStatistics/extensionData/total/index.tsx

@@ -14,9 +14,9 @@ const Total: React.FC = () => {
         pageNum: 1,
         pageSize: 20,
         sourceSystem: 'ZX_ONE',
-        costBeginDay: moment().subtract(30, 'd').format('YYYY-MM-DD'),
+        costBeginDay: moment().format('YYYY-MM-DD'),
         costEndDay: moment().format('YYYY-MM-DD'),
-        rechargeBeginDay: moment().subtract(30, 'd').format('YYYY-MM-DD'),
+        rechargeBeginDay: moment().format('YYYY-MM-DD'),
         rechargeEndDay: moment().format('YYYY-MM-DD'),
     })
     const [gameType, setGameType] = useState<any>({})
@@ -44,7 +44,7 @@ const Total: React.FC = () => {
 
         <TableData
             leftChild={<QueryForm
-                initialValues={{ sourceSystem: 'ZX_ONE', consumeDay: [moment().subtract(30, 'd'), moment()], rechargeDay: [moment().subtract(30, 'd'), moment()] }}
+                initialValues={{ sourceSystem: 'ZX_ONE', consumeDay: [moment(), moment()], rechargeDay: [moment(), moment()] }}
                 onChange={(data: any) => {
                     const { pitcherId, rechargeDay, ...params } = data
                     let newQueryForm = JSON.parse(JSON.stringify(queryForm))

+ 2 - 2
src/pages/gameDataStatistics/extensionData/total/tableConfig.tsx

@@ -112,11 +112,11 @@ function columns12(gameType: any) {
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '回收率', dataIndex: 'recoveryRate', label: '付费数据', align: 'center', width: 70, default: 16,
+                    title: '回收率', dataIndex: 'recoveryRate', label: '付费数据', align: 'center', width: 90, default: 16,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '当日回收率', dataIndex: 'todayRecoveryRate', label: '付费数据', align: 'center', width: 70, default: 17, sorter: true,
+                    title: '当日回收率', dataIndex: 'todayRecoveryRate', label: '付费数据', align: 'center', width: 90, default: 17, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {

+ 22 - 13
src/pages/gameDataStatistics/gameData/everyday/tableConfig.tsx

@@ -40,6 +40,15 @@ function columns12(rechargeTrendHandle: (data: any) => void): { label: string, f
                 { title: '日期', dataIndex: 'costDate', label: '时间', align: 'center', width: 90, default: 3 },
             ]
         },
+        {
+            label: '消耗',
+            data: [
+                {
+                    title: '消耗', dataIndex: 'cost', label: '消耗', align: 'center', width: 90, sorter: true, default: 7,
+                    render: (a: string) => <Statistic value={a || 0} />
+                }
+            ]
+        },
         {
             label: '买量用户数据',
             data: [
@@ -61,22 +70,22 @@ function columns12(rechargeTrendHandle: (data: any) => void): { label: string, f
         {
             label: '买量付费数据',
             data: [
-                { title: '买量首日新用户充值次数', dataIndex: 'buyFirstNewUserAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 7, sorter: true },
-                { title: '买量首日新用户充值人数', dataIndex: 'buyFirstNewUserAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 8, sorter: true },
+                { title: '买量首日新用户充值次数', dataIndex: 'buyFirstNewUserAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 8, sorter: true },
+                { title: '买量首日新用户充值人数', dataIndex: 'buyFirstNewUserAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 9, sorter: true },
                 {
-                    title: '买量首日新用户充值金额', dataIndex: 'buyFirstNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 9, sorter: true,
+                    title: '买量首日新用户充值金额', dataIndex: 'buyFirstNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 10, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '买量老用户充值次数', dataIndex: 'buyOldUserCount', label: '买量付费数据', align: 'center', width: 70, default: 10, sorter: true },
-                { title: '买量老用户充值人数', dataIndex: 'buyOldUserNum', label: '买量付费数据', align: 'center', width: 70, default: 11, sorter: true },
+                { title: '买量老用户充值次数', dataIndex: 'buyOldUserCount', label: '买量付费数据', align: 'center', width: 70, default: 11, sorter: true },
+                { title: '买量老用户充值人数', dataIndex: 'buyOldUserNum', label: '买量付费数据', align: 'center', width: 70, default: 12, sorter: true },
                 {
-                    title: '买量老用户充值金额', dataIndex: 'buyOldUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 12, sorter: true,
+                    title: '买量老用户充值金额', dataIndex: 'buyOldUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 13, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '买量账面充值次数', dataIndex: 'buyAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 13, sorter: true },
-                { title: '买量账面充值人数', dataIndex: 'buyAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 14, sorter: true },
+                { title: '买量账面充值次数', dataIndex: 'buyAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 14, sorter: true },
+                { title: '买量账面充值人数', dataIndex: 'buyAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 15, sorter: true },
                 {
-                    title: '买量账面充值金额', dataIndex: 'buyAmount', label: '买量付费数据', align: 'center', width: 70, default: 15, sorter: true,
+                    title: '买量账面充值金额', dataIndex: 'buyAmount', label: '买量付费数据', align: 'center', width: 70, default: 16, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 { title: '买量新用户累计充值次数', dataIndex: 'buyNewUserTotalAmountCount', label: '买量付费数据', align: 'center', width: 70, sorter: true },
@@ -110,7 +119,7 @@ function columns12(rechargeTrendHandle: (data: any) => void): { label: string, f
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量复充率', dataIndex: 'buyUserAgainRate', label: '买量付费数据', align: 'center', width: 70, default: 16, sorter: true,
+                    title: '买量复充率', dataIndex: 'buyUserAgainRate', label: '买量付费数据', align: 'center', width: 70, default: 17, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
@@ -134,8 +143,8 @@ function columns12(rechargeTrendHandle: (data: any) => void): { label: string, f
         {
             label: '自然量付费数据',
             data: [
-                { title: '自然量首日新用户充值次数', dataIndex: 'natureFirstNewUserAmountCount', label: '自然量付费数据', align: 'center', width: 70, default: 17, sorter: true },
-                { title: '自然量首日新用户充值人数', dataIndex: 'natureFirstNewUserAmountNum', label: '自然量付费数据', align: 'center', width: 70, default: 18, sorter: true },
+                { title: '自然量首日新用户充值次数', dataIndex: 'natureFirstNewUserAmountCount', label: '自然量付费数据', align: 'center', width: 70, default: 18, sorter: true },
+                { title: '自然量首日新用户充值人数', dataIndex: 'natureFirstNewUserAmountNum', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
                 {
                     title: '自然量首日新用户充值金额', dataIndex: 'natureFirstNewUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 19, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
@@ -1122,7 +1131,7 @@ function columns12(rechargeTrendHandle: (data: any) => void): { label: string, f
                     }
                     return '--'
                 },
-            },  {
+            }, {
                 title: "M6(总)",
                 dataIndex: "M6",
                 label: "总付费趋势",

+ 3 - 3
src/pages/gameDataStatistics/gameData/total/index.tsx

@@ -17,9 +17,9 @@ const Total: React.FC = () => {
     const [queryForm, setQueryForm] = useState<GameTotalProps>({ 
         pageNum: 1, pageSize: 20,
         sourceSystem: 'ZX_ONE',
-        registeredBeginDate: moment().subtract(30, 'd').format('YYYY-MM-DD'),
+        registeredBeginDate: moment().format('YYYY-MM-DD'), //.subtract(30, 'd')
         registeredEndDate: moment().format('YYYY-MM-DD'),
-        rechargeBeginDate: moment().subtract(30, 'd').format('YYYY-MM-DD'),
+        rechargeBeginDate: moment().format('YYYY-MM-DD'), //subtract(30, 'd').
         rechargeEndDate: moment().format('YYYY-MM-DD')
     })
 
@@ -34,7 +34,7 @@ const Total: React.FC = () => {
 
         <TableData
             leftChild={<QueryForm
-                initialValues={{ regDay: [moment().subtract(30, 'd'), moment()], rechargeDay: [moment().subtract(30, 'd'), moment()], sourceSystem: 'ZX_ONE' }}
+                initialValues={{ regDay: [moment(), moment()], rechargeDay: [moment(), moment()], sourceSystem: 'ZX_ONE' }}
                 onChange={(data: any) => {
                     console.log(data)
                     const { regStartDay, regEndDay, rechargeDay, ...params } = data

+ 38 - 29
src/pages/gameDataStatistics/gameData/total/tableConfig.tsx

@@ -18,6 +18,15 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 }
             ]
         },
+        {
+            label: '消耗',
+            data: [
+                {
+                    title: '消耗', dataIndex: 'cost', label: '消耗', align: 'center', width: 90, sorter: true, default: 6,
+                    render: (a: string) => <Statistic value={a || 0} />
+                }
+            ]
+        },
         {
             label: '买量用户数据',
             data: [
@@ -39,22 +48,22 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
         {
             label: '买量付费数据',
             data: [
-                { title: '买量新用户充值次数', dataIndex: 'buyNewUserAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 6 },
-                { title: '买量新用户充值人数', dataIndex: 'buyNewUserAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 7 },
+                { title: '买量新用户充值次数', dataIndex: 'buyNewUserAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 7 },
+                { title: '买量新用户充值人数', dataIndex: 'buyNewUserAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 8 },
                 {
-                    title: '买量新用户充值金额', dataIndex: 'buyNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 8,
+                    title: '买量新用户充值金额', dataIndex: 'buyNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 9,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '买量首日新用户充值次数', dataIndex: 'buyFirstNewUserAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 9, sorter: true },
-                { title: '买量首日新用户充值人数', dataIndex: 'buyFirstNewUserAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 10, sorter: true },
+                { title: '买量首日新用户充值次数', dataIndex: 'buyFirstNewUserAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 10, sorter: true },
+                { title: '买量首日新用户充值人数', dataIndex: 'buyFirstNewUserAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 11, sorter: true },
                 {
-                    title: '买量首日新用户充值金额', dataIndex: 'buyFirstNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 11, sorter: true,
+                    title: '买量首日新用户充值金额', dataIndex: 'buyFirstNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 12, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '买量老用户充值次数', dataIndex: 'buyOldUserCount', label: '买量付费数据', align: 'center', width: 70, default: 12 },
-                { title: '买量老用户充值人数', dataIndex: 'buyOldUserNum', label: '买量付费数据', align: 'center', width: 70, default: 13 },
+                { title: '买量老用户充值次数', dataIndex: 'buyOldUserCount', label: '买量付费数据', align: 'center', width: 70, default: 13 },
+                { title: '买量老用户充值人数', dataIndex: 'buyOldUserNum', label: '买量付费数据', align: 'center', width: 70, default: 14 },
                 {
-                    title: '买量老用户充值金额', dataIndex: 'buyOldUserAmount', label: '买量付费数据', align: 'center', width: 80, default: 14,
+                    title: '买量老用户充值金额', dataIndex: 'buyOldUserAmount', label: '买量付费数据', align: 'center', width: 80, default: 15,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 { title: '买量账面充值次数', dataIndex: 'buyAmountCount', label: '买量付费数据', align: 'center', width: 70 },
@@ -70,15 +79,15 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量首日付费率', dataIndex: 'buyFirstRoi', label: '买量付费数据', align: 'center', width: 70, default: 15, sorter: true,
+                    title: '买量首日付费率', dataIndex: 'buyFirstRoi', label: '买量付费数据', align: 'center', width: 70, default: 16, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '买量新用户付费率', dataIndex: 'buyNewUserRoi', label: '买量付费数据', align: 'center', width: 70, default: 16,
+                    title: '买量新用户付费率', dataIndex: 'buyNewUserRoi', label: '买量付费数据', align: 'center', width: 70, default: 17,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '买量当天付费率', dataIndex: 'buyTodayRoi', label: '买量付费数据', align: 'center', width: 70, default: 17, sorter: true,
+                    title: '买量当天付费率', dataIndex: 'buyTodayRoi', label: '买量付费数据', align: 'center', width: 70, default: 18, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
@@ -102,7 +111,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量复充率', dataIndex: 'buyUserAgainRate', label: '买量付费数据', align: 'center', width: 70, default: 18,
+                    title: '买量复充率', dataIndex: 'buyUserAgainRate', label: '买量付费数据', align: 'center', width: 70, default: 19,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
@@ -138,10 +147,10 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
         {
             label: '自然量付费数据',
             data: [
-                { title: '自然量新用户充值次数', dataIndex: 'natureNewUserAmountCount', label: '自然量付费数据', align: 'center', width: 70, default: 19 },
-                { title: '自然量新用户充值人数', dataIndex: 'natureNewUserAmountNum', label: '自然量付费数据', align: 'center', width: 70, default: 20 },
+                { title: '自然量新用户充值次数', dataIndex: 'natureNewUserAmountCount', label: '自然量付费数据', align: 'center', width: 70, default: 20 },
+                { title: '自然量新用户充值人数', dataIndex: 'natureNewUserAmountNum', label: '自然量付费数据', align: 'center', width: 70, default: 21 },
                 {
-                    title: '自然量新用户充值金额', dataIndex: 'natureNewUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 21,
+                    title: '自然量新用户充值金额', dataIndex: 'natureNewUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 22,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 { title: '自然量首日新用户充值次数', dataIndex: 'natureFirstNewUserAmountCount', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
@@ -150,10 +159,10 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     title: '自然量首日新用户充值金额', dataIndex: 'natureFirstNewUserAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '自然量老用户充值次数', dataIndex: 'natureOldUserCount', label: '自然量付费数据', align: 'center', width: 70, default: 22 },
-                { title: '自然量老用户充值人数', dataIndex: 'natureOldUserNum', label: '自然量付费数据', align: 'center', width: 70, default: 23 },
+                { title: '自然量老用户充值次数', dataIndex: 'natureOldUserCount', label: '自然量付费数据', align: 'center', width: 70, default: 23 },
+                { title: '自然量老用户充值人数', dataIndex: 'natureOldUserNum', label: '自然量付费数据', align: 'center', width: 70, default: 24 },
                 {
-                    title: '自然量老用户充值金额', dataIndex: 'natureOldUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 24,
+                    title: '自然量老用户充值金额', dataIndex: 'natureOldUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 25,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 { title: '自然量账面充值次数', dataIndex: 'natureAmountCount', label: '自然量付费数据', align: 'center', width: 70 },
@@ -237,22 +246,22 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
         {
             label: '总付费数据',
             data: [
-                { title: '总新用户充值次数', dataIndex: 'newUserAmountCount', label: '总付费数据', align: 'center', width: 70, default: 25 },
-                { title: '总新用户充值人数', dataIndex: 'newUserAmountNum', label: '总付费数据', align: 'center', width: 70, default: 26 },
+                { title: '总新用户充值次数', dataIndex: 'newUserAmountCount', label: '总付费数据', align: 'center', width: 70, default: 26 },
+                { title: '总新用户充值人数', dataIndex: 'newUserAmountNum', label: '总付费数据', align: 'center', width: 70, default: 27 },
                 {
-                    title: '总新用户充值金额', dataIndex: 'newUserAmount', label: '总付费数据', align: 'center', width: 70, default: 27,
+                    title: '总新用户充值金额', dataIndex: 'newUserAmount', label: '总付费数据', align: 'center', width: 70, default: 28,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '总首日新用户充值次数', dataIndex: 'firstNewUserAmountCount', label: '总付费数据', align: 'center', width: 70, default: 28, sorter: true },
-                { title: '总首日新用户充值人数', dataIndex: 'firstNewUserAmountNum', label: '总付费数据', align: 'center', width: 70, default: 29, sorter: true },
+                { title: '总首日新用户充值次数', dataIndex: 'firstNewUserAmountCount', label: '总付费数据', align: 'center', width: 70, default: 29, sorter: true },
+                { title: '总首日新用户充值人数', dataIndex: 'firstNewUserAmountNum', label: '总付费数据', align: 'center', width: 70, default: 30, sorter: true },
                 {
-                    title: '总首日新用户充值金额', dataIndex: 'firstNewUserAmount', label: '总付费数据', align: 'center', width: 70, default: 30, sorter: true,
+                    title: '总首日新用户充值金额', dataIndex: 'firstNewUserAmount', label: '总付费数据', align: 'center', width: 70, default: 31, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '总老用户充值次数', dataIndex: 'oldUserCount', label: '总付费数据', align: 'center', width: 70, default: 31 },
-                { title: '总老用户充值人数', dataIndex: 'oldUserNum', label: '总付费数据', align: 'center', width: 70, default: 32 },
+                { title: '总老用户充值次数', dataIndex: 'oldUserCount', label: '总付费数据', align: 'center', width: 70, default: 32 },
+                { title: '总老用户充值人数', dataIndex: 'oldUserNum', label: '总付费数据', align: 'center', width: 70, default: 33 },
                 {
-                    title: '总老用户充值金额', dataIndex: 'oldUserAmount', label: '总付费数据', align: 'center', width: 80, default: 33,
+                    title: '总老用户充值金额', dataIndex: 'oldUserAmount', label: '总付费数据', align: 'center', width: 80, default: 34,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 { title: '总账面充值次数', dataIndex: 'amountCount', label: '总付费数据', align: 'center', width: 70 },
@@ -300,7 +309,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总复充率', dataIndex: 'userAgainRate', label: '总付费数据', align: 'center', width: 70, default: 34,
+                    title: '总复充率', dataIndex: 'userAgainRate', label: '总付费数据', align: 'center', width: 70, default: 35,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {

+ 2 - 2
src/pages/gameDataStatistics/order/index.tsx

@@ -31,14 +31,14 @@ const Order: React.FC = () => {
                     newQueryForm.zxPitcherId = pitcherId
                     if (regStartDay && regEndDay) {
                         newQueryForm.beginRegTime = regStartDay + ' 00:00:00'
-                        newQueryForm.endRegTime = regEndDay + ' 00:00:00'
+                        newQueryForm.endRegTime = regEndDay + ' 59:59:59'
                     } else {
                         delete newQueryForm.beginRegTime
                         delete newQueryForm.endRegTime
                     }
                     if (beginOrderTime && endOrderTime) {
                         newQueryForm.beginOrderTime = beginOrderTime + ' 00:00:00'
-                        newQueryForm.endOrderTime = endOrderTime + ' 00:00:00'
+                        newQueryForm.endOrderTime = endOrderTime + ' 59:59:59'
                     } else {
                         delete newQueryForm.beginOrderTime
                         delete newQueryForm.endOrderTime

+ 25 - 2
src/pages/gameDataStatistics/rankingList/account/tableConfig.tsx

@@ -1,3 +1,4 @@
+import ProgressTable from "@/components/ProgressTable"
 import { gameClassifyEnum } from "@/components/QueryForm/const"
 import WidthEllipsis from "@/components/widthEllipsis"
 import { Statistic } from "antd"
@@ -35,7 +36,18 @@ function columns12() {
                 },
                 {
                     title: '消耗', dataIndex: 'cost', label: '推广账号消耗排行榜', align: 'center', width: 90, default: 7, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} />
+                    className: 'progress',
+                    render: (a: number) => {
+                        return <ProgressTable
+                            strokeColor={{
+                                from: '#e7a0f5',
+                                to: '#d161f7',
+                            }}
+                            percent={a ? a / 60000 * 100 : 0}
+                            value={a || 0}
+                            valueStyle={a >= 10000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
+                        />
+                    },
                 },
                 {
                     title: '推广广告数量', dataIndex: 'adCount', label: '推广账号消耗排行榜', align: 'center', width: 70, default: 8, sorter: true,
@@ -87,7 +99,18 @@ function columns12() {
                 },
                 {
                     title: '累计充值金额', dataIndex: 'totalAmount', label: '推广账号消耗排行榜', align: 'center', width: 70, default: 20, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} />
+                    className: 'progress',
+                    render: (a: number) => {
+                        return <ProgressTable
+                            strokeColor={{
+                                from: '#ff5900',
+                                to: '#ffd380',
+                            }}
+                            percent={a ? a / 20000 * 100 : 0}
+                            value={a || 0}
+                            valueStyle={a >= 16000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
+                        />
+                    },
                 },
                 {
                     title: '累计充值人数', dataIndex: 'totalAmountUser', label: '推广账号消耗排行榜', align: 'center', width: 70, default: 21, sorter: true,

+ 48 - 14
src/pages/gameDataStatistics/rankingList/channel/tableConfig.tsx

@@ -1,3 +1,4 @@
+import ProgressTable from "@/components/ProgressTable"
 import WidthEllipsis from "@/components/widthEllipsis"
 import { Statistic } from "antd"
 import React from "react"
@@ -9,47 +10,80 @@ function columns12() {
             label: '推广渠道充值排行榜',
             data: [
                 {
-                    title: '推广渠道账号ID', dataIndex: 'agentId', label: '推广渠道充值排行榜', align: 'center', width: 60, default: 1,
+                    title: '推广渠道账号ID', dataIndex: 'agentId', label: '推广渠道充值排行榜', align: 'center', width: 60,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '推广渠道名称', dataIndex: 'agentName', label: '推广渠道充值排行榜', align: 'center', width: 150, default: 2,
+                    title: '推广渠道名称', dataIndex: 'agentName', label: '推广渠道充值排行榜', align: 'center', width: 150, default: 1,
                     render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
                 },
                 {
-                    title: '投手', dataIndex: 'pitcher', label: '推广渠道充值排行榜', align: 'center', width: 70, default: 3,
+                    title: '投手', dataIndex: 'pitcher', label: '推广渠道充值排行榜', align: 'center', width: 70, default: 2,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '推广媒体', dataIndex: 'type', label: '推广渠道充值排行榜', align: 'center', width: 70, default: 4,
+                    title: '推广媒体', dataIndex: 'type', label: '推广渠道充值排行榜', align: 'center', width: 70, default: 3,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '当天充值金额', dataIndex: 'todayAmount', label: '推广渠道充值排行榜', align: 'center', width: 100, default: 5, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} />
+                    title: '当天充值金额', dataIndex: 'todayAmount', label: '推广渠道充值排行榜', align: 'center', width: 100, default: 4, sorter: true,
+                    className: 'progress',
+                    render: (a: number) => {
+                        return <ProgressTable
+                            strokeColor={{
+                                from: '#108ee9',
+                                to: '#87d068',
+                            }}
+                            percent={a ? a / 10000 * 100 : 0}
+                            value={a || 0}
+                            valueStyle={a >= 7000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
+                        />
+                    },
                 },
                 {
-                    title: '累计充值金额', dataIndex: 'totalRechargeAmount', label: '推广渠道充值排行榜', align: 'center', width: 100, default: 6, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} />
+                    title: '累计充值金额', dataIndex: 'totalRechargeAmount', label: '推广渠道充值排行榜', align: 'center', width: 100, default: 5, sorter: true,
+                    className: 'progress',
+                    render: (a: number) => {
+                        return <ProgressTable
+                            strokeColor={{
+                                from: '#ff5900',
+                                to: '#ffd380',
+                            }}
+                            percent={a ? a / 200000 * 100 : 0}
+                            value={a || 0}
+                            valueStyle={a >= 160000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
+                        />
+                    },
                 },
                 {
-                    title: '新用户累计充值人数', dataIndex: 'totalRechargeNum', label: '推广渠道充值排行榜', align: 'center', width: 80, default: 7, sorter: true,
+                    title: '新用户累计充值人数', dataIndex: 'totalRechargeNum', label: '推广渠道充值排行榜', align: 'center', width: 80, default: 6, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '新用户累计充值次数', dataIndex: 'totalRechargeCount', label: '推广渠道充值排行榜', align: 'center', width: 80, default: 8, sorter: true,
+                    title: '新用户累计充值次数', dataIndex: 'totalRechargeCount', label: '推广渠道充值排行榜', align: 'center', width: 80, default: 7, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '平均客单价', dataIndex: 'avgAmount', label: '推广渠道充值排行榜', align: 'center', width: 100, default: 9, sorter: true,
+                    title: '平均客单价', dataIndex: 'avgAmount', label: '推广渠道充值排行榜', align: 'center', width: 100, default: 8, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '累计消耗', dataIndex: 'totalCost', label: '推广渠道充值排行榜', align: 'center', width: 100, default: 10, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} />
+                    title: '累计消耗', dataIndex: 'totalCost', label: '推广渠道充值排行榜', align: 'center', width: 100, default: 9, sorter: true,
+                    className: 'progress',
+                    render: (a: number) => {
+                        return <ProgressTable
+                            strokeColor={{
+                                from: '#e7a0f5',
+                                to: '#d161f7',
+                            }}
+                            percent={a ? a / 100000 * 100 : 0}
+                            value={a || 0}
+                            valueStyle={a >= 100000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
+                        />
+                    },
                 },
                 {
-                    title: '回本率', dataIndex: 'roi', label: '推广渠道充值排行榜', align: 'center', width: 100, default: 11, sorter: true,
+                    title: '回本率', dataIndex: 'roi', label: '推广渠道充值排行榜', align: 'center', width: 100, default: 10, sorter: true,
                     render: (a: number) => <Statistic value={a || 0} precision={2} valueStyle={a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 }
             ]

+ 64 - 21
src/pages/gameDataStatistics/rankingList/game/tableConfig.tsx

@@ -1,3 +1,4 @@
+import ProgressTable from "@/components/ProgressTable"
 import { gameClassifyEnum } from "@/components/QueryForm/const"
 import WidthEllipsis from "@/components/widthEllipsis"
 import { Statistic } from "antd"
@@ -9,37 +10,79 @@ function columns12(gameType: any) {
         {
             label: '游戏充值排行榜',
             data: [
-                { title: '游戏ID', dataIndex: 'gameId', label: '游戏充值排行榜', align: 'center', width: 60, default: 1 },
+                { title: '游戏ID', dataIndex: 'gameId', label: '游戏充值排行榜', align: 'center', width: 60 },
                 {
                     title: '游戏名称',
                     dataIndex: 'gameName',
                     label: '游戏充值排行榜',
                     align: 'center',
                     width: 80,
-                    default: 2,
+                    default: 1,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
-                { 
-                    title: '游戏类型', 
-                    dataIndex: 'gameClassify', 
-                    label: '游戏充值排行榜', 
-                    align: 'center', 
-                    width: 85, 
-                    default: 3,
+                {
+                    title: '游戏类型',
+                    dataIndex: 'gameClassify',
+                    label: '游戏充值排行榜',
+                    align: 'center',
+                    width: 85,
+                    default: 2,
                     render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
                 },
-                { title: '当天充值金额', dataIndex: 'todayAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 4, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '当天买量充值金额', dataIndex: 'todayBuyAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 5, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '当天自然量充值金额', dataIndex: 'todayNatureAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 6, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '累计充值金额', dataIndex: 'totalAmount', label: '游戏充值排行榜', align: 'center', width: 100, default: 7, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '累计买量充值金额', dataIndex: 'totalBuyAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 8, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '累计自然量充值金额', dataIndex: 'totalNatureAmount', label: '游戏充值排行榜', align: 'center', width: 85, default: 9, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '平均客单价', dataIndex: 'avgAmount', label: '游戏充值排行榜', align: 'center', width: 70, default: 10, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '注册人数', dataIndex: 'regUserCount', label: '游戏充值排行榜', align: 'center', width: 70, default: 11, sorter: true, },
-                { title: '累计充值人数', dataIndex: 'totalRechargeUserCount', label: '游戏充值排行榜', align: 'center', width: 70, default: 12, sorter: true, },
-                { title: '累计充值次数', dataIndex: 'totalRechargeCount', label: '游戏充值排行榜', align: 'center', width: 70, default: 13, sorter: true, },
-                { title: '累计消耗', dataIndex: 'totalCost', label: '游戏充值排行榜', align: 'center', width: 100, default: 14, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '回本率', dataIndex: 'totalRoi', label: '游戏充值排行榜', align: 'center', width: 70, default: 15, sorter: true, render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" /> }
+                {
+                    title: '当天充值金额', dataIndex: 'todayAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 3, sorter: true,
+                    className: 'progress',
+                    render: (a: number) => {
+                        return <ProgressTable
+                            strokeColor={{
+                                from: '#108ee9',
+                                to: '#87d068',
+                            }}
+                            percent={a ? a / 10000 * 100 : 0}
+                            value={a || 0}
+                            valueStyle={a >= 7000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
+                        />
+                    },
+                },
+                { title: '当天买量充值金额', dataIndex: 'todayBuyAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 4, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '当天自然量充值金额', dataIndex: 'todayNatureAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 5, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '累计充值金额', dataIndex: 'totalAmount', label: '游戏充值排行榜', align: 'center', width: 100, default: 6, sorter: true,
+                    className: 'progress',
+                    render: (a: number) => {
+                        return <ProgressTable
+                            strokeColor={{
+                                from: '#ff5900',
+                                to: '#ffd380',
+                            }}
+                            percent={a ? a / 200000 * 100 : 0}
+                            value={a || 0}
+                            valueStyle={a >= 160000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
+                        />
+                    },
+                },
+                { title: '累计买量充值金额', dataIndex: 'totalBuyAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 7, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '累计自然量充值金额', dataIndex: 'totalNatureAmount', label: '游戏充值排行榜', align: 'center', width: 85, default: 8, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '平均客单价', dataIndex: 'avgAmount', label: '游戏充值排行榜', align: 'center', width: 70, default: 9, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '注册人数', dataIndex: 'regUserCount', label: '游戏充值排行榜', align: 'center', width: 70, default: 10, sorter: true, },
+                { title: '累计充值人数', dataIndex: 'totalRechargeUserCount', label: '游戏充值排行榜', align: 'center', width: 70, default: 11, sorter: true, },
+                { title: '累计充值次数', dataIndex: 'totalRechargeCount', label: '游戏充值排行榜', align: 'center', width: 70, default: 12, sorter: true, },
+                {
+                    title: '累计消耗', dataIndex: 'totalCost', label: '游戏充值排行榜', align: 'center', width: 100, default: 13, sorter: true,
+                    className: 'progress',
+                    render: (a: number) => {
+                        return <ProgressTable
+                            strokeColor={{
+                                from: '#e7a0f5',
+                                to: '#d161f7',
+                            }}
+                            percent={a ? a / 100000 * 100 : 0}
+                            value={a || 0}
+                            valueStyle={a >= 100000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
+                        />
+                    },
+                },
+                { title: '回本率', dataIndex: 'totalRoi', label: '游戏充值排行榜', align: 'center', width: 70, default: 14, sorter: true, render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" /> }
             ]
         },
     ]

+ 43 - 15
src/pages/gameDataStatistics/rankingList/gamer/tableConfig.tsx

@@ -1,3 +1,4 @@
+import ProgressTable from "@/components/ProgressTable"
 import WidthEllipsis from "@/components/widthEllipsis"
 import { Statistic } from "antd"
 import React from "react"
@@ -8,22 +9,49 @@ function columns12() {
         {
             label: '玩家充值排行榜',
             data: [
-                { title: '玩家ID', dataIndex: 'playerId', label: '玩家充值排行榜', align: 'center', width: 70, default: 1 },
-                { title: '玩家账号', dataIndex: 'playerAccountId', label: '玩家充值排行榜', align: 'center', width: 120, default: 2, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
-                { title: '注册渠道', dataIndex: 'regAgentName', label: '玩家充值排行榜', align: 'center', width: 80, default: 3, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
-                { title: '注册渠道ID', dataIndex: 'regAgentId', label: '玩家充值排行榜', align: 'center', width: 80, default: 4 },
-                { title: '注册时间', dataIndex: 'regUserTime', label: '玩家充值排行榜', align: 'center', width: 140, default: 5, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
-                { title: '注册游戏', dataIndex: 'regGameName', label: '玩家充值排行榜', align: 'center', width: 70, default: 6, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
-                { title: '玩家操作系统', dataIndex: 'playerOs', label: '玩家充值排行榜', align: 'center', width: 70, default: 7 },
-                { title: '当天充值金额', dataIndex: 'todayTotalAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 8, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '首充金额', dataIndex: 'firstAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 9, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '最近充值金额', dataIndex: 'lastAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 10, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '累计充值金额', dataIndex: 'totalAmount', label: '玩家充值排行榜', align: 'center', width: 100, default: 11, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '平均单价', dataIndex: 'avgAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 12, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '累计充值次数', dataIndex: 'totalAmountCount', label: '玩家充值排行榜', align: 'center', width: 70, default: 13, sorter: true },
+                { title: '玩家ID', dataIndex: 'playerId', label: '玩家充值排行榜', align: 'center', width: 70 },
+                { title: '玩家账号', dataIndex: 'playerAccountId', label: '玩家充值排行榜', align: 'center', width: 120, default: 1, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
+                { title: '注册渠道', dataIndex: 'regAgentName', label: '玩家充值排行榜', align: 'center', width: 80, default: 2, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
+                { title: '注册渠道ID', dataIndex: 'regAgentId', label: '玩家充值排行榜', align: 'center', width: 80 },
+                { title: '注册时间', dataIndex: 'regUserTime', label: '玩家充值排行榜', align: 'center', width: 140, default: 3, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
+                { title: '注册游戏', dataIndex: 'regGameName', label: '玩家充值排行榜', align: 'center', width: 70, default: 4, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
+                { title: '玩家操作系统', dataIndex: 'playerOs', label: '玩家充值排行榜', align: 'center', width: 70, default: 5 },
+                {
+                    title: '当天充值金额', dataIndex: 'todayTotalAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 6, sorter: true, 
+                    className: 'progress',
+                    render: (a: number) => {
+                        return <ProgressTable
+                            strokeColor={{
+                                from: '#108ee9',
+                                to: '#87d068',
+                            }}
+                            percent={a ? a / 2000 * 100 : 0}
+                            value={a || 0}
+                            valueStyle={a >= 1000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
+                        />
+                    },
+                },
+                { title: '首充金额', dataIndex: 'firstAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 7, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '最近充值金额', dataIndex: 'lastAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 8, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '累计充值金额', dataIndex: 'totalAmount', label: '玩家充值排行榜', align: 'center', width: 100, default: 9, sorter: true, className: 'progress',
+                    render: (a: number) => {
+                        return <ProgressTable
+                            strokeColor={{
+                                from: '#ff5900',
+                                to: '#ffd380',
+                            }}
+                            percent={a ? a / 10000 * 100 : 0}
+                            value={a || 0}
+                            valueStyle={a >= 5000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
+                        />
+                    },
+                },
+                { title: '平均单价', dataIndex: 'avgAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 10, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '累计充值次数', dataIndex: 'totalAmountCount', label: '玩家充值排行榜', align: 'center', width: 70, default: 11, sorter: true },
                 // { title: '玩家等级标签', dataIndex: '13', label: '玩家充值排行榜', align: 'center', width: 70, default: 14 },
-                { title: '最近充值游戏', dataIndex: 'lastAmountGameName', label: '玩家充值排行榜', align: 'center', width: 70, default: 14, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
-                { title: '最近充值时间', dataIndex: 'lastAmountTime', label: '玩家充值排行榜', align: 'center', width: 140, default: 15, render: (a: string, b: any) => (<WidthEllipsis value={a} />) }
+                { title: '最近充值游戏', dataIndex: 'lastAmountGameName', label: '玩家充值排行榜', align: 'center', width: 70, default: 12, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
+                { title: '最近充值时间', dataIndex: 'lastAmountTime', label: '玩家充值排行榜', align: 'center', width: 140, default: 13, render: (a: string, b: any) => (<WidthEllipsis value={a} />) }
             ]
         },
     ]

+ 10 - 18
src/pages/user/login/index.tsx

@@ -37,6 +37,16 @@ const Login: React.FC<{}> = () => {
 	const [m, setM] = useState<any>(0)//倒计时,0可以点击
 	const [codeType, setCodeType] = useState(1)//1钉钉验证码 2短信验证码
 
+	// 获取TOKEN
+	useEffect(() => {
+		let hash = window.location.hash
+		if (hash?.includes('token')) {
+			let token = hash?.split('token=')[1]
+			sessionStorage.setItem('Admin-Token', token)
+			setTimeout(() => { window.location.href = '/'; }, 50)
+		}
+	}, [])
+
 	// 获取运行环境
 	useEffect(() => {
 		let u = navigator.userAgent
@@ -55,24 +65,6 @@ const Login: React.FC<{}> = () => {
 		}
 	}, [initialState?.currentUser?.companyList])
 
-	//登录事件
-	// const handleSubmit = async () => {
-	//   setIsLogin(true)
-	//   values.account = values.account ? values.account : account || '';
-	//   values.password = values.password ? values.password : password || '';
-	//   if (!Object.keys(values).every((key) => !!values[key])) {
-	//     message.error('请填写完整!')
-	//     setIsLogin(false)
-	//     return
-	//   } else {
-	//     let { code, ...value } = values
-	//     Object.keys(value).forEach((key) => {
-	//       encrypt({ key, value: value[key] })
-	//     })
-	//   }
-	//   console.log(values)
-
-	// };
 	//显示隐藏登录
 	let handleShow = useCallback((props?: boolean) => {
 		if (props && !show) {

+ 5 - 5
src/services/login.ts

@@ -59,18 +59,18 @@ export async function selectCompanyApi(companyId: number) {
   });
 }
 // 手机钉钉验证码获取
-export async function  getCode(phone: string) {
-    return request(erpApi +`/erp/user/dCodeLoginState/${phone}`)
+export async function getCode(phone: string) {
+  return request(erpApi + `/erp/user/dCodeLoginState/${phone}`)
 }
 // 手机短信验证码获取
-export async function  getNoteCode(phone: string) {
-    return request(erpApi +`/erp/user/smsCodeLoginState/${phone}`)
+export async function getNoteCode(phone: string) {
+  return request(erpApi + `/erp/user/smsCodeLoginState/${phone}`)
 }
 // 手机登录
 export async function phoneLogin(params: { phone: string, code: string }) {
   return request(erpApi + `/erp/user/dCodeLogin `, {
     method: 'POST',
-    data:params
+    data: params
   })
 }
 // 查询是否在更新