wjx преди 1 година
родител
ревизия
3ca1c08151
променени са 46 файла, в които са добавени 1397 реда и са изтрити 5185 реда
  1. 0 61
      src/Hook/useNumber.tsx
  2. 9 0
      src/components/QueryForm/const.tsx
  3. 91 39
      src/components/QueryForm/index.tsx
  4. 0 8
      src/components/widthEllipsis/index.less
  5. 5 3
      src/components/widthEllipsis/index.tsx
  6. 99 199
      src/global.less
  7. 0 58
      src/models/useOperating/useAccount.ts
  8. 0 432
      src/models/useOperating/useBdMedia.ts
  9. 0 430
      src/models/useOperating/useBdMediaPup.ts
  10. 0 99
      src/models/useOperating/useMaterialDrawer.ts
  11. 0 45
      src/models/useOperating/useMaterialModal.ts
  12. 0 91
      src/models/useOperating/useMsgMaterialDrawer.ts
  13. 0 122
      src/models/useOperating/useSynthetic.ts
  14. 0 237
      src/models/useOperating/useWeMenu.ts
  15. 0 11
      src/models/useOperating/useWxGroupList.ts
  16. 1 0
      src/pages/gameDataStatistics/allSurvey/index.less
  17. 134 123
      src/pages/gameDataStatistics/allSurvey/index.tsx
  18. 9 0
      src/pages/gameDataStatistics/allSurvey/index1.less
  19. 50 42
      src/pages/gameDataStatistics/allSurvey/lineC.tsx
  20. 19 6
      src/pages/gameDataStatistics/components/TableData/index.tsx
  21. 59 19
      src/pages/gameDataStatistics/extensionData/everyday/index.tsx
  22. 223 777
      src/pages/gameDataStatistics/extensionData/everyday/tableConfig.tsx
  23. 74 7
      src/pages/gameDataStatistics/extensionData/total/index.tsx
  24. 167 110
      src/pages/gameDataStatistics/extensionData/total/tableConfig.tsx
  25. 2 2
      src/pages/gameDataStatistics/order/index.tsx
  26. 127 36
      src/pages/gameDataStatistics/order/tableConfig.tsx
  27. 55 40
      src/pages/gameDataStatistics/rankingList/game/index.tsx
  28. 55 17
      src/pages/gameDataStatistics/rankingList/game/tableConfig.tsx
  29. 43 9
      src/pages/gameDataStatistics/rankingList/gamer/index.tsx
  30. 20 16
      src/pages/gameDataStatistics/rankingList/gamer/tableConfig.tsx
  31. 64 4
      src/services/gameData/extensionData.ts
  32. 63 0
      src/services/gameData/index.ts
  33. 18 3
      src/services/gameData/order.ts
  34. 10 6
      src/services/gameData/rankingList.ts
  35. 0 122
      src/services/operating/account.ts
  36. 0 208
      src/services/operating/accountyyb.ts
  37. 0 331
      src/services/operating/adAuthorize.ts
  38. 0 25
      src/services/operating/adCensus.ts
  39. 0 246
      src/services/operating/adMaterial.ts
  40. 0 110
      src/services/operating/adNewAuthorize.ts
  41. 0 149
      src/services/operating/adWeChat.ts
  42. 0 376
      src/services/operating/book.ts
  43. 0 105
      src/services/operating/examine.ts
  44. 0 376
      src/services/operating/material.ts
  45. 0 53
      src/services/operating/operate.ts
  46. 0 32
      src/services/operating/weMenu.ts

+ 0 - 61
src/Hook/useNumber.tsx

@@ -1,61 +0,0 @@
-import React, { useEffect } from "react";
-import { useLayoutEffect, useState } from "react"
-
-function useNumber(num: number) {
-   num = parseFloat(num.toFixed(2))
-    const [number, setNumber] = useState<string>('0')
-    /**数字转,字符串 */
-    function str(newNum: number) {
-        let strNum = ''
-        let count = 0
-        for (var i = JSON.stringify(newNum).length - 1; i >= 0; i--) {
-            if (count % 3 == 0 && count != 0) {
-                strNum = JSON.stringify(newNum).charAt(i) + "," + strNum;
-            } else {
-                strNum = JSON.stringify(newNum).charAt(i) + strNum;
-            }
-            count++
-        }
-        return strNum
-    }
-    /**累加 */
-    useLayoutEffect(() => {
-        let arr = JSON.stringify(num).split('.')//假如存在小数点分割,小数点后数字不处理累加,最后返回值时拼接上
-        num = parseInt(arr[0])
-        let newNum = 0
-        let strN: any = '1'
-        let len = JSON.stringify(num).length
-        let time: any = setInterval(() => {
-            if (newNum < num) {
-                Array(len).fill('').forEach((i: string, index: number) => {
-                    let n = JSON.stringify(num).slice((index + 1) * 1, len).length //从第2位开始取得末尾有几位数
-                    let s = '1'
-                    strN = JSON.stringify(num).slice(0, (index + 1) * 1)
-                    Array(n).fill('').forEach((i: string) => { //计算获得每次累加多少数值
-                        s += '0'
-                        strN += '0'
-                    })
-                    if ((newNum + parseInt(s)) <= strN) {
-                        newNum += parseInt(s)
-                        let strNum = str(newNum) + (arr[1] ? `.${arr[1]}` : '')
-                        setNumber(strNum)
-                    } else if (JSON.stringify(num).slice(len - 1, len) !== JSON.stringify(newNum).slice(len - 1, len)) {
-                        newNum++
-                        let strNum = str(newNum) + (arr[1] ? `.${arr[1]}` : '')
-                        setNumber(strNum)
-                    }
-                })
-            } else {
-                clearInterval(time)
-            }
-        }, 0)
-        return () => {
-            clearInterval(time)
-            time = null
-        }
-    }, [num])
-    return <>
-        {number === '0' ? <span>0</span> : <span>{number}</span>}
-    </>
-}
-export default useNumber

+ 9 - 0
src/components/QueryForm/const.tsx

@@ -0,0 +1,9 @@
+import moment from "moment";
+
+export const rangePresets: any = {
+    '今天排行': [moment(), moment()],
+    '昨天排行': [moment().subtract(1, 'd'), moment().subtract(1, 'd')],
+    '7日排行': [moment().subtract(7, 'd'), moment()],
+    '30日排行': [moment().subtract(30, 'd'), moment()]
+};
+

+ 91 - 39
src/components/QueryForm/index.tsx

@@ -1,7 +1,8 @@
-import { Col, DatePicker, Form, Input, Radio, Row, Select } from "antd"
-import React, { useEffect } from "react"
-import { useRequest } from "umi"
+import { Button, Col, DatePicker, Form, Input, Radio, Row, Select, Space } from "antd"
+import React, { useEffect, useState } from "react"
 import moment from "moment"
+import { useAjax } from "@/Hook/useAjax"
+import { getAllOfOwnerUserApi, getChannelChoiceListApi, getGameChoiceListApi, getGameChoiceParentListType1Api, getSubUserWithSelfListApi, getTtAllUserListApi } from "@/services/gameData"
 
 
 interface Props {
@@ -55,7 +56,7 @@ interface Props {
     /** 是否开启 注册渠道名 搜索 */
     isRegAgent?: boolean
     /** 是否开启 注册渠道ID 搜索 */
-    isRegAgentId?: boolean
+    isAgentId?: boolean
     /** 是否开启 投放渠道名 搜索 */
     isPutAgent?: boolean
     /** 是否开启 用户注册日期 搜索 */
@@ -76,6 +77,12 @@ interface Props {
     isSelectRanking?: boolean
     /** 是否开启 消耗日期 搜索 */
     isConsumeDay?: boolean
+    /** 是否开启 充值日期 搜索 */
+    rechargeDay?: {
+        ranges?: any
+    }
+    /** 是否开启 开始时间 结束时间 搜索 */
+    isBeginDay?: boolean
 }
 /**
  * 游戏数据系统 请求参数
@@ -85,23 +92,65 @@ const QueryForm: React.FC<Props> = (props) => {
 
     /**************************/
     const {
-        onChange, initialValues, isAccount, isAccountId, isCompanyId, isCpId, isCpName, isCpOrderId, isCpStatus, isCreateDay, isDevice, isGameName, isRechargeGameName, isGameId, isGameRoleId, isGameRoleName, isFirstRecharge, isSwitch, isMerchantNo, isOrderId, isPayStatus, isPayWay, isProductName, isRegAgent, isRegAgentId, isPutAgent, isRegDay,
-        isRegGameName, isRegGameId, isSysUserName, isSysUserId, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay
+        onChange, initialValues, isAccount, isAccountId, isCompanyId, isCpId, isCpName, isCpOrderId, isCpStatus, isCreateDay, isDevice, isGameName, isRechargeGameName, isGameId, isGameRoleId, isGameRoleName, isFirstRecharge, isSwitch, isMerchantNo, isOrderId, isPayStatus, isPayWay, isProductName, isRegAgent, isAgentId, isPutAgent, isRegDay,
+        isRegGameName, isRegGameId, isSysUserName, isSysUserId, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay
     } = props
     const [form] = Form.useForm()
+    const [accountList, setAccountList] = useState<any[]>([])
+
+    const getAllOfOwnerUser = useAjax(() => getAllOfOwnerUserApi())
+    const getTtAllUserList = useAjax(() => getTtAllUserListApi())
+    const getGameChoiceList = useAjax(() => getGameChoiceListApi())
+    const getSubUserWithSelfList = useAjax(() => getSubUserWithSelfListApi())
+    const getChannelChoiceList = useAjax(() => getChannelChoiceListApi())
+    const getGameChoiceParentListType1 = useAjax(() => getGameChoiceParentListType1Api())
 
     /**************************/
 
     useEffect(() => {
         if (isAccountId) {
             // 请求广告账号列表
-
+            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 res2 = await getTtAllUserList.run()
+                data.concat(res2?.data?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.accountName })))
+                setAccountList(data)
+            }
+            getAccount()
         }
     }, [isAccountId])
 
-    const onValuesChange = async () => {
-        form.submit()
-        let data = await form.validateFields()
+    /** 游戏列表 */
+    useEffect(() => {
+        if (isGameId) {
+            getGameChoiceList.run()
+        }
+    }, [isGameId])
+
+    /** 投手列表 */
+    useEffect(() => {
+        if (isSysUserId) {
+            getSubUserWithSelfList.run()
+        }
+    }, [isSysUserId])
+
+    /** 推广渠道 */
+    useEffect(() => {
+        if (isAgentId) {
+            getChannelChoiceList.run()
+        }
+    }, [isAgentId])
+
+    /** 游戏应用类型 */
+    useEffect(() => {
+        if (isGameType) {
+            getGameChoiceParentListType1.run()
+        }
+    }, [isGameType])
+
+    const onFinish = (data: any) => {
 
         // 处理订单创建日期
         if (isCreateDay) {
@@ -127,12 +176,13 @@ const QueryForm: React.FC<Props> = (props) => {
         }
         // 处理 消耗日期
         if (isConsumeDay) {
+            console.log(11111)
             if (data?.consumeDay && data?.consumeDay?.length > 0) {
-                data.beginDay = moment(data?.consumeDay[0]).format('YYYY-MM-DD')
-                data.endDay = moment(data?.consumeDay[1]).format('YYYY-MM-DD')
+                data.costBeginDay = moment(data?.consumeDay[0]).format('YYYY-MM-DD')
+                data.costEndDay = moment(data?.consumeDay[1]).format('YYYY-MM-DD')
             } else {
-                data.beginDay = ''
-                data.endDay = ''
+                data.costBeginDay = ''
+                data.costEndDay = ''
             }
             delete data.consumeDay
         }
@@ -166,12 +216,7 @@ const QueryForm: React.FC<Props> = (props) => {
         onChange && onChange(data)
     }
 
-    const { data, loading, run } = useRequest(onValuesChange, {
-        debounceInterval: 500,
-        manual: true,
-    });
-
-    return <Form layout="inline" className='queryForm' initialValues={initialValues} name="basic" form={form} onValuesChange={run}>
+    return <Form layout="inline" className='queryForm' initialValues={initialValues} name="basic" form={form} onFinish={onFinish}>
         <Row gutter={[0, 10]}>
             {/* 不同排行榜选择 */}
             {isSelectRanking && <Col><Form.Item name='dateType'>
@@ -199,8 +244,7 @@ const QueryForm: React.FC<Props> = (props) => {
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
                     }
                 >
-                    <Select.Option value={'1'}>账户001</Select.Option>
-                    <Select.Option value={'2'}>账户002</Select.Option>
+                    {accountList.map(item => <Select.Option key={item.value} value={item.value}>{item.label.toString() + '_' + item.corporationName}</Select.Option>)}
                 </Select>
             </Form.Item></Col>}
             {/* 公司ID */}
@@ -276,6 +320,10 @@ const QueryForm: React.FC<Props> = (props) => {
             {isCreateDay && <Col><Form.Item name='createDay'>
                 <DatePicker.RangePicker placeholder={['订单创建开始日期', '订单创建结束日期']} />
             </Form.Item></Col>}
+            {/* 充值日期搜索 */}
+            {rechargeDay && <Col><Form.Item name='rechargeDay'>
+                <DatePicker.RangePicker placeholder={['充值开始日期', '充值结束日期']} {...rechargeDay} />
+            </Form.Item></Col>}
             {/* 操作设备 */}
             {isDevice && <Col><Form.Item name='device'>
                 <Input placeholder="请输入操作设备" allowClear />
@@ -300,9 +348,7 @@ const QueryForm: React.FC<Props> = (props) => {
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
                     }
                 >
-                    <Select.Option value={'1'}>游戏1</Select.Option>
-                    <Select.Option value={'2'}>游戏2</Select.Option>
-                    <Select.Option value={'3'}>游戏3</Select.Option>
+                    {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
                 </Select>
             </Form.Item></Col>}
             {/* 游戏应用类型搜索 */}
@@ -317,9 +363,7 @@ const QueryForm: React.FC<Props> = (props) => {
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
                     }
                 >
-                    <Select.Option value={'1'}>游戏应用类型1</Select.Option>
-                    <Select.Option value={'2'}>游戏应用类型2</Select.Option>
-                    <Select.Option value={'3'}>游戏应用类型3</Select.Option>
+                    {getGameChoiceParentListType1?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
                 </Select>
             </Form.Item></Col>}
             {/* 游戏角色名 */}
@@ -413,25 +457,23 @@ const QueryForm: React.FC<Props> = (props) => {
             {isRegAgent && <Col><Form.Item name='regAgent'>
                 <Input placeholder="请输入注册渠道名" allowClear />
             </Form.Item></Col>}
-            {/* 注册渠道id */}
-            {isRegAgentId && <Col><Form.Item name='regAgentId'>
+            {/* 推广渠道id */}
+            {isAgentId && <Col><Form.Item name='agentId'>
                 <Select
                     maxTagCount={1}
                     showSearch
                     style={{ minWidth: 150 }}
                     allowClear
-                    placeholder={'请选择注册渠道'}
+                    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>
+                    {getChannelChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.agentName}</Select.Option>)}
                 </Select>
             </Form.Item></Col>}
 
-            
+
             {/* 投放渠道名 */}
             {isPutAgent && <Col><Form.Item name='putAgent'>
                 <Input placeholder="请输入投放渠道名" allowClear />
@@ -469,7 +511,7 @@ const QueryForm: React.FC<Props> = (props) => {
                 <Input placeholder="请输入投手名" allowClear />
             </Form.Item></Col>}
             {/* 投手ID */}
-            {isSysUserId && <Col><Form.Item name='sysUserId'>
+            {isSysUserId && <Col><Form.Item name='pitcherId'>
                 <Select
                     maxTagCount={1}
                     showSearch
@@ -480,9 +522,7 @@ const QueryForm: React.FC<Props> = (props) => {
                         (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>
+                    {getSubUserWithSelfList?.data?.map((item: any) => <Select.Option value={item.userId} key={item.userId}>{item.nickname}</Select.Option>)}
                 </Select>
             </Form.Item></Col>}
 
@@ -513,6 +553,18 @@ const QueryForm: React.FC<Props> = (props) => {
             {isConsumeDay && <Col><Form.Item name='consumeDay'>
                 <DatePicker.RangePicker placeholder={['消耗开始日期', '消耗结束日期']} />
             </Form.Item></Col>}
+
+            {/* 消耗日期 搜索 */}
+            {isBeginDay && <Col><Form.Item name='beginDay'>
+                <DatePicker.RangePicker placeholder={['开始日期', '结束日期']} />
+            </Form.Item></Col>}
+
+            <Col>
+                <Space>
+                    <Button type="primary" htmlType="submit">搜索</Button>
+                    <Button onClick={() => form.resetFields()}>重置</Button>
+                </Space>
+            </Col>
         </Row>
     </Form>
 }

+ 0 - 8
src/components/widthEllipsis/index.less

@@ -1,7 +1,6 @@
 .myEll {
     position: relative;
     width: 100%;
-
     .hiddenCon {
         width: 100%;
         position: absolute;
@@ -12,11 +11,4 @@
         top: 0;
         left: 0;
     }
-
-    .ellipsisOne {
-        width: 100%;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-    }
 }

+ 5 - 3
src/components/widthEllipsis/index.tsx

@@ -1,9 +1,11 @@
 import { Tooltip } from "antd"
 import React, { useEffect, useRef, useState } from "react"
 import style from './index.less'
+import { copy } from "@/utils/utils"
 
 interface Props {
-    value?: string | number
+    value?: string | number,
+    isCopy?: boolean
 }
 /**
  * 表格溢出展示
@@ -12,7 +14,7 @@ interface Props {
 const WidthEllipsis: React.FC<Props> = (props) => {
 
     /*********************************/
-    const { value } = props
+    const { value, isCopy } = props
     const ref: any = useRef(null)
     const ref1: any = useRef(null)
     const [data, setData] = useState<{ visible?: boolean }>({})
@@ -32,7 +34,7 @@ const WidthEllipsis: React.FC<Props> = (props) => {
 
     return <Tooltip title={value} {...data}>
         <div className={style.myEll}>
-            <div ref={ref} className={style.ellipsisOne}>{value}</div>
+            <div ref={ref} className="ellipsisOne" style={isCopy ? { color: '#1890ff' } : {}} onClick={() => { if(isCopy) copy((value || '') as any) }}>{value || '--'}</div>
             <div ref={ref1} className={style.hiddenCon}><span>{value}</span></div>
         </div>
     </Tooltip>

+ 99 - 199
src/global.less

@@ -5,21 +5,26 @@ body,
 #root {
   height: 100%;
 }
-body #root .ranking .ant-table.ant-table-small .ant-table-tbody > tr > td.ant-table-cell{
+
+body #root .ranking .ant-table.ant-table-small .ant-table-tbody>tr>td.ant-table-cell {
   padding: 0px !important;
 }
-body #root .ranking .ant-table.ant-table-small .ant-table-tbody > tr > td.ant-table-cell  >div div {
+
+body #root .ranking .ant-table.ant-table-small .ant-table-tbody>tr>td.ant-table-cell>div div {
   height: 100%;
 }
-body #root .ranking .ant-table.ant-table-small .ant-table-tbody > tr > td.ant-table-cell .ant-progress-inner{
+
+body #root .ranking .ant-table.ant-table-small .ant-table-tbody>tr>td.ant-table-cell .ant-progress-inner {
   border-radius: 0 !important;
   height: 100%;
   background-color: #fff;
 }
-body #root .ranking .ant-table.ant-table-small .ant-table-tbody > tr > td.ant-table-cell .ant-progress-inner .ant-progress-bg{
+
+body #root .ranking .ant-table.ant-table-small .ant-table-tbody>tr>td.ant-table-cell .ant-progress-inner .ant-progress-bg {
   border-radius: 0 !important;
   height: 100% !important;
 }
+
 .colorWeak {
   filter: invert(80%);
 }
@@ -42,6 +47,7 @@ ul,
 ol {
   list-style: none;
 }
+
 input:-webkit-autofill,
 textarea:-webkit-autofill,
 select:-webkit-autofill {
@@ -52,16 +58,20 @@ select:-webkit-autofill {
   -o-box-shadow: 0 0 0 1000px white inset !important;
   -ms-box-shadow: 0 0 0 1000px white inset !important;
 }
+
 @media (max-width: @screen-xs) {
   .ant-table {
     width: 100%;
     overflow-x: auto;
-    &-thead > tr,
-    &-tbody > tr {
-      > th,
-      > td {
+
+    &-thead>tr,
+    &-tbody>tr {
+
+      >th,
+      >td {
         white-space: pre;
-        > span {
+
+        >span {
           display: block;
         }
       }
@@ -70,8 +80,9 @@ select:-webkit-autofill {
 }
 
 // 兼容IE11
-@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
-  body .ant-design-pro > .ant-layout {
+@media screen and(-ms-high-contrast: active),
+(-ms-high-contrast: none) {
+  body .ant-design-pro>.ant-layout {
     min-height: 100vh;
   }
 }
@@ -81,6 +92,7 @@ select:-webkit-autofill {
   width: 6px;
   height: 8px;
 }
+
 ::-webkit-scrollbar-thumb {
   border-radius: 4px;
   -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
@@ -92,6 +104,7 @@ select:-webkit-autofill {
   background: rgba(82, 82, 82, 0.3);
   -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
 }
+
 #notificationPop {
   width: 100vw;
   height: 100vh;
@@ -99,21 +112,25 @@ select:-webkit-autofill {
   z-index: 10001;
   position: fixed;
   top: 0;
-  > div {
+
+  >div {
     position: relative;
-    > div {
+
+    >div {
       position: absolute !important;
       right: 50% !important;
       transform: translateX(50%);
     }
   }
 }
+
 #logo {
   a {
     display: flex;
     align-items: center;
   }
 }
+
 .ant-statistic {
   .ant-statistic-content {
     color: #000;
@@ -121,125 +138,63 @@ select:-webkit-autofill {
     word-break: break-word;
   }
 }
+
 body {
   #root {
+
     .ant-table.ant-table-small .ant-table-title,
     .ant-table.ant-table-middle .ant-table-title,
     .ant-table.ant-table-small .ant-table-footer,
     .ant-table.ant-table-middle .ant-table-footer,
-    .ant-table.ant-table-small .ant-table-thead > tr > th,
-    .ant-table.ant-table-middle .ant-table-thead > tr > th,
-    .ant-table.ant-table-small .ant-table-tbody > tr > td,
-    .ant-table.ant-table-middle .ant-table-tbody > tr > td,
-    .ant-table.ant-table-small tfoot > tr > th,
-    .ant-table.ant-table-middle tfoot > tr > th,
-    .ant-table.ant-table-small tfoot > tr > td .ant-table.ant-table-middle tfoot > tr > td {
+    .ant-table.ant-table-small .ant-table-thead>tr>th,
+    .ant-table.ant-table-middle .ant-table-thead>tr>th,
+    .ant-table.ant-table-small .ant-table-tbody>tr>td,
+    .ant-table.ant-table-middle .ant-table-tbody>tr>td,
+    .ant-table.ant-table-small tfoot>tr>th,
+    .ant-table.ant-table-middle tfoot>tr>th,
+    .ant-table.ant-table-small tfoot>tr>td .ant-table.ant-table-middle tfoot>tr>td {
       padding: 5px;
     }
+
     .ant-table.ant-table-small .ant-table-thead .ant-table-column-sorters {
       padding: 0;
     }
+
     // .ant-table.ant-table-small .ant-table-tbody > tr > td.ant-table-cell {
     //   padding-top: 8px;
     // }
   }
-  .ant-table-thead > tr > th {
+
+  .ant-table-thead>tr>th {
     font-weight: 600 !important;
   }
+
   .total_table {
-    .ant-table-thead > tr > th,
-    .ant-table-tbody > tr > td {
+
+    .ant-table-thead>tr>th,
+    .ant-table-tbody>tr>td {
       border-bottom: 1px solid #e0e0e0;
     }
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-content
-      > table
-      > thead
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-header
-      > table
-      > thead
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-body
-      > table
-      > thead
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-content
-      > table
-      > tbody
-      > tr
-      > td,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-header
-      > table
-      > tbody
-      > tr
-      > td,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-body
-      > table
-      > tbody
-      > tr
-      > td,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-content
-      > table
-      > tfoot
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-header
-      > table
-      > tfoot
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-body
-      > table
-      > tfoot
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-content
-      > table
-      > tfoot
-      > tr
-      > td,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-header
-      > table
-      > tfoot
-      > tr
-      > td,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-body
-      > table
-      > tfoot
-      > tr
-      > td {
+
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>td,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>td,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>td,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>td,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>td,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>td {
       border-right: 1px solid #e0e0e0;
     }
-    .ant-table.ant-table-bordered > .ant-table-container {
+
+    .ant-table.ant-table-bordered>.ant-table-container {
       border: 1px solid #e0e0e0;
     }
+
     .ant-table-header {
       .ant-table-thead {
         tr {
@@ -250,100 +205,33 @@ body {
       }
     }
   }
+
   .all_table {
-    .ant-table-thead > tr > th,
-    .ant-table-tbody > tr > td {
+
+    .ant-table-thead>tr>th,
+    .ant-table-tbody>tr>td {
       border-bottom: 1px solid #e0e0e0;
     }
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-content
-      > table
-      > thead
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-header
-      > table
-      > thead
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-body
-      > table
-      > thead
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-content
-      > table
-      > tbody
-      > tr
-      > td,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-header
-      > table
-      > tbody
-      > tr
-      > td,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-body
-      > table
-      > tbody
-      > tr
-      > td,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-content
-      > table
-      > tfoot
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-header
-      > table
-      > tfoot
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-body
-      > table
-      > tfoot
-      > tr
-      > th,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-content
-      > table
-      > tfoot
-      > tr
-      > td,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-header
-      > table
-      > tfoot
-      > tr
-      > td,
-    .ant-table.ant-table-bordered
-      > .ant-table-container
-      > .ant-table-body
-      > table
-      > tfoot
-      > tr
-      > td {
+
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>td,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>td,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>td,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>th,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>td,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>td,
+    .ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>td {
       border-right: 1px solid #e0e0e0;
     }
-    .ant-table.ant-table-bordered > .ant-table-container {
+
+    .ant-table.ant-table-bordered>.ant-table-container {
       border: 1px solid #e0e0e0;
     }
+
     .ant-table-header {
       .ant-table-thead {
         tr {
@@ -355,25 +243,37 @@ body {
     }
   }
 }
+
 .table_row_red {
   background-color: #e91e1e80;
+
   &:hover {
-    > td {
-      background-color:#e91e1e80!important;
+    >td {
+      background-color: #e91e1e80 !important;
     }
   }
 }
+
 .table_row_yellow {
   background-color: #ffeb3b6b;
+
   &:hover {
-    > td {
+    >td {
       background-color: #ffeb3b6b !important;
     }
   }
 }
+
 // .ant-table,.ant-card{
 //   background-color: #fff !important;
 //   td{
 //     background-color: #fff !important;
 //   }
-// }
+// }
+
+.ellipsisOne {
+  width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}

+ 0 - 58
src/models/useOperating/useAccount.ts

@@ -1,58 +0,0 @@
-import { useReducer } from 'react'
-import { useAjax } from '@/Hook/useAjax'
-import { AddGroup, addGroup, configGroup, delGroup, editApproveStatus, EditGroup, editGroup, perfect } from '@/services/operating/account'
-type State = {
-    visible: boolean,//弹窗开启与否
-}
-export type Action = {
-    type: 'show' | 'code',
-    params?: any
-}
-export function reducer(state: State, action: Action) {
-    let { type } = action
-    switch (type) {
-        case 'show':
-            return { ...state, visible: !state.visible }
-        default:
-            return state;
-    }
-}
-
-export default function useWxGroupList() {
-    const [state, dispatch] = useReducer(reducer, { visible: false })
-    /*
-       * 分组操作
-       */
-    const groupAdd = useAjax((params: AddGroup) => addGroup(params), {
-        msgNmae: '添加',
-    })
-    const groupEdit = useAjax((params: EditGroup) => editGroup(params), {
-        msgNmae: '编辑',
-    })
-    const groupDel = useAjax((params: { groupId: string }) => delGroup(params), {
-        msgNmae: '删除',
-    })
-    const groupConfig = useAjax((params: { groupId: string, mpAccountId: string }) => configGroup(params), {
-        msgNmae: '修改'
-    })
-    const editStatus = useAjax((params: { mpId: string, status: string }) => editApproveStatus(params), { msgNmae: '修改' })
-    const perfectInformation = useAjax((params: {
-        mpId: string,
-        administratorCard?: string,//管理员身份证号码
-        administratorName?: string,//管理员名称
-        administratorWechat?: string,//管理员微信号
-        legalCard?: string,//法人身份证
-        legalName?: string,//法人姓名
-        legalWechat?: string,//法人手机号
-      }) => perfect(params), { msgNmae: '操作' })
-    return {
-        state,
-        dispatch,
-        groupAdd,
-        groupEdit,
-        groupDel,
-        groupConfig,
-        editStatus,
-        perfectInformation
-    }
-}

+ 0 - 432
src/models/useOperating/useBdMedia.ts

@@ -1,432 +0,0 @@
-import getMD5 from '@/components/MD5';
-import { useAjax } from '@/Hook/useAjax';
-import { bdSysMediaList, bdSysMediaAdd, delMedia, bdSysMediaEdit, getFileUrl, syncMedia, getMedia, configSortApi, syncForSend, wxSysMediaAdd, editWxlist, getFolderTree, editMediaFolder } from '@/services/operating/material';
-import { message } from 'antd';
-import { Dispatch, useCallback, useReducer, useState } from 'react'
-import { request } from 'umi';
-
-type State = {
-    fileVisible?: boolean,//文件夹弹窗
-    imgVisrible?: boolean,//img,voice,video弹窗
-    newsVisrible?: boolean,//news弹窗
-    knewsVisrible?: boolean,//客服图文弹窗
-    fileName?: string,//文件夹名称
-    sort?: number, // 排序
-    videoTitle?: string,//video文件名称
-    videoDescription?: string,//视频描述
-    belongUser?: any,//0公共本地|1个人本地
-    fileType?: 'image' | 'news' | 'voice' | 'video' | 'knews',//类型
-    parentId?: any,//上级目录ID,顶级使用null
-    url?: string,//素材地址
-    pathId?: string,//路径ID
-    selectFile?: number[],//选中的文件列表
-    rightClickPup?: any,// /**右键菜单开关 all为全部 id 为目标文件 空为不显示*/
-    xy?: { x: number, y: number },// /**鼠标位置 菜单弹窗位置使用*/
-    delPupId?: any,//按了单个删除存放的id为了让弹窗区分文件
-    actionItem?: any,//当前选中的Itme
-    path?: any[],//个人路径
-    publicPath?: any[],//本地路径
-    file?: File,//素材文件
-    selectItem?: any,//单选素材时存放选中的素材
-    knewsdefaultData?: any,//k图文编辑时的默认内容
-    sortVisible?:boolean,//排序弹窗
-}
-export type Action = {
-    type: 'set' | 'init',
-    params?: any
-}
-const typeEnum = {
-    'image': '图片',
-    'news': '图文素材',
-    'voice': '音频',
-    'video': '视频',
-    'knews': 'K-图文'
-}
-function reducer(state: State, action: Action) {
-    let { type, params } = action
-    let newState = JSON.parse(JSON.stringify(state))
-    newState.file = state.file
-    switch (type) {
-        case 'set':
-            Object.keys(params as State).forEach((key: string) => {
-                newState[key] = (params as State)[key]
-            })
-            return newState
-        case 'init':
-            return { ...initData, ...params }
-        default:
-            return state;
-    }
-}
-const initData: State = {
-    fileVisible: false,
-    knewsVisrible: false,
-    fileName: '',
-    videoTitle: '',
-    videoDescription: '',
-    belongUser: '1',
-    fileType: 'image',
-    parentId: null,
-    selectFile: [],
-    delPupId: '',
-    rightClickPup: { id: '' },
-    publicPath: [{ title: '公共本地', number: '0' }],
-    path: [{ title: '个人本地', number: '0' }],
-    imgVisrible: false,
-    newsVisrible: false,
-    sortVisible:false,
-    sort: 0
-}
-/**本地素材管理器 */
-function useBdMediaPup() {
-    const [state, dispatch]: [State, Dispatch<Action>] = useReducer(reducer, initData)
-    const { fileName, sort, belongUser, fileType, parentId, selectFile, delPupId, rightClickPup, actionItem, path, publicPath, file, videoTitle, videoDescription } = state
-    const list = useAjax((params) => bdSysMediaList(params))
-    const add = useAjax((params) => bdSysMediaAdd(params), { msgNmae: '新增' })
-    const addWx = useAjax((params) => wxSysMediaAdd(params), { msgNmae: '新增' })
-    const del = useAjax((params) => delMedia(params), { msgNmae: '删除' })
-    const edit = useAjax((params) => bdSysMediaEdit(params), { msgNmae: '编辑' })
-    const sync = useAjax((params) => syncMedia(params), { msgNmae: '同步' })
-    const syncId = useAjax((params) => syncForSend(params), { msgNmae: '同步' })
-    const configSort = useAjax((params) => configSortApi(params), { msgNmae: '排序' })
-    const get_folder_tree = useAjax((params: any) => getFolderTree(params))
-    const edit_media_folder = useAjax((params: any) => editMediaFolder(params))
-    const get = useAjax((params) => getMedia(params))//获取图文详情
-    const eidtWxlists = useAjax((params) => editWxlist(params))
-    const [isOk, setIsOk] = useState<boolean>(true)
-    //请求上传地址
-    const fileUrl = useAjax((params: { type: string }) => getFileUrl(params), {
-        manual: true,
-    })
-    /**初始化数据 */
-    const init = useCallback((params: any) => {
-        console.log('init===>', params)
-        dispatch({ type: 'init', params })
-    }, [])
-    /**设置state */
-    const set = useCallback((params: State) => {
-        // console.log('params===>',params)
-        if (params) {
-            dispatch({ type: 'set', params })
-        }
-    }, [])
-    /**新增K-客服模板消息 */
-    const knewsOk = useCallback((props: any) => {
-        let { title, knewsThumbUrl, knewsLink, description, knewsThumbId } = props?.newsList[0]
-        let obj = {
-            parentId,
-            belongUser,
-            folder: false,
-            fileType,
-            title: title,
-            knewsThumbUrl: knewsThumbUrl,
-            knewsLink: knewsLink,
-            description: description,
-            sort: props.sort
-        }
-        if (knewsThumbId) {//数据中存在封面图本地ID加入本地ID
-            obj['knewsThumbId'] = knewsThumbId
-        }
-        if (rightClickPup?.id && rightClickPup?.id !== 'all') {//编辑时传入ID
-            obj['sysMediaId'] = rightClickPup?.id
-            edit.run(obj).then((res) => {
-                if (res) {
-                    list.refresh()
-                    set({ knewsVisrible: false, knewsdefaultData: null })
-                }
-            })
-            eidtWxlists.run({ sysMediaId: rightClickPup?.id, mpIds: props?.mpIds || [] }).then((res) => {
-                console.log(res)
-            })
-        } else {
-            add.run({ ...obj, mpIds: props?.mpIds || [] }).then((res) => {
-                if (res) {
-                    list.refresh()
-                    set({ knewsVisrible: false, knewsdefaultData: null })
-                }
-            })
-        }
-    }, [add, edit, list, parentId, belongUser, fileType, rightClickPup])
-    /**新增文件夹,非图文素材 */
-    const fileOk = useCallback((e: any, fnc?: () => Promise<any>, selectWx?: number[]) => {
-        e?.stopPropagation()
-        if (fnc) {//存在代表素材
-            fnc().then(res => {
-                if (!res) {
-                    return
-                }
-                if (res?.file && file) {
-                    /**修改文件名以用户设置的文件title命名*/
-                    let newFile = new File([file], res?.fileName ? res?.fileName + '.' + file?.name?.split('.')[1] : file?.name, { type: file?.type })
-                    let formData = new FormData();
-
-                    if (fileType === 'voice') {
-                        if (newFile.size > 2097152) {
-                            message.error('请上传小于2M的音频')
-                            return
-                        }
-                    }
-                    if (fileType === 'video' || fileType === 'image') {
-                        if (newFile.size > 10485760) {
-                            message.error('请上传小于10M的素材')
-                            return
-                        }
-                    }
-
-                    /**向阿里云请求上传地址*/
-                    fileUrl.run({ type: newFile.type }).then(res1 => {
-                        Object.keys(res1).forEach((key: string) => {
-                            if (key !== 'url') {
-                                formData.append(key, res1[key])
-                            }
-                        })
-                        formData.append('file', newFile)
-                        /**向阿里云返回的上传地址上传文件*/
-                        request(res1?.ossUrl, { method: 'post', body: formData }).then(async (res2: { code: number, data: { url: string } }) => {
-                            if (res2.code === 200) {
-                                message.success('上传成功')
-                                if (res) {
-                                    /**取到返回的文件地址向后端发送具体数据*/
-                                    if (res2?.data?.url) {
-                                        let fileMd5 = await getMD5(file)
-                                        let obj = { title: res?.fileName, fileType, folder: false, parentId, belongUser, url: res2?.data?.url, mpIds: selectWx, sort: res?.sort, fileMd5, fileSize: newFile?.size }
-                                        if (fileType === 'video') {
-                                            obj['videoTitle'] = res?.videoTitle || res?.title
-                                            obj['videoDescription'] = res?.videoDescription
-                                        }
-                                        add.run(obj).then((res) => {
-                                            console.log(res)
-                                            list.refresh()//刷新页面
-                                            offEditFile()//关闭弹窗并清空相关数据
-                                        })
-                                    }
-                                }
-                            } else {
-                                message.error('上传失败!')
-                            }
-                        })
-                    })
-                }
-            })
-        } else {
-            if (fileName) {
-                let obj = { title: fileName, fileType, folder: true, parentId, belongUser, mpIds: selectWx, sort }
-                add.run(obj).then((res) => {
-                    get_folder_tree.refresh()
-                    list.refresh()//刷新页面
-                    offEditFile()//关闭弹窗并清空相关数据
-                })
-            }
-        }
-    }, [fileName, fileType, parentId, belongUser, list, file])
-    /**编辑非图文素材名称*/
-    const nameOk = useCallback((selectWx?: any) => {
-        if (fileName && actionItem) {
-            let obj = { title: fileName, belongUser, sysMediaId: actionItem?.id, fileType: actionItem?.fileType, folder: actionItem?.folder, url: actionItem?.url, sort }
-            if (fileType === 'video') {
-                obj['videoTitle'] = videoTitle
-                obj['videoDescription'] = videoDescription
-            }
-            edit.run(obj).then((res) => {
-                list.refresh()//刷新页面
-                offEditFile()//关闭弹窗并清空相关数据
-            })
-        }
-        //
-        eidtWxlists.run({ sysMediaId: actionItem?.id, mpIds: selectWx || [] }).then((res) => {
-            console.log(res)
-        })
-    }, [fileName, actionItem, edit, belongUser, fileType, videoTitle, videoDescription])
-    /**删除文件 */
-    const dels = useCallback((id?: any) => {
-        let arr = typeof id === 'number' ? [id] : selectFile
-        let len = arr?.length || 0
-        if (len) {
-            arr?.map((id, index) => {
-                del.run(id).then(() => {
-                    set({ selectFile: selectFile?.filter(i => i !== id) })//清理已删除文件
-                    if (index === len - 1) {
-                        list.refresh()//最后一次刷新页面
-                    }
-                })
-            })
-        }
-    }, [list, selectFile])
-    /**获取本地素材数据列表 */
-    const getList = useCallback((props?: any) => {
-        let obj = { pageSize: 20, pageNum: 1, fileType, belongUser, parentId, ...props }
-        list.run(obj).then((res) => {
-            setIsOk(true)
-        })
-    }, [list, fileType, belongUser, parentId])
-    /**选中文件 single 开启可单选为了在右键删除选择时只选一个*/
-    const onFile = useCallback((e: any, item: { id: any, folder?: boolean }, isAll?: boolean, single?: boolean) => {
-        let { id } = item
-        e?.stopPropagation()
-        if (isAll && !single) {
-            set({ selectFile: [...new Set([...selectFile as number[], id])] })
-        } else {
-            if (item?.folder && !single) {//假如是文件不让选择
-                message.error('不能选择文件夹')
-                return
-            }
-            set({ selectFile: [item.id], selectItem: item })
-        }
-    }, [selectFile])
-    /**点击文件夹 */
-    const fileClick = useCallback((item) => {
-        if (isOk) {
-            setIsOk(false)
-            console.log(item, belongUser == '1')
-            if (belongUser == '1' && path) {
-                set({ path: [...path, item] })
-            }
-            if (belongUser == '0' && publicPath) {
-                set({ publicPath: [...publicPath, item] })
-            }
-            set({ parentId: item.id })
-            getList({ parentId: item.id })//请求对应文件夹列表
-        }
-
-    }, [path, publicPath, fileType, belongUser, isOk])
-    /**点击目录树*/
-    const treeClick = useCallback((item) => {
-        if (isOk) {
-            setIsOk(false)
-            // console.log(item, belongUser == '1')
-            if (belongUser == '1' && path) {
-                set(item?.id === 0 ? { path: [path[0]] } : { path: [path[0], item] })
-            }
-            if (belongUser == '0' && publicPath) {
-                set(item?.id === 0 ? { publicPath: [publicPath[0]] } : { publicPath: [publicPath[0], item] })
-            }
-            set({ parentId: item.id })
-            getList({ parentId: item.id })//请求对应文件夹列表
-        }
-    }, [path, publicPath, fileType, belongUser, isOk])
-    /**点击路径 */
-    const pathClick = useCallback((item) => {
-        let newPath: any[] = []
-        if (belongUser == '1') {
-            path?.forEach((paths, index) => {//用传入的index和path循环的index对比小于等于index代表该保留的路径
-                if (index <= item.index) {
-                    newPath.push(paths)
-                }
-            })
-            set({ path: newPath })
-        } else {
-            publicPath?.forEach((paths, index) => {//用传入的index和path循环的index对比小于等于index代表该保留的路径
-                if (index <= item.index) {
-                    newPath.push(paths)
-                }
-            })
-            set({ publicPath: newPath })
-        }
-        set({ parentId: item.parentId })
-        console.log(item)
-        getList({ pageSize: 20, pageNum: 1, fileType, belongUser, parentId: item.id })
-        console.log('文件夹被点击')
-    }, [path, fileType, belongUser, publicPath])
-    /**取消文件 */
-    const offFile = useCallback((e: any, item: { id: any }) => {
-        let { id } = item
-        set({ selectFile: selectFile?.filter(i => i !== id) })
-    }, [selectFile])
-    /**判断是取消还是选中文件的操作在点击打钩时使用 */
-    const changeClickFile = useCallback((e: any, item: { id: any, folder?: boolean }, isAll?: boolean) => {
-        let { id } = item
-        e?.stopPropagation()//阻止冒泡传递到文件夹被点击事件
-        let state = selectFile?.some((i) => i === id)
-        if (isAll) {
-            if (state) {//存在就是删除
-                set({ selectFile: selectFile?.filter(i => i !== id) })
-            } else {//否则新增
-                set({ selectFile: [...selectFile as number[], id] })
-            }
-        } else {//单选情况存在于选择素材弹窗组件
-            if (item?.folder && fileType !== 'image') {//假如是文件不让选择
-                message.error('不能选择文件夹')
-                return
-            }
-            if (state) {//存在就是删除
-                set({ selectFile: selectFile?.filter(i => i !== id) })
-                set({ selectItem: null })
-            } else {//否则新增
-                set({ selectFile: [id] })
-                set({ selectItem: item })
-            }
-        }
-    }, [selectFile, fileType])
-    /**开启删除弹窗 */
-    const delPupOn = useCallback((delPupId) => {
-        set({ delPupId })
-    }, [])
-    /**关闭删除弹窗并去除选中 */
-    const delPupOff = useCallback(() => {
-        set({ delPupId: '' })
-        offFile(null, { id: delPupId })
-    }, [delPupId,])
-    /**编辑 */
-    const editFile = useCallback((e?: any,) => {
-        e?.stopPropagation()
-        onFile(null, rightClickPup, true, true)
-        // if (rightClickPup?.fileType !== 'news') {//不是图文开启编辑名字弹窗
-        let obj = { fileVisible: true, actionItem: rightClickPup, fileName: rightClickPup.title, sort: rightClickPup.sort }
-        if (rightClickPup?.fileType === 'video') {
-            obj['videoTitle'] = rightClickPup?.videoTitle || rightClickPup?.title
-            obj['videoDescription'] = rightClickPup?.videoDescription
-        }
-        set(obj)
-        // }
-    }, [rightClickPup])
-    /**取消编辑后清空选中存放的数据并关闭弹窗*/
-    const offEditFile = useCallback(() => {
-        set({ fileVisible: false, imgVisrible: false,sortVisible:false, actionItem: '', fileName: '', selectFile: selectFile?.filter(id => id !== actionItem?.id), sort: 0 })
-    }, [selectFile, actionItem])
-    /**全选反选文件*/
-    const allFile = useCallback(() => {
-        let allArr: any[] = []
-        list?.data?.records?.forEach((item: { id: any }) => {
-            allArr.push(item.id)
-        })
-        set({ selectFile: allArr.filter((i) => selectFile?.every(id => id !== i)) })
-    }, [selectFile, list])
-    /**图文素材弹窗开关 */
-    const showNews = useCallback(() => {
-
-    }, [])
-    return {
-        state,
-        init,
-        set,
-        fileOk,
-        getList,
-        dels,
-        onFile,
-        changeClickFile,
-        allFile,
-        delPupOn,
-        delPupOff,
-        editFile,
-        offEditFile,
-        nameOk,
-        fileClick,
-        treeClick,
-        pathClick,
-        knewsOk,
-        configSort,
-        fileUrl,
-        addWx,
-        list,
-        add,
-        sync,
-        get,
-        edit,
-        syncId,
-        typeEnum,
-        eidtWxlists,
-        get_folder_tree,
-        edit_media_folder
-    }
-}
-export default useBdMediaPup

+ 0 - 430
src/models/useOperating/useBdMediaPup.ts

@@ -1,430 +0,0 @@
-import getMD5 from '@/components/MD5';
-import { useAjax } from '@/Hook/useAjax';
-import { bdSysMediaList, bdSysMediaAdd, delMedia, bdSysMediaEdit, getFileUrl, syncMedia, getMedia, configSortApi, syncForSend, wxSysMediaAdd, editWxlist, getFolderTree, editMediaFolder } from '@/services/operating/material';
-import { message } from 'antd';
-import { Dispatch, useCallback, useReducer, useState } from 'react'
-import { request } from 'umi';
-/**新本地素材弹窗 */
-type State = {
-    fileVisible?: boolean,//文件夹弹窗
-    imgVisrible?: boolean,//img,voice,video弹窗
-    newsVisrible?: boolean,//news弹窗
-    knewsVisrible?: boolean,//客服图文弹窗
-    fileName?: string,//文件夹名称
-    sort?: number, // 排序
-    videoTitle?: string,//video文件名称
-    videoDescription?: string,//视频描述
-    belongUser?: any,//0公共本地|1个人本地
-    fileType?: 'image' | 'news' | 'voice' | 'video' | 'knews',//类型
-    parentId?: any,//上级目录ID,顶级使用null
-    url?: string,//素材地址
-    pathId?: string,//路径ID
-    selectFile?: number[],//选中的文件列表
-    rightClickPup?: any,// /**右键菜单开关 all为全部 id 为目标文件 空为不显示*/
-    xy?: { x: number, y: number },// /**鼠标位置 菜单弹窗位置使用*/
-    delPupId?: any,//按了单个删除存放的id为了让弹窗区分文件
-    actionItem?: any,//当前选中的Itme
-    path?: any[],//个人路径
-    publicPath?: any[],//本地路径
-    file?: File,//素材文件
-    selectItem?: any,//单选素材时存放选中的素材
-    knewsdefaultData?: any,//k图文编辑时的默认内容
-    sortVisible?:boolean,//排序弹窗
-}
-export type Action = {
-    type: 'set' | 'init',
-    params?: any
-}
-const typeEnum = {
-    'image': '图片',
-    'news': '图文素材',
-    'voice': '音频',
-    'video': '视频',
-    'knews': 'K-图文'
-}
-function reducer(state: State, action: Action) {
-    let { type, params } = action
-    let newState = JSON.parse(JSON.stringify(state))
-    newState.file = state.file
-    switch (type) {
-        case 'set':
-            Object.keys(params as State).forEach((key: string) => {
-                newState[key] = (params as State)[key]
-            })
-            return newState
-        case 'init':
-            return { ...initData, ...params }
-        default:
-            return state;
-    }
-}
-const initData: State = {
-    fileVisible: false,
-    knewsVisrible: false,
-    videoTitle: '',
-    videoDescription: '',
-    fileName: '',
-    belongUser: '1',
-    fileType: 'image',
-    parentId: null,
-    selectFile: [],
-    delPupId: '',
-    rightClickPup: { id: '' },
-    publicPath: [{ title: '公共本地', number: '0' }],
-    path: [{ title: '个人本地', number: '0' }],
-    imgVisrible: false,
-    newsVisrible: false,
-    sortVisible:false,
-    sort: 0
-}
-/**本地素材管理器 */
-function useBdMediaPup() {
-    const [state, dispatch]: [State, Dispatch<Action>] = useReducer(reducer, initData)
-    const { fileName, sort, belongUser, fileType, parentId, selectFile, delPupId, rightClickPup, actionItem, path, publicPath, file, videoTitle, videoDescription } = state
-    const list = useAjax((params) => bdSysMediaList(params))
-    const add = useAjax((params) => bdSysMediaAdd(params), { msgNmae: '新增' })
-    const addWx = useAjax((params) => wxSysMediaAdd(params), { msgNmae: '新增' })
-    const del = useAjax((params) => delMedia(params), { msgNmae: '删除' })
-    const edit = useAjax((params) => bdSysMediaEdit(params), { msgNmae: '编辑' })
-    const sync = useAjax((params) => syncMedia(params), { msgNmae: '同步' })
-    const syncId = useAjax((params) => syncForSend(params), { msgNmae: '同步' })
-    const configSort = useAjax((params) => configSortApi(params), { msgNmae: '排序' })
-    const get = useAjax((params) => getMedia(params))//获取图文详情
-    const get_folder_tree = useAjax((params: any) => getFolderTree(params))
-    const edit_media_folder = useAjax((params: any) => editMediaFolder(params))
-    const [isOk, setIsOk] = useState<boolean>(true)
-    const eidtWxlists = useAjax((params) => editWxlist(params))
-    //请求上传地址
-    const fileUrl = useAjax((params: { type: string }) => getFileUrl(params), {
-        manual: true,
-    })
-    /**初始化数据 */
-    const init = useCallback((params: any) => {
-        dispatch({ type: 'init', params })
-    }, [])
-    /**设置state */
-    const set = useCallback((params: State) => {
-        if (params) {
-            dispatch({ type: 'set', params })
-        }
-    }, [])
-    /**新增K-客服模板消息 */
-    const knewsOk = useCallback((props: any) => {
-        let { title, knewsThumbUrl, knewsLink, description, knewsThumbId } = props?.newsList[0]
-        let obj = {
-            parentId,
-            belongUser,
-            folder: false,
-            fileType,
-            title: title,
-            knewsThumbUrl: knewsThumbUrl,
-            knewsLink: knewsLink,
-            description: description,
-            sort: props.sort
-        }
-        if (knewsThumbId) {//数据中存在封面图本地ID加入本地ID
-            obj['knewsThumbId'] = knewsThumbId
-        }
-        if (rightClickPup?.id && rightClickPup?.id !== 'all') {//编辑时传入ID
-            obj['sysMediaId'] = rightClickPup?.id
-            edit.run(obj).then((res) => {
-                if (res) {
-                    list.refresh()
-                    set({ knewsVisrible: false, knewsdefaultData: null })
-                }
-            })
-            eidtWxlists.run({ sysMediaId: rightClickPup?.id, mpIds: props?.mpIds || [] }).then((res) => {
-                console.log(res)
-            })
-        } else {
-            add.run({ ...obj, mpIds: props?.mpIds }).then((res) => {
-                if (res) {
-                    list.refresh()
-                    set({ knewsVisrible: false, knewsdefaultData: null })
-                }
-            })
-        }
-    }, [add, edit, list, parentId, belongUser, fileType, rightClickPup])
-    /**新增文件夹,非图文素材 */
-    const fileOk = useCallback((e: any, fnc?: () => Promise<any>, selectWx?: number[]) => {
-        e?.stopPropagation()
-        if (fnc) {//存在代表素材
-            fnc().then(res => {
-                if (!res) {
-                    return
-                }
-                if (res?.file && file) {
-                    /**修改文件名以用户设置的文件title命名*/
-                    let newFile = new File([file], res?.fileName ? res?.fileName + '.' + file?.name?.split('.')[1] : file?.name, { type: file?.type })
-                    let formData = new FormData();
-
-                    if (fileType === 'voice') {
-                        if (newFile.size > 2097152) {
-                            message.error('请上传小于2M的音频')
-                            return
-                        }
-                    }
-                    if (fileType === 'video' || fileType === 'image') {
-                        if (newFile.size > 10485760) {
-                            message.error('请上传小于10M的素材')
-                            return
-                        }
-                    }
-
-                    /**向阿里云请求上传地址*/
-                    fileUrl.run({ type: newFile.type }).then(res1 => {
-                        Object.keys(res1).forEach((key: string) => {
-                            if (key !== 'url') {
-                                formData.append(key, res1[key])
-                            }
-                        })
-                        formData.append('file', newFile)
-                        /**向阿里云返回的上传地址上传文件*/
-                        request(res1?.ossUrl, { method: 'post', body: formData }).then(async (res2: { code: number, data: { url: string } }) => {
-                            if (res2.code === 200) {
-                                message.success('上传成功')
-                                if (res) {
-                                    /**取到返回的文件地址向后端发送具体数据*/
-                                    if (res2?.data?.url) {
-                                        let fileMd5 = await getMD5(file)
-                                        let obj = { title: res?.fileName, fileType, folder: false, parentId, belongUser, url: res2?.data?.url, mpIds: selectWx, sort: res?.sort, fileMd5, fileSize: newFile?.size }
-                                        if (fileType === 'video') {
-                                            obj['videoTitle'] = res?.videoTitle || res?.title
-                                            obj['videoDescription'] = res?.videoDescription
-                                        }
-                                        add.run(obj).then((res) => {
-                                            list.refresh()//刷新页面
-                                            offEditFile()//关闭弹窗并清空相关数据
-                                        })
-                                    }
-                                }
-                            } else {
-                                message.error('上传失败!')
-                            }
-                        })
-                    })
-                }
-            })
-        } else {
-            if (fileName) {
-                let obj = { title: fileName, fileType, folder: true, parentId, belongUser, mpIds: selectWx, sort }
-                add.run(obj).then((res) => {
-                    get_folder_tree.refresh()
-                    list.refresh()//刷新页面
-                    offEditFile()//关闭弹窗并清空相关数据
-                })
-            }
-        }
-    }, [fileName, fileType, parentId, belongUser, list, file])
-    /**编辑非图文素材名称*/
-    const nameOk = useCallback((selectWx: any) => {
-        if (fileName && actionItem) {
-            let obj = { title: fileName, belongUser, sysMediaId: actionItem?.id, fileType: actionItem?.fileType, folder: actionItem?.folder, url: actionItem?.url, sort }
-            if (fileType === 'video') {
-                obj['videoTitle'] = videoTitle
-                obj['videoDescription'] = videoDescription
-            }
-            edit.run(obj).then((res) => {
-                list.refresh()//刷新页面
-                offEditFile()//关闭弹窗并清空相关数据
-            })
-        }
-        //
-        eidtWxlists.run({ sysMediaId: actionItem?.id, mpIds: selectWx || [] }).then((res) => {
-            console.log(res)
-        })
-    }, [fileName, actionItem, edit, belongUser, fileType, videoTitle, videoDescription])
-    /**删除文件 */
-    const dels = useCallback((id?: any) => {
-        let arr = typeof id === 'number' ? [id] : selectFile
-        let len = arr?.length || 0
-        if (len) {
-            arr?.map((id, index) => {
-                del.run(id).then(() => {
-                    set({ selectFile: selectFile?.filter(i => i !== id) })//清理已删除文件
-                    if (index === len - 1) {
-                        list.refresh()//最后一次刷新页面
-                    }
-                })
-            })
-        }
-    }, [list, selectFile])
-    /**获取本地素材数据列表 */
-    const getList = useCallback((props?: any) => {
-        console.log('fileType',fileType)
-        let obj = { pageSize: 20, pageNum: 1, fileType, belongUser, parentId, ...props }
-        list.run(obj).then((res) => {
-            setIsOk(true)
-        })
-    }, [list, fileType, belongUser, parentId])
-    /**选中文件 single 开启可单选为了在右键删除选择时只选一个*/
-    const onFile = useCallback((e: any, item: { id: any, folder?: boolean }, isAll?: boolean, single?: boolean) => {
-        let { id } = item
-        e?.stopPropagation()
-        if (isAll && !single) {
-            set({ selectFile: [...new Set([...selectFile as number[], id])] })
-        } else {
-            if (item?.folder && !single) {//假如是文件不让选择
-                message.error('不能选择文件夹')
-                return
-            }
-            set({ selectFile: [item.id], selectItem: item })
-        }
-    }, [selectFile])
-    /**点击文件夹 */
-    const fileClick = useCallback((item) => {
-        if (isOk) {
-            setIsOk(false)
-            if (belongUser == '1' && path) {
-                set({ path: [...path, item] })
-            }
-            if (belongUser == '0' && publicPath) {
-                set({ publicPath: [...publicPath, item] })
-            }
-            set({ parentId: item.id })
-            getList({ parentId: item.id })//请求对应文件夹列表
-        }
-
-    }, [path, publicPath, fileType, belongUser, isOk])
-     /**点击目录树*/
-     const treeClick=useCallback((item) => {
-        if (isOk) {
-            setIsOk(false)
-            console.log(item, belongUser == '1')
-            if (belongUser == '1' && path) {
-                    set({ path: [path[0], item] })
-            }
-            if (belongUser == '0' && publicPath) {
-                set({ publicPath: [publicPath[0], item] })
-            }
-            set({ parentId: item.id })
-            getList({ parentId: item.id })//请求对应文件夹列表
-        }
-    }, [path, publicPath, fileType, belongUser, isOk])
-    /**点击路径 */
-    const pathClick = useCallback((item) => {
-        let newPath: any[] = []
-        if (belongUser == '1') {
-            path?.forEach((paths, index) => {//用传入的index和path循环的index对比小于等于index代表该保留的路径
-                if (index <= item.index) {
-                    newPath.push(paths)
-                }
-            })
-            set({ path: newPath })
-        } else {
-            publicPath?.forEach((paths, index) => {//用传入的index和path循环的index对比小于等于index代表该保留的路径
-                if (index <= item.index) {
-                    newPath.push(paths)
-                }
-            })
-            set({ publicPath: newPath })
-        }
-        set({ parentId: item.parentId })
-        getList({ pageSize: 20, pageNum: 1, fileType, belongUser, parentId: item.id })
-    }, [path, fileType, belongUser, publicPath])
-    /**取消文件 */
-    const offFile = useCallback((e: any, item: { id: any }) => {
-        let { id } = item
-        set({ selectFile: selectFile?.filter(i => i !== id) })
-    }, [selectFile])
-    /**判断是取消还是选中文件的操作在点击打钩时使用 */
-    const changeClickFile = useCallback((e: any, item: { id: any, folder?: boolean }, isAll?: boolean, noFile?: boolean) => {
-        console.log('2222222---->', noFile);
-        let { id } = item
-        e?.stopPropagation()//阻止冒泡传递到文件夹被点击事件
-        let state = selectFile?.some((i) => i === id)
-        if (isAll) {
-            if (state) {//存在就是删除
-                set({ selectFile: selectFile?.filter(i => i !== id) })
-            } else {//否则新增
-                set({ selectFile: [...selectFile as number[], id] })
-            }
-        } else {//单选情况存在于选择素材弹窗组件
-            if (!noFile) {
-                if (item?.folder) {//假如是文件不让选择
-                    message.error('不能选择文件夹')
-                    return
-                }
-            }
-            
-            if (state) {//存在就是删除
-                set({ selectFile: selectFile?.filter(i => i !== id) })
-                set({ selectItem: null })
-            } else {//否则新增
-                set({ selectFile: [id] })
-                set({ selectItem: item })
-            }
-        }
-    }, [selectFile, fileType])
-    /**开启删除弹窗 */
-    const delPupOn = useCallback((delPupId) => {
-        set({ delPupId })
-    }, [])
-    /**关闭删除弹窗并去除选中 */
-    const delPupOff = useCallback(() => {
-        set({ delPupId: '' })
-        offFile(null, { id: delPupId })
-    }, [delPupId,])
-    /**编辑 */
-    const editFile = useCallback((e?: any,) => {
-        e?.stopPropagation()
-        onFile(null, rightClickPup, true, true)
-        // if (rightClickPup?.fileType !== 'news') {//不是图文开启编辑名字弹窗
-        let obj = { fileVisible: true, actionItem: rightClickPup, fileName: rightClickPup.title, sort: rightClickPup.sort }
-        if (rightClickPup?.fileType === 'video') {
-            obj['videoTitle'] = rightClickPup?.videoTitle || rightClickPup?.title
-            obj['videoDescription'] = rightClickPup?.videoDescription
-        }
-        set(obj)
-        // }
-    }, [rightClickPup])
-    /**取消编辑后清空选中存放的数据并关闭弹窗*/
-    const offEditFile = useCallback(() => {
-        set({ fileVisible: false, imgVisrible: false,sortVisible:false, actionItem: '', fileName: '', selectFile: selectFile?.filter(id => id !== actionItem?.id), sort: 0 })
-    }, [selectFile, actionItem])
-    /**全选反选文件*/
-    const allFile = useCallback(() => {
-        let allArr: any[] = []
-        list?.data?.records?.forEach((item: { id: any }) => {
-            allArr.push(item.id)
-        })
-        set({ selectFile: allArr.filter((i) => selectFile?.every(id => id !== i)) })
-    }, [selectFile, list])
-    /**图文素材弹窗开关 */
-    const showNews = useCallback(() => {
-
-    }, [])
-    return {
-        state,
-        init,
-        set,
-        fileOk,
-        getList,
-        dels,
-        onFile,
-        changeClickFile,
-        allFile,
-        delPupOn,
-        delPupOff,
-        editFile,
-        offEditFile,
-        nameOk,
-        fileClick,
-        treeClick,
-        pathClick,
-        knewsOk,
-        configSort,
-        addWx,
-        list,
-        add,
-        sync,
-        get,
-        edit,
-        syncId,
-        typeEnum,
-        eidtWxlists,
-        get_folder_tree,
-        edit_media_folder
-    }
-}
-export default useBdMediaPup

+ 0 - 99
src/models/useOperating/useMaterialDrawer.ts

@@ -1,99 +0,0 @@
-import { useReducer } from 'react'
-
-type State = {
-    dataArr: any[],//数据存储
-    actionId: number,//左侧当前选中
-    actionIdold?: number,//记录上一次的选中
-    mediaTagIds?: number[],//标签
-    groupId?: number,//类型
-    actionData?: any,//当前选中数据
-    tags?: any[],//重写标签
-    ueditorRef?: any,//编辑器实例
-    delIds: any[],
-    sort?: number, // 排序
-    isImport:boolean,//是否导入 为了让导入能更新,添加导入时开启,更导入后关闭
-}
-export type Action = {
-    type: 'addDataArr' | 'delDataArr' | 'action' | 'mobile' | 'get' | 'setSort' | 'pushData' | 'addTag' | 'addClass' | 'initData' | 'actionData' | 'setRef' | 'importNews' | 'overImport',
-    params?: { up: boolean, eq: number } | { menuId: number } | any
-}
-export function reducer(state: State, action: Action) {
-    let { dataArr } = state
-    let { type, params } = action
-    switch (type) {
-        case 'addDataArr':  //左侧添加
-            if (dataArr.length < 8) {
-                let id = dataArr.length + 1
-                let newDelIds = [...state.delIds]
-                if (newDelIds.length > 0) {
-                    id = state.delIds[0]
-                    newDelIds.splice(0, 1)
-                }
-                console.log('state', { ...state, dataArr: [...dataArr, { menuId: id, content: '<p></p>' }], delIds: newDelIds })
-                return { ...state, dataArr: [...dataArr, { menuId: id, content: '<p></p>' }], delIds: newDelIds }
-            }
-            return state
-        case 'delDataArr':   //左侧删除
-            if (dataArr.length > 1) {
-                return { ...state, dataArr: dataArr.filter((item: any) => item.menuId !== params.menuId), delIds: [...state.delIds, params.menuId] }
-            }
-            return { ...state, ... { dataArr: [{ menuId: 1, content: '' }], actionId: 1, mediaTagIds: [], groupId: '', actionData: null } }
-        case 'action':  //左侧选中
-            console.log({ ...state, actionIdold: state.actionId, actionId: params.menuId })
-            return { ...state, actionIdold: state.actionId, actionId: params.menuId }
-        case 'actionData':
-            console.log(params.data)
-            return { ...state, actionData: params.data }
-        case 'mobile'://左侧移动
-            let arr: any[] = []
-            dataArr.forEach((item: any, index: number) => {
-                if (index === (params.up ? params.eq - 1 : params.eq + 1)) {
-                    arr[index] = dataArr[params.eq]
-                    arr[params.eq] = dataArr[index]
-                } else if (index !== params.eq) {
-                    arr[index] = dataArr[index]
-                }
-            })
-            return { ...state, dataArr: arr }
-        case 'pushData'://插入数据
-            dataArr = dataArr.map((item: any, index: number) => {
-                if (item.menuId === params.menuId) {
-                    item = { ...item, ...params }
-                }
-                return item
-            })
-            return { ...state, dataArr }
-        case 'setSort': // 排序
-            return { ...state, sort: params.sort }
-        case 'addTag':
-            return { ...state, mediaTagIds: params.mediaTagIds }
-        case 'addClass':
-            return { ...state, groupId: params.groupId }
-        case 'initData':
-            let data = params?.data || { dataArr: [{ menuId: 1, content: '' }], actionId: 1, mediaTagIds: [], groupId: '', actionData: null, delIds: [], actionIdold: undefined, ueditorRef: null, sort: 0,isImport:false }
-            console.log('initData', { ...state, ...data })
-            return { ...state, ...data }
-        case 'importNews'://批量导入图文
-            let { actionId, dataArrs } = params.data
-            let newsarr: any[] = [...dataArr]
-            if (newsarr.length > 0) {
-                newsarr.splice(actionId - 1, dataArrs.length)
-            }
-            return { ...state, dataArr: [...newsarr, ...dataArrs],isImport:true }
-        case 'setRef':
-            return { ...state, ueditorRef: params.ueditorRef }
-        case 'overImport':
-            console.log('overImport=====>')
-            return {...state,isImport:false}    
-        default:
-            return state;
-    }
-}
-
-export default function useMaterialDrawer() {
-    const [state, dispatch] = useReducer(reducer, { dataArr: [{ menuId: 1, content: undefined }], actionId: 1, delIds: [], actionIdold: undefined, sort: 0 ,isImport:false})
-    return {
-        state,
-        dispatch
-    }
-}

+ 0 - 45
src/models/useOperating/useMaterialModal.ts

@@ -1,45 +0,0 @@
-import { useCallback, useReducer } from 'react'
-type State = {
-    visible: boolean,//弹窗开关
-    actionUrl?: string,//选中的图片
-    file?: File//上传的文件
-}
-export type Action = {
-    type: 'hide' | 'show' | 'action' | 'file',
-    params?: any
-}
-export function reducer(state: State, action: Action) {
-    let { type, params } = action
-    switch (type) {
-        case 'show':
-            return { ...state, visible: true }
-        case 'hide':
-            return { ...state, visible: false }
-        case 'action':
-            return { ...state, actionUrl: params.url }
-        case 'file':
-            return { ...state, file: params.file }
-        default:
-            return state;
-    }
-}
-
-export default function useMaterialModal() {
-    const [state, dispatch] = useReducer(reducer, { visible: false })
-    const show = useCallback(() => {
-        dispatch({ type: 'show' })
-    }, [])
-    const hide = useCallback(() => {
-        dispatch({ type: 'hide' })
-    }, [])
-    const action = useCallback((url) => {
-        dispatch({ type: 'action', params: { url } })
-    }, [])
-    return {
-        state,
-        show,
-        hide,
-        action,
-        dispatch
-    }
-}

+ 0 - 91
src/models/useOperating/useMsgMaterialDrawer.ts

@@ -1,91 +0,0 @@
-import { useReducer } from 'react'
-
-type State = {
-    dataArr: any[],//数据存储
-    actionId: number,//左侧当前选中
-    actionIdold?: number,//记录上一次的选中
-    mediaTagIds?: number[],//标签
-    groupId?: number,//类型
-    actionData?: any,//当前选中数据
-    tags?: any[],//重写标签
-    ueditorRef?: any//编辑器实例
-    AllData: any,//存放完整的图文数据
-    delIds: any[]
-}
-export type Action = {
-    type: 'addDataArr' | 'delDataArr' | 'action' | 'mobile' | 'get' | 'pushData' | 'addTag' | 'addClass' | 'initData' | 'actionData' | 'setRef' | 'AllData' | 'importNews',
-    params?: { up: boolean, eq: number } | { menuId: number } | any
-}
-export function reducer(state: State, action: Action) {
-    let { dataArr } = state
-    let { type, params } = action
-    switch (type) {
-        case 'addDataArr':  //左侧添加
-            if (dataArr.length < 8) {
-                let id = dataArr.length + 1
-                let newDelIds = [...state.delIds]
-                if (newDelIds.length > 0) {
-                    id = state.delIds[0]
-                    newDelIds.splice(0, 1)
-                }
-                return { ...state, dataArr: [...dataArr, { menuId: id }], delIds: newDelIds }
-            }
-            return state
-        case 'delDataArr':   //左侧删除
-            if (dataArr.length > 1) {
-                return { ...state, dataArr: dataArr.filter((item: any) => item.menuId !== params.menuId), delIds: [...state.delIds, params.menuId] }
-            }
-            return { ...state, ... { dataArr: [{ menuId: 1, content: '' }], actionId: 1, mediaTagIds: [], groupId: '', actionData: null } }
-        case 'action':  //左侧选中
-            return { ...state, actionIdold: state.actionId, actionId: params.menuId }
-        case 'actionData':
-            return { ...state, actionData: params.data }
-        case 'mobile'://左侧移动
-            let arr: any[] = []
-            dataArr.forEach((item: any, index: number) => {
-                if (index === (params.up ? params.eq - 1 : params.eq + 1)) {
-                    arr[index] = dataArr[params.eq]
-                    arr[params.eq] = dataArr[index]
-                } else if (index !== params.eq) {
-                    arr[index] = dataArr[index]
-                }
-            })
-            return { ...state, dataArr: arr }
-        case 'pushData'://插入数据
-            dataArr = dataArr.map((item: any, index: number) => {
-                if (item.menuId === params.menuId) {
-                    item = { ...item, ...params }
-                }
-                return item
-            })
-            return { ...state, dataArr }
-        case 'addTag':
-            return { ...state, mediaTagIds: params.mediaTagIds }
-        case 'addClass':
-            return { ...state, groupId: params.groupId }
-        case 'initData':
-            let data = params?.data || { dataArr: [{ menuId: 1 }], actionId: 1, mediaTagIds: [], groupId: '', actionData: null, delIds: [] }
-            return { ...state, ...data }
-        case 'importNews'://批量导入图文
-            let { actionId, dataArrs } = params.data
-            let newsarr: any[] = [...dataArr]
-            if (newsarr.length > 0) {
-                newsarr.splice(actionId - 1, dataArrs.length)
-            }
-            return { ...state, dataArr: [...newsarr, ...dataArrs] }
-        case 'setRef':
-            return { ...state, ueditorRef: params.ueditorRef }
-        case 'AllData':
-            return { ...state, AllData: params.AllData }
-        default:
-            return state;
-    }
-}
-
-export default function useMaterialDrawer() {
-    const [state, dispatch] = useReducer(reducer, { dataArr: [{ menuId: 1, content: undefined }], actionId: 1, delIds: [] })
-    return {
-        state,
-        dispatch
-    }
-}

+ 0 - 122
src/models/useOperating/useSynthetic.ts

@@ -1,122 +0,0 @@
-import { useAjax } from "@/Hook/useAjax"
-import { getGraphicDetail, getMedia, getWxMediaInfo } from "@/services/operating/material"
-import { message } from "antd"
-import { useCallback, useReducer } from "react"
-import { useModel } from "umi"
-
-interface State {
-    isHover: boolean,
-    fx: 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft',
-    dataArr: any[],//数据存储
-    actionId: number,//左侧当前选中
-    actionIdold?: number,//记录上一次的选中
-    delIds: any[]
-}
-interface Action {
-    type: 'isHover' | 'fx' | 'addDataArr' | 'delDataArr' | 'action' | 'actionData' | 'mobile' | 'pushData' | 'init',
-    params?: any
-}
-
-function reducer(state: State, action: Action) {
-    let { type, params } = action
-    let { dataArr } = state
-    switch (type) {
-        case 'isHover':
-            return { ...state, isHover: params.isHover }
-        case 'fx':
-            return { ...state, fx: params.fx }
-        case 'addDataArr':  //左侧添加
-            if (dataArr.length < 8) {
-                let id = dataArr.length + 1
-                let newDelIds = [...state.delIds]
-                // if (newDelIds.length > 0) {
-                //     id = state.delIds[0]
-                //     newDelIds.splice(0, 1)
-                // }
-
-                return { ...state, dataArr: [...dataArr, { menuId: id, ...params.data }], delIds: newDelIds }
-            }
-            return state
-        case 'delDataArr':   //左侧删除
-            if (dataArr.length > 0) {
-                let newArr= dataArr.filter((item: any) => item.menuId !== params.menuId).map((item:any,index:number)=>{
-                    item.menuId = index+1
-                    return item
-                })
-                return { ...state, dataArr: newArr, delIds: [...state.delIds, params.menuId] }
-            }
-            return { ...state, ... { dataArr: [], actionId: 1, mediaTagIds: [], groupId: '', actionData: null } }
-        case 'action':  //左侧选中
-            return { ...state, actionIdold: state.actionId, actionId: params.menuId }
-        case 'actionData':
-            return { ...state, actionData: params.data }
-        case 'mobile'://左侧移动
-            let arr: any[] = []
-            dataArr.forEach((item: any, index: number) => {
-                if (index === (params.up ? params.eq - 1 : params.eq + 1)) {
-                    arr[index] = dataArr[params.eq]
-                    arr[params.eq] = dataArr[index]
-                } else if (index !== params.eq) {
-                    arr[index] = dataArr[index]
-                }
-            })
-            return { ...state, dataArr: arr }
-        case 'init':
-            return { ...state, dataArr: [], delIds: [], actionId: 1 }
-        default:
-            return { ...state }
-    }
-}
-let initData = {
-    isHover: false,
-    fx: 'topRight',
-    dataArr: [],
-    actionId: 1,
-    delIds: []
-}
-
-function useSynthetic() {
-    const { actionWX }: any = useModel('useOperating.useWxGroupList', model => ({ actionWX: model.state.actionWX }))
-    const bdDetail = useAjax((params) => getMedia(params))
-    const wxDetail = useAjax((params: {id: number, isCon?: boolean}) => getWxMediaInfo(params))
-    const [state, dispatch] = useReducer(reducer, initData)
-    const addData = useCallback((data: { sysMediaId: number, id: number, mediaId: string, thumbMediaId: string, index: number, smId?: number, smType?: string ,title:string}) => {
-        if (state.dataArr.length === 8) {
-            message.error('不能超过8篇!')
-            return
-        }
-        let { smType = '本地' } = data
-        if (smType === '本地') {//本地
-            bdDetail.run(data?.sysMediaId).then((res) => {
-                let isOk = true
-                if (res) {
-                    res?.news?.forEach((item: { id: number}, index: number) => {
-                        if ((item.id === data.id || data.index === index) && isOk) {
-                            dispatch({ type: 'addDataArr', params: { data: item } })
-                            isOk = false
-                        }
-                    })
-                }else{
-                    message.error('不存在的文章')
-                }
-            })
-        } else {//微信
-            wxDetail.run({id: data.smId}).then((res) => {
-                if (res) {
-                    let isOk = true
-                    res?.news?.forEach((item: { thumbMediaId: string,title:string}, index: number) => {
-                        if (((item.thumbMediaId === data.thumbMediaId && item.title === data.title)|| data.index === index) && isOk) {
-                            dispatch({ type: 'addDataArr', params: { data: item } })
-                            isOk = false
-                        }
-                    })
-                }
-            })
-        }
-
-    }, [state, actionWX])
-
-    console.log('state.dataArr',state.dataArr)
-    return { state, dispatch, addData }
-}
-export default useSynthetic

+ 0 - 237
src/models/useOperating/useWeMenu.ts

@@ -1,237 +0,0 @@
-import { useAjax } from '@/Hook/useAjax'
-import { delMenu, editMenu, getMenu, syncMenu, syncPlatform } from '@/services/operating/weMenu'
-import { useCallback, useReducer } from 'react'
-type State = {
-    defaultMenu: any,//菜单配置
-    resMenu: any,//默认菜单配置 作比较使用
-    conditionalMenus: any[],//个性菜单
-    actionMenuId?: number,//当前选中的菜单ID
-    actionItemId?: number,//当前选中的子菜单ID
-    msgVisible: boolean,//图片,视频,音频类型弹窗
-    textVisible: boolean,//文字类型弹窗
-    graphicVisible: boolean,//图文类型弹窗
-    imgCardVisible: boolean,//小程序卡片弹窗
-    msgType: 'news' | 'text' | 'voice' | 'video' | 'image',//消息类型
-    actionWX: any,//选中微信
-    theEdit: any,//选中的数据
-    type: 'click' | 'view' | 'miniprogram',//菜单按钮类型
-    ref: any,
-    // ruleClientPlatformType: null | '1' | '2'//公众号菜单类型1:IOS 2安卓 NULL默认
-    addMenuType: '0' | '1' | '2',//新增类型菜单
-    isSaver: boolean//是否保存
-    isUserId: any//是否在路径中插入userID  1|0
-}
-export type Action = {
-    type: 'addMenu' | 'moveAddMenu' | 'addMenuItem' | 'moveAddMenuItem' | 'actionMenuId'
-    | 'actionItemId' | 'msgType' | 'msgVisible' |
-    'textVisible' | 'graphicVisible' | 'theEdit' |
-    'setMenuType' | 'initData' | 'delMenu' |
-    'setName' | 'defaultData' | 'setRef' | 'pushData' | 'isSaver' | 'init' |
-    'addConditionalMenus' | 'addMenuType' | 'ruleClientPlatformType' | 'imgCardVisible' | 'isUserId'
-    params?: any
-}
-export function reducer(state: State, action: Action) {
-    let { type, params } = action
-    let { actionMenuId, actionItemId } = state
-    let newMenu: any = {}
-    switch (type) {
-        case 'moveAddMenu':
-            return { ...state, defaultMenu: params.defaultMenu }
-        case 'actionMenuId'://选中的菜单当选中菜单ID把子菜单选中ID设为0,为了配合选中效果逻辑
-            return { ...state, actionMenuId: params.actionMenuId, actionItemId: 0, }
-        case 'actionItemId'://选中的菜单子菜单
-            return { ...state, actionItemId: params.actionItemId, }
-        case 'addMenu'://添加菜单
-            newMenu = JSON.parse(JSON.stringify(state.defaultMenu))
-            if (newMenu?.buttons?.length < 4) {
-                //假如subMenus的长度大于0,那么已存至少一个菜单,那新增的菜单menuId就按第一个菜单的menuId+1 否则就是第一次添加
-                newMenu?.buttons?.push({ menuId: newMenu?.buttons?.length > 0 ? newMenu?.buttons[newMenu?.buttons?.length - 1].menuId + 1 : 1, subButtons: [], type: 'click' })
-                state.actionMenuId = newMenu?.buttons?.length > 0 ? newMenu?.buttons[newMenu?.buttons?.length - 1].menuId : 1
-            }
-            return { ...state, defaultMenu: newMenu, isSaver: false }
-        case 'addMenuItem'://添加子菜单
-            newMenu = JSON.parse(JSON.stringify(state.defaultMenu))
-            let itemArr: any = [];
-            newMenu?.buttons?.map((item: any) => {//遍历菜单查找菜单ID是否等于选中的菜单ID,是就把当前菜单的子菜单数组赋值给变量itemArr
-                if (item.menuId === state.actionMenuId) {
-                    itemArr = item.subButtons
-                }
-            })
-            if (itemArr.length < 6) {//假如itemArr的长度小于6证明不满5个可以添加子菜单,子菜单的ID等于菜单长度+1
-                //假如itemArr的长度大于0,那么已存至少一个子菜单,那新增的子菜单itemId就按第一个菜单的itemId+1 否则就是第一次添加
-                itemArr.push({ itemId: itemArr.length > 0 ? itemArr[itemArr.length - 1].itemId + 1 : 1, type: 'click' })
-                state.actionItemId = itemArr.length > 0 ? itemArr[itemArr.length - 1].itemId : 1
-            }
-            newMenu?.buttons?.forEach((item: any) => {//最后将编辑后的itemArr数组放回当前选中的菜单中,返回整个state页面监听到参数有改动重新渲染
-                if (item.menuId === state.actionMenuId) {
-                    //添加子菜单清空父菜单多余内容
-                    item.subButtons = itemArr
-                    item.url = ''
-                    item.appId = ''
-                    item.pagePath = ''
-                    item.menuType = ''
-                    item.msgContent = {}
-                }
-            })
-            return { ...state, defaultMenu: newMenu, isSaver: false }
-
-        case 'delMenu':
-            let { menuId, itemId } = params
-            newMenu = JSON.parse(JSON.stringify(state.defaultMenu))
-            if (menuId && !itemId) {//menuId存在,itemId不存在删除主菜单 
-                newMenu.buttons = newMenu?.buttons?.filter((item: any) => {
-                    if (item.menuId !== menuId) {
-                        return item
-                    }
-                })
-                //处理menuId不然选中会错乱
-                newMenu.buttons = newMenu?.buttons?.map((item: any, index: number) => {
-                    item.menuId = index + 1
-                    return item
-                })
-                //删除主菜单清除选中的主菜单ID
-                newMenu = { actionMenuId: menuId && !itemId ? 0 : actionMenuId, defaultMenu: newMenu }
-            }
-            if (menuId && itemId) { //menuId, itemId 都存在删除子菜单
-                newMenu.buttons = newMenu?.buttons?.map((item: any) => {
-                    if (item.menuId === menuId) {//遍历菜单数组查找当前选中的主菜单
-                        item.subButtons = item.subButtons.filter((items: any) => {//筛选子菜单
-                            if (items.itemId !== itemId) {
-                                return items
-                            }
-                        })
-                        if (item.subButtons.length === 0) {//假如删完了子菜单给父菜单添加type
-                            item.type = 'click'
-                        }
-                        return item
-                    }
-                    return item
-                })
-                //删除子菜单清除选中的子菜单ID归0选中调回主菜单
-                newMenu = { actionMenuId: actionMenuId, actionItemId: 0, defaultMenu: newMenu }
-            }
-            return { ...state, ...newMenu, isSaver: JSON.stringify(state.resMenu) === JSON.stringify(newMenu.defaultMenu) }
-        case 'msgType':
-            return { ...state, msgType: params.msgType }
-        case 'setMenuType':
-            return { ...state, menuType: params.menuType }
-        case 'msgVisible':
-            return { ...state, msgVisible: !state.msgVisible }
-        case 'textVisible':
-            return { ...state, textVisible: !state.textVisible }
-        case 'graphicVisible':
-            return { ...state, graphicVisible: !state.graphicVisible }
-        case 'imgCardVisible':
-            return { ...state, imgCardVisible: !state.imgCardVisible }
-        case 'theEdit':
-            return { ...state, theEdit: params.theEdit }
-        case 'addConditionalMenus':
-            let conditionalMenus
-            if(params?.ruleClientPlatformType === 0){
-                conditionalMenus = [...state.conditionalMenus, { buttons: [] }]
-            }else{
-                conditionalMenus = state.conditionalMenus.length < 3 ? [...state.conditionalMenus, { buttons: [], ruleClientPlatformType: params.ruleClientPlatformType }] : state.conditionalMenus
-            }
-            return { ...state, conditionalMenus }
-        case 'addMenuType':
-            return { ...state, addMenuType: params.addMenuType }
-        case 'ruleClientPlatformType':
-            return { ...state, defaultMenu: { ...state.defaultMenu, ruleClientPlatformType: params.ruleClientPlatformType }, isSaver: false }
-        case 'isUserId':
-            return { ...state, isUserId: params.isUserId }
-        case 'pushData':
-            newMenu = JSON.parse(JSON.stringify(state.defaultMenu))
-            Object.keys(params).forEach((key: string) => {
-                newMenu?.buttons?.map((item: any) => {
-                    if (actionMenuId && !actionItemId) {
-                        if (item.menuId === actionMenuId) {
-                            if (key === 'msgType') {
-                                item.msgContent[key] = params[key]
-                            } else {
-                                item[key] = params[key]
-                            }
-                        }
-                    }
-                    if (actionMenuId && actionItemId && item?.subButtons?.length > 0) {
-                        if (item.menuId === actionMenuId) {
-                            item.subButtons.map((button: any) => {
-                                if (button.itemId === actionItemId) {
-                                    if (key === 'msgType') {
-                                    } else {
-                                        button[key] = params[key]
-                                    }
-                                }
-                            })
-                        }
-                    }
-                })
-            })
-            return { ...state, defaultMenu: newMenu, isSaver: false }
-        case 'initData'://清空内容
-            return { ...initData, defaultMenu: state.defaultMenu, actionItemId, actionMenuId, conditionalMenus: state.conditionalMenus, resMenu: state.resMenu, addMenuType: state.addMenuType }
-        case 'defaultData'://回填接口获取的菜单
-            return { ...initData, conditionalMenus: params.conditionalMenus, defaultMenu: params.defaultMenu, resMenu: params.resMenu }
-        case 'init':
-            return { ...initData }
-        case 'setRef':
-            return { ...state, ref: params.ref }
-        case 'isSaver':
-            return { ...state, isSaver: true }
-        default:
-            return state;
-    }
-}
-let initData: State = {
-    defaultMenu: { ruleClientPlatformType: null, buttons: [] },
-    resMenu: {},
-    conditionalMenus: [],
-    msgType: 'news',
-    msgVisible: false,
-    textVisible: false,
-    graphicVisible: false,
-    theEdit: null,
-    actionWX: null,
-    type: 'click',
-    ref: null,
-    addMenuType: '0',
-    isSaver: true,
-    imgCardVisible: false,
-    isUserId: 1
-
-}
-export default function useWeMenu() {
-    const [state, dispatch] = useReducer(reducer, initData)
-    const getMenus = useAjax((params: { mpId: string }) => getMenu(params))
-    const delMenus = useAjax((params: { menuId: string }) => delMenu(params), { msgNmae: '删除' })
-    const editMenus = useAjax((params: any) => editMenu(params), { msgNmae: '编辑' })
-    const syncMenus = useAjax((params: { mpId: string }) => syncMenu(params), { msgNmae: '同步' })
-    const syncPlatforms = useAjax((params: { platform: string, menuId: string }) => syncPlatform(params), { msgNmae: '同步' })
-    const addMenu = useCallback(() => {
-        console.log('11111')
-        dispatch({ type: 'initData' })//清空数据初始化只保留已编辑的菜单
-        dispatch({ type: 'addMenu' })
-    }, [])
-    const setMenuId = useCallback((actionMenuId: number) => {
-        dispatch({ type: 'actionMenuId', params: { actionMenuId } })
-    }, [])
-    const setItemId = useCallback((actionItemId: number) => {
-        dispatch({ type: 'actionItemId', params: { actionItemId } })
-    }, [])
-    const addMenuItem = useCallback(() => {
-        dispatch({ type: 'initData' })//清空数据初始化只保留已编辑的数组
-        dispatch({ type: 'addMenuItem' }) //添加一级菜单
-    }, [])
-    return {
-        state,
-        addMenu,
-        setMenuId,
-        setItemId,
-        addMenuItem,
-        getMenus,
-        delMenus,
-        editMenus,
-        syncMenus,
-        dispatch,
-        syncPlatforms
-    }
-}

+ 0 - 11
src/models/useOperating/useWxGroupList.ts

@@ -1,7 +1,6 @@
 import { useCallback, useEffect, useReducer } from 'react';
 import { getAllZhMemBerApi } from '@/services/operating/account';
 import { useAjax } from '@/Hook/useAjax';
-import { getWxlist } from '@/services/operating/material';
 import { history } from 'umi';
 import { Modal } from 'antd';
 import { getVersions } from '@/services/login';
@@ -76,7 +75,6 @@ export function weChatReducer(state: State, action: Action) {
 export default function useWxGroupList() {
   const getAllZhMemBer = useAjax(() => getAllZhMemBerApi()); //获取账户下属公众号
   const getversions = useAjax(() => getVersions()); //获取版本号
-  const getWxlists = useAjax((id) => getWxlist(id));
   const [state, dispatch] = useReducer(weChatReducer, {
     tabsKey: '自己',
     tabsKey1: '自己',
@@ -87,15 +85,9 @@ export default function useWxGroupList() {
     selectWx: [],
   });
   let versionsInterval: NodeJS.Timeout | null = null;
-  const actionWx = useCallback((wx: any) => {
-    dispatch({ type: 'actionWX', params: { actionWX: wx } });
-  }, []);
   const actionMp = useCallback((mpAccounts: any[]) => {
     dispatch({ type: 'mpAccounts', params: { mpAccounts: mpAccounts?.filter(m => !!m) } });
   }, []);
-  const initSelectWx = () => {
-    dispatch({ type: 'selectWx', params: { selectWx: [] } });
-  };
   //首次获取列表
   useEffect(() => {
     let ok: any = true;
@@ -202,12 +194,9 @@ export default function useWxGroupList() {
   }, [state.allWx, state.groupAllWx]);
   return {
     state,
-    actionWx,
     actionMp,
     getAllZhMemBer,
     dispatch,
-    initSelectWx,
-    getWxlists,
     getversions,
   };
 }

+ 1 - 0
src/pages/gameDataStatistics/allSurvey/index.less

@@ -91,6 +91,7 @@
         }
     }
 }
+
 .lineC {
     width: 100%;
     min-height: 360px;

+ 134 - 123
src/pages/gameDataStatistics/allSurvey/index.tsx

@@ -1,11 +1,15 @@
 import { AccountBookOutlined, AppstoreOutlined, BuildOutlined, LeftOutlined, MoneyCollectOutlined, RightOutlined, TransactionOutlined, UsergroupAddOutlined } from "@ant-design/icons";
 import { useHover, useScroll, useSize } from "ahooks";
-import { Button, Card, Form, Select, Space, Statistic } from "antd"
+import { Button, Card, Space, Spin, Statistic } from "antd"
 import React, { useEffect, useRef, useState } from "react"
 import style from './index.less'
 import LineC from "./lineC";
 import { AllSurveyTotalDataProps, getAllSurveyTotalDataApi } from "@/services/gameData/allSurvey";
 import { useAjax } from "@/Hook/useAjax";
+import QueryForm from "@/components/QueryForm";
+import moment from "moment";
+
+
 const AllSurvey: React.FC = () => {
 
     /* ==================== */
@@ -24,12 +28,10 @@ const AllSurvey: React.FC = () => {
     const [rightShow, setRightShow] = useState<boolean>(false)
     const [isPass, setIsPass] = useState<boolean>(false)  // 容器是否大于内容宽度
     const [queryForm, setQueryForm] = useState<AllSurveyTotalDataProps>({})
-
-    const [form] = Form.useForm();
+    const [totalData, setTotalData] = useState<any>({})
     /* ==================== */
 
     const getAllSurveyTotalData = useAjax((params) => getAllSurveyTotalDataApi(params))
-    // console.log('size3---->', size3);
 
     // 处理左右按钮隐藏 显示
     useEffect(() => {
@@ -72,158 +74,167 @@ const AllSurvey: React.FC = () => {
     }
 
     useEffect(() => {
-        getAllSurveyTotalData.run(queryForm)
+        getAllSurveyTotalData.run(queryForm).then(() => {
+            setTotalData(totalData)
+        })
     }, [queryForm])
 
+
     return <div className={style.allSurver}>
         <Space direction="vertical" style={{ width: '100%' }}>
             <div ref={ref3}>
                 <Card bordered={false} bodyStyle={{ padding: '12px 24px' }}>
-                    <Form layout="inline" form={form}>
-                        <Form.Item label="项目组" name="group">
-                            <Select style={{ width: 150 }} placeholder='请选择项目组'>
-                                <Select.Option value="jack">组1</Select.Option>
-                                <Select.Option value="lucy">组2</Select.Option>
-                            </Select>
-                        </Form.Item>
-                        <Form.Item label="投手" name="pitcher">
-                            <Select style={{ width: 150 }} placeholder='请选择投手'>
-                                <Select.Option value="jack">投手1</Select.Option>
-                                <Select.Option value="lucy">投手2</Select.Option>
-                            </Select>
-                        </Form.Item>
-                        <Form.Item label="期数" name="periods">
-                            <Select style={{ width: 150 }} placeholder='请选择期数'>
-                                <Select.Option value="jack">期数1</Select.Option>
-                                <Select.Option value="lucy">期数2</Select.Option>
-                            </Select>
-                        </Form.Item>
-                    </Form>
+                    <QueryForm
+                        onChange={(data: any) => {
+                            console.log(data)
+                            const { beginDay } = data
+                            let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                            newQueryForm.pageNum = 1
+                            if (beginDay && beginDay?.length === 2) {
+                                newQueryForm['beginDate'] = moment(beginDay[0]).format('YYYY-MM-DD')
+                                newQueryForm['endDate'] = moment(beginDay[0]).format('YYYY-MM-DD')
+                            } else {
+                                delete newQueryForm['beginDate']
+                                delete newQueryForm['endDate']
+                            }
+                            setQueryForm(newQueryForm)
+                        }}
+                        isAccountId
+                        isGameId
+                        isSysUserId
+                        isAgentId
+                        isBeginDay
+                    />
                 </Card>
             </div>
-            <div className={style.overviewC}>
-                <div className={style.left}><Button type="primary" ref={ref1} style={{ opacity: leftShow ? 1 : 0 }} onClick={() => aboutHandle('left')} shape="circle" icon={<LeftOutlined />} /></div>
-                <div className={style.right}><Button type="primary" ref={ref2} style={{ opacity: rightShow ? 1 : 0 }} onClick={() => aboutHandle('right')} shape="circle" icon={<RightOutlined />} /></div>
-                <div className={style.overviews} ref={ref}>
-                    <div style={{ width: isPass ? '100%' : 1960 }}>
-                        <Card bordered={false} style={{ width: 320 }}>
-                            <div className={style.overview}>
-                                <div className={style.left}>
-                                    <UsergroupAddOutlined style={{ fontSize: 24 }} />
-                                    <div>玩家</div>
-                                </div>
-                                <div className={style.right}>
-                                    <div className={style.top}>
-                                        总计:<Statistic value={112893} valueStyle={{ fontSize: 20, fontWeight: 600 }} />
+            <Spin spinning={getAllSurveyTotalData.loading}>
+                <div className={style.overviewC}>
+                    <div className={style.left}><Button type="primary" ref={ref1} style={{ opacity: leftShow ? 1 : 0 }} onClick={() => aboutHandle('left')} shape="circle" icon={<LeftOutlined />} /></div>
+                    <div className={style.right}><Button type="primary" ref={ref2} style={{ opacity: rightShow ? 1 : 0 }} onClick={() => aboutHandle('right')} shape="circle" icon={<RightOutlined />} /></div>
+                    <div className={style.overviews} ref={ref}>
+
+                        <div style={{ width: isPass ? '100%' : 1960 }}>
+
+                            <Card bordered={false} style={{ width: 320 }}>
+                                <div className={style.overview}>
+                                    <div className={style.left}>
+                                        <UsergroupAddOutlined style={{ fontSize: 24 }} />
+                                        <div>玩家</div>
                                     </div>
-                                    <div className={style.bottom}>
-                                        <div>昨日:<Statistic value={6244} /></div>
-                                        <div>今日:<Statistic value={123} /></div>
+                                    <div className={style.right}>
+                                        <div className={style.top}>
+                                            总计:<Statistic value={totalData?.totalPlayers || 0} valueStyle={{ fontSize: 20, fontWeight: 600 }} />
+                                        </div>
+                                        <div className={style.bottom}>
+                                            <div>昨日:<Statistic value={totalData?.yesterdayPlayerCount || 0} /></div>
+                                            <div>今日:<Statistic value={totalData?.todayPlayerCount || 0} /></div>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                        </Card>
-                        <Card bordered={false} style={{ width: 320 }}>
-                            <div className={style.overview}>
-                                <div className={style.left} style={{ backgroundColor: '#36a3f7' }}>
-                                    <TransactionOutlined style={{ fontSize: 24 }} />
-                                    <div>消耗</div>
-                                </div>
-                                <div className={style.right}>
-                                    <div className={style.top} style={{ borderColor: '#36a3f7' }}>
-                                        总计:<Statistic value={11289345} valueStyle={{ fontSize: 20, fontWeight: 600 }} />
+                            </Card>
+                            <Card bordered={false} style={{ width: 320 }}>
+                                <div className={style.overview}>
+                                    <div className={style.left} style={{ backgroundColor: '#36a3f7' }}>
+                                        <TransactionOutlined style={{ fontSize: 24 }} />
+                                        <div>消耗</div>
                                     </div>
-                                    <div className={style.bottom}>
-                                        <div>昨日:<Statistic value={4567} /></div>
-                                        <div>今日:<Statistic value={1534} /></div>
+                                    <div className={style.right}>
+                                        <div className={style.top} style={{ borderColor: '#36a3f7' }}>
+                                            总计:<Statistic value={totalData?.totalCost || 0} valueStyle={{ fontSize: 20, fontWeight: 600 }} />
+                                        </div>
+                                        <div className={style.bottom}>
+                                            <div>昨日:<Statistic value={totalData?.yesterdayTotalCost || 0} /></div>
+                                            <div>今日:<Statistic value={totalData?.todayTotalCost || 0} /></div>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                        </Card>
-                        <Card bordered={false} style={{ width: 320 }}>
-                            <div className={style.overview}>
-                                <div className={style.left} style={{ backgroundColor: '#f4516c' }}>
-                                    <MoneyCollectOutlined style={{ fontSize: 24 }} />
-                                    <div>充值</div>
-                                </div>
-                                <div className={style.right}>
-                                    <div className={style.top} style={{ borderColor: '#f4516c' }}>
-                                        总计:<Statistic value={1120893} valueStyle={{ fontSize: 20, fontWeight: 600 }} />
+                            </Card>
+                            <Card bordered={false} style={{ width: 320 }}>
+                                <div className={style.overview}>
+                                    <div className={style.left} style={{ backgroundColor: '#f4516c' }}>
+                                        <MoneyCollectOutlined style={{ fontSize: 24 }} />
+                                        <div>充值</div>
                                     </div>
-                                    <div className={style.bottom}>
-                                        <div style={{ justifyContent: 'space-between' }}>
-                                            <div>昨账:<Statistic value={62244} /></div>
-                                            <div>昨新:<Statistic value={45000} /></div>
+                                    <div className={style.right}>
+                                        <div className={style.top} style={{ borderColor: '#f4516c' }}>
+                                            总计:<Statistic value={totalData?.totalAmount || 0} valueStyle={{ fontSize: 20, fontWeight: 600 }} />
                                         </div>
-                                        <div style={{ justifyContent: 'space-between', flex: 1 }}>
-                                            <div>今账:<Statistic value={2325} /></div>
-                                            <div>今新:<Statistic value={1230} /></div>
+                                        <div className={style.bottom}>
+                                            <div style={{ justifyContent: 'space-between' }}>
+                                                <div>昨账:<Statistic value={totalData?.yesterdayAmount || 0} /></div>
+                                                <div>昨新:<Statistic value={totalData?.yesterdayNewPlayerAmount || 0} /></div>
+                                            </div>
+                                            <div style={{ justifyContent: 'space-between', flex: 1 }}>
+                                                <div>今账:<Statistic value={totalData?.todayAmount || 0} /></div>
+                                                <div>今新:<Statistic value={totalData?.todayNewPlayerAmount || 0} /></div>
+                                            </div>
                                         </div>
                                     </div>
                                 </div>
-                            </div>
-                        </Card>
-                        <Card bordered={false} style={{ width: 320 }}>
-                            <div className={style.overview}>
-                                <div className={style.left} style={{ backgroundColor: '#52c41a' }}>
-                                    <AppstoreOutlined style={{ fontSize: 24 }} />
-                                    <div>渠道</div>
-                                </div>
-                                <div className={style.right}>
-                                    <div className={style.top} style={{ borderColor: '#52c41a' }}>
-                                        总计:<Statistic value={1128} valueStyle={{ fontSize: 20, fontWeight: 600 }} />
+                            </Card>
+                            <Card bordered={false} style={{ width: 320 }}>
+                                <div className={style.overview}>
+                                    <div className={style.left} style={{ backgroundColor: '#52c41a' }}>
+                                        <AppstoreOutlined style={{ fontSize: 24 }} />
+                                        <div>渠道</div>
                                     </div>
-                                    <div className={style.bottom}>
-                                        <div>昨日:<Statistic value={23} /></div>
-                                        <div>今日:<Statistic value={1} /></div>
+                                    <div className={style.right}>
+                                        <div className={style.top} style={{ borderColor: '#52c41a' }}>
+                                            总计:<Statistic value={totalData?.totalAgentCount || 0} valueStyle={{ fontSize: 20, fontWeight: 600 }} />
+                                        </div>
+                                        <div className={style.bottom}>
+                                            <div>昨日:<Statistic value={totalData?.yesterdayAgentCount || 0} /></div>
+                                            <div>今日:<Statistic value={totalData?.todayAgentCount || 0} /></div>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                        </Card>
-                        <Card bordered={false} style={{ width: 320 }}>
-                            <div className={style.overview}>
-                                <div className={style.left} style={{ backgroundColor: '#597ef7' }}>
-                                    <BuildOutlined style={{ fontSize: 24 }} />
-                                    <div>游戏</div>
-                                </div>
-                                <div className={style.right}>
-                                    <div className={style.top} style={{ borderColor: '#597ef7' }}>
-                                        总计:<Statistic value={1128} valueStyle={{ fontSize: 20, fontWeight: 600 }} />
+                            </Card>
+                            <Card bordered={false} style={{ width: 320 }}>
+                                <div className={style.overview}>
+                                    <div className={style.left} style={{ backgroundColor: '#597ef7' }}>
+                                        <BuildOutlined style={{ fontSize: 24 }} />
+                                        <div>游戏</div>
                                     </div>
-                                    <div className={style.bottom}>
-                                        <div>昨日:<Statistic value={23} /></div>
-                                        <div>今日:<Statistic value={1} /></div>
+                                    <div className={style.right}>
+                                        <div className={style.top} style={{ borderColor: '#597ef7' }}>
+                                            总计:<Statistic value={totalData?.totalGameCount || 0} valueStyle={{ fontSize: 20, fontWeight: 600 }} />
+                                        </div>
+                                        <div className={style.bottom}>
+                                            <div>昨日:<Statistic value={totalData?.yesterdayGameCount || 0} /></div>
+                                            <div>今日:<Statistic value={totalData?.todayGameCount || 0} /></div>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                        </Card>
-                        <Card bordered={false} style={{ width: 320 }}>
-                            <div className={style.overview}>
-                                <div className={style.left} style={{ backgroundColor: '#9254de' }}>
-                                    <AccountBookOutlined style={{ fontSize: 24 }} />
-                                    <div>回本</div>
-                                </div>
-                                <div className={style.right}>
-                                    <div className={style.top} style={{ borderColor: '#9254de' }}>
-                                        总回:<Statistic value={223} valueStyle={{ fontSize: 20, fontWeight: 600, color: 'red' }} suffix="%" />
+                            </Card>
+                            <Card bordered={false} style={{ width: 320 }}>
+                                <div className={style.overview}>
+                                    <div className={style.left} style={{ backgroundColor: '#9254de' }}>
+                                        <AccountBookOutlined style={{ fontSize: 24 }} />
+                                        <div>回本</div>
                                     </div>
-                                    <div className={style.bottom}>
-                                        <div style={{ justifyContent: 'space-between' }}>
-                                            <div>首日:<Statistic value={10} suffix="%" /></div>
-                                            <div>7天:<Statistic value={20} suffix="%" /></div>
+                                    <div className={style.right}>
+                                        <div className={style.top} style={{ borderColor: '#9254de' }}>
+                                            总回:<Statistic value={totalData?.totalRoi || 0} valueStyle={{ fontSize: 20, fontWeight: 600, color: 'red' }} suffix="%" />
                                         </div>
-                                        <div style={{ justifyContent: 'space-between', flex: 1 }}>
-                                            <div>30天:<Statistic value={50} suffix="%" /></div>
+                                        <div className={style.bottom}>
+                                            <div style={{ justifyContent: 'space-between' }}>
+                                                <div>首日:<Statistic value={totalData?.firstRoi || 0} suffix="%" /></div>
+                                                <div>7天:<Statistic value={totalData?.d7TotalRoi || 0} suffix="%" /></div>
+                                            </div>
+                                            <div style={{ justifyContent: 'space-between', flex: 1 }}>
+                                                <div>30天:<Statistic value={totalData?.d30TotalRoi || 0} suffix="%" /></div>
+                                            </div>
                                         </div>
                                     </div>
                                 </div>
-                            </div>
-                        </Card>
+                            </Card>
+                        </div>
                     </div>
                 </div>
-            </div>
+            </Spin>
+
         </Space>
-        <LineC height={size3.height || 0} />
+        <LineC height={size3.height || 0} queryForm={queryForm} />
     </div>
 }
 

+ 9 - 0
src/pages/gameDataStatistics/allSurvey/index1.less

@@ -0,0 +1,9 @@
+.spin_100 {
+    width: 100%;
+    height: 100%;
+
+    >div.ant-spin-container {
+        width: 100%;
+        height: 100%;
+    }
+}

+ 50 - 42
src/pages/gameDataStatistics/allSurvey/lineC.tsx

@@ -1,11 +1,14 @@
 import useEcharts from "@/Hook/useEcharts"
-import { useSize } from "ahooks"
-import { Card, Radio } from "antd"
-import React, { useRef } from "react"
+import { Card, Radio, Spin } from "antd"
+import React, { useEffect, useRef, useState } from "react"
 import style from './index.less'
+import './index1.less'
+import { AllSurveyTotalDataProps, getAllSurveyLineDataApi } from "@/services/gameData/allSurvey"
+import { useAjax } from "@/Hook/useAjax"
 
 interface Props {
     height: number
+    queryForm: AllSurveyTotalDataProps
 }
 /**
  * 线图
@@ -14,52 +17,57 @@ interface Props {
 const LineC: React.FC<Props> = (props) => {
 
     /******************/
-    const { height = 0 } = props
+    const { height = 0, queryForm } = props
     const { LineMonitor } = useEcharts()
     const ref = useRef(null);
-    const size = useSize(ref);
+    const [type, setType] = useState<string>('a')
+    const [data, setData] = useState<any>({})
     /******************/
 
+    const getAllSurveyLineData = useAjax((params) => getAllSurveyLineDataApi(params))
+
+    useEffect(() => {
+        getAllSurveyLineData.run(queryForm).then(res => {
+            let a1Data: any = { legendName: '消耗' }
+            let a2Data: any = { legendName: '充值' }
+            let b1Data: any = { legendName: '买量充值' }
+            let b2Data: any = { legendName: '自然量充值' }
+            let cData: any = { legendName: '首日ROI' }
+            let d1Data: any = { legendName: '新增用户' }
+            res?.forEach((item: { amount: number, buyAmount: number, cost: number, dt: string, firstRoi: number, natureAmount: number, playerAccount: number }) => {
+                a1Data[item.dt] = item?.cost || 0
+                a2Data[item.dt] = item?.amount || 0
+                b1Data[item.dt] = item?.buyAmount || 0
+                b2Data[item.dt] = item?.natureAmount || 0
+                cData[item.dt] = item?.firstRoi || 0
+                d1Data[item.dt] = item?.playerAccount || 0
+            })
+            setData({
+                a: [a1Data, a2Data],
+                b: [b1Data, b2Data],
+                c: [cData],
+                d: [d1Data]
+            })
+        })
+    }, [queryForm, type])
 
     return <div className={style.lineCont} ref={ref} style={{ height: `calc(100% - ${145.43 + height}px)` }}>
-        <Card
-            style={{ width: '100%', height: '100%' }}
-            title={<Radio.Group defaultValue="a" buttonStyle="solid">
-                <Radio.Button value="a">消耗&充值</Radio.Button>
-                <Radio.Button value="b">买量充值&自然量充值</Radio.Button>
-                <Radio.Button value="c">首日ROI</Radio.Button>
-                <Radio.Button value="d">新增用户&创角人数</Radio.Button>
-            </Radio.Group>}
-            bodyStyle={{ padding: '0 0 24px', height: 'calc(100% - 68px)' }}
-        >
-            <LineMonitor style={{ width: '100%', height: '100%' }} series smooth data={[
-                { legendName: '消耗', 2021: 1001, 2022: 30, 2023: 403, 2024: 204, 2025: 130, 2026: 60, 2027: 100, 2028: 30, 2029: 420, 2030: 230, 2031: 110, 2032: 260, 2033: 420, 2034: 1011, 2035: 60, 2036: 20, 2037: 10, 2038: 60, 2039: 20, 2040: 10, 2041: 60, 2042: 160, 2043: 520, 2044: 610, 2045: 601 },
-                { legendName: '充值', 2021: 340, 2022: 309, 2023: 220, 2024: 526, 2025: 840, 2026: 91, 2027: 100, 2028: 30, 2029: 432, 2030: 211, 2031: 1110, 2032: 350, 2033: 520, 2034: 430, 2035: 61, 2036: 120, 2037: 210, 2038: 160, 2039: 320, 2040: 210, 2041: 160, 2042: 160, 2043: 520, 2044: 610, 2045: 611 }
-            ]} />
-        </Card>
+        <Spin wrapperClassName={'spin_100'} spinning={getAllSurveyLineData.loading}>
+            <Card
+                style={{ width: '100%', height: '100%' }}
+                title={<Radio.Group value={type} buttonStyle="solid" onChange={(e) => setType(e.target.value)}>
+                    <Radio.Button value="a">消耗&充值</Radio.Button>
+                    <Radio.Button value="b">买量充值&自然量充值</Radio.Button>
+                    <Radio.Button value="c">首日ROI</Radio.Button>
+                    <Radio.Button value="d">新增用户&创角人数</Radio.Button>
+                </Radio.Group>}
+                bodyStyle={{ padding: '0 0 24px', height: 'calc(100% - 68px)' }}
+            >
+                <LineMonitor style={{ width: '100%', height: '100%' }} series smooth data={data[type]} />
+            </Card>
+        </Spin>
+
     </div>
-    // <Row gutter={[8, 8]}>
-    //     <Col span={12}><Card hoverable>
-    //         <div className={style.lineC}>
-    //             <LineMonitor style={{ width: '100%', height: '360px' }} series smooth data={[{ legendName: '消耗', 2021: 100, 2022: 30, 2023: 40, 2024: 20, 2025: 10, 2026: 60 }, { legendName: '充值', 2021: 140, 2022: 30, 2023: 20, 2024: 56, 2025: 80, 2026: 91 }]} />
-    //         </div>
-    //     </Card></Col>
-    //     <Col span={12}><Card hoverable>
-    //         <div className={style.lineC}>
-    //             <LineMonitor style={{ width: '100%', height: '360px' }} series smooth data={[{ legendName: '买量充值', 2021: 105, 2022: 310, 2023: 400, 2024: 220, 2025: 410, 2026: 600 }, { legendName: '自然量充值', 2021: 564, 2022: 125, 2023: 496, 2024: 84, 2025: 96, 2026: 785 }]} />
-    //         </div>
-    //     </Card></Col>
-    //     <Col span={12}><Card hoverable>
-    //         <div className={style.lineC}>
-    //             <LineMonitor style={{ width: '100%', height: '360px' }} series smooth data={[{ legendName: '首日ROI', 2021: 10, 2022: 30, 2023: 40, 2024: 20, 2025: 10, 2026: 60 }]} title={'首日ROI'} />
-    //         </div>
-    //     </Card></Col>
-    //     <Col span={12}><Card hoverable>
-    //         <div className={style.lineC}>
-    //             <LineMonitor style={{ width: '100%', height: '360px' }} series smooth data={[{ legendName: '新增人数', 2021: 120, 2022: 30, 2023: 340, 2024: 120, 2025: 102, 2026: 60 }, { legendName: '创角人数', 2021: 100, 2022: 105, 2023: 90, 2024: 210, 2025: 300, 2026: 60 }]} />
-    //         </div>
-    //     </Card></Col>
-    // </Row>
 }
 
 export default React.memo(LineC)

+ 19 - 6
src/pages/gameDataStatistics/components/TableData/index.tsx

@@ -37,13 +37,14 @@ interface Prosp {
         left: number,
         right: number
     },
+    totalData?: any[]
     summary?: ((data: readonly any[]) => React.ReactNode)
 }
 
 function TableData(props: Prosp) {
 
     /*************************/
-    const { isZj, scroll, title, dataSource, expandedRowRender, className, leftChild, page = undefined, pageSize = undefined, size = 'small', total = 0, onChange, config, configName, ajax, fixed = { left: 0, right: 1 }, summary } = props
+    const { isZj, totalData, scroll, title, dataSource, expandedRowRender, className, leftChild, page = undefined, pageSize = undefined, size = 'small', total = 0, onChange, config, configName, ajax, fixed = { left: 0, right: 1 }, summary } = props
     const [visible, setVisible] = useState<boolean>(false)
     const [isFullscreen, setIsFullscreen] = useState<boolean>(true)
     const [oldSelectData, setoldSelectData] = useState<any[]>([])
@@ -114,7 +115,7 @@ function TableData(props: Prosp) {
             oldName.current = configName
         }
     }, [selectData, oldSelectData, dataSource, oldFixed, configName, config, timer])
-
+    console.log('columns12()---->', newColumns)
     //拖动宽度设置设置保存
     const handelResize = useCallback((columns: any) => {
         if (configName) {
@@ -125,7 +126,7 @@ function TableData(props: Prosp) {
             localStorage.setItem(`myAdMonitorConfig${version}_` + configName, JSON.stringify(newSelectData))
         }
     }, [configName, selectData])
-    
+
     const header = <Col span={24}>
         <Row gutter={[0, 10]} align='bottom'>
             <Col flex='1 1 150px'>
@@ -173,12 +174,12 @@ function TableData(props: Prosp) {
         <Col span={24}>
             <Card
                 hoverable
-                title={<div style={{ textAlign: 'center', color: '#1890ff', fontWeight: 'bold' }}>{title}</div>}
+                title={<div style={{ textAlign: 'center', fontWeight: 'bold' }}>{title}</div>}
                 headStyle={{ textAlign: 'left' }}
             >
                 <Row gutter={[0, 16]}>
                     {header}
-                    <Tab {...{ size, newColumns, handelResize, className, isZj, scroll, isFull, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax, summary }} />
+                    <Tab {...{ size, newColumns, handelResize, className, isZj, totalData, scroll, isFull, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax, summary }} />
                 </Row>
             </Card>
         </Col>
@@ -190,10 +191,22 @@ function TableData(props: Prosp) {
 
 /**表格 */
 const Tab = React.memo((props: any) => {
-    const { size, newColumns, className, handelResize, scroll, isFull, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax, summary } = props
+    const { size, newColumns, className, handelResize, scroll, isFull, page, isZj, pageSize, totalData, dataSource, onChange, expandedRowRender, total, ajax, summary } = props
 
     return < Col span={24} >
         <div className={`${style[size]} ${className ? style[className] : ''} `}>
+            {
+                isZj && <Tables
+                    bordered
+                    columns={newColumns}
+                    dataSource={[{ ...totalData, id: 1 }]}
+                    scroll={scroll ? isFull ? { ...scroll, y: document.body.clientHeight - 300 } : scroll : {}}
+                    size={size}
+                    pagination={false}
+                    hideOnSinglePage
+                    className={`all_table ${className ? className : ''}`}
+                />
+            }
             <Tables
                 className={`all_table ${className ? className : ''}`}
                 bordered

+ 59 - 19
src/pages/gameDataStatistics/extensionData/everyday/index.tsx

@@ -1,53 +1,93 @@
 import QueryForm from "@/components/QueryForm"
 import { useAjax } from "@/Hook/useAjax"
-import { EverydayListType, getEveryListApi } from "@/services/gameData/extensionData"
+import { EverydayListType, getPromoteDayListApi, getPromoteDayTotalApi } from "@/services/gameData/extensionData"
 import React, { useEffect, useState } from "react"
 import TableData from "../../components/TableData"
 import columns12 from "./tableConfig"
-
+import { getGameChoiceParentListType1Api } from "@/services/gameData"
+import { Table } from "antd"
 
 
 const Everyday: React.FC = () => {
 
     /***************************/
     const [queryForm, setQueryForm] = useState<EverydayListType>({ pageNum: 1, pageSize: 20 })
-    const getEveryList = useAjax((params) => getEveryListApi(params))
+    const [gameType, setGameType] = useState<any>({})
+    const [totalData, setTotalData] = useState<any[]>([])
+
+    const getPromoteDayList = useAjax((params) => getPromoteDayListApi(params))
+    const getPromoteDayTotal = useAjax((params) => getPromoteDayTotalApi(params))
+    const getGameChoiceParentListType1 = useAjax(() => getGameChoiceParentListType1Api())
     /***************************/
 
     useEffect(() => {
-        getEveryList.run(queryForm)
+        getPromoteDayTotal.run(queryForm).then(res => {
+            res.accountId = '总计'
+            console.log('====>', res)
+            setTotalData([res])
+        })
+        getPromoteDayList.run(queryForm)
     }, [queryForm])
 
-    return <div>
 
+    useEffect(() => {
+        getGameChoiceParentListType1.run().then(res => {
+            let newType: any = {}
+            res.forEach((item: { id: number, name: string }) => {
+                newType[item.id] = item.name
+            })
+            setGameType(newType)
+        })
+    }, [])
+
+    return <div>
         <TableData
-            leftChild={<QueryForm 
-                onChange={(data: any) => setQueryForm({ ...queryForm, pageNum: 1, ...data })}
-                isAccount
+            leftChild={<QueryForm
+                onChange={(data: any) => {
+                    const { pitcherId, costBeginDay, costEndDay, ...params } = data
+                    console.log(params, pitcherId)
+                    let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                    newQueryForm.pageNum = 1
+                    newQueryForm.sysUserId = pitcherId
+                    newQueryForm.beginDay = costBeginDay
+                    newQueryForm.endDay = costEndDay
+                    setQueryForm({ ...newQueryForm, ...params })
+                }}
                 isAccountId
-                isCompanyId
-                isCpId
+                isAgentId
+                isConsumeDay
                 isCpName
-                isGameId
                 isGameName
                 isGameType
-                isPutAgent
-                isSysUserName
                 isSysUserId
-                isConsumeDay
             />}
+            isZj
+            totalData={totalData}
             scroll={{ x: 1000, y: 600 }}
-            ajax={getEveryList}
+            ajax={getPromoteDayList}
             fixed={{ left: 5, right: 0 }}
-            dataSource={getEveryList?.data?.records}
-            total={getEveryList?.data?.total}
+            dataSource={getPromoteDayList?.data?.records}
+            total={getPromoteDayList?.data?.total}
             page={queryForm.pageNum}
             pageSize={queryForm.pageSize}
             title='推广每日数据'
             onChange={(props: any) => {
-                setQueryForm({ ...queryForm, pageNum: props?.pagination?.current || 1, pageSize: props?.pagination?.pageSize || 20 })
+                console.log('props--->', props)
+                let { pagination, sortData } = props
+                let { current, pageSize } = pagination
+                let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                if (sortData && sortData?.order) {
+                    newQueryForm['sortType'] = sortData?.order === 'ascend' ? 'asc' : 'desc'
+                    newQueryForm['sortFiled'] = sortData?.field
+                } else {
+                    delete newQueryForm['sortType']
+                    delete newQueryForm['sortFiled']
+                }
+                newQueryForm.pageNum = current
+                newQueryForm.pageSize = pageSize
+                setQueryForm({ ...newQueryForm })
             }}
-            config={columns12()}
+            config={columns12(gameType)}
             configName={'推广每日数据'}
         />
     </div>

+ 223 - 777
src/pages/gameDataStatistics/extensionData/everyday/tableConfig.tsx

@@ -1,14 +1,10 @@
-import WidthEllipsis from "@/components/widthEllipsis"
 import { Statistic } from "antd"
 import React from "react"
 import style from './index.less'
 
-function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
+function columns12(gameType: any): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
 
     let defaultValue = [  // 默认展示字段
-        // { label: '创角人数', key: 'ffcjrs', type: '付费趋势' },
-        // { label: '创角数量', key: 'ffcjsl', type: '付费趋势' },
-        // { label: '活跃人数', key: 'ffhyrs', type: '付费趋势' },
         { label: '充值人数', key: 'rechargeCount', type: '付费趋势' },
         { label: '充值金额', key: 'rechargeMoney', type: '付费趋势' },
         { label: '增', key: 'addPayBack', type: '付费趋势' },
@@ -27,139 +23,180 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
         {
             label: '推广账号信息',
             data: [
-                { title: '推广账号名称', dataIndex: 'accountName', key: 'accountName', label: '推广账号信息', align: 'center', width: 95, default: 1 },
-                { title: '推广账号ID', dataIndex: 'accountId', key: 'accountId', label: '推广账号信息', align: 'center', width: 70, default: 2 },
-                { title: '推广账号类型', dataIndex: '3', key: '3', label: '推广账号信息', align: 'center', width: 70, default: 3 },
                 {
-                    title: '投放渠道', dataIndex: 'putAgent', key: 'putAgent', label: '推广账号信息', align: 'center', width: 130, default: 4,
-                    render: (a: string, b: any) => (<div style={{ minHeight: 60, display: 'flex', alignItems: 'center' }}>{a}</div>)
+                    title: '推广账号', dataIndex: 'accountId', key: 'accountId', label: '推广账号信息', align: 'center', width: 70, default: 1,
+                    render: (a: any) => (<span>{a || '--'}</span>)
                 },
-                { title: '推广状态', dataIndex: 'promoteStatus', key: 'promoteStatus', label: '推广账号信息', align: 'center', width: 70, default: 5 },
-                { title: '充值模板', dataIndex: '6', key: '6', label: '推广账号信息', align: 'center', width: 70, default: 6 },
+                {
+                    title: '投放渠道', dataIndex: 'agentName', key: 'agentName', label: '推广账号信息', align: 'center', width: 130, default: 2,
+                    render: (a: string, b: any) => (<span>{a || '--'}</span>)
+                }
             ]
         },
         {
             label: '业务人员信息',
             data: [
-                { title: '投手', dataIndex: 'sysUserName', key: 'sysUserName', label: '业务人员信息', align: 'center', width: 70, default: 7 },
-                { title: '运营', dataIndex: '8', key: '8', label: '业务人员信息', align: 'center', width: 70, default: 8 },
-                { title: '项目组', dataIndex: '9', key: '9', label: '业务人员信息', align: 'center', width: 70, default: 9 },
-                { title: '期数', dataIndex: '10', key: '10', label: '业务人员信息', align: 'center', width: 70, default: 10 }
+                { title: '投手', dataIndex: 'sysUserName', key: 'sysUserName', label: '业务人员信息', align: 'center', width: 70, default: 3, render: (a: any) => (<span>{a || '--'}</span>) }
             ]
         },
         {
             label: '推广内容信息',
             data: [
-                { title: '推广游戏CP名称', dataIndex: 'cpName', key: 'cpName', label: '推广内容信息', align: 'center', width: 70, default: 11 },
-                { title: '推广游戏名称', dataIndex: 'gameName', key: 'gameName', label: '推广内容信息', align: 'center', width: 70, default: 12 },
-                { title: '推广游戏应用类型', dataIndex: 'gameType', key: 'gameType', label: '推广内容信息', align: 'center', width: 70, default: 13 },
-            ]
-        },
-        {
-            label: '消耗时间',
-            data: [
-                { title: '消耗时间(小时)', dataIndex: '14', key: '14', label: '消耗时间', align: 'center', width: 110, default: 14 },
-                { title: '消耗时间(天)', dataIndex: '15', key: '15', label: '消耗时间', align: 'center', width: 110, default: 15 },
+                { title: '推广游戏CP名称', dataIndex: 'cpName', key: 'cpName', label: '推广内容信息', align: 'center', width: 70, default: 4, render: (a: any) => (<span>{a || '--'}</span>) },
+                { title: '推广游戏名称', dataIndex: 'gameName', key: 'gameName', label: '推广内容信息', align: 'center', width: 70, default: 5, render: (a: any) => (<span>{a || '--'}</span>) },
+                {
+                    title: '推广游戏应用类型', dataIndex: 'gameType', key: 'gameType', label: '推广内容信息', align: 'center', width: 70, default: 6, render: (a: string) => {
+                        if (a) {
+                            let one = a.charAt(0)
+                            switch(one) {
+                                case '3':
+                                    return 'Android'
+                                case '4':
+                                    return 'IOS'
+                                case '5':
+                                    return 'H5'
+                                case '6':
+                                    return '小程序'
+                                default:
+                                    return gameType[a] || a || '--'
+                            }
+                        } else return '--'
+                    }
+                },
             ]
         },
         {
             label: '消耗',
             data: [
-                { title: '消耗', dataIndex: 'cost', key: 'cost', label: '消耗', align: 'center', width: 70, default: 16 },
-                { title: '赔付金', dataIndex: 'costBack', key: 'costBack', label: '消耗', align: 'center', width: 90, default: 17 },
-                { title: '实际消耗', dataIndex: 'costReal', key: 'costReal', label: '消耗', align: 'center', width: 90, default: 18 },
-                { title: '推广计划数量', dataIndex: 'adPlanCount', key: 'adPlanCount', label: '消耗', align: 'center', width: 90, default: 19 },
-                { title: '推广广告数量', dataIndex: 'adCount', key: 'adCount', label: '消耗', align: 'center', width: 90, default: 20 },
+                { title: '消耗', dataIndex: 'cost', key: 'cost', label: '消耗', align: 'center', width: 70, default: 7, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '推广计划数量', dataIndex: 'adPlanCount', key: 'adPlanCount', label: '消耗', align: 'center', width: 90, default: 8, sorter: true, render: (a: any) => (<span>{a || '--'}</span>) }
             ]
         },
         {
             label: '广告曝光数据',
             data: [
-                { title: '曝光量', dataIndex: 'viewCount', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '点击量', dataIndex: 'clickCount', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '转化量', dataIndex: 'convertCount', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '转化率', dataIndex: 'convertRate', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '平均转化成本', dataIndex: 'avgConvertCost', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '深度转化量', dataIndex: 'deepConvertCount', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '深度转化成本', dataIndex: 'deepConvertCost', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '深度转化率', dataIndex: 'deepConvertRate', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '千次曝光成本', dataIndex: 'thousandViewCost', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '平均点击均价', dataIndex: 'avgClickCost', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用下载开始量', dataIndex: 'appDownloadCount', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用下载开始成本', dataIndex: 'appDownloadCost', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用下载开始率', dataIndex: 'appDownloadRate', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用下载完成量', dataIndex: 'downloadFinish', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用下载完成成本', dataIndex: 'downloadFinishCost', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用下载完成率', dataIndex: 'downloadFinishRate', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用安装量', dataIndex: 'appInstallCount', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用安装成本', dataIndex: 'appInstallCost', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用安装完成率', dataIndex: 'appInstallRate', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用激活量', dataIndex: 'appActiveCount', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用激活成本', dataIndex: 'appActiveCost', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用激活率', dataIndex: 'appActiveRate', label: '广告曝光数据', align: 'center', width: 70 },
+                { title: '曝光量', dataIndex: 'viewCount', label: '广告曝光数据', align: 'center', width: 70, default: 9, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '点击量', dataIndex: 'clickCount', label: '广告曝光数据', align: 'center', width: 70, default: 10, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '转化量', dataIndex: 'convertCount', label: '广告曝光数据', align: 'center', width: 70, default: 11, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                {
+                    title: '转化率', dataIndex: 'convertRate', label: '广告曝光数据', align: 'center', width: 70, default: 12, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                { title: '平均转化成本', dataIndex: 'avgConvertCost', label: '广告曝光数据', align: 'center', width: 70, default: 13, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '深度转化量', dataIndex: 'deepConvertCount', label: '广告曝光数据', align: 'center', width: 70, default: 14, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '深度转化成本', dataIndex: 'deepConvertCost', label: '广告曝光数据', align: 'center', width: 70, default: 15, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '深度转化率', dataIndex: 'deepConvertRate', 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: 'thousandViewCost', label: '广告曝光数据', align: 'center', width: 70, default: 17, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '平均点击均价', dataIndex: 'avgClickCost', label: '广告曝光数据', align: 'center', width: 70, default: 18, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '应用下载开始量', dataIndex: 'appDownloadCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '应用下载开始成本', dataIndex: 'appDownloadCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '应用下载开始率', dataIndex: 'appDownloadRate', 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: 'downloadFinish', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '应用下载完成成本', dataIndex: 'downloadFinishCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '应用下载完成率', dataIndex: 'downloadFinishRate', 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: 'appInstallCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '应用安装成本', dataIndex: 'appInstallCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '应用安装完成率', dataIndex: 'appInstallRate', 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: 'appActiveCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '应用激活成本', dataIndex: 'appActiveCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '应用激活率', dataIndex: 'appActiveRate', 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="%" />
+                },
             ]
         },
         {
             label: '用户数据',
             data: [
-                { title: '注册人数', dataIndex: 'regUserCount', label: '用户数据', align: 'center', width: 70 },
-                { title: '活跃用户人数', dataIndex: 'activeUserCount', label: '用户数据', align: 'center', width: 70 },
-                { title: '创角人数', dataIndex: 'userCountOfCreateRole', label: '用户数据', align: 'center', width: 70 },
-                { title: '首日创角人数', dataIndex: 'userCountOfFirstCreateRole', label: '用户数据', align: 'center', width: 70 },
-                { title: '新用户累计创角人数', dataIndex: 'firstUserCountOfFirstCreateRole', label: '用户数据', align: 'center', width: 70 },
-                { title: '创角量', dataIndex: 'createRoleCount', label: '用户数据', align: 'center', width: 70 },
-                { title: '首日创角量', dataIndex: 'firstCreateRoleCount', label: '用户数据', align: 'center', width: 70 },
-                { title: '新用户累计创角量', dataIndex: 'roleCountOfFirstUser', label: '用户数据', align: 'center', width: 70 },
-                { title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70 },
-                { title: '首日创角成本', dataIndex: 'firstCreateRoleCost', label: '用户数据', align: 'center', width: 70 },
-                { title: '新用户创角成本', dataIndex: 'firstUserCreateRoleCost', label: '用户数据', align: 'center', width: 70 },
-                { title: '首日创角率', dataIndex: 'firstCreateRoleRate', label: '用户数据', align: 'center', width: 70 },
-                { title: '新用户创角率', dataIndex: 'firstUserCreateRoleRate', label: '用户数据', align: 'center', width: 70 },
-                { title: '游戏当日LTV', dataIndex: 'oneDayLTV', label: '用户数据', align: 'center', width: 70 },
-                { title: '游戏当日广告变现ROI', dataIndex: 'firstRecoveryRate', label: '用户数据', align: 'center', width: 70 }
+                { title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
             ]
         },
         {
             label: '付费数据',
             data: [
-                { title: '首日新用户充值次数', dataIndex: 'firstUserRechargeCount', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日新用户充值人数', dataIndex: 'firstUserRechargeUser', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日新用户充值金额', dataIndex: 'firstUserRechargeMoney', label: '付费数据', align: 'center', width: 70 },
-                { title: '老用户充值次数', dataIndex: 'oldUserRechargeCount', label: '付费数据', align: 'center', width: 70 },
-                { title: '老用户充值人数', dataIndex: 'oldUserRechargeUser', label: '付费数据', align: 'center', width: 70 },
-                { title: '老用户充值金额', dataIndex: 'oldUserRechargeMoney', label: '付费数据', align: 'center', width: 70 },
-                { title: '账面充值次数', dataIndex: 'showRechargeCount', label: '付费数据', align: 'center', width: 70 },
-                { title: '账面充值人数', dataIndex: 'showRechargeUser', label: '付费数据', align: 'center', width: 70 },
-                { title: '账面充值金额', dataIndex: 'showRechargeMoney', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户累计充值次数', dataIndex: 'newUserRechargeCount', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户累计充值人数', dataIndex: 'newUserRechargeUser', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户累计充值金额', dataIndex: 'newUserRechargeMoney', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日回收率', dataIndex: 'c16', label: '付费数据', align: 'center', width: 70 },
-                { title: '买量回收率', dataIndex: 'buyRecoveryRate', label: '付费数据', align: 'center', width: 70 },
-                { title: '毛利额', dataIndex: 'c19', label: '付费数据', align: 'center', width: 70 },
-                { title: '3日ROI', dataIndex: 'threeDayROI', label: '付费数据', align: 'center', width: 70 },
-                { title: '5日ROI', dataIndex: 'fiveDayROI', label: '付费数据', align: 'center', width: 70 },
-                { title: '7日ROI', dataIndex: 'sevenDayROI', label: '付费数据', align: 'center', width: 70 },
-                { title: '30日ROI', dataIndex: 'thirtyDayROI', label: '付费数据', align: 'center', width: 70 },
-                { title: '60日ROI', dataIndex: 'sixtyDayROI', label: '付费数据', align: 'center', width: 70 },
-                { title: '180日ROI', dataIndex: 'oneHundredAndEightyDayROI', label: '付费数据', align: 'center', width: 70 },
-                { title: '1年ROI', dataIndex: 'oneYearROI', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日付费率', dataIndex: 'firstRechargeRate', label: '付费数据', align: 'center', width: 70 },
-                { title: '买量用户付费率', dataIndex: 'buyUserRechargeRate', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户付费比', dataIndex: 'newUserRechargeRate', label: '付费数据', align: 'center', width: 70 },
-                { title: '活跃用户付费率', dataIndex: 'activeUserRechargeRate', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日客单价', dataIndex: 'avgFirstUserRecharge', label: '付费数据', align: 'center', width: 70 },
-                { title: '买量客单价', dataIndex: 'avgBuyUserRecharge', label: '付费数据', align: 'center', width: 70 },
-                { title: '账面客单价', dataIndex: 'avgShowUserRecharge', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日充值成本', dataIndex: 'firstRechargeCost', label: '付费数据', align: 'center', width: 70 },
-                { title: '买量充值成本', dataIndex: 'buyUserRechargeCost', label: '付费数据', align: 'center', width: 70 },
-                { title: '复充率', dataIndex: 'repeatRechargeRate', label: '付费数据', align: 'center', width: 70 },
-                { title: '平均活跃付费率', dataIndex: 'avgActiveRechargeRate', label: '付费数据', align: 'center', width: 70 },
-                { title: '新增注册ARPU', dataIndex: 'newRegARPU', label: '付费数据', align: 'center', width: 70 },
-                { title: '活跃ARPPU', dataIndex: 'activeARPU', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日付费ARPU', dataIndex: 'firstRechargeARPU', label: '付费数据', align: 'center', width: 70 },
-                { title: '当天付费ARPU', dataIndex: 'c48', label: '付费数据', align: 'center', width: 70 },
-                { title: '账面ARPU', dataIndex: 'showRechargeARPU', label: '付费数据', align: 'center', width: 70 }
+                { title: '首日新用户充值次数', dataIndex: 'firstUserRechargeCount', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '首日新用户充值人数', dataIndex: 'firstUserRechargeUser', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '首日新用户充值金额', dataIndex: 'firstUserRechargeMoney', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '老用户充值次数', dataIndex: 'oldUserRechargeCount', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '老用户充值人数', dataIndex: 'oldUserRechargeUser', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '老用户充值金额', dataIndex: 'oldUserRechargeMoney', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '账面充值次数', dataIndex: 'showRechargeCount', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '账面充值人数', dataIndex: 'showRechargeUser', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '账面充值金额', dataIndex: 'showRechargeMoney', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '新用户累计充值次数', dataIndex: 'newUserRechargeCount', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '新用户累计充值人数', dataIndex: 'newUserRechargeUser', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '新用户累计充值金额', dataIndex: 'newUserRechargeMoney', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '首日回收率', dataIndex: 'todayRecoveryRate', 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: 'buyRecoveryRate', 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: 'grossMargin', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '3日ROI', dataIndex: 'roiDay3', 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: '5日ROI', dataIndex: 'roiDay5', 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: '7日ROI', dataIndex: 'roiDay7', 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: '30日ROI', dataIndex: 'roiDay30', 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: '60日ROI', dataIndex: 'roiDay60', 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: '180日ROI', dataIndex: 'roiDay180', 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: '1年ROI', dataIndex: 'roiYear1', 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: 'firstRechargeRate', 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: 'buyUserRechargeRate', 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: 'newUserRechargeRate', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '首日客单价', dataIndex: 'avgFirstUserRecharge', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '买量客单价', dataIndex: 'avgBuyUserRecharge', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '账面客单价', dataIndex: 'avgShowUserRecharge', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '首日充值成本', dataIndex: 'firstRechargeCost', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '买量充值成本', dataIndex: 'buyUserRechargeCost', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '复充率', dataIndex: 'repeatRechargeRate', 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: 'newRegARPU', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '首日付费ARPU', dataIndex: 'firstRechargeARPU', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '当天付费ARPU', dataIndex: 'todayRechargeArpu', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '账面ARPU', dataIndex: 'showRechargeARPU', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> }
             ]
         },
         {
@@ -171,9 +208,6 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     {
                         label: '付费趋势',
                         data: [
-                            // { label: '创角人数', key: 'ffcjrs', type: '付费趋势' },
-                            // { label: '创角数量', key: 'ffcjsl', type: '付费趋势' },
-                            // { label: '活跃人数', key: 'ffhyrs', type: '付费趋势' },
                             { label: '充值人数', key: 'rechargeCount', type: '付费趋势' },
                             { label: '充值金额', key: 'rechargeMoney', type: '付费趋势' },
                             { label: '增', key: 'addPayBack', type: '付费趋势' },
@@ -181,28 +215,6 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                             { label: '倍', key: 'newUserRechargeRate', type: '付费趋势' },
                         ]
                     },
-                    {
-                        label: 'LTV数据',
-                        data: [
-                            { label: 'LTV', key: 'LTV', type: 'LTV数据' },
-                        ]
-                    },
-                    {
-                        label: '留存分析',
-                        data: [
-                            { label: '活跃人数', key: 'rechargeUserRetentionRate', type: '留存分析' },
-                            { label: '留存率', key: 'regUserRetentionRate', type: '留存分析' },
-                        ]
-                    },
-                    {
-                        label: '玩家90日激活数据',
-                        data: [
-                            { label: '创角人数', key: 'cjrs1', type: '玩家90日激活数据' },
-                            { label: '付费人数', key: 'ffrs1', type: '玩家90日激活数据' },
-                            { label: '创角比', key: 'cjb', type: '玩家90日激活数据' },
-                            { label: '付费比', key: 'ffb1', type: '玩家90日激活数据' },
-                        ]
-                    }
                 ]
             },
             label: '时间区间跨度',
@@ -211,20 +223,21 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 dataIndex: "D1",
                 label: "时间区间跨度",
                 width: 110,
+                default: 19,
                 render: (a: any, b: any) => {
                     if (newSelectFieldData?.length > 0) {
                         let data: any = {}
                         let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                         switch (newSelectFieldData[0].type) {
                             case '付费趋势':
-                                if (b?.oneDayRechargeTrend) {
-                                    data = b?.oneDayRechargeTrend
+                                if (b?.rechargeTrendDay1) {
+                                    data = b?.rechargeTrendDay1
                                     return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeCount}</span></span>}
-                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
-                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.newUserRechargeRate}</span></span>}
+                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeUserCount}</span></span>}
+                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples}</span></span>}
                                     </div>
                                 }
                                 return '--'
@@ -237,20 +250,21 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 dataIndex: "D3",
                 label: "时间区间跨度",
                 width: 110,
+                default: 20,
                 render: (a: any, b: any) => {
                     if (newSelectFieldData?.length > 0) {
                         let data: any = {}
                         let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                         switch (newSelectFieldData[0].type) {
                             case '付费趋势':
-                                if (b?.threeDayRechargeTrend) {
-                                    data = b?.threeDayRechargeTrend
+                                if (b?.rechargeTrendDay3) {
+                                    data = b?.rechargeTrendDay3
                                     return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeCount}</span></span>}
-                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
-                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.newUserRechargeRate}</span></span>}
+                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeUserCount}</span></span>}
+                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples}</span></span>}
                                     </div>
                                 }
                                 return '--'
@@ -263,20 +277,21 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 dataIndex: "D7",
                 label: "时间区间跨度",
                 width: 110,
+                default: 21,
                 render: (a: any, b: any) => {
                     if (newSelectFieldData?.length > 0) {
                         let data: any = {}
                         let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                         switch (newSelectFieldData[0].type) {
                             case '付费趋势':
-                                if (b?.sevenDayRechargeTrend) {
-                                    data = b?.sevenDayRechargeTrend
+                                if (b?.rechargeTrendDay7) {
+                                    data = b?.rechargeTrendDay7
                                     return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeCount}</span></span>}
-                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
-                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.newUserRechargeRate}</span></span>}
+                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeUserCount}</span></span>}
+                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples}</span></span>}
                                     </div>
                                 }
                                 return '--'
@@ -289,20 +304,21 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 dataIndex: "D15",
                 label: "时间区间跨度",
                 width: 110,
+                default: 22,
                 render: (a: any, b: any) => {
                     if (newSelectFieldData?.length > 0) {
                         let data: any = {}
                         let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                         switch (newSelectFieldData[0].type) {
                             case '付费趋势':
-                                if (b?.fifteenDayRechargeTrend) {
-                                    data = b?.fifteenDayRechargeTrend
+                                if (b?.rechargeTrendDay15) {
+                                    data = b?.rechargeTrendDay15
                                     return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeCount}</span></span>}
-                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
-                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.newUserRechargeRate}</span></span>}
+                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeUserCount}</span></span>}
+                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples}</span></span>}
                                     </div>
                                 }
                                 return '--'
@@ -315,20 +331,21 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 dataIndex: "M1",
                 label: "时间区间跨度",
                 width: 110,
+                default: 23,
                 render: (a: any, b: any) => {
                     if (newSelectFieldData?.length > 0) {
                         let data: any = {}
                         let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                         switch (newSelectFieldData[0].type) {
                             case '付费趋势':
-                                if (b?.oneMonthRechargeTrend) {
-                                    data = b?.oneMonthRechargeTrend
+                                if (b?.rechargeTrendMonth1) {
+                                    data = b?.rechargeTrendMonth1
                                     return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeCount}</span></span>}
-                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
-                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.newUserRechargeRate}</span></span>}
+                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeUserCount}</span></span>}
+                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples}</span></span>}
                                     </div>
                                 }
                                 return '--'
@@ -341,20 +358,21 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 dataIndex: "M2",
                 label: "时间区间跨度",
                 width: 110,
+                default: 24,
                 render: (a: any, b: any) => {
                     if (newSelectFieldData?.length > 0) {
                         let data: any = {}
                         let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                         switch (newSelectFieldData[0].type) {
                             case '付费趋势':
-                                if (b?.twoMonthRechargeTrend) {
-                                    data = b?.twoMonthRechargeTrend
+                                if (b?.rechargeTrendMonth2) {
+                                    data = b?.rechargeTrendMonth2
                                     return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeCount}</span></span>}
-                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
-                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.newUserRechargeRate}</span></span>}
+                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeUserCount}</span></span>}
+                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples}</span></span>}
                                     </div>
                                 }
                                 return '--'
@@ -367,20 +385,21 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 dataIndex: "M3",
                 label: "时间区间跨度",
                 width: 110,
+                default: 25,
                 render: (a: any, b: any) => {
                     if (newSelectFieldData?.length > 0) {
                         let data: any = {}
                         let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
                         switch (newSelectFieldData[0].type) {
                             case '付费趋势':
-                                if (b?.threeMonthRechargeTrend) {
-                                    data = b?.threeMonthRechargeTrend
+                                if (b?.rechargeTrendMonth3) {
+                                    data = b?.rechargeTrendMonth3
                                     return <div className={style.dbox}>
-                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeCount}</span></span>}
-                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
-                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.addPayBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.payBack * 100)?.toFixed(2)}%</span></span>}
-                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.newUserRechargeRate}</span></span>}
+                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>人:<span>{data?.rechargeUserCount}</span></span>}
+                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples}</span></span>}
                                     </div>
                                 }
                                 return '--'
@@ -390,607 +409,34 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
             }, {
                 title: "总",
+                default: 26,
                 dataIndex: "total",
                 label: "时间区间跨度",
                 align: "center",
-                width: 70
+                width: 110,
+                render: (a: any, b: any) => {
+                    if (newSelectFieldData?.length > 0) {
+                        let data: any = {}
+                        let keyS: string[] = newSelectFieldData?.map((item: any) => item.key)
+                        switch (newSelectFieldData[0].type) {
+                            case '付费趋势':
+                                if (b?.rechargeTrendTotal) {
+                                    data = b?.rechargeTrendTotal
+                                    return <div className={style.dbox}>
+                                        {keyS?.includes('rechargeCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
+                                        {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
+                                        {keyS?.includes('addPayBack') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
+                                        {keyS?.includes('payBack') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples}</span></span>}
+                                    </div>
+                                }
+                                return '--'
+                        }
+                    }
+                    return '--'
+                },
             }]
-            // label: 'D1-D30',
-            // data: [{
-            //     title: "D1",
-            //     dataIndex: "D1",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D2",
-            //     dataIndex: "D2",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D3",
-            //     dataIndex: "D3",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D4",
-            //     dataIndex: "D4",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D5",
-            //     dataIndex: "D5",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D6",
-            //     dataIndex: "D6",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D7",
-            //     dataIndex: "D7",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D8",
-            //     dataIndex: "D8",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D9",
-            //     dataIndex: "D9",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D10",
-            //     dataIndex: "D10",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D11",
-            //     dataIndex: "D11",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D12",
-            //     dataIndex: "D12",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D13",
-            //     dataIndex: "D13",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D14",
-            //     dataIndex: "D14",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D15",
-            //     dataIndex: "D15",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D16",
-            //     dataIndex: "D16",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D17",
-            //     dataIndex: "D17",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D18",
-            //     dataIndex: "D18",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D19",
-            //     dataIndex: "D19",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D20",
-            //     dataIndex: "D20",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D21",
-            //     dataIndex: "D21",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D22",
-            //     dataIndex: "D22",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D23",
-            //     dataIndex: "D23",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D24",
-            //     dataIndex: "D24",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D25",
-            //     dataIndex: "D25",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D26",
-            //     dataIndex: "D26",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D27",
-            //     dataIndex: "D27",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D28",
-            //     dataIndex: "D28",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D29",
-            //     dataIndex: "D29",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }, {
-            //     title: "D30",
-            //     dataIndex: "D30",
-            //     label: "D1-D30",
-            //     align: "center",
-            //     width: 70
-            // }]
-        },
-        // {
-        //     label: 'D31-D60',
-        //     data: [{
-        //         title: "D31",
-        //         dataIndex: "D31",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D32",
-        //         dataIndex: "D32",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D33",
-        //         dataIndex: "D33",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D34",
-        //         dataIndex: "D34",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D35",
-        //         dataIndex: "D35",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D36",
-        //         dataIndex: "D36",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D37",
-        //         dataIndex: "D37",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D38",
-        //         dataIndex: "D38",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D39",
-        //         dataIndex: "D39",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D40",
-        //         dataIndex: "D40",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D41",
-        //         dataIndex: "D41",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D42",
-        //         dataIndex: "D42",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D43",
-        //         dataIndex: "D43",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D44",
-        //         dataIndex: "D44",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D45",
-        //         dataIndex: "D45",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D46",
-        //         dataIndex: "D46",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D47",
-        //         dataIndex: "D47",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D48",
-        //         dataIndex: "D48",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D49",
-        //         dataIndex: "D49",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D50",
-        //         dataIndex: "D50",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D51",
-        //         dataIndex: "D51",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D52",
-        //         dataIndex: "D52",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D53",
-        //         dataIndex: "D53",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D54",
-        //         dataIndex: "D54",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D55",
-        //         dataIndex: "D55",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D56",
-        //         dataIndex: "D56",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D57",
-        //         dataIndex: "D57",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D58",
-        //         dataIndex: "D58",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D59",
-        //         dataIndex: "D59",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D60",
-        //         dataIndex: "D60",
-        //         label: "D31-D60",
-        //         align: "center",
-        //         width: 70
-        //     }],
-        // },
-        // {
-        //     label: 'D61-D90',
-        //     data: [{
-        //         title: "D61",
-        //         dataIndex: "D61",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D62",
-        //         dataIndex: "D62",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D63",
-        //         dataIndex: "D63",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D64",
-        //         dataIndex: "D64",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D65",
-        //         dataIndex: "D65",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D66",
-        //         dataIndex: "D66",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D67",
-        //         dataIndex: "D67",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D68",
-        //         dataIndex: "D68",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D69",
-        //         dataIndex: "D69",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D70",
-        //         dataIndex: "D70",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D71",
-        //         dataIndex: "D71",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D72",
-        //         dataIndex: "D72",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D73",
-        //         dataIndex: "D73",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D74",
-        //         dataIndex: "D74",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D75",
-        //         dataIndex: "D75",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D76",
-        //         dataIndex: "D76",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D77",
-        //         dataIndex: "D77",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D78",
-        //         dataIndex: "D78",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D79",
-        //         dataIndex: "D79",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D80",
-        //         dataIndex: "D80",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D81",
-        //         dataIndex: "D81",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D82",
-        //         dataIndex: "D82",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D83",
-        //         dataIndex: "D83",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D84",
-        //         dataIndex: "D84",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D85",
-        //         dataIndex: "D85",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D86",
-        //         dataIndex: "D86",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D87",
-        //         dataIndex: "D87",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D88",
-        //         dataIndex: "D88",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D89",
-        //         dataIndex: "D89",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "D90",
-        //         dataIndex: "D90",
-        //         label: "D61-D90",
-        //         align: "center",
-        //         width: 70
-        //     }],
-        // },
-        // {
-        //     label: '月份',
-        //     data: [{
-        //         title: "M4",
-        //         dataIndex: "M4",
-        //         label: "月份",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "M5",
-        //         dataIndex: "M5",
-        //         label: "月份",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "M6",
-        //         dataIndex: "M6",
-        //         label: "月份",
-        //         align: "center",
-        //         width: 70
-        //     }, {
-        //         title: "M12",
-        //         dataIndex: "M12",
-        //         label: "月份",
-        //         align: "center",
-        //         width: 70
-        //     },]
-        // },
-        // {
-        //     label: '操作',
-        //     data: [
-        //         {
-        //             title: '操作',
-        //             dataIndex: 'cz',
-        //             label: '操作',
-        //             default: 21,
-        //             key: 'cz',
-        //             align: 'center',
-        //             width: 75,
-        //             render: (a: number) => {
-        //                 return <span>1111</span>
-        //             },
-        //         }
-        //     ]
-        // }
+        }
     ]
 }
 

+ 74 - 7
src/pages/gameDataStatistics/extensionData/total/index.tsx

@@ -1,23 +1,90 @@
-import React from "react"
+import React, { useEffect, useState } from "react"
 import TableData from "../../components/TableData"
 import columns12 from './tableConfig'
-
+import { useAjax } from "@/Hook/useAjax"
+import { PromoteTotalProps, getPromoteTotalListApi } from "@/services/gameData/extensionData"
+import QueryForm from "@/components/QueryForm"
+import moment from "moment"
+import { getGameChoiceParentListType1Api } from "@/services/gameData"
 
 const Total: React.FC = () => {
 
+    /************************************/
+    const [queryForm, setQueryForm] = useState<PromoteTotalProps>({ pageNum: 1, pageSize: 20 })
+    const [gameType, setGameType] = useState<any>({})
+
+    const getPromoteTotalList = useAjax((params) => getPromoteTotalListApi(params))
+    const getGameChoiceParentListType1 = useAjax(() => getGameChoiceParentListType1Api())
+    /************************************/
+
+
+    useEffect(() => {
+        getPromoteTotalList.run(queryForm)
+    }, [queryForm])
+
+    useEffect(() => {
+        getGameChoiceParentListType1.run().then(res => {
+            let newType: any = {}
+            res.forEach((item: { id: number, name: string }) => {
+                newType[item.id] = item.name
+            })
+            setGameType(newType)
+        })
+    }, [])
 
     return <div>
-        
-        <TableData 
+
+        <TableData
+            leftChild={<QueryForm
+                onChange={(data: any) => {
+                    const { pitcherId, rechargeDay, ...params } = data
+                    console.log(params, pitcherId)
+                    let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                    newQueryForm.pageNum = 1
+                    if (rechargeDay && rechargeDay?.length === 2) {
+                        newQueryForm['rechargeBeginDay'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
+                        newQueryForm['rechargeEndDay'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
+                    } else {
+                        delete newQueryForm['rechargeBeginDay']
+                        delete newQueryForm['rechargeEndDay']
+                    }
+                    newQueryForm.sysUserId = pitcherId
+                    setQueryForm({ ...newQueryForm, ...params })
+                }}
+                isAccountId
+                isAgentId
+                isConsumeDay
+                isCpName
+                isGameName
+                isGameType
+                rechargeDay={{}}
+                isSysUserId
+            />}
             scroll={{ x: 1000, y: 600 }}
-            ajax={null}
+            ajax={getPromoteTotalList}
+            dataSource={getPromoteTotalList?.data?.records}
+            total={getPromoteTotalList?.data?.total}
+            page={queryForm.pageNum}
+            pageSize={queryForm.pageSize}
             fixed={{ left: 5, right: 1 }}
-            dataSource={[]} 
             title='推广总数据'
             onChange={(props: any) => {
                 console.log('props--->', props)
+                let { pagination, sortData } = props
+                let { current, pageSize } = pagination
+                let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                if (sortData && sortData?.order) {
+                    newQueryForm['sortType'] = sortData?.order === 'ascend' ? 'asc' : 'desc'
+                    newQueryForm['sortFiled'] = sortData?.field
+                } else {
+                    delete newQueryForm['sortType']
+                    delete newQueryForm['sortFiled']
+                }
+                newQueryForm.pageNum = current
+                newQueryForm.pageSize = pageSize
+                setQueryForm({ ...newQueryForm })
             }}
-            config={columns12()}
+            config={columns12(gameType)}
             configName={'推广总数据'}
         />
     </div>

+ 167 - 110
src/pages/gameDataStatistics/extensionData/total/tableConfig.tsx

@@ -1,148 +1,205 @@
+import WidthEllipsis from "@/components/widthEllipsis"
+import { Statistic } from "antd"
 import React from "react"
 
-function columns12() {
+function columns12(gameType: any) {
 
     let newArr: { label: string, data: any[] }[] = [
         {
             label: '推广账号信息',
             data: [
-                { title: '推广账号名称', dataIndex: '1', key: '1', label: '推广账号信息', align: 'center', width: 95, default: 1 },
-                { title: '推广账号ID', dataIndex: '2', key: '2', label: '推广账号信息', align: 'center', width: 70, default: 2 },
-                { title: '推广账号类型', dataIndex: '3', key: '3', label: '推广账号信息', align: 'center', width: 70, default: 3 },
-                { title: '投放渠道', dataIndex: '4', key: '4', label: '推广账号信息', align: 'center', width: 70, default: 4 },
-                { title: '推广状态', dataIndex: '5', key: '5', label: '推广账号信息', align: 'center', width: 70, default: 5 },
-                { title: '充值模板', dataIndex: '6', key: '6', label: '推广账号信息', align: 'center', width: 70, default: 6 },
+                { title: '推广账号ID', dataIndex: 'accountId', key: 'accountId', label: '推广账号信息', align: 'center', width: 80, default: 1, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
+                { title: '投放渠道', dataIndex: 'agentName', key: 'agentName', label: '推广账号信息', align: 'center', width: 70, default: 2, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
             ]
         },
         {
             label: '业务人员信息',
             data: [
-                { title: '投手', dataIndex: '7', key: '7', label: '业务人员信息', align: 'center', width: 70, default: 7 },
-                { title: '运营', dataIndex: '8', key: '8', label: '业务人员信息', align: 'center', width: 70, default: 8 },
-                { title: '项目组', dataIndex: '9', key: '9', label: '业务人员信息', align: 'center', width: 70, default: 9 },
-                { title: '期数', dataIndex: '10', key: '10', label: '业务人员信息', align: 'center', width: 70, default: 10 }
+                { title: '投手', dataIndex: 'sysUserName', key: 'sysUserName', label: '业务人员信息', align: 'center', width: 70, default: 3, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
             ]
         },
         {
             label: '推广内容信息',
             data: [
-                { title: '推广游戏CP名称', dataIndex: '11', key: '11', label: '推广内容信息', align: 'center', width: 70, default: 11 },
-                { title: '推广游戏名称', dataIndex: '12', key: '12', label: '推广内容信息', align: 'center', width: 70, default: 12 },
-                { title: '推广游戏应用类型', dataIndex: '13', key: '13', label: '推广内容信息', align: 'center', width: 70, default: 13 },
-            ]
-        },
-        {
-            label: '时间',
-            data: [
-                { title: '消耗时间(注册时间)', dataIndex: '14', key: '14', label: '时间', align: 'center', width: 110, default: 14 },
-                { title: '充值时间', dataIndex: '15', key: '15', label: '时间', align: 'center', width: 110, default: 15 },
+                { title: '推广游戏CP名称', dataIndex: 'cpName', key: 'cpName', label: '推广内容信息', align: 'center', width: 70, default: 4, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
+                { title: '推广游戏名称', dataIndex: 'gameName', key: 'gameName', label: '推广内容信息', align: 'center', width: 70, default: 5, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
+                {
+                    title: '推广游戏应用类型', dataIndex: 'gameType', key: 'gameType', label: '推广内容信息', align: 'center', width: 70, default: 6,
+                    render: (a: string) => {
+                        if (a) {
+                            let one = a.charAt(0)
+                            switch (one) {
+                                case '3':
+                                    return 'Android'
+                                case '4':
+                                    return 'IOS'
+                                case '5':
+                                    return 'H5'
+                                case '6':
+                                    return '小程序'
+                                default:
+                                    return gameType[a] || a
+                            }
+                        } else return '--'
+                    }
+                },
             ]
         },
         {
             label: '消耗',
             data: [
-                { title: '消耗', dataIndex: '16', key: '16', label: '消耗', align: 'center', width: 70, default: 16 },
-                { title: '赔付金', dataIndex: '17', key: '17', label: '消耗', align: 'center', width: 90, default: 17 },
-                { title: '实际消耗', dataIndex: '18', key: '18', label: '消耗', align: 'center', width: 90, default: 18 },
-                { title: '推广计划数量', dataIndex: '19', key: '19', label: '消耗', align: 'center', width: 90, default: 19 },
-                { title: '推广广告数量', dataIndex: '20', key: '20', label: '消耗', align: 'center', width: 90, default: 20 },
+                { title: '消耗', dataIndex: 'cost', key: 'cost', label: '消耗', align: 'center', width: 110, default: 7, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '推广计划数量', dataIndex: 'adPlanCount', key: 'adPlanCount', label: '消耗', align: 'center', width: 90, default: 8, sorter: true },
             ]
         },
         {
             label: '广告曝光数据',
             data: [
-                { title: '曝光量', dataIndex: 'a1', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '点击量', dataIndex: 'a2', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '转化量', dataIndex: 'a3', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '转化率', dataIndex: 'a4', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '平均转化成本', dataIndex: 'a5', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '深度转化量', dataIndex: 'a6', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '深度转化成本', dataIndex: 'a7', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '深度转化率', dataIndex: 'a8', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '千次曝光成本', dataIndex: 'a9', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '平均点击均价', dataIndex: 'a10', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用下载开始量', dataIndex: 'a11', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用下载开始成本', dataIndex: 'a12', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用下载开始率', dataIndex: 'a13', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用下载完成成本', dataIndex: 'a14', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用安装成本', dataIndex: 'a15', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用安装完成率', dataIndex: 'a16', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用激活量', dataIndex: 'a17', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用激活成本', dataIndex: 'a18', label: '广告曝光数据', align: 'center', width: 70 },
-                { title: '应用激活率', dataIndex: 'a19', label: '广告曝光数据', align: 'center', width: 70 },
+                { title: '曝光量', dataIndex: 'viewCount', label: '广告曝光数据', align: 'center', width: 70, default: 9, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '点击量', dataIndex: 'clickCount', label: '广告曝光数据', align: 'center', width: 70, default: 10, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '转化量', dataIndex: 'convertCount', label: '广告曝光数据', align: 'center', width: 70, default: 11, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                {
+                    title: '转化率', dataIndex: 'convertRate', 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: 'avgConvertCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '深度转化量', dataIndex: 'deepConvertCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '深度转化成本', dataIndex: 'deepConvertCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '深度转化率', dataIndex: 'deepConvertRate', label: '广告曝光数据', align: 'center', width: 70, default: 12, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                { title: '千次曝光成本', dataIndex: 'thousandViewCost', label: '广告曝光数据', align: 'center', width: 70, default: 13, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '平均点击均价', dataIndex: 'avgClickCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '应用下载开始量', dataIndex: 'appDownloadCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '应用下载开始成本', dataIndex: 'appDownloadCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '应用下载开始率', dataIndex: 'appDownloadRate', 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: 'downloadFinish', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '应用下载完成成本', dataIndex: 'downloadFinishCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '应用下载完成率', dataIndex: 'downloadFinishRate', 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: 'appInstallCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '应用安装成本', dataIndex: 'appInstallCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '应用安装完成率', dataIndex: 'appInstallRate', 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: 'appActiveCount', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '应用激活成本', dataIndex: 'appActiveCost', label: '广告曝光数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '应用激活率', dataIndex: 'appActiveRate', 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="%" />
+                },
             ]
         },
         {
             label: '用户数据',
             data: [
-                { title: '注册人数', dataIndex: 'b1', label: '用户数据', align: 'center', width: 70 },
-                { title: '活跃用户人数', dataIndex: 'b2', label: '用户数据', align: 'center', width: 70 },
-                { title: '创角人数', dataIndex: 'b3', label: '用户数据', align: 'center', width: 70 },
-                { title: '首日创角人数', dataIndex: 'b4', label: '用户数据', align: 'center', width: 70 },
-                { title: '新用户累计创角人数', dataIndex: 'b5', label: '用户数据', align: 'center', width: 70 },
-                { title: '创角量', dataIndex: 'b6', label: '用户数据', align: 'center', width: 70 },
-                { title: '首日创角量', dataIndex: 'b7', label: '用户数据', align: 'center', width: 70 },
-                { title: '新用户累计创角量', dataIndex: 'b8', label: '用户数据', align: 'center', width: 70 },
-                { title: '注册成本', dataIndex: 'b9', label: '用户数据', align: 'center', width: 70 },
-                { title: '首日创角成本', dataIndex: 'b10', label: '用户数据', align: 'center', width: 70 },
-                { title: '新用户创角成本', dataIndex: 'b11', label: '用户数据', align: 'center', width: 70 },
-                { title: '首日创角率', dataIndex: 'b12', label: '用户数据', align: 'center', width: 70 },
-                { title: '新用户创角率', dataIndex: 'b13', label: '用户数据', align: 'center', width: 70 },
-                { title: '游戏当日LTV', dataIndex: 'b14', label: '用户数据', align: 'center', width: 70 },
-                { title: '游戏当日广告变现ROI', dataIndex: 'b15', label: '用户数据', align: 'center', width: 70 }
+                { title: '注册人数', dataIndex: 'regUserCount', label: '用户数据', align: 'center', width: 70, default: 14, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70, default: 15, sorter: true, render: (a: string) => <Statistic value={a || 0} /> }
             ]
         },
         {
             label: '付费数据',
             data: [
-                { title: '新用户充值次数', dataIndex: 'c1', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户充值人数', dataIndex: 'c2', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户充值金额', dataIndex: 'c3', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日新用户充值次数', dataIndex: 'c4', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日新用户充值人数', dataIndex: 'c5', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日新用户充值金额', dataIndex: 'c6', label: '付费数据', align: 'center', width: 70 },
-                { title: '老用户充值次数', dataIndex: 'c7', label: '付费数据', align: 'center', width: 70 },
-                { title: '老用户充值人数', dataIndex: 'c8', label: '付费数据', align: 'center', width: 70 },
-                { title: '老用户充值金额', dataIndex: 'c9', label: '付费数据', align: 'center', width: 70 },
-                { title: '账面充值次数', dataIndex: 'c10', label: '付费数据', align: 'center', width: 70 },
-                { title: '账面充值人数', dataIndex: 'c11', label: '付费数据', align: 'center', width: 70 },
-                { title: '账面充值金额', dataIndex: 'c12', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户累计充值次数', dataIndex: 'c13', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户累计充值人数', dataIndex: 'c14', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户累计充值金额', dataIndex: 'c15', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日回收率', dataIndex: 'c16', label: '付费数据', align: 'center', width: 70 },
-                { title: '回收率', dataIndex: 'c17', label: '付费数据', align: 'center', width: 70 },
-                { title: '当日回收率', dataIndex: 'c18', label: '付费数据', align: 'center', width: 70 },
-                { title: '毛利额', dataIndex: 'c19', label: '付费数据', align: 'center', width: 70 },
-                { title: '3日ROI', dataIndex: 'c20', label: '付费数据', align: 'center', width: 70 },
-                { title: '5日ROI', dataIndex: 'c21', label: '付费数据', align: 'center', width: 70 },
-                { title: '7日ROI', dataIndex: 'c22', label: '付费数据', align: 'center', width: 70 },
-                { title: '30日ROI', dataIndex: 'c23', label: '付费数据', align: 'center', width: 70 },
-                { title: '60日ROI', dataIndex: 'c24', label: '付费数据', align: 'center', width: 70 },
-                { title: '180日ROI', dataIndex: 'c26', label: '付费数据', align: 'center', width: 70 },
-                { title: '1年回收率', dataIndex: 'c27', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日付费率', dataIndex: 'c28', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户付费率', dataIndex: 'c29', label: '付费数据', align: 'center', width: 70 },
-                { title: '当天付费率', dataIndex: 'c30', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户付费比', dataIndex: 'c31', label: '付费数据', align: 'center', width: 70 },
-                { title: '活跃用户付费率', dataIndex: 'c32', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日客单价', dataIndex: 'c33', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户客单价', dataIndex: 'c34', label: '付费数据', align: 'center', width: 70 },
-                { title: '当天客单价', dataIndex: 'c35', label: '付费数据', align: 'center', width: 70 },
-                { title: '账面客单价', dataIndex: 'c36', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日充值成本', dataIndex: 'c37', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户充值成本', dataIndex: 'c38', label: '付费数据', align: 'center', width: 70 },
-                { title: '当天充值成本', dataIndex: 'c39', label: '付费数据', align: 'center', width: 70 },
-                { title: '复充率', dataIndex: 'c40', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户复充率', dataIndex: 'c41', label: '付费数据', align: 'center', width: 70 },
-                { title: '当天复充率', dataIndex: 'c42', label: '付费数据', align: 'center', width: 70 },
-                { title: '平均活跃付费率', dataIndex: 'c43', label: '付费数据', align: 'center', width: 70 },
-                { title: '新增注册ARPU', dataIndex: 'c44', label: '付费数据', align: 'center', width: 70 },
-                { title: '活跃ARPPU', dataIndex: 'c45', label: '付费数据', align: 'center', width: 70 },
-                { title: '首日付费ARPU', dataIndex: 'c46', label: '付费数据', align: 'center', width: 70 },
-                { title: '新用户付费ARPU', dataIndex: 'c47', label: '付费数据', align: 'center', width: 70 },
-                { title: '当天付费ARPU', dataIndex: 'c48', label: '付费数据', align: 'center', width: 70 },
-                { title: '账面ARPU', dataIndex: 'c49', label: '付费数据', align: 'center', width: 70 }
+                { title: '新用户充值次数', dataIndex: 'userRechargeCount', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '新用户充值人数', dataIndex: 'userRechargeUser', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '新用户充值金额', dataIndex: 'userRechargeMoney', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '首日新用户充值次数', dataIndex: 'firstUserRechargeCount', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '首日新用户充值人数', dataIndex: 'firstUserRechargeUser', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '首日新用户充值金额', dataIndex: 'firstUserRechargeMoney', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '老用户充值次数', dataIndex: 'oldUserRechargeCount', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '老用户充值人数', dataIndex: 'oldUserRechargeUser', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '老用户充值金额', dataIndex: 'oldUserRechargeMoney', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '账面充值次数', dataIndex: 'showRechargeCount', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '账面充值人数', dataIndex: 'showRechargeUser', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '账面充值金额', dataIndex: 'showRechargeMoney', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '新用户累计充值次数', dataIndex: 'newUserRechargeCount', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '新用户累计充值人数', dataIndex: 'newUserRechargeUser', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '新用户累计充值金额', dataIndex: 'newUserRechargeMoney', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '首日回收率', dataIndex: 'firstRecoveryRate', 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: 'recoveryRate', 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: 'todayRecoveryRate', 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: 'grossMargin', label: '付费数据', align: 'center', width: 110, default: 18, sorter: true },
+                {
+                    title: '3日ROI', dataIndex: 'roiDay3', label: '付费数据', align: 'center', width: 70, default: 19, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '5日ROI', dataIndex: 'roiDay5', label: '付费数据', align: 'center', width: 70, default: 20, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '7日ROI', dataIndex: 'roiDay7', label: '付费数据', align: 'center', width: 70, default: 21, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '30日ROI', dataIndex: 'roiDay30', label: '付费数据', align: 'center', width: 70, default: 22, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '60日ROI', dataIndex: 'roiDay60', 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: '180日ROI', dataIndex: 'roiDay180', label: '付费数据', align: 'center', width: 70, default: 24, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '1年回收率', dataIndex: 'roiYear1', label: '付费数据', align: 'center', width: 70, default: 25, sorter: true,
+                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                },
+                {
+                    title: '首日付费率', dataIndex: 'firstRechargeRate', 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: 'userRechargeRate', 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: 'todayRechargeRate', 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: 'newUserRechargeRatio', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '首日客单价', dataIndex: 'avgFirstUserRecharge', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '新用户客单价', dataIndex: 'avgUserRecharge', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '当天客单价', dataIndex: 'avgTodayRecharge', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '账面客单价', dataIndex: 'avgShowUserRecharge', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '首日充值成本', dataIndex: 'firstRechargeCost', label: '付费数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '新用户充值成本', dataIndex: 'userRechargeCost', label: '付费数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '当天充值成本', dataIndex: 'todayRechargeCost', label: '付费数据', align: 'center', width: 90, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                {
+                    title: '复充率', dataIndex: 'repeatRechargeRate', 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: 'userRepeatRechargeRate', 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: 'todayRepeatRechargeRate', 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: 'newRegArpu', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '首日付费ARPU', dataIndex: 'firstRechargeArpu', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '新用户付费ARPU', dataIndex: 'userRechargeArpu', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '当天付费ARPU', dataIndex: 'todayRechargeArpu', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> },
+                { title: '账面ARPU', dataIndex: 'showRechargeArpu', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} groupSeparator="" /> }
             ]
         },
         {
@@ -152,12 +209,12 @@ function columns12() {
                     title: '操作',
                     dataIndex: 'cz',
                     label: '操作',
-                    default: 21,
+                    default: 26,
                     key: 'cz',
                     align: 'center',
                     width: 75,
                     render: (a: number) => {
-                        return <span>1111</span>
+                        return <a>详情</a>
                     },
                 }
             ]

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

@@ -45,7 +45,7 @@ const Order: React.FC = () => {
                 isPayWay
                 isProductName
                 isRegAgent
-                isRegAgentId
+                isAgentId
                 isRegDay
                 isRegGameName
                 isRegGameId
@@ -57,7 +57,7 @@ const Order: React.FC = () => {
             scroll={{ x: 1000, y: 600 }}
             ajax={getOrderList}
             fixed={{ left: 3, right: 0 }}
-            dataSource={getOrderList?.data?.records}
+            dataSource={getOrderList?.data?.records?.map((item: any, index: number) => ({ ...item, id: item?.orderId?.replace(/\D/g, '') || index }))}
             total={getOrderList?.data?.total}
             page={queryForm.pageNum}
             pageSize={queryForm.pageSize}

+ 127 - 36
src/pages/gameDataStatistics/order/tableConfig.tsx

@@ -9,63 +9,154 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
         {
             label: '订单明细',
             data: [
-                { title: '日期(订单创建日期)', dataIndex: 'createDay', label: '订单明细', align: 'center', width: 85, default: 1 },
-                { 
+                {
+                    title: '日期(订单创建日期)', dataIndex: 'day1', label: '订单明细', align: 'center', width: 85, default: 1,
+                    render: (a: string, b: any) => (<WidthEllipsis value={b?.day} />)
+                },
+                {
                     title: '商户订单号', dataIndex: 'orderId', label: '订单明细', align: 'center', width: 120, default: 2,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
-                { 
+                {
                     title: 'CP订单号', dataIndex: 'cpOrderId', label: '订单明细', align: 'center', width: 130, default: 3,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
-                { title: '第三方支付订单号', dataIndex: 'merchantOrderNo', label: '订单明细', align: 'center', width: 85, default: 4 },
-                { title: '玩家ID', dataIndex: 'userId', label: '订单明细', align: 'center', width: 65, default: 5 },
-                { title: '玩家账号', dataIndex: 'userName', label: '订单明细', align: 'center', width: 95, default: 6 },
-                { 
-                    title: '玩家注册时间', dataIndex: 'userRegTime', label: '订单明细', align: 'center', width: 135, default: 7,
+                {
+                    title: '第三方支付订单号', dataIndex: 'merchantOrderNo', label: '订单明细', align: 'center', width: 85, default: 4,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                { title: '玩家ID', dataIndex: 'gameUserId', label: '订单明细', align: 'center', width: 65, default: 5 },
+                {
+                    title: '玩家账号', dataIndex: 'username', label: '订单明细', align: 'center', width: 95, default: 6,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '玩家注册时间', dataIndex: 'regTime', label: '订单明细', align: 'center', width: 135, default: 7,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
-                { title: '玩家注册渠道', dataIndex: 'regAgent', label: '订单明细', align: 'center', width: 95, default: 8 },
-                { title: '玩家注册游戏', dataIndex: 'regGameName', label: '订单明细', align: 'center', width: 95, default: 9 },
+                { title: '玩家注册渠道', dataIndex: 'agentId', label: '订单明细', align: 'center', width: 95, default: 8 },
+                { title: '玩家注册游戏', dataIndex: 'gameId', label: '订单明细', align: 'center', width: 95, default: 9 },
                 { title: 'CP名称', dataIndex: 'cpName', label: '订单明细', align: 'center', width: 95, default: 10 },
-                { title: '玩家注册游戏应用类型', dataIndex: 'regGameCategoryName', label: '订单明细', align: 'center', width: 110, default: 11 },
-                { title: '归因投放人员', dataIndex: 'pitcherName', label: '订单明细', align: 'center', width: 95, default: 12 },
-                { title: '归因推广账号', dataIndex: 'accountName', label: '订单明细', align: 'center', width: 95, default: 13 },
-                { title: '归因媒体', dataIndex: 'mediaName', label: '订单明细', align: 'center', width: 95, default: 14 },
-                { title: '归因广告', dataIndex: 'adId', label: '订单明细', align: 'center', width: 95, default: 15 },
-                { title: '玩家充值游戏', dataIndex: 'rechargeGameName', label: '订单明细', align: 'center', width: 95, default: 16 },
-                { title: '玩家充值游戏应用类型', dataIndex: 'rechargeGameCategory', label: '订单明细', align: 'center', width: 110, default: 17 },
-                { 
+                {
+                    title: '玩家注册游戏应用类型', dataIndex: 'classify', label: '订单明细', align: 'center', width: 110, default: 11,
+                    render: (a: string) => {
+                        if (a) {
+                            let one = a.charAt(0)
+                            switch (one) {
+                                case '3':
+                                    return 'Android'
+                                case '4':
+                                    return 'IOS'
+                                case '5':
+                                    return 'H5'
+                                case '6':
+                                    return '小程序'
+                                default:
+                                    return '--'
+                            }
+                        } else return '--'
+                    }
+                },
+                {
+                    title: '归因投放人员', dataIndex: 'zxPitcherName', label: '订单明细', align: 'center', width: 80, default: 12,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '归因推广账号', dataIndex: 'accountId', label: '订单明细', align: 'center', width: 80, default: 13,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '归因媒体', dataIndex: 'accountType', label: '订单明细', align: 'center', width: 85, default: 14,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '归因广告', dataIndex: 'adId', label: '订单明细', align: 'center', width: 80, default: 15,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '玩家充值游戏', dataIndex: 'orderGameId', label: '订单明细', align: 'center', width: 80, default: 16,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '玩家充值游戏应用类型', dataIndex: 'orderGameClassify', label: '订单明细', align: 'center', width: 70, default: 17,
+                    render: (a: string) => {
+                        if (a) {
+                            let one = a.charAt(0)
+                            switch (one) {
+                                case '3':
+                                    return 'Android'
+                                case '4':
+                                    return 'IOS'
+                                case '5':
+                                    return 'H5'
+                                case '6':
+                                    return '小程序'
+                                default:
+                                    return '--'
+                            }
+                        } else return '--'
+                    }
+                },
+                {
                     title: '充值产品名称', dataIndex: 'productName', label: '订单明细', align: 'center', width: 85, default: 18,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
-                { 
+                {
                     title: '订单金额', dataIndex: 'amount', label: '订单明细', align: 'center', width: 95, default: 19,
-                    render: (a: any) => <Statistic value={a || 0} precision={2}/>
+                    render: (a: any) => <Statistic value={a || 0} precision={2} />
                 },
-                { 
+                {
                     title: '订单实付金额', dataIndex: 'realAmount', label: '订单明细', align: 'center', width: 95, default: 20,
-                    render: (a: any) => <Statistic value={a || 0} precision={2}/>
+                    render: (a: any) => <Statistic value={a || 0} precision={2} />
+                },
+                {
+                    title: '支付方式', dataIndex: 'payWay', label: '订单明细', align: 'center', width: 65, default: 21,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '支付场景', dataIndex: 'payScene', label: '订单明细', align: 'center', width: 95, default: 22,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '收款账户', dataIndex: 'payAccountId', label: '订单明细', align: 'center', width: 95, default: 23,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
-                { title: '支付方式', dataIndex: 'payWay', label: '订单明细', align: 'center', width: 65, default: 21 },
-                { title: '支付场景', dataIndex: 'payDeviceName', label: '订单明细', align: 'center', width: 95, default: 22 },
-                { title: '收款账户', dataIndex: 'merchantNo', label: '订单明细', align: 'center', width: 95, default: 23 },
                 { title: '游戏区服', dataIndex: 'serverName', label: '订单明细', align: 'center', width: 95, default: 24 },
-                { title: '游戏角色', dataIndex: 'gameRoleName', label: '订单明细', align: 'center', width: 95, default: 25 },
-                { title: '角色等级', dataIndex: 'roleLevel', label: '订单明细', align: 'center', width: 75, default: 26 },
-                { title: '角色VIP', dataIndex: 'roleVipLevel', label: '订单明细', align: 'center', width: 75, default: 27 },
-                { title: '操作系统', dataIndex: 'deviceSystem', label: '订单明细', align: 'center', width: 75, default: 28 },
-                { title: '是否切量', dataIndex: 'isSwitch', label: '订单明细', align: 'center', width: 45, default: 29 },
-                { 
-                    title: '创建时间', dataIndex: 'createTime', label: '订单明细', align: 'center', width: 135, default: 30,
+                {
+                    title: '游戏角色', dataIndex: 'roleName', label: '订单明细', align: 'center', width: 95, default: 25,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '角色等级', dataIndex: 'roleLevel', label: '订单明细', align: 'center', width: 75, default: 26,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '角色VIP', dataIndex: 'roleVip', label: '订单明细', align: 'center', width: 75, default: 27,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '操作系统', dataIndex: 'os', label: '订单明细', align: 'center', width: 75, default: 28,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '是否切量', dataIndex: 'orderIsSwitch', label: '订单明细', align: 'center', width: 45, default: 29,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
-                { 
-                    title: '支付时间', dataIndex: 'payTime', label: '订单明细', align: 'center', width: 135, default: 31,
+                {
+                    title: '创建时间', dataIndex: 'day', label: '订单明细', align: 'center', width: 135, default: 30,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
-                { title: '支付状态', dataIndex: 'status', label: '订单明细', align: 'center', width: 85, default: 32 },
-                { 
+                {
+                    title: '支付时间', dataIndex: 'orderCreateTime', label: '订单明细', align: 'center', width: 135, default: 31,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                {
+                    title: '支付状态', dataIndex: 'orderStatus', label: '订单明细', align: 'center', width: 85, default: 32,
+                    render: (a: string, b: any) => {
+                        return { '1': '待处理', '2': '成功', '3': '失败' }[a]
+                    }
+                },
+                {
                     title: '是否首充', dataIndex: 'isFirstRecharge', label: '订单明细', align: 'center', width: 45, default: 33,
                     render: (a: any) => {
                         return a === 1 ? '是' : '否'

+ 55 - 40
src/pages/gameDataStatistics/rankingList/game/index.tsx

@@ -1,71 +1,86 @@
 import { useAjax } from "@/Hook/useAjax"
 import { GameRechargeListType, getRechargeGameListApi } from "@/services/gameData/rankingList"
-import { Radio, Space } from "antd"
 import React, { useEffect, useState } from "react"
 import TableData from "../../components/TableData"
 import columns12 from "./tableConfig"
 import moment from "moment"
+import QueryForm from "@/components/QueryForm"
+import { rangePresets } from "@/components/QueryForm/const"
+import { getGameChoiceParentListType1Api } from "@/services/gameData"
 
 
 const Game: React.FC = () => {
 
     /************************/
-    const [dateType, setDateType] = useState<string>('all')
     const [queryForm, setQueryForm] = useState<GameRechargeListType>({ pageNum: 1, pageSize: 20 })
+    const [gameType, setGameType] = useState<any>({})
+
     const getRechargeGameList = useAjax((params) => getRechargeGameListApi(params))
+    const getGameChoiceParentListType1 = useAjax(() => getGameChoiceParentListType1Api())
     /************************/
 
     useEffect(() => {
         getRechargeGameList.run(queryForm)
     }, [queryForm])
-
     useEffect(() => {
-        let newQueryForm = JSON.parse(JSON.stringify(queryForm))
-        switch(dateType) {
-            case 'all':
-                delete newQueryForm?.beginDay
-                delete newQueryForm?.endDay
-                break;
-            case 'today':
-                newQueryForm.beginDay = moment().format('YYYY-MM-DD')
-                newQueryForm.endDay = moment().format('YYYY-MM-DD')
-                break
-            case 'yesterday':
-                newQueryForm.beginDay = moment().subtract(1, 'd').format('YYYY-MM-DD')
-                newQueryForm.endDay = moment().subtract(1, 'd').format('YYYY-MM-DD')
-                break
-            case '7days':
-                newQueryForm.beginDay = moment().subtract(7, 'd').format('YYYY-MM-DD')
-                newQueryForm.endDay = moment().format('YYYY-MM-DD')
-                break
-            case '30days':
-                newQueryForm.beginDay = moment().subtract(30, 'd').format('YYYY-MM-DD')
-                newQueryForm.endDay = moment().format('YYYY-MM-DD')
-                break
-        }
-        setQueryForm(newQueryForm)
-    }, [dateType])
+        getGameChoiceParentListType1.run().then(res => {
+            let newType: any = {}
+            res.forEach((item: {id: number, name: string}) => {
+                newType[item.id] = item.name
+            })
+            setGameType(newType)
+        })
+    }, [])
 
     return <div>
         <TableData
-            leftChild={<Space>
-                <Radio.Group value={dateType} onChange={(e) => setDateType(e.target.value)}>
-                    <Radio.Button value="all">总排行</Radio.Button>
-                    <Radio.Button value="today">今日排行</Radio.Button>
-                    <Radio.Button value="yesterday">昨日排行</Radio.Button>
-                    <Radio.Button value="7days">7日排行</Radio.Button>
-                    <Radio.Button value="30days">30日排行</Radio.Button>
-                </Radio.Group>
-            </Space>}
-            scroll={{ x: 1000, y: 600 }}
+            leftChild={<QueryForm
+                onChange={(data: any) => {
+                    console.log(data)
+                    const { rechargeDay, beginDay, endDay } = data
+                    let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                    newQueryForm.pageNum = 1
+                    if (rechargeDay && rechargeDay?.length === 2) {
+                        newQueryForm['beginDay'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
+                        newQueryForm['endDay'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
+                    } else {
+                        if (beginDay && endDay) {
+                            newQueryForm['beginDay'] = beginDay
+                            newQueryForm['endDay'] = endDay
+                        } else {
+                            delete newQueryForm['beginDay']
+                            delete newQueryForm['endDay']
+                        }
+                    }
+                    setQueryForm(newQueryForm)
+                }}
+                rechargeDay={{ ranges: rangePresets }}
+            />}
+            scroll={{ x: 1200, y: 600 }}
             ajax={getRechargeGameList}
             fixed={{ left: 1, right: 0 }}
-            dataSource={[]}
+            dataSource={getRechargeGameList?.data?.records}
+            page={getRechargeGameList?.data?.current || 1}
+            pageSize={getRechargeGameList?.data?.size || 20}
+            total={getRechargeGameList?.data?.total || 0}
             title='游戏充值排行榜'
             onChange={(props: any) => {
                 console.log('props--->', props)
+                let { pagination, sortData } = props
+                let { current, pageSize } = pagination
+                let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                if (sortData && sortData?.order) {
+                    newQueryForm['sortType'] = sortData?.order === 'ascend' ? 'asc' : 'desc'
+                    newQueryForm['sortFiled'] = sortData?.field
+                } else {
+                    delete newQueryForm['sortType']
+                    delete newQueryForm['sortFiled']
+                }
+                newQueryForm.pageNum = current
+                newQueryForm.pageSize = pageSize
+                setQueryForm({ ...newQueryForm })
             }}
-            config={columns12()}
+            config={columns12(gameType)}
             configName={'游戏充值排行榜'}
         />
     </div>

+ 55 - 17
src/pages/gameDataStatistics/rankingList/game/tableConfig.tsx

@@ -1,25 +1,63 @@
-function columns12() {
+import WidthEllipsis from "@/components/widthEllipsis"
+import { Statistic } from "antd"
+import React from "react"
+
+function columns12(gameType: any) {
 
     let newArr: { label: string, data: any[] }[] = [
         {
             label: '游戏充值排行榜',
             data: [
-                { title: '排序', dataIndex: '0', label: '游戏充值排行榜', align: 'center', width: 95, default: 1 },
-                { title: '游戏ID', 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 },
-                { title: '当天充值金额', dataIndex: '4', label: '游戏充值排行榜', align: 'center', width: 70, default: 5 },
-                { title: '当天买量充值金额', dataIndex: '5', label: '游戏充值排行榜', align: 'center', width: 70, default: 6 },
-                { title: '当天自然量充值金额', dataIndex: '6', label: '游戏充值排行榜', align: 'center', width: 70, default: 7 },
-                { title: '累计充值金额', dataIndex: '7', label: '游戏充值排行榜', align: 'center', width: 70, default: 8 },
-                { title: '累计买量充值金额', dataIndex: '8', label: '游戏充值排行榜', align: 'center', width: 70, default: 9 },
-                { title: '累计自然量充值金额', dataIndex: '9', label: '游戏充值排行榜', align: 'center', width: 70, default: 10 },
-                { title: '平均客单价', dataIndex: '10', label: '游戏充值排行榜', align: 'center', width: 70, default: 11 },
-                { title: '注册人数', dataIndex: '11', label: '游戏充值排行榜', align: 'center', width: 70, default: 12 },
-                { title: '累计充值人数', dataIndex: '12', label: '游戏充值排行榜', align: 'center', width: 70, default: 13 },
-                { title: '累计充值次数', dataIndex: '13', label: '游戏充值排行榜', align: 'center', width: 70, default: 14 },
-                { title: '累计消耗', dataIndex: '14', label: '游戏充值排行榜', align: 'center', width: 70, default: 15 },
-                { title: '回本率', dataIndex: '15', label: '游戏充值排行榜', align: 'center', width: 70, default: 16 }
+                { title: '排序', dataIndex: 'id', label: '游戏充值排行榜', align: 'center', width: 60, default: 1 },
+                { title: '游戏ID', dataIndex: 'gameId', label: '游戏充值排行榜', align: 'center', width: 60, default: 2 },
+                {
+                    title: '游戏名称',
+                    dataIndex: 'gameName',
+                    label: '游戏充值排行榜',
+                    align: 'center',
+                    width: 80,
+                    default: 3,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
+                { 
+                    title: '游戏类型', 
+                    dataIndex: 'gameClassify', 
+                    label: '游戏充值排行榜', 
+                    align: 'center', 
+                    width: 85, 
+                    default: 4,
+                    render: (a: string) => {
+                        render: (a: string) => { 
+                            if (a) {
+                                let one = a.charAt(0)
+                                switch(one) {
+                                    case '3':
+                                        return 'Android'
+                                    case '4':
+                                        return 'IOS'
+                                    case '5':
+                                        return 'H5'
+                                    case '6':
+                                        return '小程序'
+                                    default:
+                                        return gameType[a] || a
+                                }
+                            } else return '--'
+                        }
+                    }
+                },
+                { title: '当天充值金额', dataIndex: 'todayAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 5, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '当天买量充值金额', dataIndex: 'todayBuyAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 6, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '当天自然量充值金额', dataIndex: 'todayNatureAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 7, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '累计充值金额', dataIndex: 'totalAmount', label: '游戏充值排行榜', align: 'center', width: 100, default: 8, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '累计买量充值金额', dataIndex: 'totalBuyAmount', label: '游戏充值排行榜', align: 'center', width: 90, default: 9, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '累计自然量充值金额', dataIndex: 'totalNatureAmount', label: '游戏充值排行榜', align: 'center', width: 85, default: 10, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '平均客单价', dataIndex: 'avgAmount', label: '游戏充值排行榜', align: 'center', width: 70, default: 11, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '注册人数', dataIndex: 'regUserCount', label: '游戏充值排行榜', align: 'center', width: 70, default: 12, sorter: true, },
+                { title: '累计充值人数', dataIndex: 'totalRechargeUserCount', label: '游戏充值排行榜', align: 'center', width: 70, default: 13, sorter: true, },
+                { title: '累计充值次数', dataIndex: 'totalRechargeCount', label: '游戏充值排行榜', align: 'center', width: 70, default: 14, sorter: true, },
+                { title: '累计消耗', dataIndex: 'totalCost', label: '游戏充值排行榜', align: 'center', width: 100, default: 15, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '回本率', dataIndex: 'totalRoi', 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="%" /> }
             ]
         },
     ]

+ 43 - 9
src/pages/gameDataStatistics/rankingList/gamer/index.tsx

@@ -1,37 +1,71 @@
 import { useAjax } from "@/Hook/useAjax"
-import { getRechargeUserApi, UserRechargeListType } from "@/services/gameData/rankingList"
+import { getRechargeUserListApi, UserRechargeListType } from "@/services/gameData/rankingList"
 import React, { useEffect, useState } from "react"
 import TableData from "../../components/TableData"
 import columns12 from "./tableConfig"
 import QueryForm from "@/components/QueryForm"
-
+import moment from "moment"
+import { rangePresets } from "@/components/QueryForm/const"
 
 const Gamer: React.FC = () => {
 
     /************************/
     const [queryForm, setQueryForm] = useState<UserRechargeListType>({ pageNum: 1, pageSize: 20 })
-    const getRechargeGameList = useAjax((params) => getRechargeUserApi(params))
+    const getRechargeUserList = useAjax((params) => getRechargeUserListApi(params))
     /************************/
 
     useEffect(() => {
-        getRechargeGameList.run(queryForm)
+        getRechargeUserList.run(queryForm)
     }, [queryForm])
 
     return <div>
 
         <TableData
             leftChild={<QueryForm
-                onChange={(data: any) => setQueryForm({ ...queryForm, pageNum: 1, ...data })}
-                initialValues={{ dateType: 'all' }}
-                isSelectRanking
+                onChange={(data: any) => {
+                    console.log(data)
+                    const { rechargeDay, beginDay, endDay } = data
+                    let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                    newQueryForm.pageNum = 1
+                    if (rechargeDay && rechargeDay?.length === 2) {
+                        newQueryForm['beginDay'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
+                        newQueryForm['endDay'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
+                    } else {
+                        if (beginDay && endDay) {
+                            newQueryForm['beginDay'] = beginDay
+                            newQueryForm['endDay'] = endDay
+                        } else {
+                            delete newQueryForm['beginDay']
+                            delete newQueryForm['endDay']
+                        }
+                    }
+                    setQueryForm(newQueryForm)
+                }}
+                rechargeDay={{ ranges: rangePresets }}
             />}
             scroll={{ x: 1000, y: 600 }}
-            ajax={getRechargeGameList}
+            ajax={getRechargeUserList}
             fixed={{ left: 1, right: 0 }}
-            dataSource={[]}
+            dataSource={getRechargeUserList?.data?.records}
+            page={getRechargeUserList?.data?.current || 1}
+            pageSize={getRechargeUserList?.data?.size || 20}
+            total={getRechargeUserList?.data?.total || 0}
             title='玩家充值排行榜'
             onChange={(props: any) => {
                 console.log('props--->', props)
+                let { pagination, sortData } = props
+                let { current, pageSize } = pagination
+                let newQueryForm = JSON.parse(JSON.stringify(queryForm))
+                if (sortData && sortData?.order) {
+                    newQueryForm['sortType'] = sortData?.order === 'ascend' ? 'asc' : 'desc'
+                    newQueryForm['sortFiled'] = sortData?.field
+                } else {
+                    delete newQueryForm['sortType']
+                    delete newQueryForm['sortFiled']
+                }
+                newQueryForm.pageNum = current
+                newQueryForm.pageSize = pageSize
+                setQueryForm({ ...newQueryForm })
             }}
             config={columns12()}
             configName={'玩家充值排行榜'}

+ 20 - 16
src/pages/gameDataStatistics/rankingList/gamer/tableConfig.tsx

@@ -1,25 +1,29 @@
+import WidthEllipsis from "@/components/widthEllipsis"
+import { Statistic } from "antd"
+import React from "react"
+
 function columns12() {
 
     let newArr: { label: string, data: any[] }[] = [
         {
             label: '玩家充值排行榜',
             data: [
-                { title: '排序', dataIndex: '0', label: '玩家充值排行榜', align: 'center', width: 95, default: 1 },
-                { title: '玩家ID', 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 },
-                { title: '注册时间', dataIndex: '4', label: '玩家充值排行榜', align: 'center', width: 70, default: 5 },
-                { title: '注册游戏', dataIndex: '5', label: '玩家充值排行榜', align: 'center', width: 70, default: 6 },
-                { title: '玩家操作系统', dataIndex: '6', label: '玩家充值排行榜', align: 'center', width: 70, default: 7 },
-                { title: '当天充值金额', dataIndex: '7', label: '玩家充值排行榜', align: 'center', width: 70, default: 8 },
-                { title: '首充金额', dataIndex: '8', label: '玩家充值排行榜', align: 'center', width: 70, default: 9 },
-                { title: '最近充值金额', dataIndex: '9', label: '玩家充值排行榜', align: 'center', width: 70, default: 10 },
-                { title: '累计充值金额', dataIndex: '10', label: '玩家充值排行榜', align: 'center', width: 70, default: 11 },
-                { title: '平均单价', dataIndex: '11', label: '玩家充值排行榜', align: 'center', width: 70, default: 12 },
-                { title: '累计充值次数', dataIndex: '12', label: '玩家充值排行榜', align: 'center', width: 70, default: 13 },
-                { title: '玩家等级标签', dataIndex: '13', label: '玩家充值排行榜', align: 'center', width: 70, default: 14 },
-                { title: '最近充值游戏', dataIndex: '14', label: '玩家充值排行榜', align: 'center', width: 70, default: 15 },
-                { title: '最近充值时间', dataIndex: '15', label: '玩家充值排行榜', align: 'center', width: 70, default: 16 }
+                { title: '排序', 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 },
+                { title: '注册时间', dataIndex: 'regUserTime', label: '玩家充值排行榜', align: 'center', width: 140, default: 5, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
+                { title: '注册游戏', dataIndex: 'regGameName', label: '玩家充值排行榜', align: 'center', width: 70, default: 6, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
+                { title: '玩家操作系统', dataIndex: 'playerOs', label: '玩家充值排行榜', align: 'center', width: 70, default: 7 },
+                { title: '当天充值金额', dataIndex: 'todayTotalAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 8, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '首充金额', dataIndex: 'firstAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 9, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '最近充值金额', dataIndex: 'lastAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 10, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '累计充值金额', dataIndex: 'totalAmount', label: '玩家充值排行榜', align: 'center', width: 100, default: 11, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '平均单价', dataIndex: 'avgAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 12, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '累计充值次数', dataIndex: 'totalAmountCount', label: '玩家充值排行榜', align: 'center', width: 70, default: 13, sorter: true },
+                // { title: '玩家等级标签', dataIndex: '13', label: '玩家充值排行榜', align: 'center', width: 70, default: 14 },
+                { title: '最近充值游戏', dataIndex: 'lastAmountGameName', label: '玩家充值排行榜', align: 'center', width: 70, default: 14, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
+                { title: '最近充值时间', dataIndex: 'lastAmountTime', label: '玩家充值排行榜', align: 'center', width: 140, default: 15, render: (a: string, b: any) => (<WidthEllipsis value={a} />) }
             ]
         },
     ]

+ 64 - 4
src/services/gameData/extensionData.ts

@@ -9,11 +9,71 @@ let wapi = api + '/gameData'
  * @returns 
  */
 export interface EverydayListType extends Paging {
-    
+    // 推广账号ID
+    accountId?: number,
+    // 投放渠道Id
+    agentId?: number,
+    // 消耗开始日期
+    beginDay?: string,
+    // 消耗结束日期
+    endDay?: string
+    cpName?: string
+    gameName?: string
+    gameType?: string,
+    sysUserId?: number
 }
-export async function getEveryListApi(data: EverydayListType) {
-    return request(wapi + `/game/promote/day/data`, {
-        method: 'PUT',
+/**
+ * 每日推广数据
+ * @param data 
+ * @returns 
+ */
+export async function getPromoteDayListApi(data: EverydayListType) {
+    return request(wapi + `/promote/day`, {
+        method: 'POST',
+        data
+    });
+}
+
+/**
+ * 每日数据总计
+ * @param data 
+ * @returns 
+ */
+export async function getPromoteDayTotalApi(data: EverydayListType) {
+    return request(wapi + `/promote/day/total`, {
+        method: 'POST',
+        data
+    });
+}
+
+
+export interface PromoteTotalProps extends Paging {
+    // 推广账号ID
+    accountId?: number,
+    // 投放渠道Id
+    agentId?: number,
+    // 消耗开始日期
+    costBeginDay?: string,
+    // 消耗结束日期
+    costEndDay?: string
+    // cp名
+    cpName?: string
+    gameName?: string
+    gameType?: string,
+    sysUserId?: number
+    // 充值开始日期
+    rechargeBeginDay?: string,
+    // 充值结束日期
+    rechargeEndDay?: string
+}
+/**
+ * 推广总数据
+ * @param data 
+ * @returns 
+ */
+export async function getPromoteTotalListApi(data: EverydayListType) {
+    return request(wapi + `/promote/total`, {
+        method: 'POST',
         data
     });
 }

+ 63 - 0
src/services/gameData/index.ts

@@ -0,0 +1,63 @@
+
+import { request } from 'umi';
+import { gameApi, api } from '../api';
+
+/**
+ * 腾讯所有推广账号列表
+ * @returns 
+ */
+export async function getAllOfOwnerUserApi() {
+    return request(gameApi + `/adq/adAccount/allOfOwnerUser`, {
+        method: 'GET',
+    });
+}
+
+/**
+ * 头条所有广告账号
+ * @returns 
+ */
+export async function getTtAllUserListApi() {
+    return request(gameApi + `/oceanengine/adAccount/allOfUser`, {
+        method: 'GET',
+    });
+}
+
+
+/**
+ * 游戏选择列
+ * @returns 
+ */
+export async function getGameChoiceListApi() {
+    return request(gameApi + `/manage/choice/game/list`, {
+        method: 'GET',
+    });
+}
+
+/**
+ * 投手列表
+ * @returns 
+ */
+export async function getSubUserWithSelfListApi() {
+    return request(gameApi + '/erp/user/subUserWithSelf');
+}
+
+/**
+ * 渠道选择列表
+ * @returns 
+ */
+export async function getChannelChoiceListApi() {
+    return request(gameApi + `/manage/choice/agent/list`, {
+        method: 'GET',
+    });
+}
+
+
+/**
+ * 游戏应用类型
+ * @returns 
+ */
+export async function getGameChoiceParentListType1Api() {
+    return request(gameApi + `/manage/choice/game/category/list`, {
+        method: 'GET',
+    });
+}

+ 18 - 3
src/services/gameData/order.ts

@@ -9,11 +9,26 @@ let wapi = api + '/gameData'
  * @returns 
  */
 export interface OrderListType extends Paging {
-    
+    // 广告账号
+    accountId?: string,
+    // 归属渠道ID
+    agentId?: number, 
+    // 订单创建时间
+    beginOrderTime?: string
+    // 用户注册时间
+    beginRegTime?: string
+    // CP订单号
+    cpOrderId?: string
+    // 订单创建时间
+    endOrderTime?: string,
+    // 用户注册时间
+    endRegTime?: string
+    // 游戏ID
+    gameId?: number
 }
 export async function getOrderListApi(data: OrderListType) {
-    return request(wapi + `/game/order/detail`, {
-        method: 'PUT',
+    return request(wapi + `/order/list`, {
+        method: 'POST',
         data
     });
 }

+ 10 - 6
src/services/gameData/rankingList.ts

@@ -12,6 +12,12 @@ export interface Paging {
     pageSize: number
 }
 
+
+export interface SortProps {
+    sortFiled?: string, // 排序字段
+    sortType?: string,  // 排序方式:升序asc;降序desc
+}
+
 /**
  * 游戏充值排行榜
  * @param beginDay 开始日期
@@ -19,13 +25,11 @@ export interface Paging {
  * @param companyId 公司ID
  * @param sysUserId 投手ID
  */
-export interface GameRechargeListType extends Paging {
+export interface GameRechargeListType extends Paging, SortProps {
     beginDay?: string,  // 充值开始日期
     endDay?: string,    // 充值结束日期
     companyId?: number, // 公司ID
     sysUserId?: number  // 投手ID
-    sortFiled?: string, // 排序字段
-    sortType?: string,  // 排序方式:升序asc;降序desc
 }
 export async function getRechargeGameListApi(data: GameRechargeListType) {
     return request(wapi + `/ranking/game`, {
@@ -47,9 +51,9 @@ export interface UserRechargeListType extends Paging {
     companyId?: number, // 公司ID
     sysUserId?: number  // 投手ID
 }
-export async function getRechargeUserApi(data: UserRechargeListType) {
-    return request(wapi + `/game/ranking/recharge/user`, {
-        method: 'PUT',
+export async function getRechargeUserListApi(data: UserRechargeListType) {
+    return request(wapi + `/ranking/player`, {
+        method: 'POST',
         data
     });
 }

+ 0 - 122
src/services/operating/account.ts

@@ -1,128 +1,6 @@
 import { request } from 'umi';
 import { api } from '../api';
-console.log('process1', process);
-export interface Postlist {
-  nickName?: string;
-  pageNum?: string | number;
-  pageSize?: string | number;
-  platformId?: string;
-  userId?: string;
-}
-export interface AddGroup {
-  groupName: string;
-  remark?: string;
-}
-export interface EditGroup {
-  groupId: string;
-  groupName: string;
-  remark?: string;
-}
-
-/**获取二维码 */
-export async function getAccount(params: { params: string; mpId: string }) {
-  let str = encodeURIComponent(params.params + '?uuid=UUID');
-  return request(api + `/system/mp/auth/${params.mpId}?callbackPage=${str}`);
-}
-export async function authSuccess(params: string) {
-  return request(api + `/system/mp/authSuccess?${params}`);
-}
-/**获取绑定公众号列表 */
-export async function postList(params?: Postlist) {
-  return request(api + '/system/mp/list', {
-    method: 'POST',
-    data: params,
-  });
-}
-/**同步*/
-export async function putWx(params: { id: string }) {
-  return request(`${api}/system/mp/refresh/${params.id}`, {
-    method: 'PUT',
-  });
-}
-/**添加公众号分组 */
-export async function addGroup(params: AddGroup) {
-  return request(api + '/system/mpGroup/add', {
-    method: 'POST',
-    data: params,
-  });
-}
 /** 获取账号 */
 export async function getAllZhMemBerApi() {
   return request(`${api}/erp/resourceOfUser/allOfMember/10`);
-}
-
-/**编辑公众号分组 */
-export async function editGroup(params: EditGroup) {
-  let { groupId, ...param } = params;
-  return request(`${api}/system/mpGroup/modify/${groupId}`, {
-    method: 'PUT',
-    data: param,
-  });
-}
-/**删除公众号分组 */
-export async function delGroup(params: { groupId: string }) {
-  return request(`${api}/system/mpGroup/del/${params.groupId}`, {
-    method: 'DELETE',
-  });
-}
-/**修改公众号所属分组 */
-export async function configGroup(params: { groupId: string; mpAccountId: string }) {
-  return request(`${api}/system/mp/configGroup`, {
-    method: 'PUT',
-    data: params,
-  });
-}
-/**修改公众号状态 */
-export async function editApproveStatus(params: { mpId: string; status: string }) {
-  return request(`${api}/system/mp/configStatus/${params.mpId}/${params.status}`, {
-    method: 'PUT',
-  });
-}
-/**公众号信息完善 */
-export async function perfect(params: {
-  mpId: string;
-  administratorCard?: string; //管理员身份证号码
-  administratorName?: string; //管理员名称
-  administratorWechat?: string; //管理员微信号
-  legalCard?: string; //法人身份证
-  legalName?: string; //法人姓名
-  legalWechat?: string; //法人手机号
-}) {
-  let { mpId, ...param } = params;
-  return request(`${api}/system/mp/${mpId}`, {
-    method: 'PUT',
-    data: param,
-  });
-}
-/**修改切书记录*/
-
-export async function modify2(params:any) {
- let {changeRecordId,...param} = params
-  return request(`${api}/erp/resourceChangeRecord/modify2/${changeRecordId}`,{
-    method:'PUT',
-    data:param
-  })
-}
-/**获取所有用户*/
-export async function getAllUser() {
-   return request(`${api}/erp/user/all`)
- }
-//**删除切书记录 */
-export async function del(changeRecordId:number) {
-  return request(`${api}/erp/resourceChangeRecord/${changeRecordId}`,{
-    method:'DELETE',
-  })
-}
-/**切书验证*/ 
-export async function verify(params:{resourceId:number,beginTime:string}) {
-  let {resourceId,beginTime} = params
-  return request(`${api}/erp/resourceChangeRecord/checkTime/${resourceId}/${beginTime}`,{
-    method:'PUT',
-  })
-}
-/**测试服临时获取新老erp token权限*/ 
-export async function authToken() {
-  return request(`http://test.api.zanxiangwl.com/api/erp/user/loginByOldErp`,{
-    method:'POST'
-  })
 }

+ 0 - 208
src/services/operating/accountyyb.ts

@@ -1,208 +0,0 @@
-import { request } from 'umi';
-import { api } from '../api';
-// =============================================== 广点通===============================================
-/**广点通账号列表*/
-export interface gdtAccountProps {
-  userId: string,
-  pageNum: number,
-  pageSize: number,
-  accountIds?: string,
-  putResourceId?: number
-}
-export async function getGdtAccountApi(params: gdtAccountProps) {
-  let { userId, pageNum, pageSize,  accountIds, putResourceId } = params
-  return request(api + `/erp/gdtAccount/list/${userId}`, {
-    method: 'POST',
-    data: { pageNum, pageSize,  accountIds, putResourceId }
-  });
-}
-
-/** 变更记录 */
-export async function getGdtChangeRecordApi(params: { gdtAccountId: number, pageNum: number, pageSize: number }) {
-  let { gdtAccountId, ...param } = params
-  return request(api + `/erp/gdtAccount/gdtChangeRecord/${gdtAccountId}`, {
-    method: 'POST',
-    data: param
-  });
-}
-
-/** 变更记录修改 */
-export async function editGdtChangeRecordApi(params: { recordId: number, putResourceId: number, beginTime: string, endTime: string }) {
-  let { recordId, ...param } = params
-  return request(api + `/erp/gdtAccount/gdtChangeRecordModify/${recordId}`, {
-    method: 'PUT',
-    data: param
-  });
-}
-
-/**批量新增广点通账号*/
-export interface addGdtAccointProps {
-  userId: string,
-  accountIds: string,
-  putResourceId: number,
-  beginTime: string
-}
-export async function addGdtAccountApi(params: addGdtAccointProps) {
-  let { userId, ...param } = params
-  return request(api + `/erp/gdtAccount/addBatch/${userId}`, {
-    method: 'POST',
-    data: param
-  });
-}
-/**编辑广点通账号 */
-export interface editGdtAccountProps {
-  accountId: string,
-  gdtAccountId: string,
-  putResourceId: number,
-  beginTime: string
-}
-export async function editGdtAccountApi(params: editGdtAccountProps) {
-  let { gdtAccountId, ...param } = params
-  return request(api + `/erp/gdtAccount/${gdtAccountId}`, {
-    method: 'PUT',
-    data: param,
-  });
-}
-/**广点通账号-批量切号*/
-export interface checkGdtAccountProps {
-  gdtAccountIds: string,
-  putResourceId: number,
-  beginTime: string
-}
-export async function checkGdtAccountGdtApi(params: { gdtAccountIds: string, putResourceId: any, beginTime: any }) {
-  let { gdtAccountIds, ...param } = params
-  return request(api + `/erp/gdtAccount/checkBatch/${gdtAccountIds}`, {
-    method: 'PUT',
-    data: param,
-  });
-}
-/**广点通账号-批量删除*/
-export async function delGdtAccountApi(params: { gdtAccountIds: string }) {
-  let { gdtAccountIds } = params
-  return request(api + `/erp/gdtAccount/${gdtAccountIds}`, {
-    method: 'DELETE',
-  });
-}
-// =============================================== 应用宝===============================================
-/**快应用账号列表*/
-export interface QuickAppAccout {
-  userId: string;
-  pageNum: number,
-  pageSize: number,
-  advertiserIds?: string,
-  account?: string,
-  putResourceId?: number
-}
-export async function getQuickAppAccountApi(params: QuickAppAccout) {
-  let { userId, ...param } = params
-  return request(api + `/erp/quickAppAccount/list/${userId} `, {
-    method: 'POST',
-    data: param
-  });
-}
-/**变更记录 */ 
-export async function getAccountChangeRecordApi(params: { quickAppAccountId: number, pageNum: number, pageSize: number }) {
-  let { quickAppAccountId, ...param } = params
-  return request(api + `/erp/quickAppAccount/accountChangeRecord/${quickAppAccountId}`, {
-    method: 'POST',
-    data: param
-  });
-}
-
-/** 变更记录修改 */
-export async function editAccountChangeRecordApi(params: { recordId: number, putResourceId: number, beginTime: string, endTime: string }) {
-  let { recordId, ...param } = params
-  return request(api + `/erp/quickAppAccount/accountChangeRecordModify/${recordId}`, {
-    method: 'PUT',
-    data: param
-  });
-}
-
-/**批量新增块应用账号*/
-export interface AddQuickAppAccount {
-  userId: string,
-  advertiserIds: string, // 账号ID
-  accountName: string, // 总账号名称
-  account: string,   // 总账号
-  accountPassword: string, // 总账号密码
-  putResourceId: number,
-  beginTime: string
-}
-export async function addQuickAppAccountApi(params: AddQuickAppAccount) {
-  let { userId, ...param } = params
-  return request(api + `/erp/quickAppAccount/addBatch/${userId}`, {
-    method: 'POST',
-    data: param
-  });
-}
-/**编辑块应用账号 */
-export interface EditQuickAppAccount {
-  accountId: string,
-  advertiserId: string,
-  accountName: string,
-  account: string,
-  accountPassword: string,
-  putResourceId: number,
-  beginTime: string
-}
-export async function editQuickAppAccountApi(params: EditQuickAppAccount) {
-  let { accountId, ...param } = params
-  return request(api + `/erp/quickAppAccount/${accountId}`, {
-    method: 'PUT',
-    data: param,
-  });
-}
-/**块应用账号-批量切号*/
-export interface CheckQuickAppAccount {
-  quickAppAccountIds: string,
-  putResourceId: number,
-  beginTime: string
-}
-export async function checkQuickAppAccountApi(params: CheckQuickAppAccount) {
-  let { quickAppAccountIds, ...param } = params
-  return request(api + `/erp/quickAppAccount/checkBatch/${quickAppAccountIds}`, {
-    method: 'PUT',
-    data: param,
-  });
-}
-/**块应用账号-批量删除*/
-export async function delQuickAppAccountApi(params: { quickAppAccountIds: string }) {
-  let { quickAppAccountIds } = params
-  return request(api + `/erp/quickAppAccount/${quickAppAccountIds}`, {
-    method: 'DELETE',
-  });
-}
-
-
-// =============================================== 公用===============================================
-/**0-公众号,10:快应用包*/
-export async function queryApi(params: { resourceType: string; resourceName: string }) {
-  let { resourceType, resourceName } = params
-  return request(api + `/erp/resource/query/10,0,3,20/${resourceName || 'null'}`);
-  // return request(api + `/erp/resource/query/${resourceType}/${resourceName || 'null'}`);
-}
-
-
-// ============================================ 快应用包管理 =========================================
-/** 获取快应用包列表 */
-export interface KyyListProps {
-  userId: string;
-  pageNum: number,
-  pageSize: number,
-  resourceType: 10,
-  resourceName?: string,
-  periodId?: number
-}
-export async function getKyyListApi(params: KyyListProps) {
-  return request(api + `/erp/resourceOfUser/list`, { method: 'POST', data: params });
-}
-
-/**
- * 获取投放信息
- * @param userId 用户ID
- * @param resourceType 资源类型
- * @returns 
- */
-export async function getResourceOfUserApi({ userId, resourceType }: { userId: number, resourceType: 10 | 0 }) {
-  return request(`${api}/erp/resourceOfUser/${userId}/${resourceType}`)
-}

+ 0 - 331
src/services/operating/adAuthorize.ts

@@ -1,331 +0,0 @@
-import { request } from 'umi';
-import { api } from '../api'
-
-
-/**登录授权 */
-export interface LoginProps {
-    scanCode?: 'qq' | 'wx'//扫码
-    user?: string,//账号
-    password?: string,//密码
-}
-export async function loginAdApi(params: LoginProps) {
-  return request(api + '/ads/adsUser/doAuth', {
-    method: 'PUT',
-    data: params,
-  });
-}
-/** 更新账户密码 */
-export async function uploadLoginAdApi(params: LoginProps) {
-    return request(api + '/ads/adsUser/updateAccount', {
-      method: 'PUT',
-      data: params,
-    });
-}
-
-
-// 更新接口
-export interface updateChannelInfoPrpps {
-    updateName: "all" | "channel" | "user" | "crowd_package ",
-    channels?: number[],
-    channelMpAccount?: any,
-    channelAdqAccount?: any
-}
-export async function updateChannelInfoApi(params: updateChannelInfoPrpps) {
-    return request(api + '/ads/adsChannel/updateChannelInfo', {
-        method: 'PUT',
-        data: params,
-    })
-}
-
-/** 轮询接口 */
-export async function loginResultApi(code: string) {
-    return request(api + `/ads/adsUser/loginResult/${code}`, {
-        method: 'GET'
-    })
-}
-
-/** 登录账户的服务商列表 */
-export async function allOfLoginUserApi() {
-    return request(api + `/ads/adsChannel/allOfLoginUser`, {
-        method: 'GET'
-    })
-}
-
-
-/** adq账号列表 */
-export interface adqPrpps {
-    pageSize: number,
-    pageNum: number,
-    channelId: number,
-    uname?: string,
-    withChannel?: boolean
-}
-export async function adsChannelAccountAdqApi(params: adqPrpps) {
-    return request(api + `/ads/adsChannelAccount/list/adq`, {
-        method: 'GET',
-        params
-    })
-}
-export async function adsChannelAccountAdqAllApi(channelId: number) {
-    return request(api + `/ads/adsChannelAccount/allOfChannel/adq/${channelId}`, {
-        method: 'GET'
-    })
-}
-/** mp账号列表 */
-export async function adsChannelAccountMpApi(params: adqPrpps) {
-    return request(api + `/ads/adsChannelAccount/list/mp`, {
-        method: 'GET',
-        params
-    })
-}
-
-export async function adsChannelAccountMpAllApi(channelId: number) {
-    return request(api + `/ads/adsChannelAccount/allOfChannel/mp/${channelId}`, {
-        method: 'GET'
-    })
-}
-
-
-/** 新增落地页 不上传 */
-export async function adsSharePageApi(params: any) {
-    return request(api + `/ads/adsSharePage`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-export interface AddAnd {
-    pageIds?: number[],
-    pageDto?: any,
-    channelMpAccounts?: number[],
-    channelAdqAccounts?: number[],
-    channelMpWechatInfoList?: any[],  // 企微
-}
-
-/** 新增落地页 上传 */
-export async function addAndCreateApi(params: AddAnd) {
-    return request(api + `/ads/adsSharePage/addAndCreate`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-/** 分页查询 */
-export interface getShare {
-    pageNum: number,
-    pageSize: number,
-    title?: string,
-    novelName?: string,
-    activeSync?: boolean,
-    accountId?: number,
-    accountType?: 'mp' | 'adq'
-}
-export async function getSharePageApi(params: getShare) {
-    return request(api + `/ads/adsSharePage/list`, {
-        method: 'GET',
-        params: params
-    })
-}
-
-/** 落地页详情 */
-export async function getSharePageDetailApi(pageId: number) {
-    return request(api + `/ads/adsSharePage/${pageId}`, {
-        method: 'GET'
-    })
-}
-
-/** 删除落地页 */
-export async function delSharePageApi(sharePageIds: string) {
-    return request(api + `/ads/adsSharePage/delBatch/${sharePageIds}`, {
-        method: 'DELETE'
-    })
-}
-
-/** 修改落地页 */
-export async function adsSharePageEditApi(params: any) {
-    let { pageId, ...parm } = params
-    return request(api + `/ads/adsSharePage/${pageId}`, {
-        method: 'PUT',
-        data: parm
-    })
-}
-
-/** 修改落地页 */
-export async function allOfAccountApi(params: any) {
-    let { accountType, channelAccountId } = params
-    return request(api + `/ads/adsChannelAccountPackage/allOfAccount/${accountType}/${channelAccountId}`, {
-        method: 'GET'
-    })
-}
-
-/** 获取客服组 */
-export async function allWechatInfoApi(params: any) {
-    let { accountType, channelAccountId } = params
-    return request(api + `/ads/adsChannelAccount/wechatInfo/allOfAccount/${accountType}/${channelAccountId}`, {
-        method: 'GET'
-    })
-}
-
-/** 获取数据源 */
-export async function allDataSourceApi(params: any) {
-    let { accountType, channelAccountId } = params
-    return request(api + `/ads/adsChannelAccount/dataSource/allOfAccount/${accountType}/${channelAccountId}`, {
-        method: 'GET'
-    })
-}
-
-/** 商品库列表 */
-export async function allOfAccountGodsApi(params: any) {
-    let { accountType, channelAccountId } = params
-    return request(api + `/ads/adsChannelAccountGoods/allOfAccount/${accountType}/${channelAccountId}`, {
-        method: 'GET'
-    })
-}
-
-/** 商品列表 */
-export async function allOfAccountGodsDetailApi(params: any) {
-    let { accountType, channelAccountId, godsId } = params
-    return request(api + `/ads/adsChannelAccountGoods/detail/${accountType}/${channelAccountId}/${godsId}`, {
-        method: 'GET'
-    })
-}
-
-/** 新增计划 */
-export interface adsPlan {
-    channelAdqAccount: any,
-    channelMpAccount: any,
-    channelMpGoods: any,
-    channelMpDataSource: any,
-    planDto: {
-        taskName: string,
-        planName: string,
-        posType: number,
-        putLocation: string,
-        putTarget: string,
-        pageId: number, 
-        firstContext: any, 
-        secondContext: any
-    }
-}
-export async function addPlanApi(params: adsPlan) {
-    return request(api + `/ads/adsPlan/addAndCreate`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-/** 获取任务列表 */
-export interface adsPlanList {
-    createStatus?: number[],
-    createStartTime?: string,
-    createEndTime?: string,
-    taskName?: string,
-    pageNum: number,
-    pageSize: number,
-}
-export async function getAdsPlanApi(params: adsPlanList) {
-    return request(api + `/ads/adsPlanTask/list`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-/** 获取计划列表 */
-export interface adsPlanLogList {
-    pageNum: number,
-    pageSize: number,
-    posType: number,
-    planId?: number,
-    channelId?: number,
-    accountIds?: string | string[], // 公众号
-    createStatus?: number
-    planName?: string, // 计划名称
-    taskName?: string, // 任务名称
-    createStartTime?: string, // 开始时间
-    createEndTime?: string
-}
-export async function getAdsPlanLogApi(params: adsPlanLogList) {
-    return request(api + `/ads/adsPlan/logList`, {
-        method: 'GET',
-        params: params
-    })
-}
-
-/** 详情 */
-export async function getAdsPlanXqApi(planId: number) {
-    return request(api + `/ads/adsPlan/${planId}`, {
-        method: 'GET'
-    })
-}
-
-/** 获取当前用户更新账户 */
-export async function getUserInfoApi() {
-    return request(api + `/ads/adsUser/info`, {
-        method: 'GET'
-    })
-}
-
-
-/** 批量复制计划接口 */
-export interface CopyPlan {
-    taskName: string,
-    planCreateLogId: number,   // 计划ID
-    begin_time: number,        // 开始时间
-    end_time: number,          // 结束时间
-    copy_count: number,        // 复制数量
-    planDtos: {
-        posType: number,
-        imageUrl?: string, // 广告位图片
-        headDescType?: number, // 信息栏类型
-        description?: string, // 信息栏文案
-        title?: string, // 图文标题
-        cardInfoDesc?: string[], // 广告文案
-        content?: string,       // 外层文案
-        planName: string,      // 计划名称
-        putLocation: string,   // 投放渠道
-        putTarget: string,     // 投放位置
-        pageId: number,        // 落地页ID
-        firstContext: string,  // 第一步
-        secondContext: string,  // 第二步
-        shortVideo?: string,  // 视频信息
-    }[]
-}
-export async function setCopyPlanApi(props: CopyPlan) {
-    return request(api + `/ads/adsPlan/copyPlan`, {
-        method: 'POST',
-        data: props
-    })
-}
-
-
-/** 删除 */
-export async function delBatchAjax(parmas: { taskIds: string }) {
-    return request(`${api}/ads/adsPlanTask/delBatch/${parmas.taskIds}`, {
-        method: 'DELETE'
-    })
-}
-export async function delLogBatchAjax(parmas: { logIds: string }) {
-    return request(`${api}/ads/adsPlan/logDelBatch/${parmas.logIds}`, {
-        method: 'DELETE'
-    })
-}
-
-
-// 设置表格参数
-// 获取通用配置
-export async function getAdsTableConfigApi(parmas: { update: boolean }) {
-    return request(`${api}/ads/adsTableConfig/get/system/config`, {
-        method: 'GET',
-        params: parmas
-    })
-}
-
-// 获取个人配置
-export async function getUserConfigApi() {
-    return request(`${api}/ads/adsTableConfig/get/user/config`, { method: 'GET' })
-}
-
-// 用户更新配置
-export async function updateUserConfigApi(data: {idList: string[], tableConfig: string}) {
-    return request(`${api}/ads/adsTableConfig/update/user/config`, { method: 'POST', data })
-}

+ 0 - 25
src/services/operating/adCensus.ts

@@ -1,25 +0,0 @@
-import { request } from 'umi';
-import { api } from '../api'
-
-/** 获取广告收益列表 */
-export interface AdProfit {
-    appId?: string,
-    startTime?: string,
-    endTime?: string,
-    userId?: string,
-    page: number,
-    size: number,
-    type?: number, // 1运营 2投手
-    mpName?: string,  // 公众号名称
-}
-export async function getAdProfitAjax(params?: AdProfit) {
-    return request(api + '/miniapp/wx/banner/mp/income', {
-        method: 'GET',
-        params: params
-    });
-}
-
-/** 获取小程序列表 */
-export async function getxcxAllAjax() {
-    return request(api + '/miniapp/applet/get/all');
-}

+ 0 - 246
src/services/operating/adMaterial.ts

@@ -1,246 +0,0 @@
-import { request } from 'umi';
-import { api } from '../api'
-
-/**查询标签 */
-export async function getLabelsApi(params: {pageNum: string | number, pageSize: string | number}) {
-  return request(api + '/ads/labels/list', {
-    method: 'POST',
-    data: params,
-  });
-}
-/**新增标签 */
-export async function addLabel(params: {label: string}) {
-  return request(api + '/ads/labels', {
-    method: 'POST',
-    data: params,
-  });
-}
-/**修改标签 */
-export async function editLabel(params: {label: string, id: number}) {
-  const {id, ...param} = params
-  return request(api + `/ads/labels/${id}`, {
-    method: 'PUT',
-    data: param,
-  });
-}
-/**删除标签 */
-export async function delLabelApi(params: {id: number}) {
-  const {id} = params
-  return request(api + `/ads/labels/${id}`, {
-    method: 'DELETE'
-  });
-}
-
-// 标题,文案
-/** 分页查询广告标题、文案 */
-export interface ContentIF {
-  begainDate?: string, //
-  endDate?: string,
-  pageNum: string | number, 
-  pageSize: string | number,
-  content?: string, // 广告标题文案
-  type: number, // 1标题,2文案
-  novels?: string, // 小说
-  labels?: number, // 标签
-  collect: string, // 全部:all,收藏:collect
-  upOrder: boolean, // true升序,false倒序
-  sortRule?: string, // 上传时间(create_time),采用次数(click_times)
-  dataType: string, // 数据类型
-}
-export async function getContentListApi(params: ContentIF) {
-  return request(api + '/ads/contents/list', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 新增广告、标题文案 */
-export interface addContentIF {
-  content: string,
-  type: number,
-  labels: string,
-  dataType: string
-}
-export async function addContentsAjax(params: addContentIF) {
-  return request(api + '/ads/contents', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 删除 标题 文案 */
-export async function delContentsAjax(params: {ids: string}) {
-  let { ids } = params
-  return request(api + `/ads/contents/delByIds/${ids}`, {
-    method: 'DELETE'
-  });
-}
-/** 修改 */
-export interface editContentIF extends addContentIF {
-  id: number
-}
-export async function editContentsAjax(params: editContentIF) {
-  let {id, ...param} = params
-  return request(api + `/ads/contents/${id}`, {
-    method: 'PUT',
-    data: param,
-  });
-}
-
-/** 新增 收藏接口 */
-//"收藏类型,1广告创意收藏,2广告图片收藏,3广告视频收藏,4广告标题收藏,5广告文案收藏"
-export async function collectsApi(params: {contentIds: string, type: number,name?:string}) {
-
-  return request(api + `/ads/${params?.name ? params?.name : 'medias'}/collect/${params?.contentIds}/${true}`, {
-    method: 'PUT',
-  });
-}
-/** 取消 收藏接口 */
-//"收藏类型,1广告创意收藏,2广告图片收藏,3广告视频收藏,4广告标题收藏,5广告文案收藏"
-export async function collectsCancelApi(params: {contentIds: string, type: number,name?:string}) {
-  return request(api + `/ads/${params?.name ? params?.name : 'medias'}/collect/${params?.contentIds}/${false}`, {
-    method: 'PUT',
-  });
-}
-
-///// 图片、视频////// bantchAdds
-
-/** 新增图片/视频素材 */
-export interface addMediasIF extends addContentIF {
-  channel: string,  // "投放渠道:朋友圈信息流,公众平台流量,广点通,小程序,头条,抖音"
-  singleImg: boolean,  //是否单图
-  id?: number,
-  width?: number,
-  height?: number,
-  mediaSize?: number,
-  mediaFormat?: string
-}
-export async function addMediasAjax(params: addMediasIF) {
-  return request(api + '/ads/medias', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 修改 */
-export async function editMediasAjax(params: addMediasIF) {
-  let { id, ...param} = params
-  return request(api + `/ads/medias/${id}`, {
-    method: 'PUT',
-    data: param,
-  });
-}
-/** 获取图片/视频列表 */
-export interface getMediasIF extends ContentIF {
-  channel: string,  // "投放渠道:朋友圈信息流,公众平台流量,广点通,小程序,头条,抖音"
-  singleImg: boolean,  //是否单图
-  minWidth?: string,   //最小宽度
-  maxWidth?: string,   //最大宽度
-  minHeight?: string,  //最小高度
-  maxHeight?: string,  //最大高度
-  minMediaSize?: number, // 最小媒体大小
-  maxMediaSize?: number, // 最大媒体大小
-  minVideoLength?: number, // 最小视频时长
-  maxVideoLength?: number, // 最大视频时长
-  minVideoBitRate?: number, // 最小视频比特率
-  maxVideoBitRate?: number, // 最大视频比特率
-}
-export async function getMediasListApi(params: getMediasIF) {
-  return request(api + '/ads/medias/list', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 删除 图片/视频 */
-export async function delMediasAjax(params: {ids: string}) {
-  let { ids } = params
-  return request(api + `/ads/medias/delByIds/${ids}`, {
-    method: 'DELETE'
-  });
-}
-
-//// 创意 /////
-
-/** 获取创意 */
-export async function getIdeasListApi(params: getMediasIF) {
-  return request(api + '/ads/ideas/list', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 删除创意 */
-export async function delIdeasAjax(params: {ids: string}) {
-  let { ids } = params
-  return request(api + `/ads/ideas/${ids}`, {
-    method: 'DELETE'
-  });
-}
-
-/** 新增创意 */
-export interface addIdeasIF extends addMediasIF {
-  title: string,  // 标题
-  article: string // 文案
-}
-export async function addIdeasAjax(params: addIdeasIF) {
-  return request(api + '/ads/ideas', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 修改 */
-export async function editIdeasAjax(params: addIdeasIF) {
-  let { id, ...param} = params
-  return request(api + `/ads/ideas/${id}`, {
-    method: 'PUT',
-    data: param,
-  });
-}
-
-/** 详情 */
-export async function getScDetailApi(id: number) {
-  console.log(id)
-  return request(api + `/ads/medias/${id}`, {
-    method: 'GET'
-  });
-}
-
-
-/** 批量修改标签本地 图片/视频 */
-export async function setBatchMediasApi(params: {mediaIds: string, labelIds: string}) {
-  let { mediaIds, labelIds } = params
-  return request(api + `/ads/medias/batch/${mediaIds}/${labelIds}`, {
-    method: 'PUT'
-  });
-}
-
-/** 批量修改标签本地 标题/文案 */
-export async function setBatchContentsApi(params: {mediaIds: string, labelIds: string}) {
-  let { mediaIds, labelIds } = params
-  return request(api + `/ads/contents/batch/${mediaIds}/${labelIds}`, {
-    method: 'PUT'
-  });
-}
-
-/** 批量修改标签云 创意 */
-export async function setTagIdeaApi(params: {mediaIds: string, labelIds: string}) {
-  let { mediaIds, labelIds } = params
-  return request(api + `/ads/dataMaterial/tagIdea/${labelIds}`, {
-    method: 'PUT',
-    params: {dataMaterialIds: mediaIds}
-  });
-}
-
-/** 批量修改标签云 图片/视频 */
-export async function setTagMediaApi(params: {mediaIds: string, labelIds: string}) {
-  let { mediaIds, labelIds } = params
-  return request(api + `/ads/dataMaterial/tagMedia/${labelIds}`, {
-    method: 'PUT',
-    params: {dataMaterialIds: mediaIds}
-  });
-}
-
-/** 批量修改标签云 标题/文案 */
-export async function setTagContentApi(params: {mediaIds: string, labelIds: string}) {
-  let { mediaIds, labelIds } = params
-  return request(api + `/ads/dataMaterial/tagContent/${labelIds}`, {
-    method: 'PUT',
-    params: {dataMaterialIds: mediaIds}
-  });
-}

+ 0 - 110
src/services/operating/adNewAuthorize.ts

@@ -1,110 +0,0 @@
-import { request } from 'umi';
-import { api } from '../api'
-
-
-/** 新增计划 */
-export interface adsPlan {
-    channelAdqAccount: any,
-    channelMpAccount: any,
-    taskName: string,  // 任务名称
-    channelMpGoods: any,
-    planDto: {
-        content: string,    // 外层文案
-        planName: string,   // 计划名称
-        posType: string,    // 创意样式 311 1707
-        putLocation: string,// 流量位 朋友圈 公众平台
-        putTarget: string,  // 推广目标 公众号 视频号
-        pageId: number,     // 落地页ID
-        campaign: string,   // 计划内容
-        adgroup: string,    // 广告组内容
-        adcreative: string, // 创意内容
-        material: string,   // 素材内容
-    }
-}
-export async function addPlanApi(params: adsPlan) {
-    return request(api + `/ads/adsNewPlan/addAndCreate`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-/** 获取任务列表 */
-export interface adsPlanList {
-    createStatus?: number[],
-    createStartTime?: string,
-    createEndTime?: string,
-    taskName?: string,
-    pageNum: number,
-    pageSize: number,
-}
-export async function getAdsPlanApi(params: adsPlanList) {
-    return request(api + `/ads/adsNewPlanTask/list`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-/** 删除 */
-export async function delBatchAjax(parmas: { taskIds: string }) {
-    return request(`${api}/ads/adsNewPlanTask/delBatch/${parmas.taskIds}`, {
-        method: 'DELETE'
-    })
-}
-export async function delLogBatchAjax(parmas: { logIds: string }) {
-    return request(`${api}/ads/adsNewPlanCreateLog/logDelBatch/${parmas.logIds}`, {
-        method: 'DELETE'
-    })
-}
-
-
-/** 获取计划列表 */
-export interface adsPlanLogList {
-    pageNum: number,
-    pageSize: number,
-    posType: number,
-    planId?: number,
-    channelId?: number,
-    accountIds?: string | string[], // 公众号
-    createStatus?: number
-    planName?: string, // 计划名称
-    taskName?: string, // 任务名称
-    createStartTime?: string, // 开始时间
-    createEndTime?: string
-}
-export async function getAdsPlanLogApi(params: adsPlanLogList) {
-    return request(api + `/ads/adsNewPlanCreateLog/logList`, {
-        method: 'GET',
-        params: params
-    })
-}
-
-/** 批量复制计划接口 */
-export interface CopyPlan {
-    taskName: string,
-    planCreateLogId: number,   // 计划ID
-    begin_time: number,        // 开始时间
-    end_time: number,          // 结束时间
-    copy_count: number,        // 复制数量
-    planDtos: {
-        posType: number,
-        imageUrl?: string, // 广告位图片
-        headDescType?: number, // 信息栏类型
-        description?: string, // 信息栏文案
-        title?: string, // 图文标题
-        cardInfoDesc?: string[], // 广告文案
-        content?: string,       // 外层文案
-        planName: string,      // 计划名称
-        putLocation: string,   // 投放渠道
-        putTarget: string,     // 投放位置
-        pageId: number,        // 落地页ID
-        firstContext: string,  // 第一步
-        secondContext: string,  // 第二步
-        shortVideo?: string,  // 视频信息
-    }[]
-}
-export async function setCopyPlanApi(props: CopyPlan) {
-    return request(api + `/ads/adsNewPlan/copyPlan`, {
-        method: 'POST',
-        data: props
-    })
-}

+ 0 - 149
src/services/operating/adWeChat.ts

@@ -1,149 +0,0 @@
-import useFetch from '@/Hook/useFetch'
-import { launchApi, api } from '../api'
-
-import { request } from 'umi';
-
-/**查询号 */
-export async function getAccApi() {
-    return request(`${api}/adlaunch/wechatInfo/listAllWechatInfo`, {
-        method: 'GET'
-    })
-}
-
-/**获取定向包 */
-export interface OrientProps {
-    pageNum: number,
-    pageSize: number,
-    serviceName: string,       // 服务商
-    wechatName: string,        // 公众号
-    humanPackageName?: string  // 人群包名称
-}
-export async function getOrientApi(params: OrientProps) {
-    return request(`${api}/adlaunch/humanInfo/list`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-/** 推广页 */
-export async function setPromotionPageAjax(params: { userId: string | number, name: string, typesetting: string }) {
-    return request(`${api}/adlaunch/layoutTypesetting`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-/**查询落地页 */
-export async function getLayoutLocalApi(params: { pageNum: number, pageSize: number, name?: string | undefined, updateStartDate?: string | undefined, updateEndDate?: string | undefined }) {
-    return request(`${api}/adlaunch/layoutTypesetting/list`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-/** 删除落地页 */
-export async function delLayoutLocalApi(params: { userId: string | number, name: string }) {
-    return request(`${api}/adlaunch/layoutTypesetting/remove`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-
-/** 删除计划 */
-export async function delAdPlanLocalApi(params: { objectName: string, serviceName: string, wechatName: string }) {
-    return request(`${api}/adlaunch/actionRecord/remove`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-/** 获取计划列表 */
-export interface PlanProps {
-    pageNum: number,
-    pageSize: number,
-    serviceName?: string | undefined, // 服务商
-    status?: string | undefined,      // 状态
-    planName?: string | undefined,    // 计划名称
-    wechatName?: string | undefined,  // 广告主名称
-    taskName?: string | undefined,    // 任务名称
-    startData?: string | undefined,   // 创建开始时间
-    endData?: string | undefined      // 创建截止时间
-}
-export async function getPlanActionRecordApi(params: PlanProps) {
-    return request(`${api}/adlaunch/actionRecord/listPlan`, {
-        method: 'POST',
-        data: params
-    })
-}
-/**创建计划*/
-export async function createAd(params: { planList: any[], userId: string }) {
-    return request(`${api}/adlaunch/actionRecord/createAdPlan`, {
-        method: 'POST',
-        data: params
-    })
-}
-
-/** 获取服务商 */
-export async function getAdWechatServiceNameApi() {
-    return request(`${api}/adlaunch/wechatInfo/getAllServiceName`, {
-        method: 'GET'
-    })
-}
-
-/** 获取广告主名称 */
-export async function getAdWechatWechatNameApi(params: { serviceName: string }) {
-    return request(`${api}/adlaunch/wechatInfo/getAllWechat/${params?.serviceName}`, {
-        method: 'GET'
-    })
-}
-
-/** 获取任务列表 */
-export interface TaskProps {
-    serviceName?: string | undefined,
-    // status?: string | undefined,
-    createTime?: string | undefined,
-    taskName?: string | undefined,
-    wechatName?: string | undefined,
-    objectName?: string | undefined,
-    local?: string | undefined,
-    channel?: string | undefined,
-    pageNum: number,
-    pageSize: number
-}
-export async function getTaskListApi(params: TaskProps) {
-    return request(`${api}/adlaunch/actionRecord/list`, {
-        method: 'POST',
-        data: params
-    })
-}
-/** 刷新 */
-export async function refreshDataApi(params: { userId: number, is_refresh: string }) {
-    return request(`${api}/adlaunch/wechatInfo/refresh/${params?.userId}/${params?.is_refresh}`, {
-        method: 'GET'
-    })
-}
-
-/** 扫码回调 */
-export async function getScanStatusApi() {
-    return request(`${api}/adlaunch/wechatCookie/getScanStatus`, {
-        method: 'GET'
-    })
-}
-
-/**个人概览 */
-// export async function overview(params: Params) {
-//     return useFetch({ url: '/data/pitcher_panel/overview', params, method: 'POST' })
-// }
-/**MP收藏*/
-export async function adqCollect(parmas: { accountId: any, collect: any }) {
-    return request(`${api}/ads/adsChannelAccount/collect/adq/${parmas.accountId}/${parmas.collect}`, {
-        method: 'POST'
-    })
-}
-/**ADQ收藏*/
-export async function mpCollect(parmas: { accountId: any, collect: any }) {
-    return request(`${api}/ads/adsChannelAccount/collect/mp/${parmas.accountId}/${parmas.collect}`, {
-        method: 'POST'
-    })
-}

+ 0 - 376
src/services/operating/book.ts

@@ -1,376 +0,0 @@
-import { request } from 'umi';
-import { api } from '../api';
-export type AddParams = {
-  platformName: string;
-  remark: string;
-};
-export type editbookParams = {
-  id: number;
-  platformId: number;
-  author: string;
-  bookName: string;
-  protagonist: string;
-  status: string;
-  typeId: string;
-  channel: string;
-  wordCount: string;
-  source: string;
-  nodePrice: string;
-  ratio: string;
-  remark: string;
-};
-/**获取全部小说平台 */
-export async function allBook() {
-  return request(`${api}/erp/bookPlatform/all`);
-}
-/**获取书城下的账号**/
-export async function listByPlatform(platformId: number) {
-  console.log(platformId);
-  return request(`${api}/erp/bookPlatformAccount/listByPlatform/${platformId}`);
-}
-/**搜索小说平台 */
-export async function seekBook() {
-  return request(`${api}/erp/bookPlatform/all`);
-}
-/** 删除vip小说 */
-export async function delVipBookApi(periodId: number) {
-  return request(`${api}/erp/period/${periodId}`, {
-    method: 'DELETE',
-  });
-}
-/** 编辑vip小说 */
-export async function editVipBookApi(params: any) {
-  let { accountId, ...data } = params;
-  return request(`${api}/erp/bookPlatformAccount/${accountId}`, {
-    method: 'PUT',
-    data: data,
-  });
-}
-/** 获取期数 */
-export async function getPeriodAll() {
-  return request(`${api}/erp/period/all`, {
-    method: 'GET',
-  });
-}
-
-/** 分页查询期数 */
-export interface PeriodList {
-  platformId: number; // 书城ID
-  pageNum: number;
-  pageSize: number;
-  periodId?: number; // 期数ID
-  account?: string; //账号搜索
-  principalName?: string; // 开户名搜索
-  status?: number; //账号状态  0:信息待完善、1:拉取中
-}
-export async function getPeriodListApi(params: PeriodList) {
-  return request(`${api}/erp/bookPlatformAccount/pageByPlatform`, {
-    method: 'GET',
-    params,
-  });
-}
-
-/**切换平台 */
-export async function switchBook(params: {
-  mpId: string;
-  operType: string;
-  remark: string;
-  newBookName?: string;
-  newPlatformId?: string;
-}) {
-  let { mpId, ...props } = params;
-  return request(`${api}/system/mpOper/switchPlatform/${mpId}`, {
-    method: 'PUT',
-    data: props,
-  });
-}
-/**操作日志 */
-export async function logBook(params: { mpId: string }) {
-  return request(`${api}/system/mpOper/operLog/${params.mpId}`);
-}
-
-/**投手配置 */
-export async function switchPitcher(params: { mpId: string; userId: string }) {
-  return request(`${api}/system/mp/configPutUser/${params.mpId}/${params.userId}`, {
-    method: 'PUT',
-  });
-}
-
-/**所有用户 */
-export async function getUserAll() {
-  return request(`${api}/system/user/all`);
-}
-
-/**编辑 */
-export async function editSubmit(params: {
-  mpId: string;
-  account: string;
-  managePhone: string;
-  managePhoneNo: string;
-  password: string;
-  secret: string;
-}) {
-  let { mpId, ...props } = params;
-  return request(`${api}/system/mp/modify/${mpId}`, {
-    method: 'PUT',
-    data: props,
-  });
-}
-
-// 分页书籍
-export async function getBookList(params: {
-  bookName?: string;
-  status?: string;
-  platformId?: string;
-  pageNum: number;
-  pageSize: number;
-}) {
-  return request(`${api}/erp/book/list`, {
-    method: 'POST',
-    data: params,
-  });
-}
-// 所有书籍
-
-export async function getBookAll() {
-  return request(`${api}/erp/book/all`, {
-    method: 'GET',
-  });
-}
-
-// 添加书籍
-export async function addWorks(params: any) {
-  return request(`${api}/erp/book`, {
-    method: 'POST',
-    data: params,
-  });
-}
-
-// 修改书籍
-export async function editWorks(params: any) {
-  let { id, ...props } = params;
-  return request(`${api}/erp/book/${id}`, {
-    method: 'PUT',
-    data: props,
-  });
-}
-
-// 删除书籍
-export async function deleteWorks(id: number) {
-  return request(`${api}/erp/book/${id}`, {
-    method: 'DELETE',
-  });
-}
-
-// 所有小说分类
-export async function getBooktypeList() {
-  return request(`${api}/erp/bookType/all`, {
-    method: 'GET',
-  });
-}
-
-// 添加分类
-export async function addBooktype(params: { name: string }) {
-  return request(`${api}/erp/bookType`, {
-    method: 'POST',
-    data: params,
-  });
-}
-
-// 编辑分类
-export async function editBooktype(params: { id: number; name: string }) {
-  let { id, ...data } = params;
-  return request(`${api}/erp/bookType/${id}`, {
-    method: 'PUT',
-    data: data,
-  });
-}
-
-// 删除类型
-export async function deleteBooktype(id: number) {
-  return request(`${api}/erp/bookType/${id}`, {
-    method: 'DELETE',
-  });
-}
-
-// 导入Excel
-export async function importExcle(data: FormDataEntryValue) {
-  return request(`${api}/erp/book/import`, {
-    method: 'POST',
-    body: data,
-  });
-}
-
-// 导出
-export async function exportExcle(data: any) {
-  return request(`${api}/erp/book/export`, {
-    method: 'POST',
-    data: data,
-    responseType: 'blob',
-  });
-}
-
-// 模板下载
-export async function downLoadTem() {
-  return request(`${api}/erp/book/export/template`, {
-    method: 'POST',
-    data: {},
-    responseType: 'blob',
-  });
-}
-
-// 分页查询小说倍率
-export async function bookRatioList(data: { bookId?: number; pageNum: number; pageSize: number }) {
-  return request(`${api}/erp/bookRatio/list`, {
-    method: 'POST',
-    data,
-  });
-}
-
-// 新增
-export async function addRatio(data: {
-  bookId: number;
-  nodePrice: number;
-  effectDay: string;
-  overDay: string;
-  type: string;
-}) {
-  return request(`${api}/erp/bookRatio`, {
-    method: 'POST',
-    data,
-  });
-}
-
-// 分页查询小说倍率
-export async function EditRatio(params: {
-  id: number;
-  bookId: number;
-  nodePrice: number;
-  ratio: number;
-  effectDay: string;
-  overDay: string;
-}) {
-  let { id, ...data } = params;
-  return request(`${api}/erp/bookRatio/${id}`, {
-    method: 'PUT',
-    data,
-  });
-}
-
-// 删除
-export async function deleteRatio(id: number) {
-  return request(`${api}/erp/bookRatio/${id}`, {
-    method: 'DELETE',
-  });
-}
-
-/**临时切换书城 */
-export async function lins(params: any) {
-  let { resourceId, ...param } = params;
-  return request(`${api}/erp/resource/checkPlatform/${resourceId} `, {
-    method: 'PUT',
-    data: param,
-  });
-}
-/**获取项目组*/
-export async function businessGroup() {
-  return request(`${api}/erp/businessGroup/all`);
-}
-/**切书记录*/
-export async function resourceChangeRecord(params: any) {
-  let { resourceId, ...param } = params;
-  return request(`${api}/erp/resourceChangeRecord/list/${resourceId} `, {
-    method: 'POST',
-    data: param,
-  });
-}
-
-/**
- * 插入记录
- * @param data param0 data: {
- *  lastChangeRecordId: 1, 上一条变更记录 id
- *  resourceId: 10 资源 id
- *  businessGroupId: 项目组 id
- *  operUserId 投手 id
- *  putUserId 期数 id
- *  periodId 书城 id
- *  platformId 书城 id
- *  platformAccountId 账号 id
- *  bookId 书 id
- *  putStatus 投放状态
- *  putChannel 投放渠道
- *  rechargeTemplate 充值模板
- *  beginTime 起始时间
- *  endTime 截止时间
- * } 
- * @returns 
- */
-export interface insetCutProps {
-  id?: number | null,
-  beginTime?: string | null,
-  endTime?: string | null,
-  resourceId?: number,
-  businessGroupId?: number,
-  operUserId?: number,
-  putUserId?: number,
-  periodId?: number,
-  platformId?: number,
-  platformAccountId?: number,
-  bookId?: number,
-  putStatus?: string,
-  putChannel?: string,
-  rechargeTemplate?: string,
-  lastChangeRecordId?: number
-}
-export async function insertCutRecordApi(data: insetCutProps) {
-  return request(`${api}/erp/resourceChangeRecord`, {
-    method: "POST",
-    data
-  })
-}
-/**
- * 修改记录
- * @param {*} data 同上
- * @returns 
- */
-export interface editCutProps extends insetCutProps {
-  id: number
-}
-export async function editCutRecordApi({ id, ...data }: editCutProps) {
-  return request(`${api}/erp/resourceChangeRecord/${id}`, {
-    method: "PUT",
-    data
-  })
-}
-/**
- * 删除记录
- * @param {*} id 
- * @returns 
- */
-export async function delCutRecordApi(id: number) {
-  return request(`${api}/erp/resourceChangeRecord/${id}`, {
-    method: "DELETE"
-  })
-}
-
-/**
- * 设置男频女频
- * @param param0 
- * @returns 
- */
-export async function setChannelApi({ bookId, channel }: { bookId: number, channel: string | null }) {
-  return request(`${api}/erp/book/configChannel/${bookId}/${channel}`, {
-    method: "PUT"
-  })
-}
-
-/**
- * 设置分类
- * @param param0 
- * @returns 
- */
- export async function setConfigTypeApi({ bookId, typeId }: { bookId: number, typeId: number | null }) {
-  return request(`${api}/erp/book/configType/${bookId}/${typeId}`, {
-    method: "PUT"
-  })
-}

+ 0 - 105
src/services/operating/examine.ts

@@ -1,105 +0,0 @@
-import { request } from 'umi';
-import { api } from '../api'
-
-
-/**
- * ================================================高级群发================================================
- */
-// 列表
-export async function getAdvancedList(params: { mpId: any, name: any, executionStatus: any, checkStatus: any }) {
-    return request(`${api}/system/msgCheck/msgGroupStrategyList`, {
-        method: 'POST',
-        data: params
-    });
-}
-// 审查
-export async function reviewAdvanced(params: { strategyId: any, checkRemark: any, checkStatus: any }) {
-    const { strategyId, ...param } = params
-    return request(`${api}/system/msgCheck/msgGroupStrategyCheck/${strategyId}`, {
-        method: 'PUT',
-        data: param
-    });
-}
-// 预览
-export async function seeAdvanced(params: { strategyId: any, mpId: any, fansId: any }) {
-    const { strategyId, mpId, fansId } = params
-    return request(`${api}/system/mpMsgGroupSendStrategy/preview2/${mpId}/${fansId}/${strategyId}`, {
-        method: 'PUT',
-    });
-}
-/**
-* ================================================客服消息================================================
-*/
-// 列表
-export async function getAserviceList(params: { mpId: any, taskName: any, status: any, checkStatus: any }) {
-    return request(`${api}/system/msgCheck/kefuStrategyList`, {
-        method: 'POST',
-        data: params
-    });
-}
-// 审查
-export async function reviewAservice(params: { strategyId: any, checkRemark: any, checkStatus: any }) {
-    const { strategyId, ...param } = params
-    return request(`${api}/system/msgCheck/kefuStrategyCheck/${strategyId}`, {
-        method: 'PUT',
-        data: param
-    });
-}
-// 预览
-export async function seeAservice(params: { strategyId: any, mpId: any, fansId: any }) {
-    const { strategyId, mpId, fansId } = params
-    return request(`${api}/system/mp/kefuMsgStrategy/preview2/${mpId}/${strategyId}/${fansId}`, {
-        method: 'PUT',
-    });
-}
-
-/**
-* ================================================模板消息================================================
-*/
-// 列表
-export async function getAtemplateList(params: { mpId: any, taskName: any, executionStatus: any, checkStatus: any }) {
-    return request(`${api}/system/msgCheck/templateStrategyList`, {
-        method: 'POST',
-        data: params
-    });
-}
-// 审查
-export async function reviewAtemplate(params: { strategyId: any, checkRemark: any, checkStatus: any }) {
-    const { strategyId, ...param } = params
-    return request(`${api}/system/msgCheck/templateStrategyCheck/${strategyId}`, {
-        method: 'PUT',
-        data: param
-    });
-}
-// 预览
-export async function seeAtemplate(params: { strategyId: any, fansId: any }) {
-    const { strategyId, fansId } = params
-    return request(`${api}/system/mp/templateMsg/preview2/${strategyId}/${fansId}`, {
-        method: 'PUT',
-    });
-}
-/**
-* ================================================立即/延迟================================================
-*/
-// 列表
-export async function getInteractList(params: { mpId: any, eventType: any, checkStatus: any }) {
-    return request(`${api}/system/msgCheck/resStrategyList`, {
-        method: 'POST',
-        data: params
-    });
-}
-//审查
-export async function reviewInteract(params: { strategyId: any, checkRemark: any, checkStatus: any }) {
-    const { strategyId, ...param } = params
-    return request(`${api}/system/msgCheck/resStrategyCheck/${strategyId}`, {
-        method: 'PUT',
-        data: param
-    });
-}
-// 预览
-export async function seeInteract(params: { strategyId: any, fansId: any }) {
-    const { strategyId, fansId } = params
-    return request(`${api}/system/mp/replyStrategy/preview2/${strategyId}/${fansId}`, {
-        method: 'PUT',
-    });
-}

+ 0 - 376
src/services/operating/material.ts

@@ -1,376 +0,0 @@
-import { queryStr } from '@/utils/query';
-import { request } from 'umi';
-import { api } from '../api'
-export interface AddTag {
-  id?: string,
-  tagName: string,
-  type: string
-}
-export interface MediaList {
-  describeInfo?: string,
-  groupId?: string,
-  id?: string,
-  mediaAuthor?: string,
-  mediaContent?: string,
-  mediaContentSourceUrl?: string,
-  mediaDigest?: string,
-  mediaTagIds?: string | string[],
-  mediaThumbMediaId?: string,
-  mediaType?: string,
-  title?: string,
-  url?: string
-}
-export interface GetMediaList {
-  mediaTagId?: string,
-  pageNum: string,
-  pageSize: string,
-  mediaType: string,
-  tagIds?: string | string[],
-  groupId?: string,
-}
-
-export interface CreateGraphic {
-  groupId: number,
-  mediaTagIds: number[],
-  sysMediaGraphics: {
-    author: string,
-    content: string,
-    contentSourceUrl?: string,
-    digest?: string,
-    needOpenComment?: boolean,
-    onlyFansCanComment?: boolean,
-    showCoverPic?: boolean,
-    title: string,
-    url: string
-  }[]
-}
-export interface EditGraphic extends CreateGraphic {
-  id: string,
-  appId: string
-}
-export interface GetGraphicList {
-  mediaType?: string,
-  groupId?: string,
-  pageNum: number,
-  pageSize: number,
-  tagIds?: number[]
-}
-// export interface GetWeChatData {
-//   appId: string,
-//   count: string | number,
-//   offset: string
-// }
-export interface GetWeChatData {
-  mpId: number,
-  mediaType: string,
-  pageNum: number,
-  pageSize: number
-}
-export interface GetWeChatITData {
-  appId: string,
-  count: string | number,
-  offset: string,
-  type: string
-}
-// export async function getGzhData() {
-//   return request('/api/data/gzhsc');
-// }
-/**获取上传接口 */
-export async function getFileUrl(params: { type: string }) {
-  return request(`${api}/system/oss/ossUpload?type=${params.type}`);
-}
-/*************************标签**********************************/
-/**新增标签 */
-export async function addTag(params?: AddTag) {
-  return request(api + '/system/mediaTag/create', {
-    method: 'POST',
-    data: params,
-  });
-}
-/**编辑标签 */
-export async function editTag(params?: AddTag) {
-  return request(api + '/system/mediaTag/edit', {
-    method: 'POST',
-    data: params,
-  });
-}
-
-/**删除标签 */
-export async function delTag(params: { id: string }) {
-  return request(`${api}/system/mediaTag/${params.id}`, {
-    method: 'DELETE',
-  });
-}
-/**获取标签列表*/
-export async function getTagList(params: { type: string }) {
-  return request(`${api}/system/mediaTag/list?type=${params.type}`);
-}
-/*************************分类**********************************/
-/**新增标签 */
-export async function addClass(params?: { groupName: string }) {
-  return request(api + '/system/sysMediaGroup/create', {
-    method: 'POST',
-    data: params,
-  });
-}
-/**编辑标签 */
-export async function editClass(params?: { groupName: string, id: string }) {
-  return request(api + '/system/sysMediaGroup/edit', {
-    method: 'POST',
-    data: params,
-  });
-}
-
-/**删除标签 */
-export async function delClass(params: { id: string }) {
-  return request(`${api}/system/sysMediaGroup/${params.id}`, {
-    method: 'DELETE',
-  });
-}
-/**获取标签列表*/
-export async function getClass(params: any) {
-  return request(`${api}/system/sysMediaGroup?type=${params?.type}`);
-}
-/*************************素材**********************************/
-/** 新增非图文本地素材*/
-export async function addMediaList(params?: MediaList) {
-  return request(api + '/system/SysMedia/create', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 编辑非图文本地素材*/
-export async function editMediaList(params?: MediaList) {
-  return request(api + '/system/SysMedia/edit', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 新增图文本地素材*/
-export async function createGraphic(params: CreateGraphic) {
-  return request(api + '/system/SysMedia/createGraphic', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 新增图文微信素材*/
-export async function createGraphicMaterial(params: CreateGraphic) {
-  return request(api + '/system/SysMedia/addWxGraphicMaterial', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 编辑图文本地素材*/
-export async function editGraphic(params: EditGraphic) {
-  return request(api + '/system/SysMedia/editGraphic', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 编辑图文微信素材*/
-export async function editGraphicWxMaterial(params: EditGraphic) {
-  return request(api + '/system/SysMedia/updateWxMaterial', {
-    method: 'POST',
-    data: params,
-  });
-}
-/** 获取图文素材*/
-export async function getGraphicList(params: GetGraphicList) {
-  return request(`${api}/system/SysMedia/graphicList${queryStr(params)}`);
-}
-/** 获取本地素材*/
-export async function getMediaList(params: GetMediaList) {
-  return request(`${api}/system/SysMedia/list${queryStr(params)}`);
-}
-/** 删除本地素材*/
-export async function delMediaList(params: { id: string }) {
-  return request(`${api}/system/SysMedia/${params.id}`, {
-    method: 'DELETE',
-  });
-}
-/**同步本地图文素材 */
-export async function syncPermanentGraphicMedias(params: { appId: string[], mediaId: string }) {
-  return request(api + '/system/SysMedia/syncPermanentGraphicMaterial', {
-    method: 'POST',
-    data: params,
-  });
-}
-/**同步本地非图文素材 */
-export async function syncMedias(params: { appId: string[], mediaId: string }) {
-  return request(api + '/system/SysMedia/syncPermanent', {
-    method: 'POST',
-    data: params,
-  });
-}
-/**获取微信图文素材 */
-export async function getWeChatITData(params: GetWeChatITData) {
-  return request(`${api}/system/SysMedia/batchGetMaterialNews${queryStr(params)}`);
-}
-
-
-// /**获取微信非图文素材 */
-// export async function getWeChatData(params: GetWeChatData) {
-//   return request(`${api}/system/SysMedia/batchGetMateria${queryStr(params)}`);
-// }
-/**获取微信非图文素材 */
-export async function getWeChatData(params: GetWeChatData) {
-  let { mpId, ...param } = params
-  return request(`${api}/system/mp/media/list/${mpId}`, {
-    method: 'POST',
-    data: param,
-  });
-}
-/**更新公众号下素材*/
-export async function updateMediaCache(params: { mpId: number, mediaType: string }) {
-  let { mpId, mediaType } = params
-  return request(`${api}/system/mp/media/syncMedia/${mpId}/${mediaType}`, {
-    method: 'PUT'
-  })
-}
-/** 删除微信素材*/
-export async function delMediawx(id: number) {
-  return request(`${api}/system/mp/media/${id}`, {
-    method: 'DELETE',
-  });
-}
-/**微信素材详情*/
-export async function getWxMediaInfo(params: { id: number, isCon?: boolean }) {
-  let { id, isCon = true } = params
-  return request(`${api}/system/mp/media/${id}/${isCon}`);
-}
-
-/**导入文章 */
-export async function exportMediaByUrl(params: { url: string }) {
-  return request(`${api}/system/SysMedia/exportMediaByUrl${queryStr(params)}`);
-}
-export async function exportMediaByUrl1(url: string) {
-  return fetch(`${api}/system/mp/media/parseWxNewsByUrl?url=${url}`, {
-    headers: { ['Authorization']: 'Bearer ' + sessionStorage.getItem('Admin-Token') },
-  });
-}
-
-
-
-
-/**本地素材详情*/
-export async function getGraphicDetail(params: { id: string }) {
-  return request(`${api}/system/SysMedia/graphicDetail/${params.id}`);
-}
-/**查询图文同步结果 */
-export async function syncResult(params: any) {
-  return request(api + '/system/SysMedia/syncResult', {
-    method: 'POST',
-    data: params,
-  });
-}
-/**批量上传非图文素材 */
-export async function bantchAdd(params: any) {
-  return request(`${api}/system/SysMedia/bantchAdd`, {
-    method: 'PUT',
-    data: params
-  })
-}
-/**oss删除 */
-export async function delOss(params: any) {
-  return request(`${api}/system/oss/${params}`, {
-    method: 'DELETE',
-    // data: params
-  });
-}
-
-
-
-//=========================新接口===================
-// belongUser 0 公共 1 个人
-/**获取本地素材列表 */
-export async function bdSysMediaList(params: { parentId?: any, belongUser: 0 | 1, pageNum: number, pageSize: number, fileType: "image" | "news" | "voice" | "video" }) {
-  const { belongUser, ...param } = params
-  return request(api + `/system/SysMedia/list/${belongUser}`, {
-    method: 'POST',
-    data: param,
-  });
-}
-/**修改本地素材 */
-export async function bdSysMediaEdit(params: { belongUser: 0 | 1, sysMediaId: number, fileType: "image" | "news" | "voice" | "video" }) {
-  const { belongUser, sysMediaId, ...param } = params
-  return request(api + `/system/SysMedia/${belongUser}/${sysMediaId}`, {
-    method: 'PUT',
-    data: param
-  });
-}
-/**新增本地素材 */
-export async function bdSysMediaAdd(params: { belongUser: 0 | 1, parentId: number, fileType: "image" | "news" | "voice" | "video" }) {
-  const { belongUser, ...param } = params
-  return request(api + `/system/SysMedia/${belongUser}`, {
-    method: 'POST',
-    data: param,
-  });
-}
-/**新增微信素材*/
-export async function wxSysMediaAdd(params: { mediaType: "image" | "news" | "voice" | "video", localMediaId: number, mpId: number, news: any }) {
-  return request(api + `/system/mp/media`, {
-    method: 'POST',
-    data: params,
-  });
-}
-/**删除本地素材 */
-export async function delMedia(sysMediaId: any) {
-  return request(`${api}/system/SysMedia/${sysMediaId}`, {
-    method: 'DELETE',
-  });
-}
-/**获取本地素材详情*/
-export async function getMedia(sysMediaId: any) {
-  return request(`${api}/system/SysMedia/${sysMediaId}`, {
-    method: 'GET',
-  });
-}
-/**同步素材 */
-export async function syncMedia(params: { sysMediaId: number, mpIds: number }) {
-  const { mpIds, sysMediaId } = params
-  return request(api + `/system/SysMedia/syncToMp/${sysMediaId}/${mpIds}`, {
-    method: 'PUT',
-  });
-}
-/**返回微信媒体ID的同步接口 */
-export async function syncForSend(params: { sysMediaId: number, mpIds: number }) {
-  const { mpIds, sysMediaId } = params
-  return request(api + `/system/SysMedia/syncForSend/${sysMediaId}/${mpIds}`, {
-    method: 'PUT',
-  });
-}
-
-/**获取素材管理的公众号*/
-export async function getWxlist(sysMediaId: number) {
-  return request(api + `/system/SysMedia/getBindMps/${sysMediaId}`, {
-    method: 'GET'
-  })
-}
-/**编辑素材关联的公众号 */
-export async function editWxlist(params: { sysMediaId: number, mpIds: any }) {
-  const { sysMediaId, mpIds } = params
-  return request(api + `/system/SysMedia/bindMediaMps/${sysMediaId}`, {
-    method: 'POST',
-    data: mpIds
-  })
-}
-/**获取素材文件夹目录树*/
-export async function getFolderTree(props: { belongUser: any, fileType: any }) {
-  let { belongUser, fileType } = props
-  return request(api + `/system/SysMedia/folderTree/${belongUser}/${fileType}`, {
-    method: 'GET'
-  })
-}
-/*改变文件位置*/
-export async function editMediaFolder(params: { sysMediaId: number, folderId: number }) {
-  const { folderId, sysMediaId } = params
-  return request(api + `/system/SysMedia/configMediaFolder/${folderId}/${sysMediaId}`, {
-    method: 'PUT',
-  });
-}
-/** 排序 */
-export async function configSortApi({ sysMediaId, sort }: { sysMediaId: number, sort: number }) {
-  return request(api + `/system/SysMedia/configMediaSort/${sysMediaId}/${sort}`, {
-    method: 'PUT'
-  });
-}

+ 0 - 53
src/services/operating/operate.ts

@@ -1,53 +0,0 @@
-import { queryStr } from '@/utils/query';
-import { request } from 'umi';
-import {api} from '../api'
-export type Fans = {
-  beginDate?: string,
-  endDate?: string,
-  mpId?: string,
-  type?: 1 | 2 | 3 | 4,//时间类型 1 按小时;2 按天 3 按周 4 按月
-}
-/**总览统计 */
-export async function getStatistics(params:{ userId: number }) {
-  return request(api+`/system/statistics${queryStr(params)}`);
-}
-/**指定公众号的统计数据 */
-export async function getStatisticsMpId(mpId:string) {
-  return request(`${api}/system/statistics/${mpId}`);
-}
-/**图文分析 */
-export async function getArticleSummary(params: Fans) {
-  return request(`${api}/system/statistics/articleSummary${queryStr(params)}`);
-}
-/**粉丝增长 */
-export async function getFanGrowth(params: Fans) {
-  return request(`${api}/system/statistics/fanGrowth${queryStr(params)}`);
-}
-/**粉丝属性 */
-export async function getFansAttribute(params: Fans) {
-  return request(`${api}/system/statistics/fansAttribute${queryStr(params)}`);
-}
-/**统计指定公众号粉丝的活跃数据 */
-export async function getFansActive(params: { mpId: string, timeDto: any }) {
-  let { mpId, timeDto } = params
-  return request(`${api}/system/statistics/fansActive/${mpId}`, {
-    method: 'POST',
-    data: timeDto
-  });
-}
-/**统计指定公众号粉丝的互动数据 */
-export async function getFansInteractive(params: { mpId: string, timeDto: any }) {
-  let { mpId, timeDto } = params
-  return request(`${api}/system/statistics/fansInteractive/${mpId}`, {
-    method: 'POST',
-    data: timeDto
-  });
-}
-/**统计指定公众号粉丝的忠诚度 */
-export async function getFansKeep(params: { mpId: string, statisticsKeepDto: any }) {
-  let { mpId, statisticsKeepDto } = params
-  return request(`${api}/system/statistics/fansKeep/${mpId}`, {
-    method: 'POST',
-    data: statisticsKeepDto
-  });
-}

+ 0 - 32
src/services/operating/weMenu.ts

@@ -1,32 +0,0 @@
-import { request } from 'umi';
-import { api } from '../api'
-/**修改微信菜单 */
-export async function editMenu(params: { mpId: string, mpMenuDtos: any, menuId: string }) {
-    let { mpId, mpMenuDtos, menuId } = params
-    return request(`${api}/system/mp/menu/modify${menuId ? '/' + menuId : ''}`, {
-        method: 'PUT',
-        data: { ...mpMenuDtos, mpId }
-    });
-}
-/**同步微信菜单 */
-export async function syncMenu(params: { mpId: string }) {
-    return request(`${api}/system/mp/menu/sync/${params.mpId}`, {
-        method: 'PUT',
-    });
-}
-/**同步IOS安卓菜单 */
-export async function syncPlatform(params: { platform: string, menuId: string }) {
-    return request(`${api}/system/mp/menu/syncPlatform/${params.platform}/${params.menuId}`, {
-        method: 'PUT',
-    });
-}
-/**删除微信菜单 */
-export async function delMenu(params: { menuId: string }) {
-    return request(`${api}/system/mp/menu/del/${params.menuId}`, {
-        method: 'DELETE',
-    });
-}
-/**获取微信菜单 */
-export async function getMenu(params: { mpId: string }) {
-    return request(`${api}/system/mp/menu/all/${params.mpId}`);
-}