wjx 1 年間 前
コミット
ea6f7baa06

+ 1 - 1
config/config.ts

@@ -19,7 +19,7 @@ export default defineConfig({
     hmr: true,
   },
   layout: {
-    name: '趣程管理后台',
+    name: '趣程游戏数据系统',
     locale: false,
     siderWidth: 208,
   },

+ 1 - 1
config/defaultSettings.ts

@@ -13,7 +13,7 @@ export default {
   menu: {
     locale: false,
   },
-  title: '趣程管理后台',
+  title: '趣程游戏数据系统',
   pwa: false,
   iconfontUrl: '',
 } as LayoutSettings & {

+ 7 - 34
src/components/QueryForm/index.tsx

@@ -67,10 +67,6 @@ interface Props {
     isPutAgent?: boolean
     /** 是否开启 用户注册日期 搜索 */
     isRegDay?: boolean
-    /** 是否开启 注册游戏名 搜索 */
-    isRegGameName?: boolean
-    /** 是否开启 注册游戏ID 搜索 */
-    isRegGameId?: boolean
     /** 是否开启 投手名称 搜索 */
     isSysUserName?: boolean
     /** 是否开启 投手ID 搜索 */
@@ -108,7 +104,7 @@ const QueryForm: React.FC<Props> = (props) => {
     const {
         onChange, initialValues, isAccount, isAccountId, isCompanyId, isCpId, isCpName, isCpOrderId, isCpStatus, isCreateDay, isDevice, isGameName, isRechargeGameName, isGameId, isOrderGameId, isGameRoleId,
         isGameRoleName, isFirstRecharge, isSwitch, isMerchantNo, isOrderId, isMerchantOrderNo, isPayStatus, isPayWay, isProductName, isRegAgent, isAgentId, isPutAgent, isRegDay, isOs, isParentId,
-        isRegGameName, isRegGameId, isSysUserName, isRechargeDate, isBGGameClassify, isGameUserId, isSysUserId, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay
+        isSysUserName, isRechargeDate, isBGGameClassify, isGameUserId, isSysUserId, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay
     } = props
     const [form] = Form.useForm()
     const [accountList, setAccountList] = useState<any[]>([])
@@ -130,9 +126,10 @@ const QueryForm: React.FC<Props> = (props) => {
             async function getAccount() {
                 let data: any[] = []
                 let res1 = await getAllOfOwnerUser.run()
-                data.concat(res1?.data?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.corporationName })))
+                let data1 = res1?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.corporationName }))
                 let res2 = await getTtAllUserList.run()
-                data.concat(res2?.data?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.accountName })))
+                let data2 = res2?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.accountName }))
+                data = [...data1, ...data2]
                 setAccountList(data)
             }
             getAccount()
@@ -207,7 +204,6 @@ const QueryForm: React.FC<Props> = (props) => {
         }
         // 处理 消耗日期
         if (isConsumeDay) {
-            console.log(11111)
             if (data?.consumeDay && data?.consumeDay?.length > 0) {
                 data.costBeginDay = moment(data?.consumeDay[0]).format('YYYY-MM-DD')
                 data.costEndDay = moment(data?.consumeDay[1]).format('YYYY-MM-DD')
@@ -268,9 +264,10 @@ const QueryForm: React.FC<Props> = (props) => {
                 <Select
                     maxTagCount={1}
                     showSearch
-                    style={{ minWidth: 140 }}
+                    style={{ width: 140 }}
                     allowClear
                     placeholder={'请选择广告账号'}
+                    dropdownMatchSelectWidth={false}
                     filterOption={(input, option) =>
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
                     }
@@ -527,6 +524,7 @@ const QueryForm: React.FC<Props> = (props) => {
                     showSearch
                     style={{ width: 140 }}
                     allowClear
+                    dropdownMatchSelectWidth={false}
                     placeholder={'请选择渠道'}
                     filterOption={(input, option) =>
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -536,36 +534,11 @@ const QueryForm: React.FC<Props> = (props) => {
                 </Select>
             </Form.Item></Col>}
 
-
             {/* 投放渠道名 */}
             {isPutAgent && <Col><Form.Item name='putAgent'>
                 <Input placeholder="请输入投放渠道名" allowClear style={{ width: 140 }} />
             </Form.Item></Col>}
 
-
-
-            {/* 注册游戏名 */}
-            {isRegGameName && <Col><Form.Item name='regGameName'>
-                <Input placeholder="请输入注册游戏名" allowClear style={{ width: 140 }} />
-            </Form.Item></Col>}
-            {/* 注册游戏id */}
-            {isRegGameId && <Col><Form.Item name='regGameId'>
-                <Select
-                    maxTagCount={1}
-                    showSearch
-                    style={{ minWidth: 140 }}
-                    allowClear
-                    placeholder={'请选择注册游戏'}
-                    filterOption={(input, option) =>
-                        (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
-                    }
-                >
-                    <Select.Option value={'1'}>注册游戏001</Select.Option>
-                    <Select.Option value={'2'}>注册游戏002</Select.Option>
-                    <Select.Option value={'3'}>注册游戏003</Select.Option>
-                </Select>
-            </Form.Item></Col>}
-
             {/* 投手名 */}
             {isSysUserName && <Col><Form.Item name='sysUserName'>
                 <Input placeholder="请输入投手名" allowClear style={{ width: 140 }} />

+ 1 - 1
src/models/useOperating/useWxGroupList.ts

@@ -136,7 +136,7 @@ export default function useWxGroupList() {
       getAllZhMemBer.run()
       function canvas(dom: any, txt: any) {
         if (!dom) return false;
-        let length = txt.length * 50 > 247 ? txt.length * 50 : 247; // 根据内容生成画布大小,20代表比例
+        let length = txt?.length * 50 > 247 ? txt?.length * 50 : 247; // 根据内容生成画布大小,20代表比例
         let canvas = document.createElement('canvas');
         canvas.id = 'myCanvas'
         canvas.width = length;

+ 3 - 2
src/pages/gameDataStatistics/extensionData/everyday/index.tsx

@@ -5,12 +5,12 @@ import React, { useEffect, useState } from "react"
 import TableData from "../../components/TableData"
 import columns12 from "./tableConfig"
 import { getGameChoiceParentListType1Api } from "@/services/gameData"
-
+import moment from "moment"
 
 const Everyday: React.FC = () => {
 
     /***************************/
-    const [queryForm, setQueryForm] = useState<EverydayListType>({ pageNum: 1, pageSize: 20 })
+    const [queryForm, setQueryForm] = useState<EverydayListType>({ pageNum: 1, pageSize: 20, beginDay: moment().format('YYYY-MM-DD'), endDay: moment().format('YYYY-MM-DD') })
     const [gameType, setGameType] = useState<any>({})
     const [totalData, setTotalData] = useState<any[]>([])
 
@@ -41,6 +41,7 @@ const Everyday: React.FC = () => {
     return <div>
         <TableData
             leftChild={<QueryForm
+                initialValues={{ consumeDay: [moment(), moment()] }}
                 onChange={(data: any) => {
                     const { pitcherId, costBeginDay, costEndDay, ...params } = data
                     console.log(params, pitcherId)

+ 9 - 1
src/pages/gameDataStatistics/extensionData/total/index.tsx

@@ -10,7 +10,14 @@ import { getGameChoiceParentListType1Api } from "@/services/gameData"
 const Total: React.FC = () => {
 
     /************************************/
-    const [queryForm, setQueryForm] = useState<PromoteTotalProps>({ pageNum: 1, pageSize: 20 })
+    const [queryForm, setQueryForm] = useState<PromoteTotalProps>({ 
+        pageNum: 1, 
+        pageSize: 20, 
+        costBeginDay: moment().subtract(30, 'd').format('YYYY-MM-DD'), 
+        costEndDay: moment().format('YYYY-MM-DD'),
+        rechargeBeginDay: moment().subtract(30, 'd').format('YYYY-MM-DD'), 
+        rechargeEndDay: moment().format('YYYY-MM-DD'),
+    })
     const [gameType, setGameType] = useState<any>({})
 
     const getPromoteTotalList = useAjax((params) => getPromoteTotalListApi(params))
@@ -36,6 +43,7 @@ const Total: React.FC = () => {
 
         <TableData
             leftChild={<QueryForm
+                initialValues={{ consumeDay: [moment().subtract(30, 'd'), moment()], rechargeDay: [moment().subtract(30, 'd'), moment()] }}
                 onChange={(data: any) => {
                     const { pitcherId, rechargeDay, ...params } = data
                     console.log(params, pitcherId)

+ 6 - 1
src/pages/gameDataStatistics/gameData/everyday/index.tsx

@@ -13,7 +13,11 @@ import moment from "moment"
 const Everyday: React.FC = () => {
 
     /*****************************/
-    const [queryForm, setQueryForm] = useState<GameDayProps>({ pageNum: 1, pageSize: 20 })
+    const [queryForm, setQueryForm] = useState<GameDayProps>({
+        pageNum: 1, pageSize: 20,
+        registeredBeginDate: moment().format('YYYY-MM-DD'),
+        registeredEndDate: moment().format('YYYY-MM-DD'),
+    })
 
     const getGameDayList = useAjax((params) => getGameDayListApi(params))
     /*****************************/
@@ -25,6 +29,7 @@ const Everyday: React.FC = () => {
     return <div>
         <TableData
             leftChild={<QueryForm
+                initialValues={{ regDay: [moment(), moment()] }}
                 onChange={(data: any) => {
                     console.log(data)
                     const { regStartDay, regEndDay, rechargeDay, ...params } = data

+ 72 - 72
src/pages/gameDataStatistics/gameData/everyday/tableConfig.tsx

@@ -58,90 +58,90 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
         {
             label: '买量用户数据',
             data: [
-                { title: '买量注册人数', dataIndex: 'buyRegNum', label: '买量用户数据', align: 'center', width: 70, default: 4 }
+                { title: '买量注册人数', dataIndex: 'buyRegNum', label: '买量用户数据', align: 'center', width: 70, default: 4, sorter: true }
             ]
         },
         {
             label: '自然量用户数据',
             data: [
-                { title: '自然量注册人数', dataIndex: 'natureRegNum', label: '自然量用户数据', align: 'center', width: 70, default: 5 }
+                { title: '自然量注册人数', dataIndex: 'natureRegNum', label: '自然量用户数据', align: 'center', width: 70, default: 5, sorter: true }
             ]
         },
         {
             label: '总用户数据',
             data: [
-                { title: '注册人数', dataIndex: 'regNum', label: '总用户数据', align: 'center', width: 70, default: 6 }
+                { title: '注册人数', dataIndex: 'regNum', label: '总用户数据', align: 'center', width: 70, default: 6, sorter: true }
             ]
         },
         {
             label: '买量付费数据',
             data: [
-                { title: '买量首日新用户充值次数', dataIndex: 'buyFirstNewUserAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 7 },
-                { title: '买量首日新用户充值人数', dataIndex: 'buyFirstNewUserAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 8 },
+                { 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: 'buyFirstNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 9,
+                    title: '买量首日新用户充值金额', dataIndex: 'buyFirstNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 9, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '买量老用户充值次数', dataIndex: 'buyOldUserCount', label: '买量付费数据', align: 'center', width: 70, default: 10 },
-                { title: '买量老用户充值人数', dataIndex: 'buyOldUserNum', label: '买量付费数据', align: 'center', width: 70, default: 11 },
+                { 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: 'buyOldUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 12,
+                    title: '买量老用户充值金额', dataIndex: 'buyOldUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 12, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '买量账面充值次数', dataIndex: 'buyAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 13 },
-                { title: '买量账面充值人数', dataIndex: 'buyAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 14 },
+                { 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: 'buyAmount', label: '买量付费数据', align: 'center', width: 70, default: 15,
+                    title: '买量账面充值金额', dataIndex: 'buyAmount', label: '买量付费数据', align: 'center', width: 70, default: 15, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '买量新用户累计充值次数', dataIndex: 'buyNewUserTotalAmountCount', label: '买量付费数据', align: 'center', width: 70 },
-                { title: '买量新用户累计充值人数', dataIndex: 'buyNewUserTotalAmountNum', label: '买量付费数据', align: 'center', width: 70 },
+                { title: '买量新用户累计充值次数', dataIndex: 'buyNewUserTotalAmountCount', label: '买量付费数据', align: 'center', width: 70, sorter: true },
+                { title: '买量新用户累计充值人数', dataIndex: 'buyNewUserTotalAmountNum', label: '买量付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '买量新用户累计充值金额', dataIndex: 'buyNewUserTotalAmount', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量新用户累计充值金额', dataIndex: 'buyNewUserTotalAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量首日付费率', dataIndex: 'buyFirstRoi', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量首日付费率', dataIndex: 'buyFirstRoi', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     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,
+                    title: '买量当天付费率', dataIndex: 'buyTodayRoi', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '买量新用户付费比', dataIndex: 'buyNewUserRate', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量新用户付费比', dataIndex: 'buyNewUserRate', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '买量首日客单价', dataIndex: 'buyFirstAvgAmount', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量首日客单价', dataIndex: 'buyFirstAvgAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量当天客单价', dataIndex: 'buyTodayAvgAmount', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量当天客单价', dataIndex: 'buyTodayAvgAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量账面客单价', dataIndex: 'buyAvgAmount', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量账面客单价', dataIndex: 'buyAvgAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量复充率', dataIndex: 'buyUserAgainRate', label: '买量付费数据', align: 'center', width: 70, default: 16,
+                    title: '买量复充率', dataIndex: 'buyUserAgainRate', 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: '买量新增注册ARPU', dataIndex: 'buyRegUserArpu', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量新增注册ARPU', dataIndex: 'buyRegUserArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量首日付费ARPU', dataIndex: 'buyFirstAmountArpu', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量首日付费ARPU', dataIndex: 'buyFirstAmountArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量当天付费ARPU', dataIndex: 'buyTodayAmountArpu', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量当天付费ARPU', dataIndex: 'buyTodayAmountArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量账面ARPU', dataIndex: 'buyAmountArpu', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量账面ARPU', dataIndex: 'buyAmountArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
             ]
@@ -149,72 +149,72 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
         {
             label: '自然量付费数据',
             data: [
-                { title: '自然量首日新用户充值次数', dataIndex: 'natureFirstNewUserAmountCount', label: '自然量付费数据', align: 'center', width: 70, default: 17 },
-                { title: '自然量首日新用户充值人数', dataIndex: 'natureFirstNewUserAmountNum', label: '自然量付费数据', align: 'center', width: 70, default: 18 },
+                { 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: 'natureFirstNewUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 19,
+                    title: '自然量首日新用户充值金额', dataIndex: 'natureFirstNewUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 19, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '自然量老用户充值次数', dataIndex: 'natureOldUserCount', label: '自然量付费数据', align: 'center', width: 70, default: 20 },
-                { title: '自然量老用户充值人数', dataIndex: 'natureOldUserNum', label: '自然量付费数据', align: 'center', width: 70, default: 21 },
+                { title: '自然量老用户充值次数', dataIndex: 'natureOldUserCount', label: '自然量付费数据', align: 'center', width: 70, default: 20, sorter: true },
+                { title: '自然量老用户充值人数', dataIndex: 'natureOldUserNum', label: '自然量付费数据', align: 'center', width: 70, default: 21, sorter: true },
                 {
-                    title: '自然量老用户充值金额', dataIndex: 'natureOldUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 22,
+                    title: '自然量老用户充值金额', dataIndex: 'natureOldUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 22, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '自然量账面充值次数', dataIndex: 'natureAmountCount', label: '自然量付费数据', align: 'center', width: 70 },
-                { title: '自然量账面充值人数', dataIndex: 'natureAmountNum', label: '自然量付费数据', align: 'center', width: 70 },
+                { title: '自然量账面充值次数', dataIndex: 'natureAmountCount', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
+                { title: '自然量账面充值人数', dataIndex: 'natureAmountNum', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '自然量账面充值金额', dataIndex: 'natureAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量账面充值金额', dataIndex: 'natureAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '自然量新用户累计充值次数', dataIndex: 'natureNewUserTotalAmountCount', label: '自然量付费数据', align: 'center', width: 70 },
-                { title: '自然量新用户累计充值人数', dataIndex: 'natureNewUserTotalAmountNum', label: '自然量付费数据', align: 'center', width: 70 },
+                { title: '自然量新用户累计充值次数', dataIndex: 'natureNewUserTotalAmountCount', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
+                { title: '自然量新用户累计充值人数', dataIndex: 'natureNewUserTotalAmountNum', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '自然量新用户累计充值金额', dataIndex: 'natureNewUserTotalAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量新用户累计充值金额', dataIndex: 'natureNewUserTotalAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量首日付费率', dataIndex: 'natureFirstRoi', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量首日付费率', dataIndex: 'natureFirstRoi', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量当天付费率', dataIndex: 'natureTodayRoi', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量当天付费率', dataIndex: 'natureTodayRoi', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量新用户付费比', dataIndex: 'natureNewUserRate', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量新用户付费比', dataIndex: 'natureNewUserRate', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量首日客单价', dataIndex: 'natureFirstAvgAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量首日客单价', dataIndex: 'natureFirstAvgAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量当天客单价', dataIndex: 'natureTodayAvgAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量当天客单价', dataIndex: 'natureTodayAvgAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量账面客单价', dataIndex: 'natureAvgAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量账面客单价', dataIndex: 'natureAvgAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量复充率', dataIndex: 'natureUserAgainRate', label: '自然量付费数据', align: 'center', width: 70, default: 23,
+                    title: '自然量复充率', dataIndex: 'natureUserAgainRate', label: '自然量付费数据', align: 'center', width: 70, default: 23, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量新增注册ARPU', dataIndex: 'natureRegUserArpu', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量新增注册ARPU', dataIndex: 'natureRegUserArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量首日付费ARPU', dataIndex: 'natureFirstAmountArpu', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量首日付费ARPU', dataIndex: 'natureFirstAmountArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量当天付费ARPU', dataIndex: 'natureTodayAmountArpu', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量当天付费ARPU', dataIndex: 'natureTodayAmountArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量账面ARPU', dataIndex: 'natureAmountArpu', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量账面ARPU', dataIndex: 'natureAmountArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 }
             ]
@@ -222,72 +222,72 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
         {
             label: '总付费数据',
             data: [
-                { title: '总首日新用户充值次数', dataIndex: 'firstNewUserAmountCount', label: '总付费数据', align: 'center', width: 70, default: 24 },
-                { title: '总首日新用户充值人数', dataIndex: 'firstNewUserAmountNum', label: '总付费数据', align: 'center', width: 70, default: 25 },
+                { title: '总首日新用户充值次数', dataIndex: 'firstNewUserAmountCount', label: '总付费数据', align: 'center', width: 70, default: 24, sorter: true },
+                { title: '总首日新用户充值人数', dataIndex: 'firstNewUserAmountNum', label: '总付费数据', align: 'center', width: 70, default: 25, sorter: true },
                 {
-                    title: '总首日新用户充值金额', dataIndex: 'firstNewUserAmount', label: '总付费数据', align: 'center', width: 70, default: 26,
+                    title: '总首日新用户充值金额', dataIndex: 'firstNewUserAmount', label: '总付费数据', align: 'center', width: 70, default: 26, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '总老用户充值次数', dataIndex: 'oldUserCount', label: '总付费数据', align: 'center', width: 70, default: 27 },
-                { title: '总老用户充值人数', dataIndex: 'oldUserNum', label: '总付费数据', align: 'center', width: 70, default: 28 },
+                { title: '总老用户充值次数', dataIndex: 'oldUserCount', label: '总付费数据', align: 'center', width: 70, default: 27, sorter: true },
+                { title: '总老用户充值人数', dataIndex: 'oldUserNum', label: '总付费数据', align: 'center', width: 70, default: 28, sorter: true },
                 {
-                    title: '总老用户充值金额', dataIndex: 'oldUserAmount', label: '总付费数据', align: 'center', width: 70, default: 29,
+                    title: '总老用户充值金额', dataIndex: 'oldUserAmount', label: '总付费数据', align: 'center', width: 70, default: 29, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '总账面充值次数', dataIndex: 'amountCount', label: '总付费数据', align: 'center', width: 70 },
-                { title: '总账面充值人数', dataIndex: 'amountNum', label: '总付费数据', align: 'center', width: 70 },
+                { title: '总账面充值次数', dataIndex: 'amountCount', label: '总付费数据', align: 'center', width: 70, sorter: true },
+                { title: '总账面充值人数', dataIndex: 'amountNum', label: '总付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '总账面充值金额', dataIndex: 'amount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总账面充值金额', dataIndex: 'amount', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '总新用户累计充值次数', dataIndex: 'newUserTotalAmountCount', label: '总付费数据', align: 'center', width: 70 },
-                { title: '总新用户累计充值人数', dataIndex: 'newUserTotalAmountNum', label: '总付费数据', align: 'center', width: 70 },
+                { title: '总新用户累计充值次数', dataIndex: 'newUserTotalAmountCount', label: '总付费数据', align: 'center', width: 70, sorter: true },
+                { title: '总新用户累计充值人数', dataIndex: 'newUserTotalAmountNum', label: '总付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '总新用户累计充值金额', dataIndex: 'newUserTotalAmount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总新用户累计充值金额', dataIndex: 'newUserTotalAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总首日付费率', dataIndex: 'firstRoi', label: '总付费数据', align: 'center', width: 70,
+                    title: '总首日付费率', dataIndex: 'firstRoi', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总当天付费率', dataIndex: 'todayRoi', label: '总付费数据', align: 'center', width: 70,
+                    title: '总当天付费率', dataIndex: 'todayRoi', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总新用户付费比', dataIndex: 'newUserRate', label: '总付费数据', align: 'center', width: 70,
+                    title: '总新用户付费比', dataIndex: 'newUserRate', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总首日客单价', dataIndex: 'firstAvgAmount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总首日客单价', dataIndex: 'firstAvgAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总当天客单价', dataIndex: 'todayAvgAmount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总当天客单价', dataIndex: 'todayAvgAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总账面客单价', dataIndex: 'avgAmount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总账面客单价', dataIndex: 'avgAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总复充率', dataIndex: 'userAgainRate', label: '总付费数据', align: 'center', width: 70, default: 30,
+                    title: '总复充率', dataIndex: 'userAgainRate', label: '总付费数据', align: 'center', width: 70, default: 30, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总新增注册ARPU', dataIndex: 'regUserArpu', label: '总付费数据', align: 'center', width: 70,
+                    title: '总新增注册ARPU', dataIndex: 'regUserArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总首日付费ARPU', dataIndex: 'firstAmountArpu', label: '总付费数据', align: 'center', width: 70,
+                    title: '总首日付费ARPU', dataIndex: 'firstAmountArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总当天付费ARPU', dataIndex: 'todayAmountArpu', label: '总付费数据', align: 'center', width: 70,
+                    title: '总当天付费ARPU', dataIndex: 'todayAmountArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总账面ARPU', dataIndex: 'amountArpu', label: '总付费数据', align: 'center', width: 70,
+                    title: '总账面ARPU', dataIndex: 'amountArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 }
             ]

+ 1 - 1
src/pages/gameDataStatistics/gameData/flowingWater/tableConfig.tsx

@@ -10,7 +10,7 @@ function columns12() {
         {
             label: '每日流水贡献',
             data: [
-                { title: '排序', dataIndex: 'id', label: '每日流水贡献', align: 'center', width: 75, default: 1 },
+                { title: 'ID', dataIndex: 'id', label: '每日流水贡献', align: 'center', width: 75, default: 1 },
                 { title: '游戏名称', dataIndex: 'gameName', label: '每日流水贡献', align: 'center', width: 70, default: 2 },
                 { title: '游戏ID', dataIndex: 'gameId', label: '每日流水贡献', align: 'center', width: 80, default: 3, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 {

+ 17 - 2
src/pages/gameDataStatistics/gameData/total/index.tsx

@@ -5,6 +5,7 @@ import { useAjax } from "@/Hook/useAjax"
 import { GameTotalProps, getGameTotalListApi } from "@/services/gameData/game"
 import QueryForm from "@/components/QueryForm"
 import { czPresets } from "@/components/QueryForm/const"
+import moment from "moment"
 
 /**
  * 游戏总数居
@@ -13,7 +14,13 @@ import { czPresets } from "@/components/QueryForm/const"
 const Total: React.FC = () => {
 
     /*****************************/
-    const [queryForm, setQueryForm] = useState<GameTotalProps>({ pageNum: 1, pageSize: 20 })
+    const [queryForm, setQueryForm] = useState<GameTotalProps>({ 
+        pageNum: 1, pageSize: 20,
+        registeredBeginDate: moment().subtract(30, 'd').format('YYYY-MM-DD'),
+        registeredEndDate: moment().format('YYYY-MM-DD'),
+        rechargeBeginDate: moment().subtract(30, 'd').format('YYYY-MM-DD'),
+        rechargeEndDate: moment().format('YYYY-MM-DD')
+    })
 
     const getGameTotalList = useAjax((params) => getGameTotalListApi(params))
     /*****************************/
@@ -26,11 +33,19 @@ const Total: React.FC = () => {
 
         <TableData
             leftChild={<QueryForm
+                initialValues={{ regDay: [moment().subtract(30, 'd'), moment()], rechargeDay: [moment().subtract(30, 'd'), moment()] }}
                 onChange={(data: any) => {
                     console.log(data)
-                    const { regStartDay, regEndDay, ...params } = data
+                    const { regStartDay, regEndDay, rechargeDay, ...params } = data
                     let newQueryForm = JSON.parse(JSON.stringify(queryForm))
                     newQueryForm.pageNum = 1
+                    if (rechargeDay && rechargeDay?.length === 2) {
+                        newQueryForm['rechargeBeginDate'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
+                        newQueryForm['rechargeEndDate'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
+                    } else {
+                        delete newQueryForm['rechargeBeginDate']
+                        delete newQueryForm['rechargeEndDate']
+                    }
                     if (regStartDay && regEndDay) {
                         newQueryForm.registeredBeginDate = regStartDay
                         newQueryForm.registeredEndDate = regEndDay

+ 96 - 96
src/pages/gameDataStatistics/gameData/total/tableConfig.tsx

@@ -36,116 +36,116 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
         {
             label: '买量用户数据',
             data: [
-                { title: '买量注册人数', dataIndex: 'buyRegNum', label: '买量用户数据', align: 'center', width: 70, default: 3 }
+                { title: '买量注册人数', dataIndex: 'buyRegNum', label: '买量用户数据', align: 'center', width: 70, default: 3, sorter: true }
             ]
         },
         {
             label: '自然量用户数据',
             data: [
-                { title: '自然量注册人数', dataIndex: 'natureRegNum', label: '自然量用户数据', align: 'center', width: 70, default: 4 }
+                { title: '自然量注册人数', dataIndex: 'natureRegNum', label: '自然量用户数据', align: 'center', width: 70, default: 4, sorter: true }
             ]
         },
         {
             label: '总用户数据',
             data: [
-                { title: '注册人数', dataIndex: 'regNum', label: '总用户数据', align: 'center', width: 70, default: 5 }
+                { title: '注册人数', dataIndex: 'regNum', label: '总用户数据', align: 'center', width: 70, default: 5, sorter: true }
             ]
         },
         {
             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: 6, sorter: true },
+                { title: '买量新用户充值人数', dataIndex: 'buyNewUserAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 7, sorter: true },
                 {
-                    title: '买量新用户充值金额', dataIndex: 'buyNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 8,
+                    title: '买量新用户充值金额', dataIndex: 'buyNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 8, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '买量首日新用户充值次数', dataIndex: 'buyFirstNewUserAmountCount', label: '买量付费数据', align: 'center', width: 70, default: 9 },
-                { title: '买量首日新用户充值人数', dataIndex: 'buyFirstNewUserAmountNum', label: '买量付费数据', align: 'center', width: 70, default: 10 },
+                { 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: 'buyFirstNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 11,
+                    title: '买量首日新用户充值金额', dataIndex: 'buyFirstNewUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 11, 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: 12, sorter: true },
+                { title: '买量老用户充值人数', dataIndex: 'buyOldUserNum', label: '买量付费数据', align: 'center', width: 70, default: 13, sorter: true },
                 {
-                    title: '买量老用户充值金额', dataIndex: 'buyOldUserAmount', label: '买量付费数据', align: 'center', width: 70, default: 14,
+                    title: '买量老用户充值金额', dataIndex: 'buyOldUserAmount', label: '买量付费数据', align: 'center', width: 80, default: 14, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '买量账面充值次数', dataIndex: 'buyAmountCount', label: '买量付费数据', align: 'center', width: 70 },
-                { title: '买量账面充值人数', dataIndex: 'buyAmountNum', label: '买量付费数据', align: 'center', width: 70 },
+                { title: '买量账面充值次数', dataIndex: 'buyAmountCount', label: '买量付费数据', align: 'center', width: 70, sorter: true },
+                { title: '买量账面充值人数', dataIndex: 'buyAmountNum', label: '买量付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '买量账面充值金额', dataIndex: 'buyAmount', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量账面充值金额', dataIndex: 'buyAmount', label: '买量付费数据', align: 'center', width: 80, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '买量新用户累计充值次数', dataIndex: 'buyNewUserTotalAmountCount', label: '买量付费数据', align: 'center', width: 70 },
-                { title: '买量新用户累计充值人数', dataIndex: 'buyNewUserTotalAmountNum', label: '买量付费数据', align: 'center', width: 70 },
+                { title: '买量新用户累计充值次数', dataIndex: 'buyNewUserTotalAmountCount', label: '买量付费数据', align: 'center', width: 70, sorter: true },
+                { title: '买量新用户累计充值人数', dataIndex: 'buyNewUserTotalAmountNum', label: '买量付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '买量新用户累计充值金额', dataIndex: 'buyNewUserTotalAmount', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量新用户累计充值金额', dataIndex: 'buyNewUserTotalAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量首日付费率', dataIndex: 'buyFirstRoi', label: '买量付费数据', align: 'center', width: 70, default: 15,
+                    title: '买量首日付费率', dataIndex: 'buyFirstRoi', 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: 'buyNewUserRoi', label: '买量付费数据', align: 'center', width: 70, default: 16,
+                    title: '买量新用户付费率', dataIndex: 'buyNewUserRoi', 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: 'buyTodayRoi', label: '买量付费数据', align: 'center', width: 70, default: 17,
+                    title: '买量当天付费率', dataIndex: 'buyTodayRoi', 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="%" />
                 },
                 {
-                    title: '买量新用户付费比', dataIndex: 'buyNewUserRate', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量新用户付费比', dataIndex: 'buyNewUserRate', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '买量首日客单价', dataIndex: 'buyFirstAvgAmount', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量首日客单价', dataIndex: 'buyFirstAvgAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量新用户客单价', dataIndex: 'buyNewUserAvgAmount', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量新用户客单价', dataIndex: 'buyNewUserAvgAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量当天客单价', dataIndex: 'buyTodayAvgAmount', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量当天客单价', dataIndex: 'buyTodayAvgAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量账面客单价', dataIndex: 'buyAvgAmount', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量账面客单价', dataIndex: 'buyAvgAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     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: 18, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '买量新用户复充率', dataIndex: 'buyNewUserAgainRate', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量新用户复充率', dataIndex: 'buyNewUserAgainRate', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '买量当天复充率', dataIndex: 'buyTodayAgainRate', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量当天复充率', dataIndex: 'buyTodayAgainRate', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '买量新增注册ARPU', dataIndex: 'buyRegUserArpu', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量新增注册ARPU', dataIndex: 'buyRegUserArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量首日付费ARPU', dataIndex: 'buyFirstAmountArpu', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量首日付费ARPU', dataIndex: 'buyFirstAmountArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量新用户付费ARPU', dataIndex: 'buyNewUserAmountArpu', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量新用户付费ARPU', dataIndex: 'buyNewUserAmountArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量当天付费ARPU', dataIndex: 'buyTodayAmountArpu', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量当天付费ARPU', dataIndex: 'buyTodayAmountArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '买量账面ARPU', dataIndex: 'buyAmountArpu', label: '买量付费数据', align: 'center', width: 70,
+                    title: '买量账面ARPU', dataIndex: 'buyAmountArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 }
             ]
@@ -153,98 +153,98 @@ 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: 19, sorter: true },
+                { title: '自然量新用户充值人数', dataIndex: 'natureNewUserAmountNum', label: '自然量付费数据', align: 'center', width: 70, default: 20, sorter: true },
                 {
-                    title: '自然量新用户充值金额', dataIndex: 'natureNewUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 21,
+                    title: '自然量新用户充值金额', dataIndex: 'natureNewUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 21, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '自然量首日新用户充值次数', dataIndex: 'natureFirstNewUserAmountCount', label: '自然量付费数据', align: 'center', width: 70 },
-                { title: '自然量首日新用户充值人数', dataIndex: 'natureFirstNewUserAmountNum', label: '自然量付费数据', align: 'center', width: 70 },
+                { title: '自然量首日新用户充值次数', dataIndex: 'natureFirstNewUserAmountCount', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
+                { title: '自然量首日新用户充值人数', dataIndex: 'natureFirstNewUserAmountNum', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '自然量首日新用户充值金额', dataIndex: 'natureFirstNewUserAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    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: 22, sorter: true },
+                { title: '自然量老用户充值人数', dataIndex: 'natureOldUserNum', label: '自然量付费数据', align: 'center', width: 70, default: 23, sorter: true },
                 {
-                    title: '自然量老用户充值金额', dataIndex: 'natureOldUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 24,
+                    title: '自然量老用户充值金额', dataIndex: 'natureOldUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 24, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '自然量账面充值次数', dataIndex: 'natureAmountCount', label: '自然量付费数据', align: 'center', width: 70 },
-                { title: '自然量账面充值人数', dataIndex: 'natureAmountNum', label: '自然量付费数据', align: 'center', width: 70 },
+                { title: '自然量账面充值次数', dataIndex: 'natureAmountCount', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
+                { title: '自然量账面充值人数', dataIndex: 'natureAmountNum', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '自然量账面充值金额', dataIndex: 'natureAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量账面充值金额', dataIndex: 'natureAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '自然量新用户累计充值次数', dataIndex: 'natureNewUserTotalAmountCount', label: '自然量付费数据', align: 'center', width: 70 },
-                { title: '自然量新用户累计充值人数', dataIndex: 'natureNewUserTotalAmountNum', label: '自然量付费数据', align: 'center', width: 70 },
+                { title: '自然量新用户累计充值次数', dataIndex: 'natureNewUserTotalAmountCount', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
+                { title: '自然量新用户累计充值人数', dataIndex: 'natureNewUserTotalAmountNum', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '自然量新用户累计充值金额', dataIndex: 'natureNewUserTotalAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量新用户累计充值金额', dataIndex: 'natureNewUserTotalAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量首日付费率', dataIndex: 'natureFirstRoi', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量首日付费率', dataIndex: 'natureFirstRoi', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量新用户付费率', dataIndex: 'natureNewUserRoi', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量新用户付费率', dataIndex: 'natureNewUserRoi', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量当天付费率', dataIndex: 'natureTodayRoi', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量当天付费率', dataIndex: 'natureTodayRoi', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量新用户付费比', dataIndex: 'natureNewUserRate', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量新用户付费比', dataIndex: 'natureNewUserRate', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量首日客单价', dataIndex: 'natureFirstAvgAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量首日客单价', dataIndex: 'natureFirstAvgAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量新用户客单价', dataIndex: 'natureNewUserAvgAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量新用户客单价', dataIndex: 'natureNewUserAvgAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量当天客单价', dataIndex: 'natureTodayAvgAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量当天客单价', dataIndex: 'natureTodayAvgAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量账面客单价', dataIndex: 'natureAvgAmount', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量账面客单价', dataIndex: 'natureAvgAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量复充率', dataIndex: 'natureUserAgainRate', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量复充率', dataIndex: 'natureUserAgainRate', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量新用户复充率', dataIndex: 'natureNewUserAgainRate', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量新用户复充率', dataIndex: 'natureNewUserAgainRate', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量当天复充率', dataIndex: 'natureTodayAgainRate', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量当天复充率', dataIndex: 'natureTodayAgainRate', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '自然量新增注册ARPU', dataIndex: 'natureRegUserArpu', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量新增注册ARPU', dataIndex: 'natureRegUserArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量首日付费ARPU', dataIndex: 'natureFirstAmountArpu', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量首日付费ARPU', dataIndex: 'natureFirstAmountArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量新用户付费ARPU', dataIndex: 'natureNewUserAmountArpu', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量新用户付费ARPU', dataIndex: 'natureNewUserAmountArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量当天付费ARPU', dataIndex: 'natureTodayAmountArpu', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量当天付费ARPU', dataIndex: 'natureTodayAmountArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '自然量账面ARPU', dataIndex: 'natureAmountArpu', label: '自然量付费数据', align: 'center', width: 70,
+                    title: '自然量账面ARPU', dataIndex: 'natureAmountArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 }
             ]
@@ -252,98 +252,98 @@ 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: 25, sorter: true },
+                { title: '总新用户充值人数', dataIndex: 'newUserAmountNum', label: '总付费数据', align: 'center', width: 70, default: 26, sorter: true },
                 {
-                    title: '总新用户充值金额', dataIndex: 'newUserAmount', label: '总付费数据', align: 'center', width: 70, default: 27,
+                    title: '总新用户充值金额', dataIndex: 'newUserAmount', label: '总付费数据', align: 'center', width: 70, default: 27, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '总首日新用户充值次数', dataIndex: 'firstNewUserAmountCount', label: '总付费数据', align: 'center', width: 70, default: 28 },
-                { title: '总首日新用户充值人数', dataIndex: 'firstNewUserAmountNum', label: '总付费数据', align: 'center', width: 70, default: 29 },
+                { 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: 'firstNewUserAmount', label: '总付费数据', align: 'center', width: 70, default: 30,
+                    title: '总首日新用户充值金额', dataIndex: 'firstNewUserAmount', label: '总付费数据', align: 'center', width: 70, default: 30, 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: 31, sorter: true },
+                { title: '总老用户充值人数', dataIndex: 'oldUserNum', label: '总付费数据', align: 'center', width: 70, default: 32, sorter: true },
                 {
-                    title: '总老用户充值金额', dataIndex: 'oldUserAmount', label: '总付费数据', align: 'center', width: 70, default: 33,
+                    title: '总老用户充值金额', dataIndex: 'oldUserAmount', label: '总付费数据', align: 'center', width: 80, default: 33, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '总账面充值次数', dataIndex: 'amountCount', label: '总付费数据', align: 'center', width: 70 },
-                { title: '总账面充值人数', dataIndex: 'amountNum', label: '总付费数据', align: 'center', width: 70 },
+                { title: '总账面充值次数', dataIndex: 'amountCount', label: '总付费数据', align: 'center', width: 70, sorter: true },
+                { title: '总账面充值人数', dataIndex: 'amountNum', label: '总付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '总账面充值金额', dataIndex: 'amount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总账面充值金额', dataIndex: 'amount', label: '总付费数据', align: 'center', width: 85, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
-                { title: '总新用户累计充值次数', dataIndex: 'newUserTotalAmountCount', label: '总付费数据', align: 'center', width: 70 },
-                { title: '总新用户累计充值人数', dataIndex: 'newUserTotalAmountNum', label: '总付费数据', align: 'center', width: 70 },
+                { title: '总新用户累计充值次数', dataIndex: 'newUserTotalAmountCount', label: '总付费数据', align: 'center', width: 70, sorter: true },
+                { title: '总新用户累计充值人数', dataIndex: 'newUserTotalAmountNum', label: '总付费数据', align: 'center', width: 70, sorter: true },
                 {
-                    title: '总新用户累计充值金额', dataIndex: 'newUserTotalAmount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总新用户累计充值金额', dataIndex: 'newUserTotalAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总首日付费率', dataIndex: 'firstRoi', label: '总付费数据', align: 'center', width: 70,
+                    title: '总首日付费率', dataIndex: 'firstRoi', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总新用户付费率', dataIndex: 'newUserRoi', label: '总付费数据', align: 'center', width: 70,
+                    title: '总新用户付费率', dataIndex: 'newUserRoi', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总当天付费率', dataIndex: 'todayRoi', label: '总付费数据', align: 'center', width: 70,
+                    title: '总当天付费率', dataIndex: 'todayRoi', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总新用户付费比', dataIndex: 'newUserRate', label: '总付费数据', align: 'center', width: 70,
+                    title: '总新用户付费比', dataIndex: 'newUserRate', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总首日客单价', dataIndex: 'firstAvgAmount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总首日客单价', dataIndex: 'firstAvgAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总新用户客单价', dataIndex: 'newUserAvgAmount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总新用户客单价', dataIndex: 'newUserAvgAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总当天客单价', dataIndex: 'todayAvgAmount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总当天客单价', dataIndex: 'todayAvgAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总账面客单价', dataIndex: 'avgAmount', label: '总付费数据', align: 'center', width: 70,
+                    title: '总账面客单价', dataIndex: 'avgAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     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: 34, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总新用户复充率', dataIndex: 'newUserAgainRate', label: '总付费数据', align: 'center', width: 70,
+                    title: '总新用户复充率', dataIndex: 'newUserAgainRate', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总当天复充率', dataIndex: 'todayAgainRate', label: '总付费数据', align: 'center', width: 70,
+                    title: '总当天复充率', dataIndex: 'todayAgainRate', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '总新增注册ARPU', dataIndex: 'regUserArpu', label: '总付费数据', align: 'center', width: 70,
+                    title: '总新增注册ARPU', dataIndex: 'regUserArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总首日付费ARPU', dataIndex: 'firstAmountArpu', label: '总付费数据', align: 'center', width: 70,
+                    title: '总首日付费ARPU', dataIndex: 'firstAmountArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总新用户付费ARPU', dataIndex: 'newUserAmountArpu', label: '总付费数据', align: 'center', width: 70,
+                    title: '总新用户付费ARPU', dataIndex: 'newUserAmountArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总当天付费ARPU', dataIndex: 'todayAmountArpu', label: '总付费数据', align: 'center', width: 70,
+                    title: '总当天付费ARPU', dataIndex: 'todayAmountArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总账面ARPU', dataIndex: 'amountArpu', label: '总付费数据', align: 'center', width: 70,
+                    title: '总账面ARPU', dataIndex: 'amountArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: string) => <Statistic value={a || 0} />
                 }
             ]

+ 1 - 1
src/pages/gameDataStatistics/rankingList/account/tableConfig.tsx

@@ -4,7 +4,7 @@ function columns12() {
         {
             label: '推广账号消耗排行榜',
             data: [
-                { title: '排序', dataIndex: '0', label: '推广账号消耗排行榜', align: 'center', width: 95, default: 1 },
+                { title: 'ID', dataIndex: '0', label: '推广账号消耗排行榜', align: 'center', width: 95, default: 1 },
                 { title: '推广账号', dataIndex: '1', label: '推广账号消耗排行榜', align: 'center', width: 95, default: 2 },
                 { title: '推广账号ID', dataIndex: '2', label: '推广账号消耗排行榜', align: 'center', width: 70, default: 3 },
                 { title: '推广账号类型', dataIndex: '3', label: '推广账号消耗排行榜', align: 'center', width: 70, default: 4 },

+ 1 - 1
src/pages/gameDataStatistics/rankingList/channel/tableConfig.tsx

@@ -4,7 +4,7 @@ function columns12() {
         {
             label: '推广渠道充值排行榜',
             data: [
-                { title: '排序', dataIndex: '0', label: '推广渠道充值排行榜', align: 'center', width: 95, default: 1 },
+                { title: 'ID', dataIndex: '0', label: '推广渠道充值排行榜', align: 'center', width: 95, default: 1 },
                 { title: '推广渠道账号', dataIndex: '1', label: '推广渠道充值排行榜', align: 'center', width: 95, default: 2 },
                 { title: '推广渠道名称', dataIndex: '2', label: '推广渠道充值排行榜', align: 'center', width: 70, default: 3 },
                 { title: '投手', dataIndex: '3', label: '推广渠道充值排行榜', align: 'center', width: 70, default: 4 },

+ 1 - 1
src/pages/gameDataStatistics/rankingList/game/tableConfig.tsx

@@ -8,7 +8,7 @@ function columns12(gameType: any) {
         {
             label: '游戏充值排行榜',
             data: [
-                { title: '排序', dataIndex: 'id', label: '游戏充值排行榜', align: 'center', width: 60, default: 1 },
+                { title: 'ID', dataIndex: 'id', label: '游戏充值排行榜', align: 'center', width: 60, default: 1 },
                 { title: '游戏ID', dataIndex: 'gameId', label: '游戏充值排行榜', align: 'center', width: 60, default: 2 },
                 {
                     title: '游戏名称',

+ 1 - 1
src/pages/gameDataStatistics/rankingList/gamer/tableConfig.tsx

@@ -8,7 +8,7 @@ function columns12() {
         {
             label: '玩家充值排行榜',
             data: [
-                { title: '排序', dataIndex: 'id', label: '玩家充值排行榜', align: 'center', width: 75, default: 1 },
+                { title: 'ID', dataIndex: 'id', label: '玩家充值排行榜', align: 'center', width: 75, default: 1 },
                 { title: '玩家ID', dataIndex: 'playerId', label: '玩家充值排行榜', align: 'center', width: 70, default: 2 },
                 { title: '玩家账号', dataIndex: 'playerAccountId', label: '玩家充值排行榜', align: 'center', width: 120, default: 3, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
                 { title: '注册渠道', dataIndex: 'regAgentId', label: '玩家充值排行榜', align: 'center', width: 80, default: 4 },

+ 356 - 360
src/pages/user/login/index.tsx

@@ -1,384 +1,380 @@
 import { Button, message, Radio, Spin } from 'antd';
 import React, { useCallback, useEffect, useState } from 'react';
 import { useModel, useRequest } from 'umi';
-import { fakeAccountLogin, getCode, getDingKey, ddlogin, phoneLogin, getNoteCode, isPreserve } from '@/services/login';
+import { getCode, getDingKey, ddlogin, phoneLogin, getNoteCode } from '@/services/login';
 import styles from './style.less';
 import { CopyrightOutlined, SwapRightOutlined } from '@ant-design/icons';
-import { useBase64 } from '@/Hook/useBase64'
+import { useBase64 } from '@/Hook/useBase64';
 import Bg from './components/bg';
-import { history } from 'umi'
-import { api } from '@/services/api'
-import { useAjax } from '@/Hook/useAjax';
+import { history } from 'umi';
+import { erpApi } from '@/services/api';
 
-/**
- * 退出登录,并且将当前的 url 保存
- */
+/**  退出登录,并且将当前的 url 保存 */
 const loginOut = async () => {
-  sessionStorage.removeItem('Admin-Token')
-  // window.location.href = '/';
+	sessionStorage.removeItem('Admin-Token')
 };
 
 const Login: React.FC<{}> = () => {
-  const { encrypt, decode } = useBase64()
-  const { setInitialState, initialState } = useModel('@@initialState');
-  const codeRes = useRequest((phone) => getCode(phone), { manual: true, formatResult: (res: any) => res })//钉钉验证码
-  const noteCode = useRequest((phone) => getNoteCode(phone), { manual: true, formatResult: (res: any) => res })//短信验证码
-  const getKey = useRequest(() => getDingKey(), { manual: true, formatResult: (res: any) => res })//获取服务器KEY
-  const Ddlogin = useRequest((params: any) => ddlogin(params), { manual: true, formatResult: (res: any) => res })//用钉钉登录
-  const phone_login = useRequest((params: any) => phoneLogin(params), { manual: true, formatResult: (res: any) => res })//用手机登录
-  const ispreserve = useAjax(() => isPreserve())
-  let phone = decode('phone')
-  let code = decode('code')
-  const [values, setValues] = useState<{ phone: string, code: string }>({ phone: phone || '', code: code || '' })
-  const [isLogin, setIsLogin] = useState<boolean>(false)
-  const [videoMenu, setVideoMenu] = useState<{ visible: boolean, left?: number, top?: number }>({ visible: false, left: 0, top: 0 })
-  const [show, setShow] = useState<boolean>(false)
-  const [tab, setTab] = useState<1 | 2>(2)
-  const [APPID,] = useState<string>('dingwfmhucedfluenpuj')//测试 dingdsfuoevmawlyyrjx 线上dingwfmhucedfluenpuj
-  const [REDIRECT_URI,] = useState<string>(encodeURIComponent(location.href?.split('?')[0]))
-  const [companyList, setCompanyList] = useState<any[]>([])
-  const [loading, setLoading] = useState<boolean>(false)
-  const [isMobile, setIsMobile] = useState<boolean>(false)
-  const [m, setM] = useState<any>(0)//倒计时,0可以点击
-  const [codeType,setCodeType]=useState(1)//1钉钉验证码 2短信验证码
-  // 获取运行环境
-  useEffect(() => {
-    let u = navigator.userAgent
-    let isPhone = !!u.match(/AppleWebKit.*Mobile.*/) || u.indexOf('iPad') > -1
-    if (isPhone) {
-      setTab(1)
-      setIsMobile(isPhone)  // 判断是否在移动端
-    }
-  }, [])
+	const { decode } = useBase64()
+	const { setInitialState, initialState } = useModel('@@initialState');
+	const codeRes = useRequest((phone) => getCode(phone), { manual: true, formatResult: (res: any) => res })//钉钉验证码
+	const noteCode = useRequest((phone) => getNoteCode(phone), { manual: true, formatResult: (res: any) => res })//短信验证码
+	const getKey = useRequest(() => getDingKey(), { manual: true, formatResult: (res: any) => res })//获取服务器KEY
+	const Ddlogin = useRequest((params: any) => ddlogin(params), { manual: true, formatResult: (res: any) => res })//用钉钉登录
+	const phone_login = useRequest((params: any) => phoneLogin(params), { manual: true, formatResult: (res: any) => res })//用手机登录
+	let phone = decode('phone')
+	let code = decode('code')
+	const [values, setValues] = useState<{ phone: string, code: string }>({ phone: phone || '', code: code || '' })
+	const [isLogin, setIsLogin] = useState<boolean>(false)
+	const [videoMenu, setVideoMenu] = useState<{ visible: boolean, left?: number, top?: number }>({ visible: false, left: 0, top: 0 })
+	const [show, setShow] = useState<boolean>(false)
+	const [tab, setTab] = useState<1 | 2>(2)
+	const [APPID,] = useState<string>('dingwfmhucedfluenpuj')//测试 dingdsfuoevmawlyyrjx 线上dingwfmhucedfluenpuj
+	const [REDIRECT_URI,] = useState<string>(encodeURIComponent(location.href?.split('?')[0]))
+	const [companyList, setCompanyList] = useState<any[]>([])
+	const [loading, setLoading] = useState<boolean>(false)
+	const [isMobile, setIsMobile] = useState<boolean>(false)
+	const [m, setM] = useState<any>(0)//倒计时,0可以点击
+	const [codeType, setCodeType] = useState(1)//1钉钉验证码 2短信验证码
 
-  // 获取公司列表
-  useEffect(() => {
-    let data = initialState?.currentUser?.companyList
-    if (data && Object.keys(data).length > 0) {
-      setCompanyList(() => data as any)
-    }
-  }, [initialState?.currentUser?.companyList])
+	// 获取运行环境
+	useEffect(() => {
+		let u = navigator.userAgent
+		let isPhone = !!u.match(/AppleWebKit.*Mobile.*/) || u.indexOf('iPad') > -1
+		if (isPhone) {
+			setTab(1)
+			setIsMobile(isPhone)  // 判断是否在移动端
+		}
+	}, [])
 
-  //登录事件
-  // 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)
+	// 获取公司列表
+	useEffect(() => {
+		let data = initialState?.currentUser?.companyList
+		if (data && Object.keys(data).length > 0) {
+			setCompanyList(() => data as any)
+		}
+	}, [initialState?.currentUser?.companyList])
 
-  // };
-  //显示隐藏登录
-  let handleShow = useCallback((props?: boolean) => {
-    if (props && !show) {
-      console.log('显示')
-      setShow(true)
-    }
-    if (!props && show) {
-      console.log('关闭')
-      setShow(false)
-    }
-  }, [show])
-  // 钉钉登录
-  useEffect(() => {
-    if (!sessionStorage.getItem('Admin-Token')) {
-      let query = history?.location?.query
-      if (query?.code) {
-        Ddlogin.run({ code: query?.code, state: query?.state, stateKey: sessionStorage.getItem('DDK') }).then((msg: any) => {
-          if (msg.code === 200) {
-            sessionStorage.setItem('Admin-Token', msg?.data?.token)
-            let companyInfo = msg?.data?.companyRelationInfo?.filter((item: { companyId: number }) => item.companyId !== 4 && item.companyId !== 3)
-            setIsLogin(false)
-            if (companyInfo?.length === 0) {
-              sessionStorage.removeItem('Admin-Token')
-              message.error('登录失败,请用趣程运营平台账号登录')
-              return
-            } else if (companyInfo?.length === 1) {
-              setCompanyHandle(msg?.data?.companyRelationInfo[0].companyId)
-            } else {
-              setCompanyList(companyInfo)
-            }
-            // message.success('登录成功!');
-            return;
-          } else {
-            setIsLogin(false)
-            message.success('2秒后刷新页面,请重新扫码登录')
-            setTimeout(() => {
-              window.open(location?.origin, '_parent')
-            }, 2000)
-          }
-        })
-      } else {
-        if (tab === 2) {
-          let state = ''
-          getKey.run().then((res) => {
-            if (res?.code === 200) {
-              let strArr = res?.data?.split('_')
-              sessionStorage.setItem('DDK', strArr[0])
-              state = strArr[1]
-            }
-          });
-          (window as any).DDLogin({
-            id: "login_container",
-            goto: encodeURIComponent(`https://oapi.dingtalk.com/connect/qrconnect?appid=${APPID}&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=${REDIRECT_URI}`),
-            style: "border:none;padding:0 0 20px 0;background-color:rgba(255,255,255,0.7);",
-            width: "100%",
-            height: "400"
-          });
-          const handleMessage = (event: { data: any; origin: any; }) => {
-            // 获取loginTempCode
-            const loginTempCode = event.data;
-            // 获取消息来源
-            const origin = event.origin;
-            // 拼接 url
-            const url = `https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=${APPID}&response_type=code&scope=snsapi_login&state=${encodeURIComponent(state)}&redirect_uri=${REDIRECT_URI}&loginTmpCode=${loginTempCode}`
-            // 如果来源为https://login.dingtalk.com,则在当前窗口打开回调链接
-            if (origin === 'https://login.dingtalk.com') {
-              window.open(encodeURI(url), '_parent')
-            }
-          }
-          // 监听iframe的消息
-          if (typeof window.addEventListener != 'undefined') {
-            window.addEventListener('message', handleMessage, false);
-          } else if (typeof (window as any).attachEvent != 'undefined') {
-            (window as any).attachEvent('onmessage', handleMessage);
-          }
-        }
-      }
-    }
+	//登录事件
+	// 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)
 
-  }, [tab, sessionStorage.getItem('Admin-Token')])
-  // 选择公司
-  const setCompanyHandle = (companyId: number) => {
-    setLoading(() => true)
-    fetch(api + `/erp/user/chooseCompany/${companyId}`, {
-      method: 'PUT',
-      headers: { ['Authorization']: 'Bearer ' + sessionStorage.getItem('Admin-Token') }
-    }).then(res => res.json()).then((res: any) => {
-      setLoading(() => false)
-      if (res?.code === 200) {
-        // 验证服务器是否升级
-        fetch(api + '/erp/config/sysVersion/preserve', {
-          headers: {
-            'Authorization': 'Bearer ' + res?.data?.token
-          }
-        }).then(res => res.json()).then(js => {
-          if (js?.data?.configValue === 'true') { 
-            message.error('版本更新中....请关注大群公告!!!!',5,()=>{
-              sessionStorage.removeItem('Admin-Token')
-              window.location.href = '/';
-            })
-          } else {
-            sessionStorage.setItem('Admin-Token', res?.data?.token)
-            window.location.href = '/';
-            // setTimeout(() => {
-            //   refresh();
-            // }, 0);
-          }
-        })
+	// };
+	//显示隐藏登录
+	let handleShow = useCallback((props?: boolean) => {
+		if (props && !show) {
+			console.log('显示')
+			setShow(true)
+		}
+		if (!props && show) {
+			console.log('关闭')
+			setShow(false)
+		}
+	}, [show])
+	// 钉钉登录
+	useEffect(() => {
+		if (!sessionStorage.getItem('Admin-Token')) {
+			let query = history?.location?.query
+			if (query?.code) {
+				Ddlogin.run({ code: query?.code, state: query?.state, stateKey: sessionStorage.getItem('DDK') }).then((msg: any) => {
+					if (msg.code === 200) {
+						sessionStorage.setItem('Admin-Token', msg?.data?.token)
+						let companyInfo = msg?.data?.companyRelationInfo?.filter((item: { companyId: number }) => item.companyId !== 4 && item.companyId !== 3)
+						setIsLogin(false)
+						if (companyInfo?.length === 0) {
+							sessionStorage.removeItem('Admin-Token')
+							message.error('登录失败,请用趣程运营平台账号登录')
+							return
+						} else if (companyInfo?.length === 1) {
+							setCompanyHandle(msg?.data?.companyRelationInfo[0].companyId)
+						} else {
+							setCompanyList(companyInfo)
+						}
+						// message.success('登录成功!');
+						return;
+					} else {
+						setIsLogin(false)
+						message.success('2秒后刷新页面,请重新扫码登录')
+						setTimeout(() => {
+							window.open(location?.origin, '_parent')
+						}, 2000)
+					}
+				})
+			} else {
+				if (tab === 2) {
+					let state = ''
+					getKey.run().then((res) => {
+						if (res?.code === 200) {
+							let strArr = res?.data?.split('_')
+							sessionStorage.setItem('DDK', strArr[0])
+							state = strArr[1]
+						}
+					});
+					(window as any).DDLogin({
+						id: "login_container",
+						goto: encodeURIComponent(`https://oapi.dingtalk.com/connect/qrconnect?appid=${APPID}&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=${REDIRECT_URI}`),
+						style: "border:none;padding:0 0 20px 0;background-color:rgba(255,255,255,0.7);",
+						width: "100%",
+						height: "400"
+					});
+					const handleMessage = (event: { data: any; origin: any; }) => {
+						// 获取loginTempCode
+						const loginTempCode = event.data;
+						// 获取消息来源
+						const origin = event.origin;
+						// 拼接 url
+						const url = `https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=${APPID}&response_type=code&scope=snsapi_login&state=${encodeURIComponent(state)}&redirect_uri=${REDIRECT_URI}&loginTmpCode=${loginTempCode}`
+						// 如果来源为https://login.dingtalk.com,则在当前窗口打开回调链接
+						if (origin === 'https://login.dingtalk.com') {
+							window.open(encodeURI(url), '_parent')
+						}
+					}
+					// 监听iframe的消息
+					if (typeof window.addEventListener != 'undefined') {
+						window.addEventListener('message', handleMessage, false);
+					} else if (typeof (window as any).attachEvent != 'undefined') {
+						(window as any).attachEvent('onmessage', handleMessage);
+					}
+				}
+			}
+		}
 
-      }
-    }).catch(() => setLoading(() => false))
-  }
-  // 更换账户
-  const logOut = () => {
-    setInitialState({ ...initialState, currentUser: undefined });
-    loginOut();
+	}, [tab, sessionStorage.getItem('Admin-Token')])
+	// 选择公司
+	const setCompanyHandle = (companyId: number) => {
+		setLoading(() => true)
+		fetch(erpApi + `/erp/user/chooseCompany/${companyId}`, {
+			method: 'PUT',
+			headers: { ['Authorization']: 'Bearer ' + sessionStorage.getItem('Admin-Token') }
+		}).then(res => res.json()).then((res: any) => {
+			setLoading(() => false)
+			if (res?.code === 200) {
+				// 验证服务器是否升级
+				fetch(erpApi + '/erp/config/sysVersion/preserve', {
+					headers: {
+						'Authorization': 'Bearer ' + res?.data?.token
+					}
+				}).then(res => res.json()).then(js => {
+					if (js?.data?.configValue === 'true') {
+						message.error('版本更新中....请关注大群公告!!!!', 5, () => {
+							sessionStorage.removeItem('Admin-Token')
+							window.location.href = '/';
+						})
+					} else {
+						sessionStorage.setItem('Admin-Token', res?.data?.token)
+						window.location.href = '/';
+						// setTimeout(() => {
+						//   refresh();
+						// }, 0);
+					}
+				})
 
-  }
-  // 获取手机钉钉验证码
-  const getPhoneCode = () => {
-    let reg = new RegExp(/^(13\d|14[579]|15[^4\D]|17[^49\D]|18\d)\d{8}$/g)
-    if (values) {
-      setM(30)
-      codeRes.run(values?.phone).then(res => {
-        if (res.code === 200) {
-          message.success('获取成功,请查看你的钉钉消息!验证码将发送到钉钉')
-          timeOut(30)
-        } else {
-          timeOut(0)
-        }
-      })
-    } else {
-      message.error('请输入正确的手机号!!!')
-    }
-  }
-   // 获取手机短信验证码
-   const getPhoneNoteCode = () => {
-    let reg = new RegExp(/^(13\d|14[579]|15[^4\D]|17[^49\D]|18\d)\d{8}$/g)
-    if (values) {
-      setM(30)
-      noteCode.run(values?.phone).then(res => {
-        if (res.code === 200) {
-          message.success('获取成功,请查看你的短信消息!验证码将以短信的形式发送到您的手机!')
-          timeOut(30)
-        } else {
-          timeOut(0)
-        }
-      })
-    } else {
-      message.error('请输入正确的手机号!!!')
-    }
-  }
-  // 倒计时
-  const timeOut = useCallback((num) => {
-    let timer: any = null
-    if (num > 0) {
-      timer = setTimeout(() => {
-        setM(num - 1)
-        timeOut(num - 1)
-        clearTimeout(timer)
-        timer = null
-      }, 1000)
-    } else {
-      setM(0)
-    }
-  }, [])
-  // 手机登录
-  const phoneSubmit = () => {
-    if (values?.code) {
-      phone_login.run(values).then(res => {
-        try {
-          if (res.code === 200) {
-            setIsLogin(false)
-            sessionStorage.setItem('Admin-Token', res?.data?.token)
-            let companyInfo = res?.data?.companyRelationInfo?.filter((item: { companyId: number }) => item.companyId !== 4 && item.companyId !== 3)
-            if (companyInfo?.length === 0) {
-              sessionStorage.removeItem('Admin-Token')
-              message.error('登录失败,请用趣程运营平台账号登录')
-              return
-            } else if (companyInfo?.length === 1) {
-              setCompanyHandle(res?.data?.companyRelationInfo[0].companyId)
-            } else {
-              setCompanyList(companyInfo)
-            }
-            // message.success('登录成功!');
-            return;
-          } else {
-            setIsLogin(false)
-            // codeRes.run()
-          }
-          // 如果失败去设置用户错误信息
-        } catch (error) {
-          setIsLogin(false)
-          message.error('登录失败,请重试!');
-        }
-      })
-    }
-  }
-  return (
-    <>
-      {
-        <>
-          {/* {isOk?} */}
-          <div className={`${styles.container}`} id='login'>
-            <div className={styles.content}>
+			}
+		}).catch(() => setLoading(() => false))
+	}
+	// 更换账户
+	const logOut = () => {
+		setInitialState({ ...initialState, currentUser: undefined });
+		loginOut();
 
-              {sessionStorage.getItem('Admin-Token') && companyList?.length > 0 ? <div className={`${styles.company}  ${isMobile ? '' : show ? '' : styles.login_hide}`}>
-                <h1>趣程运营管理后台</h1>
+	}
+	// 获取手机钉钉验证码
+	const getPhoneCode = () => {
+		// let reg = new RegExp(/^(13\d|14[579]|15[^4\D]|17[^49\D]|18\d)\d{8}$/g)
+		if (values) {
+			setM(30)
+			codeRes.run(values?.phone).then(res => {
+				if (res.code === 200) {
+					message.success('获取成功,请查看你的钉钉消息!验证码将发送到钉钉')
+					timeOut(30)
+				} else {
+					timeOut(0)
+				}
+			})
+		} else {
+			message.error('请输入正确的手机号!!!')
+		}
+	}
+	// 获取手机短信验证码
+	const getPhoneNoteCode = () => {
+		// let reg = new RegExp(/^(13\d|14[579]|15[^4\D]|17[^49\D]|18\d)\d{8}$/g)
+		if (values) {
+			setM(30)
+			noteCode.run(values?.phone).then(res => {
+				if (res.code === 200) {
+					message.success('获取成功,请查看你的短信消息!验证码将以短信的形式发送到您的手机!')
+					timeOut(30)
+				} else {
+					timeOut(0)
+				}
+			})
+		} else {
+			message.error('请输入正确的手机号!!!')
+		}
+	}
+	// 倒计时
+	const timeOut = useCallback((num) => {
+		let timer: any = null
+		if (num > 0) {
+			timer = setTimeout(() => {
+				setM(num - 1)
+				timeOut(num - 1)
+				clearTimeout(timer)
+				timer = null
+			}, 1000)
+		} else {
+			setM(0)
+		}
+	}, [])
+	// 手机登录
+	const phoneSubmit = () => {
+		if (values?.code) {
+			phone_login.run(values).then(res => {
+				try {
+					if (res.code === 200) {
+						setIsLogin(false)
+						sessionStorage.setItem('Admin-Token', res?.data?.token)
+						let companyInfo = res?.data?.companyRelationInfo?.filter((item: { companyId: number }) => item.companyId !== 4 && item.companyId !== 3)
+						if (companyInfo?.length === 0) {
+							sessionStorage.removeItem('Admin-Token')
+							message.error('登录失败,请用趣程运营平台账号登录')
+							return
+						} else if (companyInfo?.length === 1) {
+							setCompanyHandle(res?.data?.companyRelationInfo[0].companyId)
+						} else {
+							setCompanyList(companyInfo)
+						}
+						// message.success('登录成功!');
+						return;
+					} else {
+						setIsLogin(false)
+						// codeRes.run()
+					}
+					// 如果失败去设置用户错误信息
+				} catch (error) {
+					setIsLogin(false)
+					message.error('登录失败,请重试!');
+				}
+			})
+		}
+	}
+	return (
+		<>
+			{
+				<>
+					{/* {isOk?} */}
+					<div className={`${styles.container}`} id='login'>
+						<div className={styles.content}>
 
-                <div className={styles.companyAccount}>
-                  <h3 className={styles.title}>请选择公司账户登录</h3>
-                  <div className={styles.chooseTableBlock}>
-                    <Spin spinning={loading}>
-                      {
-                        companyList?.map((item: any) => <div className={styles.acTableLine} key={item?.companyId} onClick={() => { setCompanyHandle(item.companyId) }}>
-                          <div className={styles.actname}>{item?.companyInfo?.companyName}</div>
-                          <div className={styles.right}> <div className={styles.actcha}>{item?.powerLevel === 999 ? '超级管理员' : item?.powerLevel === 100 ? '系统管理员' : item?.powerLevel === 99 ? '管理员' : '普通用户'}</div> <SwapRightOutlined className={styles.iconRight} /></div>
-                        </div>)
-                      }
-                    </Spin>
-                  </div>
-                  <div className={styles.button}>
-                    <Button type="link" onClick={logOut}>更换账号</Button>
-                  </div>
-                </div>
+							{sessionStorage.getItem('Admin-Token') && companyList?.length > 0 ? <div className={`${styles.company}  ${isMobile ? '' : show ? '' : styles.login_hide}`}>
+								<h1>趣程游戏数据系统</h1>
 
-              </div> : <div className={`${styles.main}  ${isMobile ? '' : show ? '' : styles.login_hide}`}>
-                <h1>趣程运营管理后台</h1>
-                {/*  (isMobile || location.origin === 'http://localhost:8000' || location.origin.includes('test')) */}
-                {true   && <div className={styles.tabs}>
-                  <span onClick={() => { setTab(1) }} style={tab === 1 ? { color: localStorage.getItem('color') || '#24DB95' } : {}}>手机</span>
-                  <span onClick={() => { setTab(2) }} style={tab === 2 ? { color: localStorage.getItem('color') || '#24DB95' } : {}}>钉钉</span>
-                </div>}
+								<div className={styles.companyAccount}>
+									<h3 className={styles.title}>请选择公司账户登录</h3>
+									<div className={styles.chooseTableBlock}>
+										<Spin spinning={loading}>
+											{
+												companyList?.map((item: any) => <div className={styles.acTableLine} key={item?.companyId} onClick={() => { setCompanyHandle(item.companyId) }}>
+													<div className={styles.actname}>{item?.companyInfo?.companyName}</div>
+													<div className={styles.right}> <div className={styles.actcha}>{item?.powerLevel === 999 ? '超级管理员' : item?.powerLevel === 100 ? '系统管理员' : item?.powerLevel === 99 ? '管理员' : '普通用户'}</div> <SwapRightOutlined className={styles.iconRight} /></div>
+												</div>)
+											}
+										</Spin>
+									</div>
+									<div className={styles.button}>
+										<Button type="link" onClick={logOut}>更换账号</Button>
+									</div>
+								</div>
 
-                {
-                  tab === 1 ? <>
-                    <div>
-                      <input
-                        placeholder='Phone'
-                        value={values?.phone}
-                        onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
-                          let value = e.target.value
-                          if (value === '背景') {
-                            setVideoMenu({ visible: true })
-                          }
-                          setValues({ ...values, phone: value })
-                        }}
-                      />
-                    </div>
-                    <div>
-                      <input
-                        placeholder='Code'
-                        style={{ width: '60%' }}
-                        onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
-                          let value = e.target.value
-                          setValues({ ...values, code: value })
-                        }}
-                        onKeyUp={(event: React.KeyboardEvent<HTMLInputElement>) => {
-                          if (event.key === 'Enter') {
-                            phoneSubmit()
-                          }
-                        }}
-                      />
-                      <button
-                        className={styles.btn}
-                        style={!m ? { background: localStorage.getItem('color') || '#24DB95' } : { background: '#999' }}
-                        onClick={codeType===1 ?getPhoneCode : getPhoneNoteCode}
-                        disabled={!!m}
-                      >
-                        {!m ? '获取验证码' : m + '秒再次获取'}
-                      </button>
-                    </div>
-                    <Radio.Group value={codeType} onChange={(e)=>{
-                      let v = e.target.value
-                      setCodeType(v)
-                    }}>
-                      <Radio value={1} style={{ color: '#fff' }}>钉钉验证码</Radio>
-                      <Radio value={2} style={{ color: '#fff' }}>手机验证码</Radio>
-                    </Radio.Group>
-                    <button
-                      onClick={phoneSubmit}
-                      disabled={isLogin}
-                      style={{ background: localStorage.getItem('color') || '#24DB95' }}
-                    >登录</button>
-                  </> :
-                    <div id='login_container' />
-                }
-              </div>}
-            </div>
-            {/**背景 */}
-            {!isMobile && <Bg data={videoMenu} open={setVideoMenu} show={handleShow} isShow={show} />}
-            <footer className={`${styles.footer} ${show ? '' : styles.footer_hide}`} onClick={() => { setVideoMenu({ visible: !videoMenu.visible }) }}>
-              <a >
-                趣程
-              </a>
-              <span>Copyright<span><CopyrightOutlined /></span>趣程 </span>
-            </footer>
-          </div>
-        </>
-      }
-    </>
-  );
+							</div> : <div className={`${styles.main}  ${isMobile ? '' : show ? '' : styles.login_hide}`}>
+								<h1>趣程游戏数据系统</h1>
+								{/*  (isMobile || location.origin === 'http://localhost:8000' || location.origin.includes('test')) */}
+								{true && <div className={styles.tabs}>
+									<span onClick={() => { setTab(1) }} style={tab === 1 ? { color: localStorage.getItem('color') || '#24DB95' } : {}}>手机</span>
+									<span onClick={() => { setTab(2) }} style={tab === 2 ? { color: localStorage.getItem('color') || '#24DB95' } : {}}>钉钉</span>
+								</div>}
+
+								{
+									tab === 1 ? <>
+										<div>
+											<input
+												placeholder='Phone'
+												value={values?.phone}
+												onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
+													let value = e.target.value
+													if (value === '背景') {
+														setVideoMenu({ visible: true })
+													}
+													setValues({ ...values, phone: value })
+												}}
+											/>
+										</div>
+										<div>
+											<input
+												placeholder='Code'
+												style={{ width: '60%' }}
+												onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
+													let value = e.target.value
+													setValues({ ...values, code: value })
+												}}
+												onKeyUp={(event: React.KeyboardEvent<HTMLInputElement>) => {
+													if (event.key === 'Enter') {
+														phoneSubmit()
+													}
+												}}
+											/>
+											<button
+												className={styles.btn}
+												style={!m ? { background: localStorage.getItem('color') || '#24DB95' } : { background: '#999' }}
+												onClick={codeType === 1 ? getPhoneCode : getPhoneNoteCode}
+												disabled={!!m}
+											>
+												{!m ? '获取验证码' : m + '秒再次获取'}
+											</button>
+										</div>
+										<Radio.Group value={codeType} onChange={(e) => {
+											let v = e.target.value
+											setCodeType(v)
+										}}>
+											<Radio value={1} style={{ color: '#fff' }}>钉钉验证码</Radio>
+											<Radio value={2} style={{ color: '#fff' }}>手机验证码</Radio>
+										</Radio.Group>
+										<button
+											onClick={phoneSubmit}
+											disabled={isLogin}
+											style={{ background: localStorage.getItem('color') || '#24DB95' }}
+										>登录</button>
+									</> :
+										<div id='login_container' />
+								}
+							</div>}
+						</div>
+						{/**背景 */}
+						{!isMobile && <Bg data={videoMenu} open={setVideoMenu} show={handleShow} isShow={show} />}
+						<footer className={`${styles.footer} ${show ? '' : styles.footer_hide}`} onClick={() => { setVideoMenu({ visible: !videoMenu.visible }) }}>
+							<a >
+								趣程
+							</a>
+							<span>Copyright<span><CopyrightOutlined /></span>趣程 </span>
+						</footer>
+					</div>
+				</>
+			}
+		</>
+	);
 };
 
 export default Login;

+ 12 - 12
src/services/login.ts

@@ -1,5 +1,5 @@
 import { request } from 'umi';
-import { api } from './api'
+import { erpApi } from './api'
 export interface LoginParamsType {
   username: string;
   password: string;
@@ -15,7 +15,7 @@ export interface LoginParamsType {
 //   });
 // }
 export async function fakeAccountLogin(params: any) {
-  return request(api + '/erp/user/login', {
+  return request(erpApi + '/erp/user/login', {
     method: 'POST',
     data: params,
   });
@@ -26,7 +26,7 @@ export async function getFakeCaptcha(mobile: string) {
 }
 
 export async function outLogin() {
-  return request(api + '/erp/user/logout', {
+  return request(erpApi + '/erp/user/logout', {
     method: 'DELETE'
   });
 }
@@ -35,45 +35,45 @@ export async function outLogin() {
 // }
 /**查询版本号 */
 export async function getVersions() {
-  return request(api + '/erp/config/sysVersion/versions')
+  return request(erpApi + '/erp/config/sysVersion/versions')
 }
 /**查询私人定制用户 */
 export async function getPrivate() {
-  return request(api + '/erp/config/sysVersion/private')
+  return request(erpApi + '/erp/config/sysVersion/private')
 }
 /**获取钉钉扫码前的后台KEY*/
 export async function getDingKey() {
-  return request(api + '/erp/user/dLoginState')
+  return request(erpApi + '/erp/user/dLoginState')
 }
 /**钉钉登录*/
 export async function ddlogin(params: { code: string, stateKey: string, state: string }) {
   let { code, stateKey, state } = params
-  return request(api + `/erp/user/dLogin?code=${code}&stateKey=${stateKey}&state=${state}`, {
+  return request(erpApi + `/erp/user/dLogin?code=${code}&stateKey=${stateKey}&state=${state}`, {
     method: 'POST'
   })
 }
 // 选择公司
 export async function selectCompanyApi(companyId: number) {
-  return request(api + `/erp/user/chooseCompany/${companyId}`, {
+  return request(erpApi + `/erp/user/chooseCompany/${companyId}`, {
     method: 'PUT'
   });
 }
 // 手机钉钉验证码获取
 export async function  getCode(phone: string) {
-    return request(api +`/erp/user/dCodeLoginState/${phone}`)
+    return request(erpApi +`/erp/user/dCodeLoginState/${phone}`)
 }
 // 手机短信验证码获取
 export async function  getNoteCode(phone: string) {
-    return request(api +`/erp/user/smsCodeLoginState/${phone}`)
+    return request(erpApi +`/erp/user/smsCodeLoginState/${phone}`)
 }
 // 手机登录
 export async function phoneLogin(params: { phone: string, code: string }) {
-  return request(api + `/erp/user/dCodeLogin `, {
+  return request(erpApi + `/erp/user/dCodeLogin `, {
     method: 'POST',
     data:params
   })
 }
 // 查询是否在更新
 export async function isPreserve() {
-  return request(api + '/erp/config/sysVersion/preserve')
+  return request(erpApi + '/erp/config/sysVersion/preserve')
 }

+ 2 - 2
src/services/operating/account.ts

@@ -1,6 +1,6 @@
 import { request } from 'umi';
-import { api } from '../api';
+import { erpApi } from '../api';
 /** 获取账号 */
 export async function getAllZhMemBerApi() {
-  return request(`${api}/erp/resourceOfUser/allOfMember/10`);
+  return request(`${erpApi}/erp/resourceOfUser/allOfMember/10`);
 }

+ 6 - 6
src/services/user.ts

@@ -1,6 +1,6 @@
 import { queryStr } from '@/utils/query';
 import { request } from 'umi';
-import { api } from './api'
+import { erpApi } from './api'
 
 export async function query() {
   return request('/api/users');
@@ -9,31 +9,31 @@ export async function query() {
 //   return request<API.CurrentUser>('/api/currentUser');
 // }
 export async function queryCurrent() {
-  return request(api + '/erp/user/loginUserInfo');
+  return request(erpApi + '/erp/user/loginUserInfo');
 }
 
 
 export async function getMenu(): Promise<any> {
-  return request(api + '/erp/menu/getRouters', {
+  return request(erpApi + '/erp/menu/getRouters', {
     method: 'PUT',
     data: ["game-data"]
   })
 }
 
 export async function editUser(prams: { oldPassword: string, password: string }) {
-  return request(`${api}/erp/user/profile/updatePwd${queryStr(prams)}`, {
+  return request(`${erpApi}/erp/user/profile/updatePwd${queryStr(prams)}`, {
     method: 'PUT'
   })
 }
 /** 重置密码 */
 export async function modifyPasswordAjax(prams: { userId: string, password: string, oldPassword: string }) {
   let { userId, ...parm } = prams
-  return request(`${api}/erp/user/modifyPassword/${userId}`, {
+  return request(`${erpApi}/erp/user/modifyPassword/${userId}`, {
     method: 'PUT',
     data: parm
   })
 }
 /**查询公众号到期 */
 export async function getMpsTimeOut(userId: any): Promise<any> {
-  return request(api + `/system/mp/getMpsTimeOut/${userId}`)
+  return request(erpApi + `/system/mp/getMpsTimeOut/${userId}`)
 }