Jelajahi Sumber

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage into develop

shenwu 2 tahun lalu
induk
melakukan
8a08d551f3
100 mengubah file dengan 25 tambahan dan 13240 penghapusan
  1. 10 10
      config/routerConfig.ts
  2. 2 2
      src/models/useAdMonitor/useMonitor.ts
  3. 0 118
      src/models/useData/useDataCenter.ts
  4. 0 175
      src/models/useData/useTableData.ts
  5. 0 14
      src/models/useLaunch/useAdAuthorize.ts
  6. 0 79
      src/models/useLaunch/useMaterial.ts
  7. 0 65
      src/models/useLaunch/useMonitor.ts
  8. 0 386
      src/models/useLaunch/useNewCreateAd.ts
  9. 0 38
      src/models/useLaunch/useWeChat.ts
  10. 3 3
      src/pages/adMonitor/adMonitorList/index.tsx
  11. 4 4
      src/pages/adMonitor/adMonitorList/monitor.tsx
  12. 6 6
      src/pages/adMonitor/adMonitorList/planList.tsx
  13. 0 125
      src/pages/dataStatistics/allSurvey/index.tsx
  14. 0 41
      src/pages/dataStatistics/book/payTrend/index.less
  15. 0 52
      src/pages/dataStatistics/book/payTrend/index.tsx
  16. 0 339
      src/pages/dataStatistics/book/payTrend/tableConfig.tsx
  17. 0 41
      src/pages/dataStatistics/book/summarizing/index.less
  18. 0 53
      src/pages/dataStatistics/book/summarizing/index.tsx
  19. 0 421
      src/pages/dataStatistics/book/summarizing/tableConfig.tsx
  20. 0 161
      src/pages/dataStatistics/color.less
  21. 0 60
      src/pages/dataStatistics/components/TableData/index.less
  22. 0 914
      src/pages/dataStatistics/components/TableData/index.tsx
  23. 0 9
      src/pages/dataStatistics/components/TableData/index1.less
  24. 0 610
      src/pages/dataStatistics/components/TableData/indexTab.tsx
  25. 0 125
      src/pages/dataStatistics/components/TableData/tableConfig.tsx
  26. 0 26
      src/pages/dataStatistics/imageRank/adCost/index.less
  27. 0 66
      src/pages/dataStatistics/imageRank/adCost/index.tsx
  28. 0 366
      src/pages/dataStatistics/imageRank/adCost/tableConfig.tsx
  29. 0 11
      src/pages/dataStatistics/imageRank/imageLibrary/index.less
  30. 0 51
      src/pages/dataStatistics/imageRank/imageLibrary/index.tsx
  31. 0 90
      src/pages/dataStatistics/imageRank/imageLibrary/tableConfig.tsx
  32. 0 39
      src/pages/dataStatistics/novel/novelConsumption/index.tsx
  33. 0 113
      src/pages/dataStatistics/novel/novelConsumption/tableConfig.tsx
  34. 0 19
      src/pages/dataStatistics/novel/novelPay/index.tsx
  35. 0 160
      src/pages/dataStatistics/novel/novelPay/tableConfig.tsx
  36. 0 49
      src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/benyue.tsx
  37. 0 41
      src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/index.less
  38. 0 106
      src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/index.tsx
  39. 0 49
      src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/leiji.tsx
  40. 0 49
      src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/shangyue.tsx
  41. 0 49
      src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/zonghaoshu.tsx
  42. 0 44
      src/pages/dataStatistics/pitcher/dataCenter/index.less
  43. 0 517
      src/pages/dataStatistics/pitcher/dataCenter/index.tsx
  44. 0 345
      src/pages/dataStatistics/pitcher/dataCenter/tableConfig.tsx
  45. 0 52
      src/pages/dataStatistics/pitcher/overview/index.tsx
  46. 0 332
      src/pages/dataStatistics/pitcher/overview/tableConfig.tsx
  47. 0 52
      src/pages/dataStatistics/pitcher/pitcherChannel/component/advertising/index.tsx
  48. 0 366
      src/pages/dataStatistics/pitcher/pitcherChannel/component/advertising/tableConfig.tsx
  49. 0 111
      src/pages/dataStatistics/pitcher/pitcherChannel/component/testVirtualTable/index.tsx
  50. 0 55
      src/pages/dataStatistics/pitcher/pitcherChannel/component/weChatList/index.tsx
  51. 0 207
      src/pages/dataStatistics/pitcher/pitcherChannel/component/weChatList/tableConfig.tsx
  52. 0 61
      src/pages/dataStatistics/pitcher/pitcherChannel/index.tsx
  53. 0 222
      src/pages/dataStatistics/pitcher/pitcherChannel/tableConfig.tsx
  54. 0 305
      src/pages/dataStatistics/pitcher/pitcherChannel/tableConfigVertising.tsx
  55. 0 41
      src/pages/dataStatistics/pitcher/pitcherPay/index.less
  56. 0 53
      src/pages/dataStatistics/pitcher/pitcherPay/index.tsx
  57. 0 272
      src/pages/dataStatistics/pitcher/pitcherPay/tableConfig.tsx
  58. 0 10
      src/pages/dataStatistics/pitcher/recoveryQuery/index.less
  59. 0 56
      src/pages/dataStatistics/pitcher/recoveryQuery/index.tsx
  60. 0 70
      src/pages/dataStatistics/pitcher/recoveryQuery/tableConfig.tsx
  61. 0 10
      src/pages/dataStatistics/rechargeMonitor/index.less
  62. 0 60
      src/pages/dataStatistics/rechargeMonitor/rechargeHis/index.tsx
  63. 0 249
      src/pages/dataStatistics/rechargeMonitor/rechargeHis/tableConfig.tsx
  64. 0 61
      src/pages/dataStatistics/rechargeMonitor/rechargeHisYear/index.tsx
  65. 0 160
      src/pages/dataStatistics/rechargeMonitor/rechargeHisYear/tableConfig.tsx
  66. 0 28
      src/pages/dataStatistics/weChat/ChannelAnalysis/index.less
  67. 0 61
      src/pages/dataStatistics/weChat/ChannelAnalysis/index.tsx
  68. 0 59
      src/pages/dataStatistics/weChat/ChannelAnalysis/tableConfig.tsx
  69. 0 66
      src/pages/dataStatistics/weChat/advertising/index.tsx
  70. 0 408
      src/pages/dataStatistics/weChat/advertising/tableConfig.tsx
  71. 0 0
      src/pages/dataStatistics/weChat/osoRoi/index.less
  72. 0 55
      src/pages/dataStatistics/weChat/osoRoi/index.tsx
  73. 0 62
      src/pages/dataStatistics/weChat/osoRoi/tableConfig.tsx
  74. 0 41
      src/pages/dataStatistics/weChat/payFans/index.less
  75. 0 52
      src/pages/dataStatistics/weChat/payFans/index.tsx
  76. 0 263
      src/pages/dataStatistics/weChat/payFans/tableConfig.tsx
  77. 0 41
      src/pages/dataStatistics/weChat/payTrend/index.less
  78. 0 54
      src/pages/dataStatistics/weChat/payTrend/index.tsx
  79. 0 324
      src/pages/dataStatistics/weChat/payTrend/tableConfig.tsx
  80. 0 41
      src/pages/dataStatistics/weChat/payTrendCom/index.less
  81. 0 88
      src/pages/dataStatistics/weChat/payTrendCom/index.tsx
  82. 0 372
      src/pages/dataStatistics/weChat/payTrendCom/tableConfig.tsx
  83. 0 44
      src/pages/dataStatistics/weChat/sevenDay/index.less
  84. 0 71
      src/pages/dataStatistics/weChat/sevenDay/index.tsx
  85. 0 92
      src/pages/dataStatistics/weChat/sevenDay/sonTableConfig.tsx
  86. 0 34
      src/pages/dataStatistics/weChat/sevenDay/table.less
  87. 0 151
      src/pages/dataStatistics/weChat/sevenDay/tableConfig.tsx
  88. 0 62
      src/pages/dataStatistics/weChat/todayRanking/index.tsx
  89. 0 238
      src/pages/dataStatistics/weChat/todayRanking/tableConfig.tsx
  90. 0 52
      src/pages/dataStatistics/weChat/weChatList/component/advertising/index.tsx
  91. 0 366
      src/pages/dataStatistics/weChat/weChatList/component/advertising/tableConfig.tsx
  92. 0 111
      src/pages/dataStatistics/weChat/weChatList/component/testVirtualTable/index.tsx
  93. 0 55
      src/pages/dataStatistics/weChat/weChatList/component/weChatList/index.tsx
  94. 0 207
      src/pages/dataStatistics/weChat/weChatList/component/weChatList/tableConfig.tsx
  95. 0 58
      src/pages/dataStatistics/weChat/weChatList/index.tsx
  96. 0 234
      src/pages/dataStatistics/weChat/weChatList/tableConfig.tsx
  97. 0 305
      src/pages/dataStatistics/weChat/weChatList/tableConfigVertising.tsx
  98. 0 50
      src/pages/launchSystem/adMonitor/adMonitorList/components/box.tsx
  99. 0 179
      src/pages/launchSystem/adMonitor/adMonitorList/components/planDetail.tsx
  100. 0 70
      src/pages/launchSystem/adMonitor/adMonitorList/components/tableConfig.tsx

+ 10 - 10
config/routerConfig.ts

@@ -19,7 +19,7 @@ function headrRouter(initialState: any, history: any) {
         initialState?.menu?.data.forEach((item: { roles: string[], path: string, routes: { path: string, routes: any[] }[] }) => {
             if (item?.routes?.some((i: { path: string }) => i.path?.includes('/launchSystemNew'))) {
                 let path = item?.routes?.length > 0 ? (item?.routes[0]?.routes?.length > 0 && item?.routes[0]?.routes[0]?.path) ? item?.routes[0]?.routes[0]?.path : item?.routes[0].path : item?.routes[0].path
-                isPhone ? history.push(path) : window.open(location.origin+'/#'+path) 
+                isPhone ? history.push(path) : window.open(location.origin + '/#' + path)
             }
         })
     }
@@ -28,7 +28,7 @@ function headrRouter(initialState: any, history: any) {
         initialState?.menu?.data.forEach((item: { roles: string[], path: string, routes: { path: string, routes: any[] }[] }) => {
             if (item?.routes?.some((i: { path: string }) => i.path?.includes('/adMonitor'))) {
                 let path = item?.routes?.length > 0 ? (item?.routes[0]?.routes?.length > 0 && item?.routes[0]?.routes[0]?.path) ? item?.routes[0]?.routes[0]?.path : item?.routes[0].path : item?.routes[0].path
-                isPhone ? history.push(path) : window.open(location.origin+'/#'+path) 
+                isPhone ? history.push(path) : window.open(location.origin + '/#' + path)
             }
         })
     }
@@ -87,9 +87,15 @@ function getMyMenu(code: any, data: any,) {
 const launchSystem = {
     path: '/launchSystemNew',
     routes: [
+        {
+            path: '/launchSystemNew/account',
+            name: '广告账户管理',
+            access: 'account',
+            component: './launchSystemNew/account',
+        },
         {
             path: '/launchSystemNew/adq',
-            name: '广点通',
+            name: '腾讯广告',
             component: './launchSystemNew/adq',
             access: 'adq',
         },
@@ -98,17 +104,11 @@ const launchSystem = {
             name: '广告投放',
             access: 'launchManage',
             routes: [
-                {
-                    path: '/launchSystemNew/launchManage/adAuthorize',
-                    name: '授权',
-                    access: 'adAuthorize',
-                    component: './launchSystemNew/launchManage/adAuthorize',
-                },
                 {
                     path: '/launchSystemNew/launchManage/localAd',
                     name: '广告模板',
                     access: 'localAd',
-                    component: './launchSystemNew/launchManage/localAd',  
+                    component: './launchSystemNew/launchManage/localAd',
                 },
                 {
                     path: '/launchSystemNew/launchManage/createAd',

+ 2 - 2
src/models/useAdMonitor/useMonitor.ts

@@ -9,7 +9,7 @@ import {
 
 export default function useMonitor() {
     /** 获取起量计划列表 */
-    const getPlanList = useAjax((params: ListType) => getPlanListApi(params), { formatResult: true })
+    const getPlanList = useAjax((params: ListType) => getPlanListApi(params), { formatResult: true, debounceInterval: 1000 })
     /**获取起来计划列表明细*/
     const getPlanDetailList = useAjax((params: ListType) => getDetailListApi(params), { formatResult: true, debounceInterval: 100 })
     /**获取起来计划列表5min*/
@@ -23,7 +23,7 @@ export default function useMonitor() {
     /** 获取组员 */
     const getUserGroup = useAjax(() => getUserGroupApi(), { formatResult: true })
     /** 计划列表 */
-    const getAllPlanList = useAjax((params: allPlanProps) => getAllPlanListApi(params), { formatResult: true, debounceInterval: 500 })
+    const getAllPlanList = useAjax((params: allPlanProps) => getAllPlanListApi(params), { formatResult: true, debounceInterval: 1000 })
     const getBookListAll = useAjax(() => getBookListAllApi(), { formatResult: true })
     /** 下载 */
     const downLoadUpAd = useAjax((params: ListType) => downLoadUpAdApi(params), { formatResult: true })

+ 0 - 118
src/models/useData/useDataCenter.ts

@@ -1,118 +0,0 @@
-import { Dispatch, useReducer } from 'react'
-import { channe, daily, overview, Params } from '@/services/dataStatistics/dataCenter'
-import { useAjax } from '@/Hook/useAjax'
-type State = {
-    /**radio值 */
-    radioValue?: '1' | '2' | '3',
-    /**折线图搜索天数 */
-    LineDay?: '7' | '15',
-    /**table切换值 */
-    tableValue?: '1' | '2',
-    /**table搜索日期值开始时间 */
-    start?: string,
-    /**table搜索日期值结束 */
-    end?: string,
-    /**table搜索天数 */
-    date_range?: string,
-    /**table搜索公众号值 */
-    channel?: string,//
-    /**个人概览 */
-    overview?: {
-        /**累计消耗*/
-        cost: number,
-        /**累计充值 */
-        amount: number,
-        /** 综合回本率*/
-        roi: number,
-        /**总号数 */
-        channel_count: number,
-        /** 在投号数*/
-        on_channel_count: number,
-        /**停投号数 */
-        off_channel_count: number,
-        /**本月消耗 */
-        this_month_cost: number,
-        /** 本月充值*/
-        this_month_amount: number,
-        /** 本月回本率*/
-        this_month_roi: number,
-        /** 上月消耗*/
-        last_month_cost: number,
-        /**上月充值 */
-        last_month_amount: number,
-        /**上月30天回本率 */
-        last_month_roi: number,
-        /** 上月至今回本率*/
-        last_month_far_roi: number,
-    },
-    LineData1?: {
-        [key: string]: any;
-        legendName: string;
-    }[],
-    LineData2?: {
-        [key: string]: any;
-        legendName: string;
-    }[],
-    LineData3?: {
-        [key: string]: any;
-        legendName: string;
-    }[],
-    tableData?: any[],
-    order_by?:string//排序字段
-    order?:'asc'|'desc'//升序降序
-}
-export type Action = {
-    type: 'radioChange' | 'LineData' | 'tableChange' | 'tableDate' | 'tableAppid' | 'LineDay' | 'tableDay' | 'setState',
-    params?: State
-}
-export function reducer(state: State, action: Action) {
-    let { type, params } = action
-    let newState = JSON.parse(JSON.stringify(state))
-    switch (type) {
-        case 'radioChange':
-        // return { ...state, radioValue: params?.radioValue }
-        case 'tableChange':
-        // return { ...state, tableValue: params?.tableValue }
-        case 'tableDate':
-        // return { ...state, tableDate: params?.tableDate }
-        case 'tableAppid':
-        // return { ...state, tableAppid: params?.tableAppid }
-        case 'tableDay':
-        // return { ...state, tableDay: params?.tableDay }
-        case 'LineDay':
-        // return { ...state, LineDay: params?.LineDay }
-        case 'setState':
-            Object.keys(params as State).forEach((key: string) => {
-                newState[key] = (params as State)[key]
-            })
-            return newState
-        // case 'LineData':
-        //     return { ...state, LineData: params?.LineData }
-        default:
-            return state;
-    }
-}
-const initData: State = {
-    radioValue: '1',
-    tableValue: '1',
-    date_range: '7',
-    LineData1: [],
-    LineData2: [],
-    LineData3: [],
-}
-export default function useWxGroupList() {
-    const [state, dispatch]: [state: State, dispatch: Dispatch<Action>] = useReducer(reducer, initData)
-    /**个人预览*/
-    const getOverview = useAjax((params: Params) => overview(params),{ formatResult: true })
-    /**日期汇总*/
-    const getDaily = useAjax((params: Params) => daily(params),{ formatResult: true })
-    /**公众号汇总*/
-    const getChanne = useAjax((params: Params) => channe(params),{ formatResult: true })
-    return {
-        state,
-        dispatch,
-        getOverview,
-        getDaily,
-        getChanne,
-    }
-}

+ 0 - 175
src/models/useData/useTableData.ts

@@ -1,175 +0,0 @@
-import { useReducer } from 'react'
-import { channel_analysis_select,pitcher_channel,channel_analysis_select_daily,ad_rank,bookOverview, bookRank, bookTrend, bossSummary,
-    getAccApi, channelActive, getUserApi, channelAgainOrderTrend, channelOrderTrend, channelOverview, channelStatChannel, imageRank, 
-    Params, pitcherOverview, pitcherTrend, getRechargeHisApi, getRechargeHisYaerApi, channelOrderTrendPay, setPayApi, recoveryQueryapi, getOsoRoiApi } from '@/services/dataStatistics/dataCenter'
-import { useAjax } from '@/Hook/useAjax'
-type State = {
-    tableDate?: string,//table搜索单日期值
-    channel?: string,//table搜索公众号名称
-    channels?: string[],// 多选公众号
-    tableId?: string,//table搜索公众号ID
-    date_range?: string,//table搜索公众号n天
-    start?: string,//开始时间
-    end?: string,//结束时间
-    start15?: string,//开始时间
-    end15?: string,//结束时间
-    cost_time_start?: string,//消耗开始时间
-    cost_time_end?: string,//结束时间
-    order_time_start?: string,//订单开始时间
-    order_time_end?: string,//结束时间
-    cost_year?: string, // 消耗所在年(格式:2021)
-    order_month?: string, // 订单所在月份  (格式:2021-11)
-    pitcher?: string,//投手名称
-    book?: any,//table搜索书名
-    dataSource?: any[]//table数据
-    loding?: boolean//请求
-    order_by?: string//排序字段
-    order?: 'asc' | 'desc',//升序降序
-    location?: 'MP' | 'GDT',//投放位置老
-    type?: 'MP' | 'GDT',//投放位置新
-    targetKeys?: any[],//
-    platform?:string,//书城
-    selectedKeys?: any[],//
-    tableValue?: '1' | '2',
-    stage?: string,//期数
-    tabKey?: string,
-    st?:string,//充值开始
-    et?:string,//充值结束
-    is_video?: number,
-    is_pitcher_self?: boolean,
-}
-export type Action = {
-    type: 'tableDate' | 'channel'| 'channels' | 'isVideo' | 'tableId' | 'book' | 'date_range' | 'tableDateArr' | 'tableDateArr15' | 'isPitcherSelf' | 'depleteDateDateArr' | 'orderDateDateArr' | 'costYear' | 'orderMonth' | 'tabKey' | 'init' | 'setState' | 'dataSource',
-    params?: State
-}
-export function reducer(state: State, action: Action) {
-    let { type, params } = action
-    let newState = JSON.parse(JSON.stringify(state))
-    switch (type) {
-        case 'tableDate':
-            return { ...state, tableDate: params?.tableDate }
-        case 'channel':
-            return { ...state, channel: params?.channel }
-        case 'costYear':
-            return { ...state, cost_year: params?.cost_year }
-        case 'orderMonth':
-            return { ...state, order_month: params?.order_month }
-        case 'isPitcherSelf':
-            return { ...state, is_pitcher_self: params?.is_pitcher_self }
-        case 'channels':
-            return { ...state, channels: params?.channels }
-        case 'isVideo':
-            return { ...state, is_video: params?.is_video }
-        case 'tableId':
-            return { ...state, tableId: params?.tableId }
-        case 'book':
-            return { ...state, book: params?.book }
-        case 'date_range':
-            return { ...state, date_range: params?.date_range }
-        case 'tableDateArr':
-            return { ...state, start: params?.start, end: params?.end }
-        case 'tableDateArr15':
-            return { ...state, start15: params?.start15, end15: params?.end15 }
-        case 'depleteDateDateArr':
-            return { ...state, cost_time_start: params?.start, cost_time_end: params?.end }
-        case 'orderDateDateArr':
-            return { ...state, order_time_start: params?.start, order_time_end: params?.end }
-        case 'dataSource':
-            return { ...state, dataSource: params?.dataSource }
-        case 'tabKey':
-            return { ...state, tabKey: params?.tabKey }
-        case 'setState':
-            Object.keys(params as State).forEach((key: string) => {
-                newState[key] = (params as State)[key]
-            })
-            return newState
-        case 'init':
-            return {}
-        default:
-            return state;
-    }
-}
-const initData: State = {
-    date_range:'7'
-}
-export default function useTableData() {
-    const [state, dispatch] = useReducer(reducer, initData)
-    /**广告投放详细数据 */
-    const getChannelOverview = useAjax((params: Params) => channelOverview(params), { formatResult: true })
-    /**今日消耗排行榜 */
-    const getBookRank = useAjax((params: Params) => bookRank(params), { formatResult: true })
-    /**公众号付费趋势表 */
-    const getChannelOrderTrend = useAjax((params: Params) => channelOrderTrend(params), { formatResult: true })
-    /**公众号付费趋势(含赔付金) */
-    const getChannelOrderTrendPay = useAjax((params: Params) => channelOrderTrendPay(params), { formatResult: true })
-    /** 公众号7日复重趋势*/
-    const getChannelAgainOrderTrend = useAjax((params: Params) => channelAgainOrderTrend(params), { formatResult: true })
-    /**公众号付费粉丝激活数据 */
-    const getChannelActive = useAjax((params: Params) => channelActive(params), { formatResult: true })
-    /**公众号汇总 */
-    const getChannelStatChannel = useAjax((params: Params) => channelStatChannel(params), { formatResult: true })
-    /**投手付费趋势 */
-    const getPitcherTrend = useAjax((params: Params) => pitcherTrend(params), { formatResult: true })
-    /**投手回收查询 */
-    const getRecoveryQuery = useAjax((params: Params) => recoveryQueryapi(params), { formatResult: true })
-    /**公众号回收查询 */
-    const getOsoRoi = useAjax((params: Params) => getOsoRoiApi(params), { formatResult: true })
-     /**投手总数据 */
-    const getPitcherOverview = useAjax((params: Params) => pitcherOverview(params), { formatResult: true })
-     /**充值历史 */
-    const getRechargeHis = useAjax((params: Params) => getRechargeHisApi(params), { formatResult: true })
-     /**充值历史(年) */
-    const getRechargeHisYaer = useAjax((params: Params) => getRechargeHisYaerApi(params), { formatResult: true })
-    /**小说付费趋势 */
-    const getBookTrend = useAjax((params: Params) => bookTrend(params), { formatResult: true })
-    /**小说总数据 */
-    /**小说付总数据 */
-    const getBookOverview = useAjax((params: Params) => bookOverview(params), { formatResult: true })
-    /**整体概况 */
-    const getBossSummary = useAjax((params: Params) => bossSummary(params), { formatResult: true })
-    /**素材库 */
-    const getImageRank = useAjax((params: Params) => imageRank(params), { formatResult: true })
-    /**素材消耗排行榜 */
-    const getAdrank = useAjax((params: Params) => ad_rank(params), { formatResult: true })
-    /** 搜索公众号 */
-    const getAccAjax = useAjax((params: Params) => getAccApi(params), { formatResult: true })
-    /** 获取拥有用户 */
-    const getUserAjax = useAjax((params: Params) => getUserApi(params), { formatResult: true })
-    /** 投手投放号 */
-    const getPitcherChannel = useAjax((params: Params) => pitcher_channel(params), { formatResult: true })
-    /** 公众号用户充值查询 */
-    const getChannelAnalysis = useAjax((params: Params) => channel_analysis_select(params), { formatResult: true })  
-    /** 公众号用户充值查询详情 */
-    const getChannelAnalysisDetails = useAjax((params: Params) => channel_analysis_select_daily(params), { formatResult: true })  
-    /** 设置赔付金 */
-    const setPay = useAjax((params: { date: string, channel: string, pay: number }) => setPayApi(params), { formatResult: true })
-
-    return {
-        state,
-        dispatch,
-        getChannelOverview,
-        getChannelOrderTrend,
-        getChannelOrderTrendPay,
-        getChannelAgainOrderTrend,
-        getChannelActive,
-        getChannelStatChannel,
-        getPitcherTrend,
-        getRecoveryQuery,
-        getBookRank,
-        getBookTrend,
-        getBookOverview,
-        getPitcherOverview,
-        getRechargeHis,
-        getBossSummary,
-        getImageRank,
-        getAdrank,
-        getAccAjax,
-        getRechargeHisYaer,
-        getUserAjax,
-        getPitcherChannel,
-        getChannelAnalysis,
-        getChannelAnalysisDetails,
-        setPay,
-        getOsoRoi
-    }
-}

File diff ditekan karena terlalu besar
+ 0 - 14
src/models/useLaunch/useAdAuthorize.ts


+ 0 - 79
src/models/useLaunch/useMaterial.ts

@@ -1,79 +0,0 @@
-import { useAjax } from '@/Hook/useAjax'
-import { data_list, data_label, collects_data, } from '@/services/dataStatistics/dataCenter'
-import {
-    editLabel, addLabel, getLabelsApi, delLabelApi, getContentListApi, ContentIF,
-    addContentsAjax, addContentIF, delContentsAjax, editContentsAjax, editContentIF, collectsApi,
-    collectsCancelApi, addMediasAjax, addMediasIF, getMediasListApi, getMediasIF, delMediasAjax, editMediasAjax,
-    getIdeasListApi, delIdeasAjax, addIdeasAjax, addIdeasIF, editIdeasAjax, getScDetailApi, setBatchMediasApi, setBatchContentsApi,
-    setTagIdeaApi, setTagMediaApi, setTagContentApi
-} from '@/services/operating/adMaterial'
-import { useModel } from 'umi'
-
-export default function useWxGroupList() {
-    const userId  = useModel('@@initialState', model =>model.initialState?.currentUser?.userId)
-    const getLabels = useAjax((params: { pageNum: string | number, pageSize: string | number }) => getLabelsApi(params))
-    const labelAdd = useAjax((params: { label: string }) => addLabel(params), { msgNmae: '添加' })
-    const LabelEdit = useAjax((params: { label: string, id: number }) => editLabel(params), { msgNmae: '修改' })
-    const delLabel = useAjax((params: { id: number }) => delLabelApi(params), { msgNmae: '删除' })
-
-    const getContentList = useAjax((params: ContentIF) => getContentListApi(params))
-    const addContents = useAjax((params: addContentIF) => addContentsAjax(params), { msgNmae: '添加' })
-    const delContents = useAjax((params: { ids: string }) => delContentsAjax(params), { msgNmae: '删除' })
-    const editContents = useAjax((params: editContentIF) => editContentsAjax(params), { msgNmae: '修改' })
-
-    const collects = useAjax((params: { contentIds: string, type: number }) => collectsApi(params), { msgNmae: '收藏' })
-    const collectsCancel = useAjax((params: { contentIds: string, type: number }) => collectsCancelApi(params), { msgNmae: '取消收藏' })
-
-    const addMedias = useAjax((params: addMediasIF) => addMediasAjax(params), { msgNmae: '添加' })
-    const getMediasList = useAjax((params: getMediasIF) => getMediasListApi(params))
-    const delMedias = useAjax((params: { ids: string }) => delMediasAjax(params), { msgNmae: '删除' })
-    const editMedias = useAjax((params: addMediasIF) => editMediasAjax(params), { msgNmae: '修改' })
-
-    const getIdeasList = useAjax((params: getMediasIF) => getIdeasListApi(params))
-    const delIdeas = useAjax((params: { ids: string }) => delIdeasAjax(params), { msgNmae: '删除' })
-    const addIdeas = useAjax((params: addIdeasIF) => addIdeasAjax(params), { msgNmae: '添加' })
-    const editIdeas = useAjax((params: addIdeasIF) => editIdeasAjax(params), { msgNmae: '修改' })
-    const getSmDetail = useAjax((id: number) => getScDetailApi(id))
-
-    /**数据云 */
-    const dataList = useAjax((params) => data_list({...params,userId}), { formatResult: true })
-    const dataLable = useAjax((params) => data_label({...params,userId}), { formatResult: true })
-    const datacollects = useAjax((params) => collects_data({...params,userId}), { msgNmae:'操作' })
-
-    /** 批量修改标签 */
-    const setBatchMedias = useAjax((params: {mediaIds: string, labelIds: string}) => setBatchMediasApi(params), { msgNmae: '修改' })
-    const setBatchContents = useAjax((params: {mediaIds: string, labelIds: string}) => setBatchContentsApi(params), { msgNmae: '修改' })
-    const setTagIdea = useAjax((params: {mediaIds: string, labelIds: string}) => setTagIdeaApi(params), { msgNmae: '修改' })
-    const setTagMedia = useAjax((params: {mediaIds: string, labelIds: string}) => setTagMediaApi(params), { msgNmae: '修改' })
-    const setTagContent = useAjax((params: {mediaIds: string, labelIds: string}) => setTagContentApi(params), { msgNmae: '修改' })
-
-    return {
-        getLabels,
-        labelAdd,
-        LabelEdit,
-        delLabel,
-        getContentList,
-        addContents,
-        delContents,
-        editContents,
-        collects,
-        collectsCancel,
-        addMedias,
-        getMediasList,
-        delMedias,
-        editMedias,
-        getIdeasList,
-        delIdeas,
-        addIdeas,
-        editIdeas,
-        getSmDetail,
-        dataList,
-        dataLable,
-        datacollects,
-        setBatchMedias,
-        setBatchContents,
-        setTagIdea,
-        setTagMedia,
-        setTagContent
-    }
-}

+ 0 - 65
src/models/useLaunch/useMonitor.ts

@@ -1,65 +0,0 @@
-import { useAjax } from '@/Hook/useAjax'
-import {
-    ListType, getPlanListApi, getTotalCostApi, getPlanCostApi, getCostSpeedApi, getUserGroupApi, getAllPlanListApi,
-    allPlanProps, getDetailListApi, getAgencyListApi, getBookListApi, listProps, getMinuteListApi, downLoadUpAdApi, downLoadDetailApi,
-    downLoadDetailMinuteApi, downLoadSpeedApi, downLoadAllAdListApi, addEditGroupApi, getAdGroupListApi, deleteAdGroupApi, 
-    getAccountListApi, AccountListProps, addDelAccountApi, getBookListAllApi
-} from '@/services/launch/adMonitor'
-
-
-export default function useMonitor() {
-    /** 获取起量计划列表 */
-    const getPlanList = useAjax((params: ListType) => getPlanListApi(params), { formatResult: true })
-    /**获取起来计划列表明细*/
-    const getPlanDetailList = useAjax((params: ListType) => getDetailListApi(params), { formatResult: true })
-    /**获取起来计划列表5min*/
-    const getMinuteList = useAjax((params: ListType) => getMinuteListApi(params), { formatResult: true })
-    /** 获取今日计划总消耗图谱 */
-    const getTotalCost = useAjax((params: ListType) => getTotalCostApi(params), { formatResult: true })
-    /** 获取计划消耗图谱 */
-    const getPlanCost = useAjax((params: ListType) => getPlanCostApi(params), { formatResult: true })
-    /** 获取消耗速度详情(弹窗) */
-    const getCostSpeed = useAjax((params: ListType) => getCostSpeedApi(params), { formatResult: true })
-    /** 获取组员 */
-    const getUserGroup = useAjax(() => getUserGroupApi(), { formatResult: true })
-    /** 计划列表 */
-    const getAllPlanList = useAjax((params: allPlanProps) => getAllPlanListApi(params), { formatResult: true })
-    const getAgencyList = useAjax((params: listProps) => getAgencyListApi(params), { formatResult: true })
-    const getBookList = useAjax((params: listProps) => getBookListApi(params), { formatResult: true })
-    const getBookListAll = useAjax(() => getBookListAllApi(), { formatResult: true })
-    /** 下载 */
-    const downLoadUpAd = useAjax((params: ListType) => downLoadUpAdApi(params), { formatResult: true })
-    const downLoadDetail = useAjax((params: ListType) => downLoadDetailApi(params), { formatResult: true })
-    const downLoadDetailMinute = useAjax((params: ListType) => downLoadDetailMinuteApi(params), { formatResult: true })
-    const downLoadSpeed = useAjax((params: ListType) => downLoadSpeedApi(params), { formatResult: true })
-    const downLoadAllAdList = useAjax((params: allPlanProps) => downLoadAllAdListApi(params), { formatResult: true })
-    // 监控数据源
-    const addEditGroup = useAjax((params: { groupName: string, id?: number, remark?: string }) => addEditGroupApi(params), { formatResult: true })
-    const getAdGroupList = useAjax(() => getAdGroupListApi(), { formatResult: true })
-    const deleteAdGroup = useAjax((params: { id: number }) => deleteAdGroupApi(params), { formatResult: true })
-    const getAccountList = useAjax((params: AccountListProps) => getAccountListApi(params), { formatResult: true })
-    const addDelAccount = useAjax((params: { accountIdList: number[], groupId: number, type: 0 | 1 }) => addDelAccountApi(params), { formatResult: true })
-    return {
-        getPlanList,
-        getTotalCost,
-        getPlanCost,
-        getCostSpeed,
-        getUserGroup,
-        getAllPlanList,
-        getPlanDetailList,
-        getAgencyList,
-        getBookList,
-        getMinuteList,
-        downLoadUpAd,
-        downLoadDetail,
-        downLoadDetailMinute,
-        downLoadSpeed,
-        downLoadAllAdList,
-        addEditGroup,
-        getAdGroupList,
-        deleteAdGroup,
-        getAccountList,
-        addDelAccount,
-        getBookListAll
-    }
-}

+ 0 - 386
src/models/useLaunch/useNewCreateAd.ts

@@ -1,386 +0,0 @@
-import { adcreative311, adcreative1707, adcreative928, adcreative929 } from '@/pages/launchSystem/launchManageNew/weChatNew/components/createPlan/components/adList/styleData'
-import { message } from 'antd'
-import moment from 'moment'
-import { Dispatch, useReducer } from 'react'
-import { Campaign, Targeting, Adgroup, Adcreative, Material } from '../../pages/launchSystem/launchManage/req'
-import { addPlanApi, adsPlan, getAdsPlanApi, adsPlanList, delBatchAjax, getAdsPlanLogApi, adsPlanLogList, delLogBatchAjax, setCopyPlanApi, CopyPlan } from '@/services/operating/adNewAuthorize'
-import { useAjax } from '@/Hook/useAjax'
-
-interface State {
-    campaign: Campaign
-    targeting: Targeting
-    adgroup: Adgroup
-    adcreative: Adcreative
-    material: Material
-    pageData: any[] // 落地页
-    launchAcc: any[] // 定向包
-    releases: { label: string, value: string, id: number }[] // 投放号
-    release: string[]
-}
-
-const initData: State = {
-    campaign: {
-        campaign_name: "", //计划名称
-        campaign_type: "CAMPAIGN_TYPE_NORMAL", //暂时固定
-        promoted_object_type: "PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT", //推广目标--->  PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT->公众号推广  PROMOTED_OBJECT_TYPE_WECHAT_CHANNELS->视频号推广
-        daily_budget: 0, //计划日预算
-        speed_mode: "SPEED_MODE_STANDARD", //暂时固定
-        application_platform: 3, //暂时固定
-    },
-    targeting: {
-        age: [{
-            min: 14,
-            max: 66
-        }],
-        behavior_or_interest: {},
-        device_brand_model: {},
-        geo_location: {
-            location_types: ["LIVE_IN"],
-            regions: [110000, 120000, 130000, 140000, 150000, 210000, 220000, 230000, 310000, 320000, 330000, 340000, 350000, 360000, 370000, 410000, 420000, 430000, 440000, 450000, 460000, 500000, 510000, 520000, 530000, 540000, 610000, 620000, 630000, 640000, 650000]
-        },
-    },
-    adgroup: {
-        account_id: "17383887",
-        adgroup_name: "", //广告名称
-        begin_date: moment().startOf('day').add(4, 'M').format('YYYY-MM-DD'), //开始日期
-        end_date: moment().startOf('day').add(12, 'M').format('YYYY-MM-DD'), //结束日期
-        targeting: "", // Targeting
-        time_series: "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
-        campaign_id: '',//计划ID
-        configured_status: "AD_STATUS_NORMAL",
-        daily_budget: "100000",   // 广告日预算
-        bid_amount: "10", //出价
-        expand_enabled: "false",
-        promoted_object_id: "", // "wxf82b302b1dde69e9"
-        promoted_object_type: "PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT", //推广目标--->  PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT->公众号推广  PROMOTED_OBJECT_TYPE_WECHAT_CHANNELS->视频号推广
-        site_set: ["SITE_SET_MOMENTS"],   //流量位--->  SITE_SET_MOMENTS->朋友圈信息流  SITE_SET_WECHAT->公众平台流量
-        bid_mode: "BID_MODE_OCPM", //出价方式--->   BID_MODE_OCPM->oCPM BID_MODE_OCPC->oCPC BID_MODE_CPM->CPM
-        optimization_goal: "OPTIMIZATIONGOAL_ECOMMERCE_ORDER",  // 优化目标---> OPTIMIZATIONGOAL_CLICK->点击  OPTIMIZATIONGOAL_ECOMMERCE_ORDER->下单 OPTIMIZATIONGOAL_FOLLOW->关注 
-        bid_strategy: "BID_STRATEGY_TARGET_COST",   // 投放模式--->  BID_STRATEGY_AVERAGE_COST->均衡投放  BID_STRATEGY_TARGET_COST->跑量优先  BID_STRATEGY_PRIORITY_CAP_COST->控制成本上线
-        smart_bid_type: "SMART_BID_TYPE_CUSTOM",  // 投放模式--->  SMART_BID_TYPE_CUSTOM->手动模式  SMART_BID_TYPE_SYSTEMATIC->自动模式
-        auto_acquisition_enabled: "false", //
-        cold_start_audience: "[]",
-    },
-    adcreative: {
-        account_id: "",
-        campaign_id: "",
-        adcreative_name: "",
-        adcreative_template_id: "311",
-        page_type: "PAGE_TYPE_CANVAS_WECHAT",
-        adcreative_elements: {
-            image_list: [""],  //
-            title: ""   // 外层文案
-        },
-        page_spec: {
-            page_id: "",  // 落地页ID 我们平台传name
-        },
-        countdown_switch: "false",
-        head_click_type: "HEAD_CLICK_TYPE_DEFAULT",
-        site_set: ["SITE_SET_MOMENTS"],   //流量位--->  SITE_SET_MOMENTS->朋友圈信息流  SITE_SET_WECHAT->公众平台流量
-        promoted_object_type: "PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT", //推广目标--->  PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT->公众号推广  PROMOTED_OBJECT_TYPE_WECHAT_CHANNELS->视频号推广
-        promoted_object_id: "",
-        link_page_type: "LINK_PAGE_TYPE_WECHAT_OFFICIAL_ACCOUNT_DETAIL", // 文字链类型--->  LINK_PAGE_TYPE_WECHAT_OFFICIAL_ACCOUNT_DETAIL->微信公众号详情页 LINK_PAGE_TYPE_CANVAS_WECHAT->微信原生页
-        link_name_type: "READ_NOVELS",   // 文字链文案---> READ_NOVELS->阅读小说 FOLLOW_OFFICIAL_ACCOUNT->关注公众号 MORE_INFO->了解更多
-    },
-    material: {
-        page_name: ''
-    },
-    pageData: [],
-    launchAcc: [],
-    releases: [],
-    release: []
-}
-
-interface Action {
-    type: 'setCampaign' | 'setTargeting' | 'setAdgroup' | 'setAdcreative' | 'setMaterial' | 'setReleases' | 'setRelease' | 'setLaunchAcc' | 'setPageData' | 'setData' | 'init'
-    params: State
-}
-
-
-function reducer(state: State, action: Action) {
-    let { type, params } = action
-    switch (type) {
-        case 'setCampaign':
-            return { ...state, campaign: { ...params.campaign } }
-        case 'setTargeting':
-            return { ...state, targeting: { ...params.targeting } }
-        case 'setAdgroup':
-            return { ...state, adgroup: { ...params.adgroup } }
-        case 'setAdcreative':
-            return { ...state, adcreative: { ...params.adcreative } }
-        case 'setMaterial':
-            return { ...state, material: { ...params.material } }
-        case 'setReleases':
-            return { ...state, releases: params.releases }
-        case 'setRelease':
-            return { ...state, release: params.release }
-        case 'setPageData':
-            return { ...state, pageData: params.pageData }
-        case 'setLaunchAcc':
-            return { ...state, launchAcc: params.launchAcc }
-        case 'setData':
-            return { ...state, ...params }
-        case 'init':
-            return { ...state, ...initData }
-        default:
-            return state;
-    }
-}
-
-export default function useNewCreateAd() {
-    const [state, dispatch]: [state: State, dispatch: Dispatch<Action>] = useReducer(reducer, initData)
-
-    const { targeting, adgroup, adcreative, material } = state
-    const { age } = targeting
-
-    // 设置Adgroup
-    const setAdgroup = (key: string, value: any) => {
-        let newAdgroup = JSON.parse(JSON.stringify(adgroup))
-        if(value !== 'All') {
-            if(key === 'bid_mode') {
-                let bid_mode = newAdgroup.bid_mode
-                dispatch({type: 'setMaterial', params: { ...state, material: { page_name: material.page_name } }})
-                if(value === 'BID_MODE_CPM') {
-                    delete newAdgroup?.optimization_goal
-                    delete newAdgroup?.bid_strategy
-                    delete newAdgroup?.smart_bid_type
-                    delete newAdgroup?.auto_acquisition_enabled
-                    delete newAdgroup?.cold_start_audience
-                } else if(bid_mode === 'BID_MODE_CPM') { // 现在在CPM 往其他地方点击
-                    newAdgroup.optimization_goal = 'OPTIMIZATIONGOAL_ECOMMERCE_ORDER'
-                    newAdgroup.bid_strategy = 'BID_STRATEGY_TARGET_COST'
-                    newAdgroup.smart_bid_type = 'SMART_BID_TYPE_CUSTOM'
-                    newAdgroup.auto_acquisition_enabled = 'false'
-                    newAdgroup.cold_start_audience = "[]"
-                }
-                if(newAdgroup.site_set[0] === 'SITE_SET_WECHAT') { // 是公众平台流量
-                    // if(newAdgroup?.scene_spec?.wechat_position?.length === 0) {
-                        if(value === 'BID_MODE_OCPM') { // 视频 929
-                            dispatch({ type: 'setAdcreative', params: { ...state, adcreative: { ...adcreative929 as Adcreative } } })
-                        } else if(value === 'BID_MODE_OCPC') {  // 图片 928
-                            dispatch({ type: 'setAdcreative', params: { ...state, adcreative: { ...adcreative928 as Adcreative } } })
-                        }
-                    // }
-                }
-            } else if(key === 'optimization_goal' && value === 'OPTIMIZATIONGOAL_ECOMMERCE_ORDER') { // 如果关注设置了深度优化 切换到下单 要清除
-                delete newAdgroup?.deep_conversion_spec
-            } else if(key === 'site_set') { // 设置流量位
-                // setAdcreative('site_set', value)
-                dispatch({type: 'setMaterial', params: { ...state, material: { page_name: material.page_name } }})
-                if(value[0] === 'SITE_SET_WECHAT') { // 公众平台流量
-                    newAdgroup.scene_spec = {
-                        wechat_position: []
-                    }
-                    if(newAdgroup.bid_mode === 'BID_MODE_CPM') { // 如果是cpm要转
-                        newAdgroup.bid_mode = 'BID_MODE_OCPM'
-                        newAdgroup.optimization_goal = 'OPTIMIZATIONGOAL_ECOMMERCE_ORDER'
-                        newAdgroup.bid_strategy = 'BID_STRATEGY_TARGET_COST'
-                        newAdgroup.smart_bid_type = 'SMART_BID_TYPE_CUSTOM'
-                        newAdgroup.auto_acquisition_enabled = 'false'
-                        newAdgroup.cold_start_audience = "[]"
-                    }
-                } else {
-                    if(Object.keys(newAdgroup).indexOf('scene_spec') !== -1) { // 朋友圈信息流
-                        delete newAdgroup.scene_spec
-                    }
-                }
-                if(value[0] === 'SITE_SET_MOMENTS') { // 朋友圈信息流
-                    if(newAdgroup.bid_mode === 'BID_MODE_OCPC') { // 如果是OCPC要转
-                        newAdgroup.bid_mode = 'BID_MODE_OCPM'
-                    }
-                }
-
-            } else if(key === 'scene_spec') { // 设置广告位
-                if(value.wechat_position.indexOf(1024790) !== -1) {
-                    if(newAdgroup.bid_mode === 'BID_MODE_OCPM') {
-                        dispatch({type: 'setMaterial', params: { ...state, material: { page_name: material.page_name } }})
-                    }
-                    newAdgroup.bid_mode = 'BID_MODE_OCPC'
-                    dispatch({ type: 'setAdcreative', params: { ...state, adcreative: { ...adcreative928 as Adcreative } } })
-                } else if(value.wechat_position.indexOf(1024791) !== -1 || value.wechat_position.indexOf(1024795) !== -1) {
-                    if(newAdgroup.bid_mode === 'BID_MODE_OCPC') {
-                        dispatch({type: 'setMaterial', params: { ...state, material: { page_name: material.page_name } }})
-                    }
-                    newAdgroup.bid_mode = 'BID_MODE_OCPM'
-                    dispatch({ type: 'setAdcreative', params: { ...state, adcreative: { ...adcreative929 as Adcreative } } })
-                }
-            }
-            newAdgroup[key] = value
-        } else {
-            for (const key1 in newAdgroup) {
-                if (key1 === key) {
-                    delete newAdgroup[key1]
-                }
-            }
-        }
-        dispatch({ type: 'setAdgroup', params: { ...state, adgroup: { ...newAdgroup } } })
-    }
-
-    // 设置targeting
-    const setTargeting = (key: string, value: any) => {
-        let newTargeting = JSON.parse(JSON.stringify(targeting))
-        if (value !== 'All') {
-            newTargeting[key] = value
-        } else {
-            for (const key1 in newTargeting) {
-                if (key1 === key) {
-                    delete newTargeting[key1]
-                }
-            }
-        }
-        dispatch({ type: 'setTargeting', params: { ...state, targeting: { ...newTargeting } } })
-    }
-
-    // 设置targeting wechat_ad_behavior
-    const setTargeting_wab = (key: string, value: any) => {
-        let newTargeting = JSON.parse(JSON.stringify(targeting))
-        if (value !== 'All') {
-            if(Object.keys(newTargeting).indexOf('wechat_ad_behavior') === -1) {
-                newTargeting['wechat_ad_behavior'] = {}
-            }
-            newTargeting['wechat_ad_behavior'][key] = value
-        } else {
-            for (const key1 in newTargeting) {
-                if (key1 === 'wechat_ad_behavior') {
-                    for (const key2 in newTargeting[key1]) {
-                        if (key2 === key) {
-                            delete newTargeting[key1][key2]
-                        }
-                    }
-                    if(Object.keys(newTargeting[key1]).length === 0) {
-                        delete newTargeting[key1]
-                    }
-                }
-            }
-        }
-        dispatch({ type: 'setTargeting', params: { ...state, targeting: { ...newTargeting } } })
-    }
-
-    // 设置年龄
-    const setAgeHandle = (value: number, type: 'min' | 'max') => {
-        age[0][type] = value
-        dispatch({ type: 'setTargeting', params: { ...state, targeting: { ...targeting, age } } })
-    }
-
-    // 设置adcreative
-    const setAdcreative = (key: string, value: any) => {
-        let newAdcreative = JSON.parse(JSON.stringify(adcreative))
-        if (value !== 'All') {
-            newAdcreative[key] = value
-            if (key === 'page_spec' && value?.override_canvas_head_option === 'OPTION_CANVAS_OVERRIDE_CREATIVE') {
-                dispatch({type: 'setMaterial', params: { ...state, material: { page_name: material.page_name || "" } }})
-            }
-        } else {
-            for (const key1 in newAdcreative) {
-                if (key1 === key) {
-                    delete newAdcreative[key1]
-                }
-            }
-        }
-        dispatch({ type: 'setAdcreative', params: { ...state, adcreative: { ...newAdcreative } } })
-    }
-
-
-    // 设置创意样式
-    const setAdcreativeType = (value: string) => {
-        // adcreative311, adcreative1707
-        if (['311', '641', '642', '643', '618', '1465', '1480'].includes(value)) {
-            let newAdEle = JSON.parse(JSON.stringify(adcreative311?.adcreative_elements)) || { title: '', image_list: [""] }
-            if(['311', '641', '642', '643'].includes(value)) {
-                delete newAdEle?.short_video_struct
-                newAdEle.image_list = [""]
-            } else {
-                delete newAdEle?.image_list
-                newAdEle.short_video_struct = {
-                    short_video1: ""
-                }
-            }
-            dispatch({ type: 'setAdcreative', params: { ...state, adcreative: { ...adcreative311 as Adcreative, adcreative_template_id: value, adcreative_elements: { ...newAdEle } } } })
-        } else if (['1707', '1708'].includes(value)) {
-            let newAdEle = JSON.parse(JSON.stringify(adcreative1707?.adcreative_elements)) || { title: '', description: '', image_list: [""] }
-            if(['1707'].includes(value)) {
-                delete newAdEle?.video
-                newAdEle.image_list = [""]
-            } else {
-                delete newAdEle?.image_list
-                newAdEle.video = ""
-            }
-            dispatch({ type: 'setAdcreative', params: { ...state, adcreative: { ...adcreative1707 as Adcreative, adcreative_template_id: value, adcreative_elements: { ...newAdEle } } } })
-        } else if (['928'].includes(value)) {
-            dispatch({ type: 'setAdcreative', params: { ...state, adcreative: { ...adcreative928 as Adcreative } } })
-        } else if (['929'].includes(value)) {
-            dispatch({ type: 'setAdcreative', params: { ...state, adcreative: { ...adcreative929 as Adcreative } } })
-        }
-    }
-
-    // 设置落地页
-    const setPageData = (value: any) => {
-        dispatch({ type: 'setPageData', params: { ...state, pageData: value } })
-    }
-
-    // 重置落地页相关
-    const resetPage = () => {
-        setPageData([])
-        dispatch({type: 'setMaterial', params: { ...state, material: { page_name: "" } }})
-        dispatch({ type: 'setReleases', params: { ...state, releases: [] } })
-        dispatch({ type: 'setRelease', params: { ...state, release: [] } })
-        dispatch({ type: 'setLaunchAcc', params: { ...state, launchAcc: [] } })
-    }
-
-    // 保存在本地
-    const severBd = () => {
-        let newState = JSON.parse(JSON.stringify(state))
-        delete newState['releases']
-        let obj = {
-            ...newState
-        }
-        localStorage.setItem('newBdPlan', JSON.stringify(obj))
-        message.success('保存本地成功!')
-    }
-
-    // 进入设置成本地数据
-    const setBd = () => {
-        let plan = localStorage.getItem('newBdPlan')
-        if (plan) {
-            let obj = JSON.parse(plan)
-            dispatch({type: 'setData', params: { ...obj }})
-        }
-    }
-
-    // 清空本地数据
-    const delBdPlan = () => {
-        localStorage.setItem('newBdPlan', '')
-        dispatch({type: 'init', params: { ...state }})
-        message.success('本地保存已清空!')
-    }
-
-    // api
-    const addPlan = useAjax((props: adsPlan) => addPlanApi(props), { formatResult: true })
-    const getAdsPlan = useAjax((props: adsPlanList) => getAdsPlanApi(props), { formatResult: true })
-    const delBatch = useAjax((props: { taskIds: string }) => delBatchAjax(props), { formatResult: true, msgNmae: '删除' })
-    const delLogBatch = useAjax((props: { logIds: string }) => delLogBatchAjax(props), { formatResult: true, msgNmae: '删除' })
-    const getAdsPlanLog = useAjax((props: adsPlanLogList) => getAdsPlanLogApi(props), { formatResult: true })
-    const setCopyPlan = useAjax((props: CopyPlan) => setCopyPlanApi(props))
-
-    return {
-        state,
-        dispatch,
-        setAdgroup,
-        setTargeting,
-        setAgeHandle,
-        setTargeting_wab,
-        setAdcreative,
-        setAdcreativeType,
-        setPageData,
-        resetPage,
-        severBd,
-        setBd,
-        delBdPlan,
-        addPlan,
-        getAdsPlan,
-        delBatch,
-        getAdsPlanLog,
-        delLogBatch,
-        setCopyPlan
-    }
-}

+ 0 - 38
src/models/useLaunch/useWeChat.ts

@@ -1,38 +0,0 @@
-import { useAjax } from '@/Hook/useAjax'
-import { getAccApi, getOrientApi, setPromotionPageAjax, getLayoutLocalApi, delLayoutLocalApi,
-    delAdPlanLocalApi, getPlanActionRecordApi, createAd, getAdWechatServiceNameApi, getAdWechatWechatNameApi, 
-    getTaskListApi, getScanStatusApi, TaskProps, PlanProps, OrientProps, refreshDataApi } from '@/services/operating/adWeChat'
-
-
-export default function useWeChat() {
-    const getAcc = useAjax(() => getAccApi(), { formatResult: true })
-    const getOrient = useAjax((params: OrientProps) => getOrientApi(params), { formatResult: true })
-    // const getBookRank = useAjax((params: Params) => bookRank(params), { formatResult: true })
-    const setPromotionPage = useAjax((params: { userId: string | number, name: string, typesetting: string }) => setPromotionPageAjax(params), { formatResult: true })
-    const getLayoutLocal = useAjax((params: { pageNum: number, pageSize: number, name?: string | undefined, updateStartDate?: string | undefined, updateEndDate?: string | undefined }) => getLayoutLocalApi(params), { formatResult: true })
-    const delLayoutLocal = useAjax((params: { userId: string | number, name: string }) => delLayoutLocalApi(params), { formatResult: true })
-
-    const delAdPlanLocal = useAjax((params: { objectName: string, serviceName: string, wechatName: string }) => delAdPlanLocalApi(params), { formatResult: true })
-    const getPlanActionRecord = useAjax((params: PlanProps) => getPlanActionRecordApi(params), { formatResult: true })
-    const createAdPost = useAjax((params) => createAd(params), { formatResult: true })
-    const getAdWechatServiceName = useAjax(() => getAdWechatServiceNameApi(), { formatResult: true })
-    const getAdWechatWechatName = useAjax((params: { serviceName: string }) => getAdWechatWechatNameApi(params), { formatResult: true })
-    const getTaskList = useAjax((params: TaskProps) => getTaskListApi(params), { formatResult: true })
-    const getScanStatus = useAjax(() => getScanStatusApi(), { formatResult: true })
-    const refreshData = useAjax((params: {userId: number, is_refresh: string}) => refreshDataApi(params), { formatResult: true })
-    return {
-        getAcc,
-        getOrient,
-        setPromotionPage,
-        getLayoutLocal,
-        delLayoutLocal,
-        delAdPlanLocal,
-        getPlanActionRecord,
-        createAdPost,
-        getAdWechatServiceName,
-        getAdWechatWechatName,
-        getTaskList,
-        getScanStatus,
-        refreshData
-    }
-}

+ 3 - 3
src/pages/adMonitor/adMonitorList/index.tsx

@@ -14,10 +14,10 @@ const AdMonitorList: React.FC = () => {
     return <div className="adMonitorList">
         <Tabs activeKey={tab} className="adMonitorListTab" size="small" type="card" onChange={(activeKey: string) => {
             if (activeKey === 'monitor') {
-                getAllPlanList.mutate([])
+                getAllPlanList.data && getAllPlanList.mutate([])
             } else {
-                getPlanList.mutate([])
-                getPlanDetailList.mutate([])
+                getPlanList.data && getPlanList.mutate([])
+                getPlanDetailList.data && getPlanDetailList.mutate([])
             }
             setTab(activeKey)
         }}>

+ 4 - 4
src/pages/adMonitor/adMonitorList/monitor.tsx

@@ -27,7 +27,7 @@ function Monitor(props: { onChange: () => void }) {
     const { getPlanList, getTotalCost, getPlanCost, getPlanDetailList, getMinuteList, getAdqAccountList } = useModel('useAdMonitor.useMonitor')
     const { getPicherList } = useModel('useOperating.useWxGroupList')
     // 变量开始
-    const [queryForm, setQueryForm] = useState<newListType>({ totalTimeUnit: 'day', planTimeUnit: 'hour', sysUserId: JSON.parse(sessionStorage.getItem('SYSUSERID') || '[]'), pageNum: 1, pageSize: 100 }) // 搜索变量//startTime: moment().format('YYYY-MM-DD'), endTime: moment().format('YYYY-MM-DD'),
+    const [queryForm, setQueryForm] = useState<newListType>({ totalTimeUnit: 'day', planTimeUnit: 'hour', sysUserId: JSON.parse(sessionStorage.getItem('SYSUSERID') || '[]'), pageNum: 1, pageSize: 20 }) // 搜索变量//startTime: moment().format('YYYY-MM-DD'), endTime: moment().format('YYYY-MM-DD'),
     const { BarMonitor, LineMonitor } = useEcharts()
     const [barDis, setBarDis] = useState<any[]>([])
     const [lineDis, setLineDis] = useState<any[]>([])
@@ -47,11 +47,11 @@ function Monitor(props: { onChange: () => void }) {
 
     // 获取投手
     useEffect(() => {
-        getPicherList.run()
+        !getPicherList.data && getPicherList.run()
     }, [])
     // 获取广告账号
     useEffect(() => {
-        getAdqAccountList.run()
+        !getAdqAccountList.data && getAdqAccountList.run()
     }, [])
     // // 获取排行数据,柱图
     useEffect(() => {
@@ -449,7 +449,7 @@ function Monitor(props: { onChange: () => void }) {
                     setQueryForm({ ...newQueryForm })
                 } : (props: any) => {
                     let { sortData } = props
-                    if (sortData && JSON.stringify('sortData') !== '{}') {
+                    if (sortData && JSON.stringify(sortData) !== '{}') {
                         let { field, order } = sortData   // descend 降序 大到小  ascend 升序 小到大 planDetailList
                         if (mode === 'detail') {
                             getPlanDetailList?.mutate({ data: order ? getPlanDetailList?.data?.data?.sort(compare(field, order)) : [...planDetailList] })

+ 6 - 6
src/pages/adMonitor/adMonitorList/planList.tsx

@@ -16,7 +16,7 @@ const PlanList: React.FC = () => {
     const { getAllPlanList, getBookListAll, getAdqAccountList } = useModel('useAdMonitor.useMonitor')
     const { getPicherList } = useModel('useOperating.useWxGroupList')
     // 变量开始
-    const [queryForm, setQueryForm] = useState<allPlanProps>({ pageNum: 1, pageSize: 100, sysUserId: JSON.parse(sessionStorage.getItem('SYSUSERID') || '[]'), createStartTime: moment().subtract(3, 'days').format('YYYY-MM-DD'), createEndTime: moment().format('YYYY-MM-DD') }) // 搜索变量
+    const [queryForm, setQueryForm] = useState<allPlanProps>({ pageNum: 1, pageSize: 20, sysUserId: JSON.parse(sessionStorage.getItem('SYSUSERID') || '[]'), createStartTime: moment().subtract(3, 'days').format('YYYY-MM-DD'), createEndTime: moment().format('YYYY-MM-DD') }) // 搜索变量
     const [visible, setVisible] = useState<boolean>(false) // 详情弹窗控制
     const [adId, setAdId] = useState<any>()
     const [downLoadLoading, setDownLoadLoading] = useState<boolean>(false)
@@ -24,12 +24,12 @@ const PlanList: React.FC = () => {
 
     // 获取广告账号
     useEffect(() => {
-        getAdqAccountList.run()
+        !getAdqAccountList.data && getAdqAccountList.run()
     }, [])
 
     // 获取投手
     useEffect(() => {
-        getPicherList.run()
+        !getPicherList.data && getPicherList.run()
     }, [])
 
     useEffect(() => {
@@ -50,9 +50,9 @@ const PlanList: React.FC = () => {
     }, [queryForm])
 
     /** 获取书 */
-    useEffect(() => {
-        getBookListAll.run()
-    }, [])
+    // useEffect(() => {
+    //     getBookListAll.run()
+    // }, [])
 
     // 设置创建时间
     const setUnix = ([str, end]: string[]) => {

+ 0 - 125
src/pages/dataStatistics/allSurvey/index.tsx

@@ -1,125 +0,0 @@
-import DatePickePage from "@/components/DatePicker"
-import useEcharts from "@/Hook/useEcharts"
-import { SearchOutlined } from "@ant-design/icons"
-import { useDebounce } from "ahooks"
-import { Button, Input, Select, Space } from "antd"
-import moment from "moment"
-import React, { useCallback, useEffect, useState } from "react"
-import { useModel } from "umi"
-
-function Page() {
-    const { Line } = useEcharts()
-    const { state: { pitcher, channel }, dispatch, getBossSummary, getUserAjax, getAccAjax } = useModel('useData.useTableData')
-    const [costData, setCostData] = useState<any[]>([])
-    const { state: userState } = useModel('useOperating.useUser')
-    const [type, setType] = useState<'MP' | 'GDT' | ''>()//投放位置
-    const [stage, setStage] = useState<string>()//期数
-    const [date, setDate] = useState<any>([moment().subtract(3, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])
-    const [value, setValue] = useState<string>('');
-    const { currentUser }: any = useModel('@@initialState', model => ({ currentUser: model.initialState?.currentUser }))
-    useEffect(() => {
-        tableSubmut()
-    }, [userState.selectdName])
-    useEffect(() => {
-        getUserAjax.run({ user_id: currentUser.userId })
-    }, [currentUser.userId])
-
-    const handleSearch = useCallback((value: string) => {
-        setValue(value)
-    }, [])
-    const debouncedValue = useDebounce(value, { wait: 300 });
-    useEffect(() => {
-        getAccAjax.run({ user_id: currentUser.userId, name: debouncedValue })
-    }, [debouncedValue, userState?.selectdUserId])
-
-    const tableSubmut = useCallback(() => {
-        let obj: any = {}
-        pitcher && (obj['pitcher'] = pitcher)
-        stage && (obj['stage'] = stage)
-        date && (obj['start'] = date[0])
-        date && (obj['end'] = date[1])
-        type && (obj['type'] = type)
-        channel && (obj['channel'] = channel)
-        obj['user_id'] = currentUser.userId
-        getBossSummary.run(obj).then((res) => {
-            if (res?.data) {
-                let cost_data = [{ legendName: '消耗' }, { legendName: '账面充值' }]
-                res?.data?.reverse().forEach((item: { dt: string, order_amount: number, cost: number }) => {
-                    cost_data[0][item.dt] = item.cost
-                    cost_data[1][item.dt] = item.order_amount
-                })
-                console.log(cost_data);
-                
-                setCostData(cost_data)
-            }
-        })
-    }, [pitcher, stage, date, type, channel])
-    return <>
-        <Space style={{ marginBottom: 15 }}>
-            <Select
-                style={{ width: 150 }}
-                placeholder='请输投手名称'
-                onChange={(value: any) => { dispatch({ type: 'setState', params: { pitcher: value } }) }}
-                showArrow
-                showSearch
-                allowClear
-                value={pitcher}
-                >
-                    {
-                        getUserAjax?.data?.data?.map((list: any, eq: number) => {
-                            return <Select.Option key={list?.user_id} value={list?.nick_name}>
-                                {list?.nick_name}
-                            </Select.Option>
-                        })
-                    })
-            </Select>
-            <Select
-                style={{ width: 150 }}
-                placeholder="输入搜索公众号"
-                onChange={(value: any) => { dispatch({ type: 'channel', params: { channel: value as string } }) }}
-                showSearch
-                allowClear
-                defaultActiveFirstOption={false}
-                showArrow={false}
-                filterOption={false}
-                onSearch={handleSearch}
-                value={channel || undefined}
-                notFoundContent={null}
-            >
-                {
-                    getAccAjax?.data?.data?.map((list: any, eq: number) => {
-                        return <Select.Option key={list?.id} value={list?.nick_name}>
-                            {list?.nick_name}
-                        </Select.Option>
-                    })
-                })
-            </Select>
-            <Input placeholder='请输入期数名称' onChange={(e) => { setStage(e.target.value) }} allowClear style={{ width: 140 }} value={stage} />
-            <Select value={type} placeholder='投放位置' onChange={(v) => setType(v)} allowClear style={{ minWidth: 100 }}>
-                <Select.Option value='MP'>MP</Select.Option>
-                <Select.Option value='GDT'>GDT</Select.Option>
-                <Select.Option value='BYTEDANCE'>BYTEDANCE</Select.Option>
-            </Select>
-            {/*  */}
-            <DatePickePage model='RangePicker' DatePickerChange={(a, b) => { setDate(b) }} allowClear date={date ? date : undefined} />
-            <Button type='primary' onClick={() => tableSubmut()}><SearchOutlined />搜索</Button>
-        </Space>
-        <>
-            {/* <h3>{userState.selectdName</h3>} */}
-            <Line
-                style={{ width: '100%', height: 'calc(100vh - 150px)', display: 'flex', justifyContent: 'center' }}
-                data={costData}
-                // areaStyle
-                // color={['#009632','#d42700']}
-                title={(pitcher || '全部') + '——整体概况'}
-                series
-                smooth
-                markPoint={[
-                    { type: 'max', name: '最大值', itemStyle: { color: '#d42700' } },
-                    { type: 'min', name: '最小值', itemStyle: { color: '#009632' } }
-                ]}
-            />
-        </>
-    </>
-}
-export default Page

+ 0 - 41
src/pages/dataStatistics/book/payTrend/index.less

@@ -1,41 +0,0 @@
-.dbox{
-    display: flex;
-    flex-flow: column;
-    align-items: center;
-    // padding: 10px;
-    >span{
-        display: flex;
-        justify-content: left;
-        width: 100%;
-    }
-}
-.show {
-    background: rgba(59, 116, 255, 0.08);
-    border: 1px solid rgba(59, 116, 255, 0.12);
-  }
-  .red {
-    background: rgba(255, 86, 45, 0.08);
-    border: 1px solid rgba(255, 86, 45, 0.12);
-    position: relative;
-    overflow: hidden;
-    &::before{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(146deg);
-        position: absolute;
-        top: 56%;
-        left: -10px;
-    }
-    &::after{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(-146deg);
-        position: absolute;
-        top: 44%;
-        left: -10px;
-    }
-  }

+ 0 - 52
src/pages/dataStatistics/book/payTrend/index.tsx

@@ -1,52 +0,0 @@
-import React, { useMemo } from 'react'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-import { useModel } from 'umi'
-import HocError from '@/Hoc/HocError'
-/**小说付费趋势*/
-function Page() {
-    const { state: { dataSource }, getBookTrend } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //  //获取排序列表
-     const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-            if(typeof item.title === 'object' && typeof  item.title.props.children[0] === 'string' ){
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isBook
-            isType
-            // isPlatform
-            isTableDateArr
-            // isTableDay
-            isZj
-            isGroupTab={false}
-            sortArr={sortArr}
-            columns={columns}
-            dataSource={data}
-            ajax={getBookTrend}
-            title='小说付费趋势'
-            scroll={{y:600}}
-            // isTdColor
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 339
src/pages/dataStatistics/book/payTrend/tableConfig.tsx

@@ -1,339 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import style from './index.less'
-function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let arr: ColumnsType<any> = Array(60).fill('').map((i: string, index: number) => {
-        return {
-            title: `D${index + 1}`,
-            dataIndex: `d${index + 1}`,
-            key: `d${index + 1}`,
-            render: (a: { amount: number, roi: number, add: number, mult: number }) => {
-                if (a?.amount) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={a?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 110
-        }
-    })
-    let newArr: ColumnsType<any> = [
-        {
-            title: '时间',
-            dataIndex: 'dt',
-            key: 'dt',
-            align: 'center',
-            width: 95,
-            fixed: 'left',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'dt' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '小说',
-            dataIndex: 'book',
-            key: 'book',
-            align: 'center',
-            width: 70,
-            fixed: 'left',
-            ellipsis: true,
-            render:(str)=>{
-                return <a href={`#/dataStatistics/book/payTrend?bookName=${str}`}>{str}</a>
-            }
-        },
-        {
-            title: '投放位置',
-            dataIndex: 'type',
-            key: 'type',
-            align: 'center',
-            width: 40,
-            fixed: 'left',
-        },
-        {
-            title: '当天消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日回收率',
-            dataIndex: 'first_roi',
-            key: 'first_roi',
-            width: 70,
-            align: 'center',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '当天用户七日回本率',
-            dataIndex: 'roi7',
-            key: 'roi7',
-            align: 'center',
-            width: 95,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi7' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '当天用户30日回本率',
-            dataIndex: 'roi30',
-            key: 'roi30',
-            align: 'center',
-            width: 100,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi30' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '当天用户回本率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '当天账面充值',
-            dataIndex: 'order_amount',
-            key: 'order_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '毛利额',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'profit' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '点击率',
-            dataIndex: 'click_rate',
-            key: 'click_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'click_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '关注率',
-            dataIndex: 'follow_rate',
-            key: 'follow_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日充值率',
-            dataIndex: 'first_order_rate',
-            key: 'first_order_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '曝光量',
-            dataIndex: 'view_count',
-            key: 'view_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'view_count' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '点击量',
-            dataIndex: 'click_count',
-            key: 'click_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'click_count' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '关注人数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_user' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '新用户累计充值人数',
-            dataIndex: 'reg_order_user',
-            key: 'reg_order_user',
-            align: 'center',
-            width: 105,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'reg_order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日充值人数',
-            dataIndex: 'first_order_user',
-            key: 'first_order_user',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '关注成本',
-            dataIndex: 'follow_cost',
-            key: 'follow_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值成本',
-            dataIndex: 'order_cost',
-            key: 'order_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日充值成本',
-            dataIndex: 'first_order_cost',
-            key: 'first_order_cost',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        ...arr,
-        {
-            title: 'M3',
-            dataIndex: 'm3',
-            key: 'm3',
-            render: (a: { amount: number, roi: number, add: number, mult: number }) => {
-                if (a?.amount) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={a?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 130
-        },
-        {
-            title: 'M4',
-            dataIndex: 'm4',
-            key: 'm4',
-            // align: 'center',
-            className: 'table_color_bule',
-            render: (a: { amount: number, roi: number, add: number, mult: number }) => {
-                if (a?.amount) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={a?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 130,
-        },
-        {
-            title: 'M5',
-            dataIndex: 'm5',
-            key: 'm5',
-            // align: 'center',
-            className: 'table_color_bule',
-            render: (a: { amount: number, roi: number, add: number, mult: number }) => {
-                if (a?.amount) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={a?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 130,
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 41
src/pages/dataStatistics/book/summarizing/index.less

@@ -1,41 +0,0 @@
-.dbox{
-    display: flex;
-    flex-flow: column;
-    align-items: center;
-    // padding: 10px;
-    >span{
-        display: flex;
-        justify-content: left;
-        width: 100%;
-    }
-}
-.show {
-    background: rgba(59, 116, 255, 0.08);
-    border: 1px solid rgba(59, 116, 255, 0.12);
-  }
-  .red {
-    background: rgba(255, 86, 45, 0.08);
-    border: 1px solid rgba(255, 86, 45, 0.12);
-    position: relative;
-    overflow: hidden;
-    &::before{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(146deg);
-        position: absolute;
-        top: 56%;
-        left: -10px;
-    }
-    &::after{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(-146deg);
-        position: absolute;
-        top: 44%;
-        left: -10px;
-    }
-  }

+ 0 - 53
src/pages/dataStatistics/book/summarizing/index.tsx

@@ -1,53 +0,0 @@
-import React, { useMemo } from 'react'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-import { useModel } from 'umi'
-import HocError from '@/Hoc/HocError'
-/**小说总数据*/
-function Page() {
-    const { state: { dataSource }, getBookOverview } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //  //获取排序列表
-     const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-            if(typeof item.title === 'object' && typeof  item.title.props.children[0] === 'string' ){
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isBook
-            isType
-            // isPlatform
-            isTableDateArr
-            isDownload
-            // isTableDay
-            // isZj
-            isGroupTab={false}
-            sortArr={sortArr}
-            columns={columns}
-            dataSource={data}
-            ajax={getBookOverview}
-            title='小说总数据'
-            scroll={{y:600}}
-            // isTdColor
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 421
src/pages/dataStatistics/book/summarizing/tableConfig.tsx

@@ -1,421 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import style from './index.less'
-function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let arr: ColumnsType<any> = Array(60).fill('').map((i: string, index: number) => {
-        return {
-            title: `D${index + 1}`,
-            dataIndex: `d${index + 1}`,
-            key: `d${index + 1}`,
-            render: (a: { amount: number, roi: number, add: number, mult: number }) => {
-                if (a?.amount) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={a?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 140
-        }
-    })
-    let newArr: ColumnsType<any> = [
-        {
-            title: '小说',
-            dataIndex: 'book',
-            key: 'book',
-            align: 'center',
-            width: 70,
-            fixed: 'left',
-            ellipsis: true,
-            render: (str) => {
-                return <a href={`#/dataStatistics/book/summarizing?bookName=${str}`}>{str}</a>
-            }
-        },
-        {
-            title: '投放位置',
-            dataIndex: 'type',
-            key: 'type',
-            align: 'center',
-            width: 40,
-            fixed: 'left',
-        },
-     
-        {
-            title: '最早投放日期',
-            dataIndex: 'start_date',
-            key: 'start_date',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'start_date' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '最晚投放日期',
-            dataIndex: 'end_date',
-            key: 'end_date',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'end_date' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '注册用户充值',
-            dataIndex: 'amount',
-            key: 'amount',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日充值',
-            dataIndex: 'first_amount',
-            key: 'first_amount',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '回收率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日回收率',
-            dataIndex: 'first_roi',
-            key: 'first_roi',
-            width: 70,
-            align: 'center',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '七日回本率',
-            dataIndex: 'roi7',
-            key: 'roi7',
-            align: 'center',
-            width: 95,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi7' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '30日回本率',
-            dataIndex: 'roi30',
-            key: 'roi30',
-            align: 'center',
-            width: 100,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi30' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '毛利额',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'profit' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '点击率',
-            dataIndex: 'click_rate',
-            key: 'click_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'click_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '关注率',
-            dataIndex: 'follow_rate',
-            key: 'follow_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '下单率',
-            dataIndex: 'order_rate',
-            key: 'order_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日下单率',
-            dataIndex: 'first_order_rate',
-            key: 'first_order_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '曝光量',
-            dataIndex: 'view_count',
-            key: 'view_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'view_count' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '点击量',
-            dataIndex: 'click_count',
-            key: 'click_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'click_count' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '关注人数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_user' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '首日充值人数',
-            dataIndex: 'first_order_user',
-            key: 'first_order_user',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '关注成本',
-            dataIndex: 'follow_cost',
-            key: 'follow_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值成本',
-            dataIndex: 'order_cost',
-            key: 'order_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日充值成本',
-            dataIndex: 'first_order_cost',
-            key: 'first_order_cost',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '客单价',
-            dataIndex: 'avg_amount',
-            key: 'avg_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'avg_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '今日充值',
-            dataIndex: 'td_amount',
-            key: 'td_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'td_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '昨日充值',
-            dataIndex: 'yd_amount',
-            key: 'yd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'yd_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '前日充值',
-            dataIndex: 'byd_amount',
-            key: 'byd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'byd_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        ...arr,
-        {
-            title: 'M3',
-            dataIndex: 'm3',
-            key: 'm3',
-            render: (a: { amount: number, roi: number, add: number, mult: number }) => {
-                if (a?.amount) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={a?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 140
-        },
-        {
-            title: 'M4',
-            dataIndex: 'm4',
-            key: 'm4',
-            // align: 'center',
-            className: 'table_color_bule',
-            render: (a: { amount: number, roi: number, add: number, mult: number }) => {
-                if (a?.amount) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={a?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 140,
-        },
-        {
-            title: 'M5',
-            dataIndex: 'm5',
-            key: 'm5',
-            // align: 'center',
-            className: 'table_color_bule',
-            render: (a: { amount: number, roi: number, add: number, mult: number }) => {
-                if (a?.amount) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={a?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 140,
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 161
src/pages/dataStatistics/color.less

@@ -1,161 +0,0 @@
-.color0,
-.color0 > td {
-  background-color: #e1f5fe;
-  color: #000;
-}
-.color0,.color1,.color2,.color3,.color4,.color5,.color6,.color7,.color8,.color9,.color10,.color11,.color12,.color13,.color14,.color15,.color16,.color17,.color18,.color19,.color20,
-.color21,.color22,.color23,.color24,.color25,.color26,.color27,.color28,.color29,.color30 {
-  >td{
-    // border-bottom: 1px solid #fff !important;
-  }
-  &:hover{
-    >td {
-      color: #fff;
-    }
-  }
-}
-.color1,
-.color1 > td {
-  background-color: #e8eaf6;
-  color: #000;
-}
-.color2,
-.color2 > td {
-  background-color: #f3e5f5;
-  color: #000;
-}
-.color3,
-.color3 > td {
-  background-color: #fff3e0;
-  color: #000;
-}
-.color4,
-.color4 > td {
-  background-color: #fce4ec;
-  color: #000;
-}
-.color5,
-.color5 > td {
-  background-color: #ffebee;
-  color: #000;
-}
-.color6,
-.color6 > td {
-  background-color: #fffde7;
-  color: #000;
-}
-.color7,
-.color7 > td {
-  background-color: #efebe9;
-  color: #000;
-}
-.color8,
-.color8 > td {
-  background-color: #f0f4c3;
-  color: #000;
-}
-.color9,
-.color9 > td {
-  background-color: #e8f5e9;
-  color: #000;
-}
-.color10,
-.color10 > td {
-  background-color: #e0f2f1;
-  color: #000;
-}
-.color11,
-.color11 > td {
-  background-color: #cfd8dc;
-  color: #000;
-}
-.color12,
-.color12 > td {
-  background-color: #d7ccc8;
-  color: #000;
-}
-.color13,
-.color13 > td {
-  background-color: #ffccbc;
-  color: #000;
-}
-.color14,
-.color14 > td {
-  background-color: #ffecb3;
-  color: #000;
-}
-.color15,
-.color15 > td {
-  background-color: #f0f4c3;
-  color: #000;
-}
-.color16,
-.color16 > td {
-  background-color: #dcedc8;
-  color: #000;
-}
-.color17,
-.color17 > td {
-  background-color: #c8e6c9;
-  color: #000;
-}
-.color18,
-.color18 > td {
-  background-color: #b2dfdb;
-  color: #000;
-}
-.color19,
-.color19 > td {
-  background-color: #b2ebf2;
-  color: #000;
-}
-.color21,
-.color21 > td {
-  background-color: #b3e5fc;
-  color: #000;
-}
-.color22,
-.color22 > td {
-  background-color: #bbdefb;
-  color: #000;
-}
-.color23,
-.color23 > td {
-  background-color: #c5cae9;
-  color: #000;
-}
-.color24,
-.color24 > td {
-  background-color: #d1c4e9;
-  color: #000;
-}
-.color25,
-.color25 > td {
-  background-color: #e1bee7;
-  color: #000;
-}
-.color26,
-.color26 > td {
-  background-color: #f8bbd0;
-  color: #000;
-}
-.color27,
-.color27 > td {
-  background-color: #ffcdd2;
-  color: #000;
-}
-.color28,
-.color28 > td {
-  background-color: #a5d6a7;
-  color: #000;
-}
-.color29,
-.color29 > td {
-  background-color: #ffcc80;
-  color: #000;
-}
-.color20,
-.color20 > td {
-  background-color: #80deea;
-  color: #000;
-}

+ 0 - 60
src/pages/dataStatistics/components/TableData/index.less

@@ -1,60 +0,0 @@
-@import '../../color.less';
-.cell {
-  text-align: center;
-  background-color: #fafafa;
-  color: rgb(212, 46, 46);
-}
-.middle {
-  tr,
-  td {
-    font-size: 14px !important;
-  }
-}
-.small {
-  tr,
-  td {
-    font-size: 13px !important;
-  }
-}
-.ranking {
-  tr,
-  td {
-    font-size: 14px !important;
-    span{
-      font-size: 14px;
-    }
-  }
- 
-}
-.large {
-  tr,
-  td {
-    font-size: 14px !important;
-  }
-}
-.item_img {
-  width: 25px;
-  border-radius: 2px;
-  margin-right: 5px;
-  background-color: #efefef;
-}
-.blue {
-  background-color: cornflowerblue;
-}
-.cardtitle{
-  position: relative;
-  width: 100%;
-  height: 100%;
-  .text {
-    width: 100%;
-    height: 100%;
-    text-align: center;
-  }
-  .cardTab{
-    position: absolute;
-    width: 400px;
-    height: 100%;
-    top: 0;
-    left: 0;
-  }
-}

+ 0 - 914
src/pages/dataStatistics/components/TableData/index.tsx

@@ -1,914 +0,0 @@
-import DatePickePage from '@/components/DatePicker'
-import GroupWxTabs from '@/components/GroupWxTabs'
-import Tables from '@/components/Tables'
-import { quanpin } from '@/utils/fullScreen'
-import { CloudDownloadOutlined, FullscreenExitOutlined, FullscreenOutlined, QuestionCircleOutlined, SearchOutlined, SettingOutlined } from '@ant-design/icons'
-import { Button, Card, Checkbox, Col, Table, DatePicker, Drawer, Input, InputNumber, Radio, Row, Select, Space, Tag, Tooltip, Transfer, Statistic } from 'antd'
-import { SelectValue } from 'antd/es/select'
-import { RadioChangeEvent } from 'antd/lib/radio'
-import { ColumnsType } from 'antd/lib/table'
-import { TransferDirection } from 'antd/lib/transfer'
-import { Moment } from 'moment'
-import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
-import { useModel, history } from 'umi'
-import style from './index.less'
-import './index1.less'
-import Sortable from 'sortablejs'
-import { useDebounce } from 'ahooks'
-import moment from 'moment'
-import arrayMove from "array-move";
-import { CheckboxChangeEvent } from 'antd/lib/checkbox'
-
-interface Prosp {
-    isTableName?: boolean,//是否开启公众号名称搜索
-    sortArr?: { label: string, value: string }[],//排序参数名列表
-    isTableId?: boolean,//是否开公众号ID搜索
-    isTableDate?: boolean,//是否开启单日期搜索
-    isTableDate15?: boolean,//是否开启单日期搜索
-    isTableDay?: boolean,//是否开启N天搜索
-    isBook?: boolean,//是否开启小说搜索
-    isGroup?: boolean,//是否开启切换
-    isZj?: boolean,//是否查总计
-    isQs?: boolean,//是否开启期数
-    isInputName?: boolean, // 是否开启输入框 输入公众号
-    isPitcher?: boolean,//默认关闭,关闭下使用左侧组员组件选中的名称,开启后使用input输入筛选
-    isAdmin?: boolean, // 是否admin展示 普通员工不展示 与isGroupTab 配合 isGroupTab关闭 isAdmin可打开 
-    isCPitcher?: boolean, //是否传Pitcher
-    isUserId?: boolean, // 是否传入usid
-    isDownload?: boolean,//是否开启下载
-    isPlatform?: boolean,//是否开启书城
-    isTableDateArr?: boolean,//是否开启双日期搜索
-    isTableDateArr15?: boolean,//是否开启双日期搜索
-    isDepleteDateArr?: boolean,  // 是否开启消耗时间选择
-    isOrderDateArr?: boolean,  // 是否开启订单时间选择
-    isTableDateArrSt?: boolean,//是否开启双日期充值时间搜索
-    isTableDateOne?: boolean, // 是否开启单日期搜索 [start, end] 相同
-    tableTotal?: { [key: string]: string },//是个开启总计
-    isLocation?: boolean,//是否开启投放位置
-    isType?: boolean,//是否开启投放位置
-    scroll?: { x?: number, y?: number },//开启行滑动并设置容器最大宽度
-    columns: () => ColumnsType<any>,//table列表配置
-    title?: string,//tabel的标题
-    subTitle?: JSX.Element | String, // 副标题
-    tooltip?: JSX.Element,//是否在标题后加问号展示说明
-    dataSource: any[],//table的数据
-    expandedRowRender?: (data: any) => JSX.Element,
-    ajax: any,//请求
-    isTdColor?: boolean,//是否需要开启背景色
-    isGroupTab?: boolean,//是否开启组员tab
-    className?: string,//自定义class
-    isSelctAcc?: boolean, // 是否用data公众号
-    isSelctAccTags?: boolean,//公众号多选
-    isdownload?: boolean, // 是否下载
-    isDataSelectPitcher?: boolean,  // 选择数据服务传回来的投手
-    isDataSelectPitcher_isDisabled?: boolean,  // 是否选择公众号 禁用 投手
-    isPitcherId?: boolean, // 使用id
-    isLoginId?: boolean, // 传登陆ID
-    isVideo?: boolean, // 是否判断是视频还是图片
-    isCostYear?: boolean, // 是否开启消耗所在年选择
-    isOrderMonth?: boolean,  // 是否开启订单所在月份选择
-    isShowTotal?: boolean,  // 是否展示总计
-    isLastReverse?: boolean,  // 选择年是否倒序
-    isHideSort?: boolean,  // 是否隐藏排序
-    isPitcherSelf?: boolean,  // 是否包含组员
-    defaultSortOrder?: {  // 默认排序
-        columnKey: string,
-        order: 'descend' | 'ascend' | undefined
-    },
-    isSummaryHis?: boolean,
-}
-/**
- * 
- * @param  isTableName boolean是否开启公众号名称搜索
- * @param isTableId boolean,//是否开公众号ID搜索
- * @param isTableDate boolean,//是否开启单日期搜索
- * @param isTableDay  boolean,//是否开启N天搜索
- * @param isBook   boolean,//是否开启小说搜索
- * @param isTableDateArr  boolean,//是否开启双日期搜索
- * @param tableTotal  { [key: string]: string },//是个开启总计
- * @param x  number,//开启行滑动并设置容器最大宽度
- * @param dataSource any[],//table的数据
- * @param columns  () => ColumnsType<any>,//table列表配置
- * @param title  string,//tabel的标题
- * @param tooltip  JSX.Element//是否在标题后加问号展示说明
- * @param ajax  (params: Params) => Promise<any>//请求
- */
-const version = '1.0.0'
-const Page = forwardRef((props: Prosp, fref) => {
-    const { isInputName, isTableName, defaultSortOrder, isSummaryHis, isDataSelectPitcher_isDisabled, isTableDateArr15 = false, isSelctAccTags = false, isHideSort, isLastReverse, isPitcherSelf, isGroup, isShowTotal = true, isTableDateOne, subTitle, isPitcherId, isTableId, isCostYear, isOrderMonth, isTableDate, isTableDate15, isSelctAcc = false, isLoginId = false, isTableDay, isCPitcher = true, isDataSelectPitcher = false, isLocation, isBook, isTableDateArr, isDepleteDateArr, isOrderDateArr, isType, isPitcher = false, isdownload = false, isAdmin = false, isUserId = false, isPlatform, isDownload, isGroupTab = true, tableTotal, isQs, isZj, scroll, columns, title, tooltip, ajax, dataSource, expandedRowRender, sortArr, isTdColor, className, isTableDateArrSt, isVideo } = props
-    const { state, dispatch, getAccAjax, getUserAjax, getChannelAnalysisDetails } = useModel('useData.useTableData')
-    const { state: userState } = useModel('useOperating.useUser')
-    const { currentUser }: any = useModel('@@initialState', model => ({ currentUser: model.initialState?.currentUser }))
-    const { state: { groupActionWx } } = useModel('useOperating.useWxGroupList')
-    const [size, setSize] = useState<'small' | 'middle' | 'large'>('small')
-    const [page, setPage] = useState<number>(1)
-    const [pageSize, setPageSize] = useState<number>(100)
-    const [total, setTotal] = useState<number>(0)
-    const { selectdName, isFell } = userState
-    const [visible, setVisible] = useState<boolean>(false)
-    const [selectedKeys, setSelectedKeys] = useState<any[]>([])
-    const [statistical, setStatistical] = useState<any>({})
-    const [fixedNum, setFixedNum] = useState<number | string>(localStorage.getItem(`${title}_${version}fixedNum`) || 1)
-    const [targetKeys, setTargetKeys] = useState<any[]>(localStorage?.getItem(`${title}_${version}`) ? JSON.parse(localStorage?.getItem(`${title}_${version}`) as string) : [])
-    const { channel, channels, tableDate, date_range, start, end, start15, end15, cost_time_start, cost_time_end, is_pitcher_self, order_time_start, order_time_end, st, et, cost_year, order_month, tableId, book, order_by, order, location, stage, type, platform, pitcher, tableValue = '1', is_video } = state
-    const [showZj, setShowZj] = useState<boolean>(false)
-    const [value, setValue] = useState<string>('');
-    const [searchValue, setSearchValue] = useState<any>([])
-    const [detailsDtat, setDetailsData] = useState<any[]>([])//充值详情数据
-    const [accNum, setaccNum] = useState<number>(1)  // 多选公众号个数
-    const [sortOrder, setSortOrder] = useState<{ columnKey: string, order: 'descend' | 'ascend' | undefined }>(defaultSortOrder || { columnKey: '', order: undefined })
-    const [startTime, setStartTime] = useState<string>()
-    const [disData, setDisData] = useState<[string, string]>(['', ''])
-    const [info, setInfo] = useState<'start' | 'end' | ''>('start')
-    const [open, setOpen] = useState<boolean>(false)
-    const ref = useRef(null)
-
-    useImperativeHandle(fref, () => ({ tableSubmut }))
-    /**点击书名搜索书名 */
-    useEffect(() => {
-        let bookName = history?.location?.query?.bookName
-        if (bookName) {
-            dispatch({ type: 'book', params: { book: bookName } })
-            tableSubmut({ bookName })
-        }
-    }, [history.location])
-    const handleSearch = useCallback((value: string) => {
-        setValue(value)
-    }, [value])
-    const debouncedValue = useDebounce(value, { wait: 300 });
-    useEffect(() => {
-        let pitcher_id
-        if (pitcher) {
-            let pitcherData = searchValue?.find((item: { nick_name: string }) => item.nick_name === pitcher)
-            pitcher_id = pitcherData?.user_id
-        }
-        getAccAjax.run({ user_id: currentUser.userId == 1 ? userState?.selectdUserId : currentUser.userId, name: debouncedValue, pitcher_id })
-    }, [debouncedValue, isSelctAcc, userState?.selectdUserId, currentUser.userId, isSelctAccTags, pitcher, searchValue])
-    useEffect(() => {
-        if (isDataSelectPitcher) {
-            getUserAjax.run({ user_id: currentUser.userId == 1 ? userState?.selectdUserId : currentUser.userId }).then((res: any) => {
-                setSearchValue(res?.data || [])
-            })
-        }
-    }, [isDataSelectPitcher, userState?.selectdUserId, currentUser.userId])
-    /**table搜索事件 */
-    const tableSubmut = useCallback(
-        (props: {
-            pagination?: { current?: number, pageSize?: number, gzh?: string },
-            filters?: any,
-            sortData?: {
-                column: { dataIndex: string },
-                order?: "ascend" | "descend",
-                columnKey: string
-            },
-            bookName?: any,
-            download?: boolean,
-        }) => {
-            let { pagination, filters, sortData, bookName, download } = props
-            let data = {}
-            isDataSelectPitcher && pitcher && (data['pitcher'] = pitcher)
-            if (isPitcherId) {
-                if (pitcher) {
-                    let pitcherData = searchValue?.find((item: { nick_name: string }) => item.nick_name === pitcher)
-                    let pitcher_id = pitcherData?.user_id
-                    pitcher_id && (data['pitcher_id'] = pitcher_id)
-                }
-            }
-            if (isUserId) {
-                if (currentUser.userId === 1) {
-                    data['user_id'] = userState.selectdUserId || 1
-                } else {
-                    data['user_id'] = currentUser.userId || 1
-                }
-            }
-            if (isLoginId) {
-                data['user_id'] = currentUser.userId || 1
-            }
-            !download && (data['page'] = pagination?.current || 1)
-            !download && (data['page_size'] = pagination?.pageSize || 100)
-            setPageSize(pagination?.pageSize || 100)
-            setPage(pagination?.current || 1)
-            let gzh = pagination?.gzh || channel //'寒龙书海'||
-            isBook && (book || bookName) && (data['book'] = bookName || book)
-            isQs && stage && (data['stage'] = stage)
-            isPitcherSelf && pitcher && (!channels || channels?.length === 0) && (data['is_pitcher_self'] = !is_pitcher_self)
-            isTableName && gzh && (data['channel'] = gzh)
-            isInputName && (data['channel'] = channel)
-            isSelctAcc && (data['channel'] = channel)
-            isSelctAccTags && (data['channel'] = channels)
-            isVideo && (data['is_video'] = is_video)
-            // data['channel'] = '龙鳞文学'
-            isTableId && tableId && (data['state'] = tableId === '2' ? '在投' : '停投')
-            isTableDate && tableDate && (data['date'] = tableDate)
-            isTableDate15 && tableDate && (data['start'] = tableDate)
-            isTableDay && date_range && (data['date_range'] = date_range)
-            isTableDateArr && start && (data['start'] = start)
-            isTableDateArr && end && (data['end'] = end)
-            isTableDateArr15 && start15 && (data['start'] = start15)
-            isTableDateArr15 && end15 && (data['end'] = end15)
-            isTableDateOne && startTime && (data['start'] = startTime)
-            isTableDateOne && startTime && (data['end'] = startTime)
-            isDepleteDateArr && cost_time_start && (data['cost_time_start'] = cost_time_start)
-            isDepleteDateArr && cost_time_end && (data['cost_time_end'] = cost_time_end)
-            isOrderDateArr && order_time_start && (data['order_time_start'] = order_time_start)
-            isOrderDateArr && order_time_end && (data['order_time_end'] = order_time_end)
-            isCostYear && cost_year && (data['cost_year'] = cost_year)
-            isOrderMonth && order_month && (data['order_month'] = order_month)
-            isTableDateArrSt && st && (data['st'] = st)
-            isTableDateArrSt && et && (data['et'] = et)
-            if (!sortData && defaultSortOrder) {
-                data['order'] = defaultSortOrder.order === 'ascend' ? 'asc' : 'desc'
-                data['order_by'] = defaultSortOrder.columnKey
-            }
-            sortData?.order && (data['order'] = sortData?.order === 'ascend' ? 'asc' : 'desc');
-            sortData?.column?.dataIndex && (data['order_by'] = sortData?.column?.dataIndex)
-            if (sortData) { // 返回排序
-                setSortOrder({ columnKey: sortData.columnKey, order: sortData?.order })
-            } else {
-                if (sortOrder) {
-                    sortOrder?.order && (data['order'] = sortOrder?.order === 'ascend' ? 'asc' : 'desc');
-                    sortOrder?.columnKey && (data['order_by'] = sortOrder?.columnKey)
-                }
-            }
-
-            if (filters && Object.keys(filters).length > 0) {
-                for (const key in filters) {
-                    if (Object.prototype.hasOwnProperty.call(filters, key)) {
-                        const element = filters[key];
-                        element?.forEach((item: any) => {
-                            data = { ...data, ...JSON.parse(item) }
-                        })
-                    }
-                }
-            }
-
-            isLocation && location && (data['location'] = location)
-            isType && type && (data['type'] = type)
-            isPlatform && platform && (data['platform'] = platform)
-            isDownload && download && (data['download'] = 1)
-            if (ajax) {
-                ajax.run(data).then((res: any) => {
-                    if (isDownload && download) return;
-                    if (res?.data) {
-                        let dateArr: string[] = []
-                        let arr = []
-                        if (isTdColor) {
-                            arr = res?.data?.map((item: any, index: number) => {
-                                item['id'] = (pagination?.current || 1) + index + + Math.random() * 100
-                                if (dateArr.indexOf(item.date) !== -1) {//假如日期在dateArr中存在
-                                    item['color'] = `color${dateArr.indexOf(item.date)}`//那么颜色等于dateArr的位置
-                                } else {//假如不存在dateArr中
-                                    dateArr.push(item.date)//向dateArr添加日期以备相同日期对比
-                                    item['color'] = `color${dateArr.length - 1}`//颜色的值等于dateArr的长度-1
-                                }
-                                return item
-                            })
-                        } else {
-                            arr = res?.data?.map((item: any, index: number) => {
-                                item['id'] = (pagination?.current || 1) + index + Math.random() * 100
-                                return item
-                            })
-                        }
-                        setStatistical(res?.total_data)
-                        dispatch({ type: 'dataSource', params: { dataSource: arr } })
-                        setTotal(res?.total)
-                    } else {
-                        setStatistical({})
-                        dispatch({ type: 'dataSource', params: { dataSource: [] } })
-                    }
-                })
-            }
-        }, [tableDate, isSelctAccTags, is_pitcher_self, sortOrder, defaultSortOrder, startTime, searchValue, channels, cost_year, order_month, cost_time_start, cost_time_end, order_time_start, order_time_end, channel, cost_year, order_month, is_video, start, end, st, et, tableId, book, date_range, selectdName, ajax, order, order_by, isTdColor, location, stage, platform, type])
-    /**tableName事件 */
-    const tableNameChange = useCallback((value: SelectValue) => {
-        dispatch({ type: 'channel', params: { channel: value as string } })
-    }, [])
-    /**tableBook事件 */
-    const tableBookChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        // setBook(value)
-        dispatch({ type: 'book', params: { book: value } })
-    }, [])
-    /**书城*/
-    const platformChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        // setPlatform(value)
-        dispatch({ type: 'setState', params: { platform: value } })
-    }, [])
-    const platformChangeInput = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        dispatch({ type: 'setState', params: { platform: value } })
-    }, [])
-    /**投手名称*/
-    const pitcherChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        // setPitcher(value)
-        dispatch({ type: 'setState', params: { pitcher: value } })
-    }, [])
-    /**tableQs事件 */
-    const tableQsChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        // setStage(value)
-        dispatch({ type: 'setState', params: { stage: value } })
-    }, [])
-    /**table单日期事件 */
-    const tableDateChange = useCallback((arr: Moment[], formatString: string | string[]) => {
-        // setTableDate(formatString)
-        dispatch({ type: 'tableDate', params: { tableDate: formatString as string } })
-    }, [])
-    /**table双日期事件 */
-    const tableDateArrChange = useCallback((arr: Moment[], formatString: string | string[]) => {
-        // setStart((formatString as string[])[0])
-        // setEnd((formatString as string[])[1])
-        dispatch({ type: 'tableDateArr', params: { start: (formatString as string[])[0], end: (formatString as string[])[1] } })
-    }, [])
-    /**table双日期st事件 */
-    const tableDateArrStChange = useCallback((arr: Moment[], formatString: string | string[]) => {
-        // setStart((formatString as string[])[0])
-        // setEnd((formatString as string[])[1])
-        dispatch({ type: 'setState', params: { st: (formatString as string[])[0], et: (formatString as string[])[1] } })
-    }, [])
-    /**tableDay事件 */
-    const tableDayChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        // setDate_range(value)
-        dispatch({ type: 'date_range', params: { date_range: value } })
-    }, [])
-    /**tableId事件 */
-    const tableIdChange = useCallback((value: string) => {
-        // setTableId(value)
-        dispatch({ type: 'tableId', params: { tableId: value } })
-    }, [])
-    /**排序选择 */
-    const sortChange = useCallback((value: SelectValue) => {
-        // setOrder_by(value)
-        dispatch({ type: 'setState', params: { order_by: value as string } })
-    }, [])
-    /**投放位置1 */
-    const locationChange = useCallback((value: SelectValue) => {
-        // setLocation(value)
-        dispatch({ type: 'setState', params: { location: value as 'MP' | 'GDT' } })
-    }, [])
-    /**投放位置2 */
-    const typeChange = useCallback((value: SelectValue) => {
-        // setType(value)
-        dispatch({ type: 'setState', params: { type: value as 'MP' | 'GDT' } })
-    }, [])
-    const orderChange = useCallback((value: SelectValue) => {
-        // setOrder(value)
-        dispatch({ type: 'setState', params: { order: value as 'asc' | 'desc' } })
-    }, [])
-    /**table字段设置 */
-    const handleChange = useCallback((nextTargetKeys: string[], direction: TransferDirection, moveKeys: string[]) => {
-        let newTargetKeys = JSON.parse(JSON.stringify(targetKeys))
-        if (direction === 'right') { // 加
-            newTargetKeys = [...newTargetKeys, ...moveKeys]
-        } else { // 减
-            newTargetKeys = newTargetKeys?.filter((item: string) => !moveKeys.includes(item))
-        }
-        setTargetKeys([...newTargetKeys])
-    }, [targetKeys])
-    const handleSelectChange = useCallback((sourceSelectedKeys: string[], targetSelectedKeys: string[]) => {
-        setSelectedKeys([...sourceSelectedKeys, ...targetSelectedKeys])
-    }, [])
-    const handleScroll = (direction: TransferDirection, e: React.SyntheticEvent<HTMLUListElement, Event>) => {
-        // console.log('direction:', direction);
-        // console.log('target:', e.target);
-    };
-    /**table切换事件 */
-    const tableChange = useCallback((e: RadioChangeEvent) => {
-        dispatch({ type: 'dataSource', params: { dataSource: [] } })
-        let value = e.target.value
-        dispatch({ type: 'setState', params: { tableValue: value } })
-    }, [])
-    /**卸载组件清空数据 */
-    useEffect(() => {
-        return () => {
-            dispatch({ type: 'dataSource', params: { dataSource: [] } })
-            // setPitcher('')
-            setTargetKeys([])
-            // setOrder_by(undefined)
-            dispatch({ type: 'setState', params: { order_by: undefined, targetKeys: [] } })
-            // setTargetKeys([])
-        }
-    }, [])
-    /**首次加载请求or投手名称变化 */
-    useEffect(() => {
-        let { channel } = history?.location?.query as any//假如路径中带公众号号名称
-        tableSubmut({ pagination: { current: 1, pageSize: 100, gzh: channel, }, download: isdownload })
-    }, [selectdName, channel, searchValue])
-    /**重组选中的字段 */
-    const newColumns = useMemo(() => {
-        let arr: any[] = []
-        if (targetKeys && targetKeys.length > 0) {
-            let column: any[] = columns()
-            targetKeys?.forEach((v: string, index: number) => {
-                column?.forEach((item: { dataIndex: string, fixed: any }) => {
-                    if (item.dataIndex === v) {
-                        if (index < fixedNum) {
-                            item.fixed = true
-                        } else {
-                            item.fixed = false
-                        }
-                        arr.push(item)
-                    }
-                })
-            })
-            localStorage.setItem(`${title}_${version}`, JSON.stringify(targetKeys))//保存至本地浏览器
-            return arr
-        }
-        if (isLastReverse) { // 小于今年倒序
-            let column: any[] = columns()
-            if (cost_year) {
-                let year = moment().endOf('year')
-                if (moment(cost_year).endOf('year') < year) {
-                    arr = column.reverse()
-                    let index = column?.findIndex((item: { dataIndex: string }) => item.dataIndex === 'time')
-                    if (index !== -1) {
-                        arr = arrayMove(arr, index, 0)
-                    }
-                }
-            }
-        }
-        return arr
-    }, [targetKeys, fixedNum, cost_year])
-    useEffect(() => {
-        if (visible) {
-            let ul: any = document.getElementsByClassName('ant-transfer-list-content-show-remove')[0]
-            if (ul) {
-                new Sortable(ul, {
-                    animation: 150,
-                    dragClass: style.blue,
-                    onEnd: (evt: any) => {
-                        let newTargetKeys: any[] = []
-                        for (let item of ul?.children) {
-                            sortArr?.forEach((arr: any) => {
-                                if (item?.title === arr?.title) {
-                                    newTargetKeys.push(arr?.key)
-                                }
-                            })
-                        }
-                        setTargetKeys(newTargetKeys)
-                    }
-                });
-            }
-        }
-    }, [visible, targetKeys])
-    //获取详情
-    const getDetails = useCallback((channel?: string) => {
-        let data = { start, end, st, et, channel }
-        if (currentUser.userId === 1) {
-            data['user_id'] = userState.selectdUserId || 1
-        } else {
-            data['user_id'] = currentUser.userId || 1
-        }
-        getChannelAnalysisDetails.run(data).then((res) => {
-            setDetailsData(res?.data || [])
-        })
-    }, [userState, currentUser, start, end, st, et])
-
-    const header = <Col span={24}>
-        <Row gutter={[0, 10]}>
-            {
-                isGroup && <Col span={24}>
-                    <Radio.Group onChange={tableChange} value={tableValue}>
-                        <Radio.Button value={'1'}>日期汇总</Radio.Button>
-                        <Radio.Button value={'2'}>公众号汇总</Radio.Button>
-                    </Radio.Group>
-                </Col>
-            }
-            <Col span={24}>
-                <Space>
-                    {
-                        isPitcher && <Input placeholder='请输投手名称' onChange={pitcherChange} allowClear style={{ width: 140 }} value={pitcher} />
-                    }
-                    {
-                        isDataSelectPitcher && <Select
-                            style={{ width: 150 }}
-                            placeholder='请输投手名称'
-                            onChange={(value: any) => { dispatch({ type: 'setState', params: { pitcher: value } }) }}
-                            showArrow
-                            showSearch
-                            disabled={isDataSelectPitcher_isDisabled ? isPitcherSelf ? channels?.length > 0 : channel : false}
-                            allowClear
-                            value={pitcher || null}
-                        >
-                            {
-                                searchValue?.map((list: any, eq: number) => {
-                                    return <Select.Option key={list?.user_id} value={list?.nick_name}>
-                                        {list?.nick_name}
-                                    </Select.Option>
-                                })
-                            })
-                        </Select>
-                    }
-                    {
-                        isPitcherSelf && pitcher && (!channels || channels?.length === 0) && <Checkbox checked={is_pitcher_self} onChange={(e: CheckboxChangeEvent) => {
-                            dispatch({ type: 'isPitcherSelf', params: { is_pitcher_self: e.target.checked } })
-                        }}>是否包含组员</Checkbox>
-                    }
-                    {
-                        isBook && <Input placeholder='请输入小说名称' onChange={tableBookChange} allowClear style={{ width: 140 }} value={book} />
-                    }
-                    {
-                        isVideo && <Select
-                            style={{ width: 150 }}
-                            placeholder="选择类型"
-                            onChange={(value: any) => { dispatch({ type: 'isVideo', params: { is_video: value } }) }}
-                            showSearch
-                            allowClear
-                            value={is_video}
-                        >
-                            <Select.Option value={1}>视频</Select.Option>
-                            <Select.Option value={0}>图片</Select.Option>
-                        </Select>
-                    }
-                    {
-                        isQs && <Input placeholder='请输入期数名称' onChange={tableQsChange} allowClear style={{ width: 140 }} value={stage} />
-                    }
-                    {
-                        isPlatform && <Input placeholder='请输入书城' onChange={platformChange} allowClear style={{ width: 140 }} value={platform} />
-                    }
-                    {
-                        isTableName && <Select
-                            style={{ width: 150 }}
-                            placeholder="输入搜索公众号"
-                            onChange={(value: any) => { tableNameChange(value) }}
-                            showSearch
-                            allowClear
-                            value={channel}
-                        >
-                            {
-                                groupActionWx?.map((list: any, eq: number) => {
-                                    return <Select.Option key={list?.id} value={list?.nickName}>
-                                        <img src={list?.headImg || localStorage?.bookImg} className={style.item_img} /> {list?.nickName}
-                                    </Select.Option>
-                                })
-                            })
-                        </Select>
-                    }
-                    {
-                        isSelctAcc && <Select
-                            style={{ width: 185 }}
-                            placeholder="输入搜索公众号"
-                            onChange={(value: any) => { tableNameChange(value) }}
-                            showSearch
-                            allowClear
-                            // mode="multiple"
-                            defaultActiveFirstOption={false}
-                            showArrow={false}
-                            filterOption={false}
-                            onSearch={handleSearch}
-                            value={channel}
-                            loading={getAccAjax?.loading}
-                            notFoundContent={null}
-                        >
-                            {
-                                getAccAjax?.data?.data?.map((list: any, eq: number) => {
-                                    return <Select.Option key={list?.id} value={list?.nick_name}>
-                                        {list?.nick_name}
-                                    </Select.Option>
-                                })
-                            })
-                        </Select>
-                    }
-                    {/* 多选公众号 */}
-                    {
-                        isSelctAccTags && <Select
-                            style={{ minWidth: 200 }}
-                            placeholder="输入搜索公众号"
-                            onChange={(value: any) => { dispatch({ type: 'channels', params: { channels: value } }) }}
-                            showSearch
-                            allowClear
-                            mode="multiple"
-                            defaultActiveFirstOption={false}
-                            showArrow={false}
-                            filterOption={false}
-                            onSearch={handleSearch}
-                            value={channels}
-                            loading={getAccAjax?.loading}
-                            notFoundContent={null}
-                            tagRender={(props) => {
-                                const { label, value, closable, onClose } = props;
-                                const onPreventMouseDown = (event: any) => {
-                                    event.preventDefault();
-                                    event.stopPropagation();
-                                };
-                                if (accNum === 1 && value) {
-                                    if (channels && channels[0] === value) {
-                                        return <>
-                                            <Tag
-                                                color="#F5F5F5"
-                                                onMouseDown={onPreventMouseDown}
-                                                closable={closable}
-                                                onClose={onClose}
-                                                className="accTag"
-                                                style={{ marginRight: 3 }}
-                                            >
-                                                {label}
-                                            </Tag>
-                                            {channels?.length > 1 && <Tag
-                                                color="#F5F5F5"
-                                                onMouseDown={onPreventMouseDown}
-                                                className="accTag"
-                                                style={{ marginRight: 3 }}
-                                            >
-                                                <div style={{ cursor: 'pointer' }} onClick={() => { setaccNum(channels?.length) }}>+ {channels?.length - 1} ...</div>
-                                            </Tag>}
-                                        </>
-                                    } else {
-                                        return <></>
-                                    }
-                                } else {
-                                    let length = channels?.length
-                                    let lastChannel = channels[length - 1]
-                                    return <>
-                                        <Tag
-                                            color="#F5F5F5"
-                                            onMouseDown={onPreventMouseDown}
-                                            closable={closable}
-                                            onClose={onClose}
-                                            className="accTag"
-                                            style={{ marginRight: 3 }}
-                                        >
-                                            {label}
-                                        </Tag>
-                                        {lastChannel === value && <Tag
-                                            color="#1890ff"
-                                            onMouseDown={onPreventMouseDown}
-                                            className="accTag"
-                                            style={{ marginRight: 3 }}
-                                        >
-                                            <div style={{ cursor: 'pointer', color: '#fff' }} onClick={() => { setaccNum(1) }}>收起</div>
-                                        </Tag>}
-                                    </>
-                                }
-
-                            }}
-                        >
-                            {
-                                getAccAjax?.data?.data?.map((list: any, eq: number) => {
-                                    return <Select.Option key={list?.id} value={list?.nick_name}>
-                                        {list?.nick_name}
-                                    </Select.Option>
-                                })
-                            })
-                        </Select>
-                    }
-                    {
-                        isInputName && <Input onChange={(event: React.ChangeEvent<HTMLInputElement>) => { tableNameChange(event.target.value) }} placeholder='请输入公众号' allowClear />
-                    }
-                    {
-                        isTableId && <Select value={tableId} placeholder='状态' onChange={tableIdChange} allowClear style={{ minWidth: 100 }}>
-                            <Select.Option value='1'>停投</Select.Option>
-                            <Select.Option value='2'>在投</Select.Option>
-                        </Select>
-                    }
-                    {
-                        isLocation && <Select value={location} placeholder='投放位置' onChange={locationChange} allowClear style={{ minWidth: 100 }}>
-                            <Select.Option value='MP'>MP</Select.Option>
-                            <Select.Option value='GDT'>GDT</Select.Option>
-                            <Select.Option value='BYTEDANCE'>BYTEDANCE</Select.Option>
-                        </Select>
-                    }
-                    {
-                        isType && <Select value={type} placeholder='投放位置' onChange={typeChange} allowClear style={{ minWidth: 100 }}>
-                            <Select.Option value='MP'>MP</Select.Option>
-                            <Select.Option value='GDT'>GDT</Select.Option>
-                            <Select.Option value='BYTEDANCE'>BYTEDANCE</Select.Option>
-                        </Select>
-                    }
-                    {
-                        isTableDate || isTableDate15 && <DatePickePage model='DatePicker' DatePickerChange={tableDateChange} allowClear date={tableDate} />
-                    }
-                    {
-                        isTableDateArr && <DatePickePage model='RangePicker' DatePickerChange={tableDateArrChange} allowClear date={start ? [start, end] : undefined} />
-                    }
-                    {
-                        isTableDateArr15 && <DatePicker.RangePicker onOpenChange={(open) => { setOpen(open); if (!open) { setDisData(['', '']); setInfo('') } }} onCalendarChange={(dates: any, dateStrings: [string, string], info: { range: 'start' | 'end' }) => { setDisData(dateStrings); setInfo(info.range) }} disabledDate={(current: any) => {
-                            if (info === 'start' && disData[0]) {
-                                return moment(disData[0]).startOf('day') > current || current > moment(disData[0]).add(10, 'days') || current > moment().endOf('day');
-                            } else if (info === 'end' && disData[1]) {
-                                return current < moment(disData[1]).subtract(10, 'days');
-                            } else {
-                                return current && current > moment().endOf('day');
-                            }
-                        }} onChange={(mo: any, str: any) => {
-                            dispatch({ type: 'tableDateArr15', params: { start15: (str as string[])[0], end15: (str as string[])[1] } })
-                        }} value={!open ? start15 ? [moment(start15), moment(end15)] : undefined : undefined} />
-                    }
-                    {
-                        isTableDateOne && <DatePickePage model='DatePicker' DatePickerChange={(arr: Moment[], formatString: string | string[]) => { setStartTime(formatString as string) }} allowClear date={startTime} />
-                    }
-                    {
-                        isDepleteDateArr && <DatePickePage model='RangePicker' placeholder={['消耗开始时间', '消耗结束时间']} DatePickerChange={(arr: Moment[], formatString: string | string[]) => { dispatch({ type: 'depleteDateDateArr', params: { start: (formatString as string[])[0], end: (formatString as string[])[1] } }) }} allowClear date={cost_time_start ? [cost_time_start, cost_time_end] : undefined} />
-                    }
-                    {
-                        isOrderDateArr && <DatePicker.RangePicker disabledDate={(current: any) => {
-                            if (cost_time_start && cost_time_end && current) { // 设置了消耗时间就要控制在消耗时间内
-                                return moment(cost_time_start).startOf('day') > current || current && current > moment().endOf('day');
-                            } else {
-                                return current && current > moment().endOf('day');
-                            }
-                        }} placeholder={['订单开始时间', '订单结束时间']} onChange={(mo: any, str: any) => { dispatch({ type: 'orderDateDateArr', params: { start: (str as string[])[0], end: (str as string[])[1] } }) }} value={order_time_start ? [moment(order_time_start), moment(order_time_end)] : undefined} />
-                    }
-                    {
-                        isTableDateArrSt && <DatePickePage model='RangePicker' DatePickerChange={tableDateArrStChange} allowClear date={st ? [st, et] : undefined} placeholder={['充值开始时间', '充值结束时间']} />
-                    }
-                    {/* 年选择 */}
-                    {
-                        isCostYear && <DatePicker disabledDate={(current: any) => {
-                            return current && current > moment().endOf('year');
-                        }} onChange={(value: Moment | null, dateString: string) => { dispatch({ type: 'costYear', params: { cost_year: dateString } }) }} picker="year" placeholder='请选择消耗年份' value={cost_year ? moment(cost_year) : null} />
-                    }
-                    {/* 月选择 */}
-                    {
-                        isOrderMonth && <DatePicker placeholder='请选择充值月份' disabledDate={(current: any) => {
-                            // 选择了年 限制月选择
-                            if (cost_year && current) {
-                                return moment(cost_year).startOf('year') > current || current && current > moment().endOf('month');
-                            } else {
-                                return current && current > moment().endOf('month');
-                            }
-                        }} onChange={(value: Moment | null, dateString: string) => { dispatch({ type: 'orderMonth', params: { order_month: dateString } }) }} picker="month" value={order_month ? moment(order_month) : null} />
-                    }
-                    {
-                        isTableDay && <Input
-                            style={{ width: 120 }}
-                            value={date_range}
-                            onChange={tableDayChange}
-                            allowClear
-                            placeholder='过去N天'
-                        >
-                        </Input>
-                    }
-                    <Button type='primary' onClick={() => tableSubmut({})}><SearchOutlined />搜索</Button>
-                    {isDownload && <Button type='primary' onClick={() => tableSubmut({ download: true })}><CloudDownloadOutlined />下载EXCEL</Button>}
-                </Space>
-                {/*紧凑*/}
-                <Space style={{ float: 'right' }}>
-                    {!isHideSort && <Button
-                        size='small'
-                        type='text'
-                        onClick={() => {
-                            setVisible(true)
-                        }}>
-                        <SettingOutlined />
-                    </Button>}
-                    <Button
-                        type='text'
-                        size='small'
-                        onClick={() => {
-                            if (ref?.current) {
-                                quanpin(ref?.current)
-                            }
-                        }}>
-                        {
-                            <Tooltip title={!isFell ? '全屏' : '退出全屏'}>{!isFell ? <FullscreenOutlined /> : <FullscreenExitOutlined />}</Tooltip>
-                        }
-                    </Button>
-                    <Drawer
-                        title="table字段设置"
-                        width={420}
-                        visible={visible}
-                        getContainer={ref?.current || false}
-                        onClose={() => {
-                            setVisible(false)
-                        }}
-                    >
-                        <div>
-                            <span>请输入固定列数值:</span>
-                            <InputNumber
-                                size="small"
-                                min={1}
-                                max={100000}
-                                onChange={(v) => {
-                                    setFixedNum(v as number)
-                                    localStorage.setItem(`${title}_${version}fixedNum`, `${v}`)
-                                }}
-                                value={fixedNum}
-                                style={{ marginBottom: 10 }}
-                                placeholder='请输入固定列数值'
-                            />
-                        </div>
-                        <Transfer
-                            dataSource={sortArr || []}
-                            titles={['不展示', '展示']}
-                            showSearch
-                            targetKeys={targetKeys || []}
-                            selectedKeys={selectedKeys || []}
-                            onChange={handleChange}
-                            onSelectChange={handleSelectChange}
-                            onScroll={handleScroll}
-                            render={(item: any) => item?.title}
-                            oneWay
-                            style={{ marginBottom: 16 }}
-                            listStyle={{
-                                height: 'calc(100vh - 140px)',
-                            }}
-                        />
-                    </Drawer>
-                </Space>
-            </Col>
-        </Row>
-    </Col>
-    const content = <Row gutter={[0, 20]} ref={ref} style={isFell ? { background: '#fff' } : {}}>
-        {/**table */}
-        <Col span={24}>
-            <Card
-                hoverable
-                title={
-                    <Space direction='vertical'>
-                        <Space>
-                            {isGroupTab ? selectdName + '--' + title : (isAdmin && currentUser.userId === 1) ? selectdName + '--' + title : title}
-                            {
-                                tooltip && <Tooltip
-                                    title={tooltip}>
-                                    <QuestionCircleOutlined style={{ color: 'red' }} />
-                                </Tooltip>
-                            }
-                        </Space>
-                        {subTitle && subTitle}
-                    </Space>
-                }
-                headStyle={{ textAlign: 'center' }}
-            >
-                <Row gutter={[0, 20]}>
-                    {header}
-                    <Tab {...{ size, className, isZj, newColumns, isShowTotal, columns, sortOrder, isSummaryHis, statistical, dispatch, scroll, isFell, showZj, page, pageSize, dataSource, tableSubmut, expandedRowRender, total, ajax, getDetails, detailsDtat }} />
-                </Row>
-            </Card>
-        </Col>
-    </Row >
-    return <>
-        {
-            isGroupTab ? <GroupWxTabs height='calc(100vh - 180px)'>
-                {content}
-            </GroupWxTabs > : (isAdmin && currentUser.userId === 1) ? <GroupWxTabs height='calc(100vh - 180px)'>
-                {content}
-            </GroupWxTabs> : content
-        }
-    </>
-})
-
-/**表格 */
-const Tab = React.memo((props: any) => {
-    const { size, getDetails, detailsDtat, className, isZj, isShowTotal = true, dispatch, newColumns, isSummaryHis, sortOrder, columns, statistical, scroll, isFell, showZj, page, pageSize, dataSource, tableSubmut, expandedRowRender, total, ajax } = props
-
-    return < Col span={24} >
-        <div className={`${style[size]} ${className ? style[className] : ''} `}>
-            {
-                isZj && <Tables
-                    bordered
-                    columns={newColumns?.length > 0 ? newColumns : columns({ getDetails, data: detailsDtat, sortOrder, dispatch })}
-                    dataSource={[{ ...statistical, id: 1 }]}
-                    scroll={scroll ? isFell ? { ...scroll, y: document.body.clientHeight - 300 } : scroll : {}}
-                    size={size}
-                    pagination={false}
-                    hideOnSinglePage
-                    className={`all_table ${className ? className : ''}`}
-                />
-            }
-            <Tables
-                className={`all_table ${className ? className : ''}`}
-                bordered
-                current={showZj ? 1 : page}
-                pageSize={pageSize}
-                columns={newColumns?.length > 0 ? newColumns : columns({ getDetails, data: detailsDtat, sortOrder, dispatch })}
-                dataSource={showZj ? [{ ...statistical, id: 1 }] : dataSource}
-                scroll={scroll ? isFell ? { ...scroll, y: document.body.clientHeight - 300 } : scroll : {}}
-                onChange={(pagination: any, filters: any, sorter: any) => tableSubmut({ pagination, filters, sortData: sorter })}
-                rowClassName={(record: { color: string }) => style[record['color']]}
-                expandedRowRender={expandedRowRender ? expandedRowRender : undefined}
-                size={size}
-                isShowTotal={isShowTotal}
-                total={showZj ? 1 : total}
-                loading={ajax?.loading}
-                defaultPageSize={100}
-                summary={pageData => {
-                    if (isSummaryHis) {
-                        return <Table.Summary fixed>
-                            <Table.Summary.Row>
-                                <Table.Summary.Cell index={0}><div style={{ fontSize: 18, fontWeight: 600, textAlign: 'center' }}>总计</div></Table.Summary.Cell>
-                                <Table.Summary.Cell index={1}><div style={{ fontWeight: 600, textAlign: 'center', color: '#000000d9' }}>消耗</div></Table.Summary.Cell>
-                                <Table.Summary.Cell index={2}><div style={{ textAlign: 'center' }}>{Object.keys(statistical)?.length > 0 ? <Statistic value={statistical?.cost ? (statistical?.cost as number).toFixed(2) : statistical?.cost === 0 ? 0 : '--'} /> : '--'}</div> </Table.Summary.Cell>
-                                <Table.Summary.Cell index={3}><div style={{ fontWeight: 600, textAlign: 'center', color: '#000000d9' }}>充值</div></Table.Summary.Cell>
-                                <Table.Summary.Cell index={4}><div style={{ textAlign: 'center' }}>{Object.keys(statistical)?.length > 0 ? <Statistic value={statistical?.amount ? (statistical?.amount as number).toFixed(2) : statistical?.amount === 0 ? 0 : '--'} /> : '--'}</div></Table.Summary.Cell>
-                                <Table.Summary.Cell index={5}><div style={{ fontWeight: 600, textAlign: 'center', color: '#000000d9' }}>回收率</div></Table.Summary.Cell>
-                                <Table.Summary.Cell index={6}><div style={{ textAlign: 'center' }}>{Object.keys(statistical)?.length > 0 && statistical?.roi ? <div style={statistical?.roi >= 0.5 ? { color: '#0f990f' } : { color: 'red' }}>{(statistical?.roi * 100).toFixed(2) + '%'}</div> : '--'}</div></Table.Summary.Cell>
-                            </Table.Summary.Row>
-                        </Table.Summary>
-                    }
-                    return null
-                }}
-            />
-        </div>
-    </Col >
-}, (a, b) => {
-    if (JSON.stringify(a) === JSON.stringify(b)) {
-        return true
-    } else {
-        return false
-    }
-})
-export default Page

+ 0 - 9
src/pages/dataStatistics/components/TableData/index1.less

@@ -1,9 +0,0 @@
-.accTag {
-  color: #000000D9;
-  .anticon-close {
-    color: #000000D9;
-    &:hover {
-        color: #000000D9;
-    }
-  }
-}

+ 0 - 610
src/pages/dataStatistics/components/TableData/indexTab.tsx

@@ -1,610 +0,0 @@
-import DatePickePage from '@/components/DatePicker'
-import GroupWxTabs from '@/components/GroupWxTabs'
-import Tables from '@/components/Tables'
-import { quanpin } from '@/utils/fullScreen'
-import { CloudDownloadOutlined, FullscreenExitOutlined, FullscreenOutlined, QuestionCircleOutlined, SearchOutlined, SettingOutlined } from '@ant-design/icons'
-import { Button, Card, Col, Drawer, Input, InputNumber, Radio, Row, Select, Space, Statistic, Table, Tabs, Tooltip, Transfer } from 'antd'
-import { SelectValue } from 'antd/es/select'
-import { RadioChangeEvent } from 'antd/lib/radio'
-import { ColumnsType } from 'antd/lib/table'
-import { TransferDirection } from 'antd/lib/transfer'
-import { Moment } from 'moment'
-import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import { useModel, history } from 'umi'
-import style from './index.less'
-import Sortable from 'sortablejs'
-import { useDebounce } from 'ahooks'
-
-interface Prosp {
-    isTableName?: boolean,//是否开启公众号名称搜索
-    sortArr?: { label: string, value: string }[],//排序参数名列表
-    isTableId?: boolean,//是否开公众号ID搜索
-    isTableDate?: boolean,//是否开启单日期搜索
-    isTableDay?: boolean,//是否开启N天搜索
-    isBook?: boolean,//是否开启小说搜索
-    isGroup?: boolean,//是否开启切换
-    isZj?: boolean,//是否查总计
-    isQs?: boolean,//是否开启期数
-    isInputName?: boolean, // 是否开启输入框 输入公众号
-    isPitcher?: boolean,//默认关闭,关闭下使用左侧组员组件选中的名称,开启后使用input输入筛选
-    isAdmin?: boolean, // 是否admin展示 普通员工不展示 与isGroupTab 配合 isGroupTab关闭 isAdmin可打开 
-    isCPitcher?: boolean, //是否传Pitcher
-    isUserId?: boolean, // 是否传入usid
-    isDownload?: boolean,//是否开启下载
-    isPlatform?: boolean,//是否开启书城
-    isTableDateArr?: boolean,//是否开启双日期搜索
-    tableTotal?: { [key: string]: string },//是个开启总计
-    isLocation?: boolean,//是否开启投放位置
-    isType?: boolean,//是否开启投放位置
-    scroll?: { x?: number, y?: number },//开启行滑动并设置容器最大宽度
-    columns: () => ColumnsType<any>,//table列表配置
-    title?: string,//tabel的标题
-    tooltip?: JSX.Element,//是否在标题后加问号展示说明
-    dataSource: any[],//table的数据
-    expandedRowRender?: (data: any) => JSX.Element,
-    ajax: any,//请求
-    isTdColor?: boolean,//是否需要开启背景色
-    isGroupTab?: boolean,//是否开启组员tab
-    className?: string,//自定义class
-    isSelctAcc?: boolean, // 是否用data公众号
-    isdownload?: boolean, // 是否下载
-    isDataSelectPitcher?: boolean,  // 选择数据服务传回来的投手
-    isLoginId?: boolean, // 传登陆ID
-}
-/**
- * 
- * @param  isTableName boolean是否开启公众号名称搜索
- * @param isTableId boolean,//是否开公众号ID搜索
- * @param isTableDate boolean,//是否开启单日期搜索
- * @param isTableDay  boolean,//是否开启N天搜索
- * @param isBook   boolean,//是否开启小说搜索
- * @param isTableDateArr  boolean,//是否开启双日期搜索
- * @param tableTotal  { [key: string]: string },//是个开启总计
- * @param x  number,//开启行滑动并设置容器最大宽度
- * @param dataSource any[],//table的数据
- * @param columns  () => ColumnsType<any>,//table列表配置
- * @param title  string,//tabel的标题
- * @param tooltip  JSX.Element//是否在标题后加问号展示说明
- * @param ajax  (params: Params) => Promise<any>//请求
- */
-function Page(props: Prosp) {
-    const { isInputName, isTableName, isGroup, isTableId, isTableDate, isSelctAcc = false, isLoginId = false, isTableDay, isCPitcher = true, isDataSelectPitcher = false, isLocation, isBook, isTableDateArr, isType, isPitcher = false, isdownload = false, isAdmin = false, isUserId = false, isPlatform, isDownload, isGroupTab = true, tableTotal, isQs, isZj, scroll, columns, title, tooltip, ajax, dataSource, expandedRowRender, sortArr, isTdColor, className } = props
-    const { state, dispatch, getAccAjax, getUserAjax } = useModel('useData.useTableData')
-    const { state: userState } = useModel('useOperating.useUser')
-    const { currentUser }: any = useModel('@@initialState', model => ({ currentUser: model.initialState?.currentUser }))
-    const { state: { groupActionWx } } = useModel('useOperating.useWxGroupList')
-    const [size, setSize] = useState<'small' | 'middle' | 'large'>('small')
-    const [page, setPage] = useState<number>(1)
-    const [pageSize, setPageSize] = useState<number>(100)
-    const [total, setTotal] = useState<number>(0)
-    const { selectdName, isFell } = userState
-    const [visible, setVisible] = useState<boolean>(false)
-    const [selectedKeys, setSelectedKeys] = useState<any[]>([])
-    const [statistical, setStatistical] = useState<any>({})
-    const [fixedNum, setFixedNum] = useState<number | string>(localStorage.getItem(`${title}fixedNum`) || 1)
-    const [targetKeys, setTargetKeys] = useState<any[]>(localStorage?.getItem(`${title}`) ? JSON.parse(localStorage?.getItem(`${title}`) as string) : [])
-    const { channel, tableDate, date_range, start, end, tableId, book, order_by, order, location, stage, type, platform, pitcher, tableValue = '1' } = state
-    const [showZj, setShowZj] = useState<boolean>(false)
-    const [value, setValue] = useState<string>('');
-    const [searchValue, setSearchValue] = useState<any>([])
-    const ref = useRef(null)
-
-    useEffect(() => {
-        return () => {
-            console.log('卸载。。。');
-            dispatch({ type: 'dataSource', params: { dataSource: [] } })
-        }
-    }, [])
-    /**点击书名搜索书名 */
-    useEffect(() => {
-        let bookName = history?.location?.query?.bookName
-        if (bookName) {
-            dispatch({ type: 'book', params: { book: bookName } })
-            tableSubmut({ bookName })
-        }
-    }, [history.location])
-    const handleSearch = useCallback((value: string) => {
-        setValue(value)
-    }, [])
-    const debouncedValue = useDebounce(value, { wait: 300 });
-    useEffect(() => {
-        if (debouncedValue) {
-            getAccAjax.run({ user_id: userState?.selectdUserId, name: debouncedValue })
-        }
-    }, [debouncedValue, isSelctAcc, userState?.selectdUserId])
-    useEffect(() => {
-        if (isDataSelectPitcher) {
-            getUserAjax.run({ user_id: userState?.selectdUserId }).then((res: any) => {
-                setSearchValue(res?.data || [])
-            })
-        }
-    }, [isDataSelectPitcher, userState?.selectdUserId])
-    /**table搜索事件 */
-    const tableSubmut = useCallback(
-        (props: {
-            pagination?: { current?: number, pageSize?: number, gzh?: string },
-            filters?: any,
-            sortData?: {
-                column: { dataIndex: string },
-                order?: "ascend" | "descend"
-            },
-            bookName?: any,
-            download?: boolean,
-        }) => {
-            let { pagination, filters, sortData, bookName, download, } = props
-            let data = {}
-            if (isCPitcher) {
-                data = { pitcher: isPitcher ? pitcher : selectdName }//'潘晨虹'||
-            }
-            if (isDataSelectPitcher) {
-                data = { pitcher: pitcher }//'潘晨虹'||
-            }
-            if (isUserId) {
-                if (currentUser.userId === 1) {
-                    data['user_id'] = userState.selectdUserId || 1
-                } else {
-                    data['user_id'] = currentUser.userId || 1
-                }
-            }
-            if (isLoginId) {
-                data['user_id'] = currentUser.userId || 1
-            }
-            !download && (data['page'] = pagination?.current || 1)
-            !download && (data['page_size'] = pagination?.pageSize || 100)
-            // console.log(sortData)
-            setPageSize(pagination?.pageSize || 100)
-            setPage(pagination?.current || 1)
-            let gzh = pagination?.gzh || channel //'寒龙书海'||
-            isBook && (book || bookName) && (data['book'] = bookName || book)
-            isQs && stage && (data['stage'] = stage)
-            isTableName && gzh && (data['channel'] = gzh)
-            isInputName && (data['channel'] = channel)
-            isSelctAcc && (data['channel'] = channel)
-            // data['channel'] = '龙鳞文学'
-            isTableId && tableId && (data['state'] = tableId === '2' ? '在投' : '停投')
-            isTableDate && tableDate && (data['date'] = tableDate)
-            isTableDay && date_range && (data['date_range'] = date_range)
-            isTableDateArr && start && (data['start'] = start)
-            isTableDateArr && end && (data['end'] = end)
-            sortData?.order && (data['order'] = sortData?.order === 'ascend' ? 'asc' : 'desc');
-            sortData?.column?.dataIndex && (data['order_by'] = sortData?.column?.dataIndex)
-            isLocation && location && (data['location'] = location)
-            isType && type && (data['type'] = type)
-            isPlatform && platform && (data['platform'] = platform)
-            isDownload && download && (data['download'] = 1)
-            if (ajax) {
-                ajax.run(data).then((res: any) => {
-                    if (res?.data) {
-                        let dateArr: string[] = []
-                        let arr = []
-                        if (isTdColor) {
-                            arr = res?.data?.map((item: any, index: number) => {
-                                item['id'] = (pagination?.current || 1) + index + + Math.random()*100
-                                if (dateArr.indexOf(item.date) !== -1) {//假如日期在dateArr中存在
-                                    item['color'] = `color${dateArr.indexOf(item.date)}`//那么颜色等于dateArr的位置
-                                } else {//假如不存在dateArr中
-                                    dateArr.push(item.date)//向dateArr添加日期以备相同日期对比
-                                    item['color'] = `color${dateArr.length - 1}`//颜色的值等于dateArr的长度-1
-                                }
-                                return item
-                            })
-                        } else {
-                            arr = res?.data?.map((item: any, index: number) => {
-                                item['id'] = (pagination?.current || 1) + index + Math.random()*100
-                                return item
-                            })
-                        }
-                        setStatistical(res?.total_data)
-                        dispatch({ type: 'dataSource', params: { dataSource: arr } })
-                        setTotal(res?.total)
-                    } else {
-                        setStatistical({})
-                        dispatch({ type: 'dataSource', params: { dataSource: [] } })
-                    }
-                })
-            }
-        }, [tableDate, channel, start, end, tableId, book, date_range, selectdName, ajax, order, order_by, isTdColor, location, stage, platform, type])
-    /**tableName事件 */
-    const tableNameChange = useCallback((value: SelectValue) => {
-        // let value = e.target.value
-        // setChannel(value)
-        dispatch({ type: 'channel', params: { channel: value as string } })
-    }, [])
-    /**tableBook事件 */
-    const tableBookChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        // setBook(value)
-        dispatch({ type: 'book', params: { book: value } })
-    }, [])
-    /**书城*/
-    const platformChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        // setPlatform(value)
-        dispatch({ type: 'setState', params: { platform: value } })
-    }, [])
-    const platformChangeInput = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        console.log(value);
-
-        dispatch({ type: 'setState', params: { platform: value } })
-    }, [])
-    /**投手名称*/
-    const pitcherChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        // setPitcher(value)
-        dispatch({ type: 'setState', params: { pitcher: value } })
-    }, [])
-    /**tableQs事件 */
-    const tableQsChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        // setStage(value)
-        dispatch({ type: 'setState', params: { stage: value } })
-    }, [])
-    /**table单日期事件 */
-    const tableDateChange = useCallback((arr: Moment[], formatString: string | string[]) => {
-        // setTableDate(formatString)
-        dispatch({ type: 'tableDate', params: { tableDate: formatString as string } })
-    }, [])
-    /**table双日期事件 */
-    const tableDateArrChange = useCallback((arr: Moment[], formatString: string | string[]) => {
-        // setStart((formatString as string[])[0])
-        // setEnd((formatString as string[])[1])
-        dispatch({ type: 'tableDateArr', params: { start: (formatString as string[])[0], end: (formatString as string[])[1] } })
-    }, [])
-    /**tableDay事件 */
-    const tableDayChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        // setDate_range(value)
-        dispatch({ type: 'date_range', params: { date_range: value } })
-    }, [])
-    /**tableId事件 */
-    const tableIdChange = useCallback((value: string) => {
-        // setTableId(value)
-        dispatch({ type: 'tableId', params: { tableId: value } })
-    }, [])
-    /**排序选择 */
-    const sortChange = useCallback((value: SelectValue) => {
-        // setOrder_by(value)
-        dispatch({ type: 'setState', params: { order_by: value as string } })
-    }, [])
-    /**投放位置1 */
-    const locationChange = useCallback((value: SelectValue) => {
-        // setLocation(value)
-        dispatch({ type: 'setState', params: { location: value as 'MP' | 'GDT' } })
-    }, [])
-    /**投放位置2 */
-    const typeChange = useCallback((value: SelectValue) => {
-        // setType(value)
-        dispatch({ type: 'setState', params: { type: value as 'MP' | 'GDT' } })
-    }, [])
-    const orderChange = useCallback((value: SelectValue) => {
-        // setOrder(value)
-        dispatch({ type: 'setState', params: { order: value as 'asc' | 'desc' } })
-    }, [])
-    /**table字段设置 */
-    const handleChange = useCallback((nextTargetKeys: string[], direction: TransferDirection, moveKeys: string[]) => {
-        setTargetKeys(nextTargetKeys)
-    }, [])
-    const handleSelectChange = useCallback((sourceSelectedKeys: string[], targetSelectedKeys: string[]) => {
-        setSelectedKeys([...sourceSelectedKeys, ...targetSelectedKeys])
-    }, [])
-    const handleScroll = (direction: TransferDirection, e: React.SyntheticEvent<HTMLUListElement, Event>) => {
-        // console.log('direction:', direction);
-        // console.log('target:', e.target);
-    };
-    /**table切换事件 */
-    const tableChange = useCallback((e: RadioChangeEvent) => {
-        dispatch({ type: 'dataSource', params: { dataSource: [] } })
-        let value = e.target.value
-        dispatch({ type: 'setState', params: { tableValue: value } })
-    }, [])
-    /**卸载组件清空数据 */
-    useEffect(() => {
-        return () => {
-            dispatch({ type: 'dataSource', params: { dataSource: [] } })
-            // setPitcher('')
-            setTargetKeys([])
-            // setOrder_by(undefined)
-            dispatch({ type: 'setState', params: { order_by: undefined, targetKeys: [], pitcher: '' } })
-            // setTargetKeys([])
-        }
-    }, [])
-    /**首次加载请求or投手名称变化 */
-    useEffect(() => {
-        let { channel } = history?.location?.query as any//假如路径中带公众号号名称
-        tableSubmut({ pagination: { current: 1, pageSize: 100, gzh: channel, }, download: isdownload })
-    }, [selectdName])
-    /**重组选中的字段 */
-    const newColumns = useMemo(() => {
-        console.log(123)
-        let arr: any[] = []
-        if (targetKeys && targetKeys.length > 0) {
-            let column: any[] = columns()
-            targetKeys?.forEach((v: string, index: number) => {
-                column?.forEach((item: { dataIndex: string, fixed: any }) => {
-                    if (item.dataIndex === v) {
-                        if (index < fixedNum) {
-                            item.fixed = true
-                        } else {
-                            item.fixed = false
-                        }
-                        arr.push(item)
-                    }
-                })
-            })
-            localStorage.setItem(`${title}`, JSON.stringify(targetKeys))//保存至本地浏览器
-            return arr
-        }
-        return arr
-    }, [targetKeys, fixedNum])
-    useEffect(() => {
-        if (visible) {
-            let ul: any = document.getElementsByClassName('ant-transfer-list-content-show-remove')[0]
-            if (ul) {
-                new Sortable(ul, {
-                    animation: 150,
-                    dragClass: style.blue,
-                    onEnd: (evt: any) => {
-                        let newTargetKeys: any[] = []
-                        for (let item of ul?.children) {
-                            sortArr?.forEach((arr: any) => {
-                                if (item?.title === arr?.title) {
-                                    newTargetKeys.push(arr?.key)
-                                }
-                            })
-                        }
-                        setTargetKeys(newTargetKeys)
-                    }
-                });
-            }
-        }
-    }, [visible, targetKeys])
-    const header = <Col span={24}>
-        <Row gutter={[0, 10]}>
-            {
-                isGroup && <Col span={24}>
-                    <Radio.Group onChange={tableChange} value={tableValue}>
-                        <Radio.Button value={'1'}>日期汇总</Radio.Button>
-                        <Radio.Button value={'2'}>公众号汇总</Radio.Button>
-                    </Radio.Group>
-                </Col>
-            }
-            <Col span={24}>
-                <Space>
-                    {
-                        isPitcher && <Input placeholder='请输投手名称' onChange={pitcherChange} allowClear style={{ width: 140 }} value={pitcher} />
-                    }
-                    {
-                        isDataSelectPitcher && <Select
-                            style={{ width: 150 }}
-                            placeholder='请输投手名称'
-                            onChange={(value: any) => { dispatch({ type: 'setState', params: { pitcher: value } }) }}
-                            showArrow
-                            showSearch
-                            allowClear
-                            value={pitcher || null}
-                        >
-                            {
-                                searchValue?.map((list: any, eq: number) => {
-                                    return <Select.Option key={list?.user_id} value={list?.nick_name}>
-                                        {list?.nick_name}
-                                    </Select.Option>
-                                })
-                            })
-                    </Select>
-                    }
-                    {
-                        isBook && <Input placeholder='请输入小说名称' onChange={tableBookChange} allowClear style={{ width: 140 }} value={book} />
-                    }
-                    {
-                        isQs && <Input placeholder='请输入期数名称' onChange={tableQsChange} allowClear style={{ width: 140 }} value={stage} />
-                    }
-                    {
-                        isPlatform && <Input placeholder='请输入书城' onChange={platformChange} allowClear style={{ width: 140 }} value={platform} />
-                    }
-                    {
-                        isTableName && <Select
-                            style={{ width: 150 }}
-                            placeholder="输入搜索公众号"
-                            onChange={(value: any) => { tableNameChange(value) }}
-                            showSearch
-                            allowClear
-                            value={channel}
-                        >
-                            {
-                                groupActionWx?.map((list: any, eq: number) => {
-                                    return <Select.Option key={list?.id} value={list?.nickName}>
-                                        <img src={list?.headImg || localStorage?.bookImg} className={style.item_img} /> {list?.nickName}
-                                    </Select.Option>
-                                })
-                            })
-                    </Select>
-                    }
-                    {
-                        isSelctAcc && <Select
-                            style={{ width: 150 }}
-                            placeholder="输入搜索公众号"
-                            onChange={(value: any) => { tableNameChange(value) }}
-                            showSearch
-                            allowClear
-                            defaultActiveFirstOption={false}
-                            showArrow={false}
-                            filterOption={false}
-                            onSearch={handleSearch}
-                            value={channel}
-                            notFoundContent={null}
-                        >
-                            {
-                                getAccAjax?.data?.data?.map((list: any, eq: number) => {
-                                    return <Select.Option key={list?.id} value={list?.nick_name}>
-                                        {list?.nick_name}
-                                    </Select.Option>
-                                })
-                            })
-                    </Select>
-                    }
-                    {
-                        isInputName && <Input onChange={(event: React.ChangeEvent<HTMLInputElement>) => { tableNameChange(event.target.value) }} placeholder='请输入公众号' allowClear />
-                    }
-                    {
-                        isTableId && <Select value={tableId} placeholder='状态' onChange={tableIdChange} allowClear style={{ minWidth: 100 }}>
-                            <Select.Option value='1'>停投</Select.Option>
-                            <Select.Option value='2'>在投</Select.Option>
-                        </Select>
-                    }
-                    {
-                        isLocation && <Select value={location} placeholder='投放位置' onChange={locationChange} allowClear style={{ minWidth: 100 }}>
-                            <Select.Option value='MP'>MP</Select.Option>
-                            <Select.Option value='GDT'>GDT</Select.Option>
-                        </Select>
-                    }
-                    {
-                        isType && <Select value={type} placeholder='投放位置' onChange={typeChange} allowClear style={{ minWidth: 100 }}>
-                            <Select.Option value='MP'>MP</Select.Option>
-                            <Select.Option value='GDT'>GDT</Select.Option>
-                        </Select>
-                    }
-                    {
-                        isTableDate && <DatePickePage model='DatePicker' DatePickerChange={tableDateChange} allowClear date={tableDate} />
-                    }
-                    {
-                        isTableDateArr && <DatePickePage model='RangePicker' DatePickerChange={tableDateArrChange} allowClear date={start ? [start, end] : undefined} />
-                    }
-                    {
-                        isTableDay && <Input
-                            style={{ width: 120 }}
-                            value={date_range}
-                            onChange={tableDayChange}
-                            allowClear
-                            placeholder='过去N天'
-                        >
-                        </Input>
-                    }
-                    <Button type='primary' onClick={() => tableSubmut({})}><SearchOutlined />搜索</Button>
-                    {isDownload && <Button type='primary' onClick={() => tableSubmut({ download: true })}><CloudDownloadOutlined />下载EXCEL</Button>}
-                </Space>
-                {/*紧凑*/}
-                <Space style={{ float: 'right' }}>
-                    <Button
-                        size='small'
-                        type='text'
-                        onClick={() => {
-                            setVisible(true)
-                        }}>
-                        <SettingOutlined />
-                    </Button>
-                    <Button
-                        type='text'
-                        size='small'
-                        onClick={() => {
-                            if (ref?.current) {
-                                quanpin(ref?.current)
-                            }
-                        }}>
-                        {
-                            <Tooltip title={!isFell ? '全屏' : '退出全屏'}>{!isFell ? <FullscreenOutlined /> : <FullscreenExitOutlined />}</Tooltip>
-                        }
-                    </Button>
-                    <Drawer
-                        title="table字段设置"
-                        width={420}
-                        visible={visible}
-                        getContainer={ref?.current || false}
-                        onClose={() => {
-                            setVisible(false)
-                        }}
-                    >
-                        <div>
-                            <span>请输入固定列数值:</span>
-                            <InputNumber
-                                size="small"
-                                min={1}
-                                max={100000}
-                                onChange={(v) => {
-                                    setFixedNum(v as number)
-                                    localStorage.setItem(`${title}fixedNum`, `${v}`)
-                                }}
-                                value={fixedNum}
-                                style={{ marginBottom: 10 }}
-                                placeholder='请输入固定列数值'
-                            />
-                        </div>
-                        <Transfer
-                            dataSource={sortArr || []}
-                            titles={['不展示', '展示']}
-                            showSearch
-                            targetKeys={targetKeys || []}
-                            selectedKeys={selectedKeys || []}
-                            onChange={handleChange}
-                            onSelectChange={handleSelectChange}
-                            onScroll={handleScroll}
-                            render={(item: any) => item?.title}
-                            oneWay
-                            style={{ marginBottom: 16 }}
-                            listStyle={{
-                                height: 'calc(100vh - 140px)',
-                            }}
-                        />
-                    </Drawer>
-                </Space>
-            </Col>
-        </Row>
-    </Col>
-    const content = <Row gutter={[0, 20]} ref={ref} style={isFell ? { background: '#fff' } : {}}>
-        {/**table */}
-        <Col span={24}>
-            <Row gutter={[0, 20]}>
-                {header}
-                <Tab {...{ size, className, isZj, newColumns, columns, statistical, scroll, isFell, showZj, page, pageSize, dataSource, tableSubmut, expandedRowRender, total, ajax }} />
-            </Row>
-        </Col>
-    </Row >
-    return <>
-        {
-            content
-        }
-    </>
-}
-/**表格 */
-const Tab = React.memo((props: any) => {
-    const { size, className, isZj, newColumns, columns, statistical, scroll, isFell, showZj, page, pageSize, dataSource, tableSubmut, expandedRowRender, total, ajax } = props
-    return < Col span={24} >
-        <div className={`${style[size]} ${className ? style[className] : ''} `}>
-            {
-                isZj && <Tables
-                    bordered
-                    columns={newColumns?.length > 0 ? newColumns : columns()}
-                    dataSource={[{ ...statistical, id: 1 }]}
-                    scroll={scroll ? isFell ? { ...scroll, y: document.body.clientHeight - 300 } : scroll : {}}
-                    size={size}
-                    pagination={false}
-                    hideOnSinglePage
-                    className='total_table'
-                />
-            }
-            <Tables
-                className={`all_table ${className ? className : ''}`}
-                bordered
-                current={showZj ? 1 : page}
-                pageSize={pageSize}
-                columns={newColumns?.length > 0 ? newColumns : columns()}
-                dataSource={showZj ? [{ ...statistical, id: 1 }] : dataSource}
-                scroll={scroll ? isFell ? { ...scroll, y: document.body.clientHeight - 300 } : scroll : {}}
-                onChange={(pagination: any, filters: any, sorter: any) => tableSubmut({ pagination, filters, sortData: sorter })}
-                rowClassName={(record: { color: string }) => style[record['color']]}
-                expandedRowRender={expandedRowRender ? expandedRowRender : undefined}
-                size={size}
-                total={showZj ? 1 : total}
-                loading={ajax?.loading}
-                defaultPageSize={100}
-            />
-        </div>
-    </Col >
-}, (a, b) => {
-    if (JSON.stringify(a) === JSON.stringify(b)) {
-        return true
-    } else {
-        return false
-    }
-})
-export default Page

+ 0 - 125
src/pages/dataStatistics/components/TableData/tableConfig.tsx

@@ -1,125 +0,0 @@
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-
-function columns(){
-    let arr: ColumnsType<any>= Array(7).fill('').map((i: string, index: number) => {
-        return {
-            title: `D${index + 1}`,
-            dataIndex: `D${index + 1}`,
-            key: `D${index + 1}`,
-            width:250,
-            align: 'center',
-            render: () => {
-                return <div style={{ display: 'flex', flexFlow: 'column', alignContent: 'center' }}>
-                    <span>原:</span>
-                    <span>增:</span>
-                    <span>移:</span>
-                    <span>现:</span>
-                </div>
-            }
-        }
-    })
-    let newArr:ColumnsType<any>= [
-        {
-            title: '时间',
-            dataIndex: 'data1',
-            key: 'data1',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '公众号',
-            dataIndex: 'data2',
-            key: 'data2',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '主投书',
-            dataIndex: 'data3',
-            key: 'data3',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '当天消耗',
-            dataIndex: 'data4',
-            key: 'data4',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '当日新用户累计充值',
-            dataIndex: 'data5',
-            key: 'data5',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '回本率',
-            dataIndex: 'data6',
-            key: 'data6',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '新增粉丝数',
-            dataIndex: 'data7',
-            key: 'data7',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '新增粉丝成本',
-            dataIndex: 'data8',
-            key: 'data8',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '总充值人数',
-            dataIndex: 'data9',
-            key: 'data9',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '总充值次数',
-            dataIndex: 'data10',
-            key: 'data10',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '充值用户成本',
-            dataIndex: 'data11',
-            key: 'data11',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '平均复充比率',
-            dataIndex: 'data12',
-            key: 'data12',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '平均充值金额',
-            dataIndex: 'data13',
-            key: 'data13',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '平均充值次数',
-            dataIndex: 'data14',
-            key: 'data14',
-            align: 'center',
-            width:150,
-        },
-        ...arr
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 26
src/pages/dataStatistics/imageRank/adCost/index.less

@@ -1,26 +0,0 @@
-.showred{
-    &>div{
-        color: red !important;
-    }
-}
-.img{
-    >div{
-        >span{ 
-             z-index: -1;
-            &:first-child{
-               z-index: 50;
-            }
-        }
-    }
-}
-
-.ellipsis{
-    text-overflow: -o-ellipsis-lastline;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    display: -webkit-box;
-    -webkit-line-clamp: 2;
-    -webkit-box-orient: vertical;
-    font-size: 12px;
-    text-align: left;
-}

+ 0 - 66
src/pages/dataStatistics/imageRank/adCost/index.tsx

@@ -1,66 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import { Modal } from 'antd'
-import React, { useEffect, useMemo, useState } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { fcolumns } from './tableConfig'
-/**素材消耗排行榜 */
-function MaterialPage() {
-    const { state: { dataSource }, getAdrank } = useModel('useData.useTableData')
-    const [isModalVisible, setIsModalVisible] = useState<boolean>(false)
-    const [url, setUrl] = useState<string>('') // 视频链接
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        fcolumns()().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [fcolumns])
-
-    const openVideo = (url: string) => {
-        setIsModalVisible(true)
-        setUrl(url)
-    }
-    return <>
-        {isModalVisible && <Modal visible={isModalVisible} footer={null} width={500} maskClosable onCancel={()=>{setIsModalVisible(false)}}>
-            {url && <video src={url} loop controls autoPlay style={{width: '100%', marginTop: 20}}></video>}
-        </Modal>}
-        <TableData
-            isLoginId
-            isBook
-            isType
-            isVideo
-            // isQs
-            isTableDateArr
-            // isTableDay
-            // isZj
-            isDataSelectPitcher
-            isSelctAcc
-            isGroupTab={false}
-            sortArr={sortArr}
-            columns={fcolumns(openVideo)}
-            ajax={getAdrank}
-            title='素材消耗排行榜'
-            dataSource={data}
-            scroll={{ x: 1000, y: 600 }}
-        />
-    </>
-}
-
-export default HocError(MaterialPage)

+ 0 - 366
src/pages/dataStatistics/imageRank/adCost/tableConfig.tsx

@@ -1,366 +0,0 @@
-import { Space, Statistic, Image, Badge, Tooltip } from 'antd'
-// import ImgCrop from 'antd-img-crop'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import style from './index.less'
-
-function fcolumns(openVideo?: (url: string)=> void) {
-    return function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-        let newArr: ColumnsType<any> = [
-            {
-                title: '日期',
-                dataIndex: 'dt',
-                key: 'dt',
-                align: 'center',
-                width: 80,
-                fixed: 'left',
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'dt' && props?.sortOrder?.order) || undefined,
-            },
-            {
-                title: '图片预览',
-                dataIndex: 'preview_url',
-                key: 'preview_url',
-                align: 'center',
-                width: 65,
-                render: (url: string, b: any) => {
-                    let urls = url?.replace(/\s/g,"")?.split(',')
-                    let links: string[] = []
-                    urls?.forEach((item: string) => {
-                        if(item) {
-                            links.push(item)
-                        }
-                    })
-                    return <Space style={{ display: 'flex', flexFlow: 'row wrap', justifyContent: 'center', }} className={style.img}>
-                        {
-                            b?.is_video === 1 ? <div>
-                                <video src={url} style={{width: 60, height: 30}} onClick={()=>{openVideo && openVideo(url)}}></video>
-                            </div> :  links?.length > 0 ? <Image.PreviewGroup>
-                                {
-                                    links?.map((a, b) => {
-                                        return <Badge count={links?.length > 1 ? links?.length : ''} style={b > 0 ? { display: 'none' } : {}} size='small'>
-                                            {a && <Image src={a} preview key={b} alt="123" style={b > 0 ? { display: 'none' } : { width: 'auto', zIndex: 100 }} height={28} />}
-                                        </Badge>
-                                    })
-                                }
-                            </Image.PreviewGroup> : '(空)'
-                        }
-                        
-                    </Space>
-                }
-            },
-            {
-                title: '素材类型',
-                dataIndex: 'is_video',
-                key: 'is_video',
-                align: 'center',
-                width: 40,
-                render: (a: any) => {
-                    return <span className={style.ellipsis}>{a === 1 ? '视频' : '图片'}</span>
-                }
-            },
-            {
-                title: '标题',
-                dataIndex: 'title',
-                key: 'title',
-                align: 'center',
-                width: 180,
-                // ellipsis: true
-                // sorter:true,
-                render: (a: any) => {
-                    return <Tooltip placement="top" title={a} arrowPointAtCenter>
-                        <span className={style.ellipsis}>{a}</span>
-                    </Tooltip>
-                }
-            },
-            {
-                title: '文案描述',
-                dataIndex: 'description',
-                key: 'description',
-                align: 'center',
-                width: 100,
-                ellipsis: true
-                // sorter:true,
-                // render:(a:any)=>{
-                //     return <Statistic  value={a || 0}  />
-                // }
-            },
-            {
-                title: '公众号',
-                dataIndex: 'channel',
-                key: 'channel',
-                align: 'center',
-                width: 90,
-                // fixed: 'left',
-                // ellipsis: true
-            },
-            {
-                title: '归属人',
-                dataIndex: 'owner',
-                key: 'owner',
-                align: 'center',
-                width: 85,
-                // fixed: 'left',
-            },
-            {
-                title: '投手',
-                dataIndex: 'pitcher',
-                key: 'pitcher',
-                align: 'center',
-                width: 85,
-                // fixed: 'left',
-            },
-            // {
-            //     title: '期数',
-            //     dataIndex: 'stage',
-            //     key: 'stage',
-            //     align: 'center',
-            //     width: 85,
-            //     // fixed: 'left',
-            // },
-            {
-                title: '平台',
-                dataIndex: 'platform',
-                key: 'platform',
-                align: 'center',
-                width: 60
-            },
-            {
-                title: '主投书',
-                dataIndex: 'book',
-                key: 'book',
-                width: 130,
-                align: 'center',
-                // fixed: 'left',
-                // ellipsis: true
-            },
-            // {
-            //     title: '广告名称',
-            //     dataIndex: 'ad_name',
-            //     key: 'ad_name',
-            //     width: 90,
-            //     align: 'center'
-            // },
-            // {
-            //     title: '广告ID',
-            //     dataIndex: 'ad_id',
-            //     key: 'ad_id',
-            //     width: 90,
-            //     align: 'center',
-            //     // fixed: 'left',
-            //     // ellipsis: true
-            // },
-            {
-                title: '投放位置',
-                dataIndex: 'type',
-                key: 'type',
-                width: 40,
-                align: 'center',
-                // fixed: 'left',
-            },
-            // {
-            //     title: '广告位',
-            //     dataIndex: 'site',
-            //     key: 'site',
-            //     width: 40,
-            //     align: 'center',
-            //     // fixed: 'left',
-            // },
-            {
-                title: '消耗',
-                dataIndex: 'cost',
-                key: 'cost',
-                align: 'center',
-                width: 90,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} className={`${a > 3000 && style.showred}`} />
-                },
-            },
-            {
-                title: '曝光次数',
-                dataIndex: 'view_count',
-                key: 'view_count',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'view_count' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '点击次数',
-                dataIndex: 'click_count',
-                key: 'click_count',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'click_count' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '公众号关注次数',
-                dataIndex: 'follow_count',
-                key: 'follow_count',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'follow_count' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '千次曝光成本',
-                dataIndex: 'cpm',
-                key: 'cpm',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'cpm' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '关注成本',
-                dataIndex: 'follow_cost',
-                key: 'follow_cost',
-                align: 'center',
-                width: 60,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'follow_cost' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '点击率',
-                dataIndex: 'ctr',
-                key: 'ctr',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'ctr' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                    return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-                },
-            },
-            {
-                title: '点击均价',
-                dataIndex: 'cpc',
-                key: 'cpc',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'cpc' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '下单量',
-                dataIndex: 'order_count',
-                key: 'order_count',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'order_count' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '下单金额',
-                dataIndex: 'order_amount',
-                key: 'order_amount',
-                align: 'center',
-                width: 90,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'order_amount' && props?.sortOrder?.order) || undefined,
-                filters: [
-                    {
-                        text: '非零',
-                        value: '{"has_order": 1}',
-                    }
-                ],
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '下单率',
-                dataIndex: 'order_rate',
-                key: 'order_rate',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'order_rate' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                    return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-                },
-            },
-            {
-                title: '下单客单价',
-                dataIndex: 'unit_price',
-                key: 'unit_price',
-                align: 'center',
-                width: 98,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'unit_price' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '下单成本',
-                dataIndex: 'order_cost',
-                key: 'order_cost',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'order_cost' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '回收率',
-                dataIndex: 'roi',
-                key: 'roi',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                    return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-                },
-            },
-    
-            {
-                title: '图片id',
-                dataIndex: 'image_id',
-                key: 'image_id',
-                align: 'center',
-                width: 90,
-                ellipsis: true
-                // sorter:true,
-                // render:(a:any)=>{
-                //     return <Statistic  value={a || 0}  />
-                // }
-            },
-    
-    
-        ]
-        return newArr
-    }
-}
-export { fcolumns }

+ 0 - 11
src/pages/dataStatistics/imageRank/imageLibrary/index.less

@@ -1,11 +0,0 @@
-
-.img{
-    >div{
-        >span{ 
-             z-index: -1;
-            &:first-child{
-               z-index: 100;
-            }
-        }
-    }
-}

+ 0 - 51
src/pages/dataStatistics/imageRank/imageLibrary/index.tsx

@@ -1,51 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-
-
-/**素材库 */
-function Page() {
-    const { state: { dataSource }, getImageRank } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //  //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isTableDateArr
-            // isTableDay
-            isBook
-            isType
-            isGroupTab={false}
-            sortArr={sortArr}
-            columns={columns}
-            dataSource={data}
-            title='素材库'
-            // scroll={{ x: 1000, y: 600 }}
-            ajax={getImageRank}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 90
src/pages/dataStatistics/imageRank/imageLibrary/tableConfig.tsx

@@ -1,90 +0,0 @@
-import { Statistic, Image, Space, Badge } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import style from './index.less'
-
-function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let newArr: ColumnsType<any> = [
-        // {
-        //     title: '图片链接',
-        //     dataIndex: 'preview_url',
-        //     key: 'preview_url',
-        //     align: 'center',
-        //     width: 60,
-        //     fixed: 'left',
-        //     render: (url: string) => {
-        //         let urls = url?.split(',')
-        //         return <Space>
-        //             {
-        //                 urls.map((a, b) => {
-        //                     return <Image src={a} style={{ width: 100 }} preview key={b} />
-        //                 })
-        //             }
-        //         </Space>
-        //     }
-        // },
-        {
-            title: '图片链接',
-            dataIndex: 'preview_url',
-            key: 'preview_url',
-            align: 'center',
-            ellipsis: true,
-            fixed: 'left',
-            width:60,
-            render: (url: string) => {
-                let urls = url?.split(',')
-                return <Space style={{display:'flex',flexFlow:'row wrap',justifyContent:'center',}} className={style.img}>
-               <Image.PreviewGroup>
-                {
-                    urls?.map((a, b) => {
-                            return <Badge count={urls?.length > 1 ? urls?.length : ''}  style={b > 0 ?{ display:'none' }:{}} size='small'>
-                                 <Image src={a} preview key={b}  style={b > 0 ?{ display:'none'}:{width:20,zIndex:100}}/>
-                                </Badge>   
-                        })
-                    }
-               </Image.PreviewGroup>
-            </Space>       
-            }
-        },
-        {
-            title: '消耗',
-            dataIndex: 'sum(cost)',
-            key: 'sum(cost)',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            sortOrder: (props?.sortOrder?.columnKey === 'sum(cost)' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '点击率',
-            dataIndex: 'ctr',
-            key: 'ctr',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            sortOrder: (props?.sortOrder?.columnKey === 'ctr' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '点击均价',
-            dataIndex: 'cpc',
-            key: 'cpc',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            sortOrder: (props?.sortOrder?.columnKey === 'cpc' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 39
src/pages/dataStatistics/novel/novelConsumption/index.tsx

@@ -1,39 +0,0 @@
-import React from 'react'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-const tableTotal = {
-    name: '总计',
-    d1: '/',
-    d2: '/',
-    d3: '/',
-    d4: '/',
-    d5: '/',
-    d6: '/',
-    d7: '/',
-    d8: '/',
-    d9: '/',
-    d10: '/',
-    d11: '/',
-    d12: '/',
-    d13: '/',
-    d14: '/',
-    d15: '/',
-    d16: '/',
-}
-/**单本小说投手消耗排行 */
-function Page() {
-    return <>
-        <TableData 
-            isBook
-            isTableDateArr
-            // isTableDay
-            columns={columns}
-            dataSource={[]}
-            title='单本小说投手消耗排行'
-            tableTotal={tableTotal}
-            scroll={{ x: 2000 }}
-        />
-    </>
-}
-
-export default Page

+ 0 - 113
src/pages/dataStatistics/novel/novelConsumption/tableConfig.tsx

@@ -1,113 +0,0 @@
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-function columns() {
-    let arr: ColumnsType<any> = [
-        {
-            title: '序号',
-            dataIndex: 'data1',
-            key: 'data1',
-            align: 'center',
-        },
-        {
-            title: '投手',
-            dataIndex: 'data2',
-            key: 'data2',
-            align: 'center',
-        },
-        {
-            title: '公众号',
-            dataIndex: 'data3',
-            key: 'data3',
-            align: 'center',
-        },
-        {
-            title: '小说名称',
-            dataIndex: 'data4',
-            key: 'data4',
-            align: 'center',
-            ellipsis: true,
-        },
-        {
-            title: '投放期数',
-            dataIndex: 'data5',
-            key: 'data5',
-            align: 'center',
-        },
-        {
-            title: '投放开始时间',
-            dataIndex: 'data6',
-            key: 'data6',
-            align: 'center',
-        },
-        {
-            title: '投放结束时间',
-            dataIndex: 'data7',
-            key: 'data7',
-            align: 'center',
-        },
-        {
-            title: '总消耗(默认排序)',
-            dataIndex: 'data8',
-            key: 'data8',
-            align: 'center',
-        },
-        {
-            title: '总回本',
-            dataIndex: 'data9',
-            key: 'data9',
-            align: 'center',
-            align: 'center',
-        },
-        {
-            title: '回本利润率',
-            dataIndex: 'data10',
-            key: 'data10',
-            align: 'center',
-        },
-        {
-            title: '个人平均首日ROI',
-            dataIndex: 'data11',
-            key: 'data11',
-            align: 'center',
-        },
-        {
-            title: '平均七日ROI',
-            dataIndex: 'data12',
-            key: 'data12',
-            align: 'center',
-        },
-        {
-            title: '首日粉丝激活率',
-            dataIndex: 'data13',
-            key: 'data13',
-            align: 'center',
-        },
-        {
-            title: '首日粉丝激活成本',
-            dataIndex: 'data14',
-            key: 'data14',
-            align: 'center',
-        },
-        {
-            title: '七日粉丝激活成本',
-            dataIndex: 'data14',
-            key: 'data14',
-            align: 'center',
-        },
-        {
-            title: '30日粉丝激活成本',
-            dataIndex: 'data15',
-            key: 'data15',
-            align: 'center',
-        },
-        {
-            title: '首日用户客单价',
-            dataIndex: 'data16',
-            key: 'data16',
-            align: 'center',
-        },
-    ]
-    return arr
-}
-
-export { columns }

+ 0 - 19
src/pages/dataStatistics/novel/novelPay/index.tsx

@@ -1,19 +0,0 @@
-import React from 'react'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-/**单本小说投手消耗排行 */
-function Page() {
-    return <>
-        <TableData 
-            isBook
-            isTableDateArr
-            isTableDay
-            columns={columns}
-            dataSource={[]}
-            title='单日单本小说付费趋势表'
-            x={10000}
-        />
-    </>
-}
-
-export default Page

+ 0 - 160
src/pages/dataStatistics/novel/novelPay/tableConfig.tsx

@@ -1,160 +0,0 @@
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-
-function columns(){
-    let arr: ColumnsType<any>= Array(60).fill('').map((i: string, index: number) => {
-        return {
-            title: `D${index + 1}`,
-            dataIndex: `D${index + 1}`,
-            key: `D${index + 1}`,
-            width:150,
-            align: 'center',
-            render: () => {
-                return <div style={{ display: 'flex', flexFlow: 'column', alignContent: 'center' }}>
-                    <span>充:</span>
-                    <span>增:</span>
-                    <span>回:</span>
-                </div>
-            }
-        }
-    })
-    let newArr:ColumnsType<any>= [
-        {
-            title: '时间',
-            dataIndex: 'data1',
-            key: 'data1',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '主投书',
-            dataIndex: 'data2',
-            key: 'data2',
-            align: 'center',
-            width:150,
-            ellipsis: true,
-        },
-        {
-            title: '当天消耗',
-            dataIndex: 'data3',
-            key: 'data3',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '当天新用户首日充值',
-            dataIndex: 'data4',
-            key: 'data4',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: <span>当天用户回本率<br />(ROI)</span>,
-            dataIndex: 'data5',
-            key: 'data5',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '当天用户七日回本率',
-            dataIndex: 'data6',
-            key: 'data6',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '当天用户30日回本率',
-            dataIndex: 'data7',
-            key: 'data7',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '累计新用户首日总充值',
-            dataIndex: 'data8',
-            key: 'data8',
-            align: 'center',
-            width:200,
-        },
-        {
-            title: '累计新用户回本率',
-            dataIndex: 'data9',
-            key: 'data9',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '当天平台充值',
-            dataIndex: 'data10',
-            key: 'data10',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '平台累计消耗',
-            dataIndex: 'data11',
-            key: 'data11',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '平台累计充值',
-            dataIndex: 'data12',
-            key: 'data12',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: <span>总毛利额<br />(累计总充值-累计总消耗)</span>,
-            dataIndex: 'data13',
-            key: 'data13',
-            align: 'center',
-            width:350,
-        },
-        {
-            title: '累计回本率',
-            dataIndex: 'data14',
-            key: 'data14',
-            align: 'center',
-            width:150,
-        },
-        {
-            title: '平均ROI',
-            dataIndex: 'data15',
-            key: 'data15',
-            align: 'center',
-            width:150,
-        },
-        ...arr,
-        {
-            title: 'M3',
-            dataIndex: 'M3',
-            key: 'M3',
-            align: 'center',
-            width:150,
-            render: () => {
-                return <div style={{ display: 'flex', flexFlow: 'column', alignContent: 'center' }}>
-                    <span>充:</span>
-                    <span>增:</span>
-                    <span>回:</span>
-                </div>
-            }
-        },
-        {
-            title: 'M4',
-            dataIndex: 'M4',
-            key: 'M4',
-            align: 'center',
-            width:150,
-            render: () => {
-                return <div style={{ display: 'flex', flexFlow: 'column', alignContent: 'center' }}>
-                    <span>充:</span>
-                    <span>增:</span>
-                    <span>回:</span>
-                </div>
-            }
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 49
src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/benyue.tsx

@@ -1,49 +0,0 @@
-import useEcharts from "@/Hook/useEcharts"
-import React from "react"
-
-function Bneyue(data: number[]) {
-    data = Object.values(data).map((v: number) => v)
-    const { Echarts } = useEcharts()
-    return <>
-        <Echarts style={{ width: '100%', height: 300 }}>
-            {
-                {
-                    tooltip: {
-                        formatter: function (data: any) {
-                            return `${data.name}<br>本月消耗\n:\n¥${data.value[0]}<br>本月新用户充值\n:\n¥${data.value[1]}<br>本月回本率\n:\n${data.value[2]}%`
-                        }
-                    },
-                    radar: {
-                        // shape: 'circle',
-                        name: {
-                            textStyle: {
-                                color: '#fff',
-                                backgroundColor: '#999',
-                                borderRadius: 3,
-                                padding: [3, 5]
-                            }
-                        },
-                        indicator: [
-                            { name: '消耗', max: Math.max(...data) },
-                            { name: '充值', max: Math.max(...data) },
-                            { name: '回本率', max: data[2] < 100 ? 100 : data[2] },
-
-                        ]
-                    },
-                    series: [{
-                        type: 'radar',
-                        areaStyle: {},
-                        color: '#673ab7',
-                        data: [
-                            {
-                                value: data,
-                                name: '本月消耗/充值/回本率'
-                            },
-                        ]
-                    }],
-                }
-            }
-        </Echarts>
-    </>
-}
-export default React.memo(Bneyue)

+ 0 - 41
src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/index.less

@@ -1,41 +0,0 @@
-.body {
-  display: flex;
-  justify-content: space-between;
-  flex-flow: row wrap;
-}
-.box {
-  // height: 490px;
-  > p {
-    display: flex;
-    flex-flow: row wrap;
-    justify-content: space-between;
-    align-items: center;
-    > span {
-      color: #000;
-      font-size: calc(100vw / 140);
-    }
-    > em {
-      color: #2196f3;
-      font-size: calc(100vw / 100);
-      font-style: normal;
-      >span{
-        width: 50%;
-      }
-    }
-    &:nth-child(2) {
-      > em {
-        color: #ff5722;
-      }
-    }
-    &:nth-child(3) {
-      > em {
-        color: red;
-      }
-    }
-    &:nth-child(4) {
-      > em {
-        color: #e91e63;
-      }
-    }
-  }
-}

+ 0 - 106
src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/index.tsx

@@ -1,106 +0,0 @@
-import useNumber from '@/Hook/useNumber'
-import { Card, Col, Row } from 'antd'
-import React from 'react'
-import style from './index.less'
-import Leiji from './leiji'
-import Zonghaoshu from './zonghaoshu'
-import Benyue from './benyue'
-import Shangyue from './shangyue'
-const gutter = { xs: 24, sm: 24, md: 12, xl: 6 }
-function DailyReport(props: any) {
-    let { amount, cost, roi, channel_count, on_channel_count, off_channel_count, this_month_cost, this_month_amount, this_month_roi, last_month_cost, last_month_amount, last_month_roi, last_month_far_roi, } = props
-    return (<div >
-        {  <Row className={style.body} gutter={[20, 20]}>
-            <Col {...gutter}>
-                <Card hoverable >
-                    <div className={style.box}>
-                        <p>
-                            <span>累计消耗</span>
-                            <em>¥ {cost ? useNumber(cost) : 0}</em>
-                        </p>
-                        <p>
-                            <span>累计充值</span>
-                            <em>¥ {amount ? useNumber(amount) : 0}</em>
-                        </p>
-                        <p>
-                            <span>综合回本率</span>
-                            <em>{roi ? useNumber((roi) * 100) : 0}%</em>
-                        </p>
-                        <p><em>&nbsp;</em></p>
-                        <Leiji {...[cost || 0, amount || 0, ((roi || 0) * 100).toFixed(2)]} />
-                    </div>
-                </Card>
-            </Col>
-            <Col {...gutter}>
-                <Card hoverable >
-                    <div className={style.box}>
-                        <p>
-                            <span>总号数</span>
-                            <em>{channel_count ? useNumber(channel_count) : 0}</em>
-                        </p>
-                        <p>
-                            <span>在投号数</span>
-                            <em>{on_channel_count ? useNumber(on_channel_count) : 0}</em>
-                        </p>
-                        <p>
-                            <span>停投号数</span>
-                            <em>{off_channel_count ? useNumber(off_channel_count) : 0}</em>
-                        </p>
-                        <p><em>&nbsp;</em></p>
-                        <Zonghaoshu {...[channel_count || 0, on_channel_count || 0, off_channel_count || 0]} />
-                    </div>
-                </Card>
-            </Col>
-            <Col {...gutter}>
-                <Card hoverable >
-                    <div className={style.box}>
-                        <p>
-                            <span>本月消耗</span>
-                            <em>¥{this_month_cost ? useNumber(this_month_cost) : 0}</em>
-                        </p>
-                        <p>
-                            <span>本月新用户充值</span>
-                            <em>¥{this_month_amount ? useNumber(this_month_amount) : 0}</em>
-                        </p>
-                        <p>
-                            <span>本月回本率</span>
-                            <em>{this_month_roi ? useNumber((this_month_roi) * 100) : 0}%</em>
-                        </p>
-                        <p><em>&nbsp;</em></p>
-                        <Benyue  {...[this_month_cost || 0, this_month_amount || 0, (this_month_roi || 0) * 100]} />
-                    </div>
-                </Card>
-            </Col>
-            <Col {...gutter}>
-                <Card hoverable >
-                    <div className={style.box}>
-                        <p>
-                            <span>上月消耗</span>
-                            <em>¥{last_month_cost ? useNumber(last_month_cost) : 0}</em>
-                        </p>
-                        <p>
-                            <span>上月新用户充值</span>
-                            <em>¥{last_month_amount ? useNumber(last_month_amount) : 0}</em>
-                        </p>
-                        <p>
-                            <span>上月30日回本率</span>
-                            <em>{last_month_roi ? useNumber((last_month_roi) * 100) : 0}%</em>
-                        </p>
-                        <p>
-                            <span>上月至今回本率</span>
-                            <em>{last_month_far_roi ? useNumber((last_month_far_roi) * 100) : 0}%</em>
-                        </p>
-                        <Shangyue  {...[
-                            (last_month_roi || 0) * 100,
-                            last_month_cost || 0,
-                            (last_month_far_roi || 0) * 100,
-                            last_month_amount || 0
-                        ]} />
-                    </div>
-                </Card>
-            </Col>
-        </Row>}
-    </div>)
-}
-
-export default React.memo(DailyReport)

+ 0 - 49
src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/leiji.tsx

@@ -1,49 +0,0 @@
-import useEcharts from "@/Hook/useEcharts"
-import React from "react"
-
-function Leiji(data: number[]) {
-    data = Object.values(data).map((v: number) => v)
-    const { Echarts } = useEcharts()
-    return <>
-        <Echarts style={{ width: '100%', height: 300 }}>
-            {
-                {
-                    tooltip: {
-                        formatter: function (data: any) {
-                            return `${data.name}<br>消耗\n:\n¥${data.value[0]}<br>充值\n:\n¥${data.value[1]}<br>回本率\n:\n${data.value[2]}%`
-                        }
-                    },
-                    radar: {
-                        // shape: 'circle',
-                        name: {
-                            textStyle: {
-                                color: '#fff',
-                                backgroundColor: '#999',
-                                borderRadius: 3,
-                                padding: [3, 5]
-                            }
-                        },
-                        indicator: [
-                            { name: '消耗', max: Math.max(...data) },
-                            { name: '充值', max: Math.max(...data) },
-                            { name: '回本率', max: data[2] < 100 ? 100 : data[2] },
-
-                        ]
-                    },
-                    series: [{
-                        type: 'radar',
-                        areaStyle: {},
-                        color: 'red',
-                        data: [
-                            {
-                                value: data,
-                                name: '累计消耗/充值/回本率'
-                            },
-                        ]
-                    }]
-                }
-            }
-        </Echarts>
-    </>
-}
-export default React.memo(Leiji)

+ 0 - 49
src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/shangyue.tsx

@@ -1,49 +0,0 @@
-import useEcharts from "@/Hook/useEcharts"
-import React from "react"
-
-function Shangyue(data: number[]) {
-    data = Object.values(data).map((v: number) => v)
-    const {Echarts} = useEcharts()
-    return <>
-        <Echarts style={{ width: '100%', height: 300 }}>
-            {
-                {
-                    tooltip: {
-                        formatter: function (data: any) {
-                            return `${data.name}<br>上月消耗\n:\n¥${data.value[1]}<br>上月新用户充值\n:\n¥${data.value[3]}<br>上月30日回本率\n:\n${data.value[0]}%<br>上月至今回本率\n:\n${data.value[2]}%`
-                        }
-                    },
-                    radar: {
-                        // shape: 'circle',
-                        name: {
-                            textStyle: {
-                                color: '#fff',
-                                backgroundColor: '#999',
-                                borderRadius: 3,
-                                padding: [3, 5]
-                            }
-                        },
-                        indicator: [
-                            { name: '30日回本率', max: data[0] < 100 ? 100 : data[0] },
-                            { name: '消耗', max: Math.max(...data) },
-                            { name: '至今回本率', max: data[2] < 100 ? 100 : data[2] },
-                            { name: '充值', max: Math.max(...data) },
-                        ]
-                    },
-                    series: [{
-                        type: 'radar',
-                        areaStyle: {},
-                        color: '#4caf50',
-                        data: [
-                            {
-                                value: data,
-                                name: '上月消耗/上月充值/上月30日回本率/上月至今回本率'
-                            },
-                        ]
-                    }]
-                }
-            }
-        </Echarts>
-    </>
-}
-export default React.memo(Shangyue)

+ 0 - 49
src/pages/dataStatistics/pitcher/dataCenter/components/DailyReport/zonghaoshu.tsx

@@ -1,49 +0,0 @@
-import useEcharts from "@/Hook/useEcharts"
-import React from "react"
-
-function Zonghaoshu(data: number[]) {
-    data = Object.values(data).map((v: number) => v)
-    const { Echarts } = useEcharts()
-    return <>
-        <Echarts style={{ width: '100%', height: 300 }}>
-            {
-                {
-                    tooltip: {
-                        formatter: function (data: any) {
-                            return `${data.name}<br>总号数\n:\n${data.value[0]}<br>在投号数\n:\n${data.value[1]}<br>停投号数\n:\n${data.value[2]}`
-                        }
-                    },
-                    radar: {
-                        // shape: 'circle',
-                        name: {
-                            textStyle: {
-                                color: '#fff',
-                                backgroundColor: '#999',
-                                borderRadius: 3,
-                                padding: [3, 5]
-                            }
-                        },
-                        indicator: [
-                            { name: '总', max: data[0] },
-                            { name: '在投', max: data[0] },
-                            { name: '停投', max: data[0] },
-
-                        ]
-                    },
-                    series: [{
-                        type: 'radar',
-                        areaStyle: {},
-                        color: '#ff9800',
-                        data: [
-                            {
-                                value: data,
-                                name: '总号数/在投号数/停投号数'
-                            },
-                        ]
-                    }]
-                }
-            }
-        </Echarts>
-    </>
-}
-export default React.memo(Zonghaoshu)

+ 0 - 44
src/pages/dataStatistics/pitcher/dataCenter/index.less

@@ -1,44 +0,0 @@
-// @import '../color.less';
-.chart {
-  display: flex;
-  justify-content: space-between;
-  flex-flow: wrap wrap;
-}
-.middle {
-  tr,
-  td {
-    font-size: 14px !important;
-  }
-}
-.small {
-  tr,
-  td {
-    font-size: 13px !important;
-  }
-}
-.large {
-  tr,
-  td {
-    font-size: 14px !important;
-  }
-}
-.item_img {
-  width: 25px;
-  border-radius: 2px;
-  margin-right: 5px;
-  background-color: #efefef;
-}
-
-.gktitle{
-  width: 100%;
-  position: absolute;
-  text-align: center;
-  font-size: 16px;
-  font-weight: 500;
-  &>div{
-    position: absolute;
-    top: -45px;
-    left: 50%;
-    transform: translateX(-50%);
-  }
-}

+ 0 - 517
src/pages/dataStatistics/pitcher/dataCenter/index.tsx

@@ -1,517 +0,0 @@
-import DatePickePage from '@/components/DatePicker'
-import GroupWxTabs from '@/components/GroupWxTabs'
-import Tables from '@/components/Tables'
-import useEcharts from '@/Hook/useEcharts'
-import { FullscreenExitOutlined, FullscreenOutlined, SearchOutlined, SettingOutlined } from '@ant-design/icons'
-import { Button, Card, Col, Drawer, Input, InputNumber, Row, Select, Space, Tooltip, Transfer } from 'antd'
-import { RadioChangeEvent } from 'antd/lib/radio'
-import { Moment } from 'moment'
-import React, { useCallback, useEffect, useRef, useState } from 'react'
-import { useModel } from 'umi'
-import DailyReport from './components/DailyReport'
-import { dateColumns, weChatColumns } from './tableConfig'
-import style from './index.less'
-import { SelectValue } from 'antd/es/select'
-import HocError from '@/Hoc/HocError'
-import { quanpin } from '@/utils/fullScreen'
-import { TransferDirection } from 'antd/lib/transfer'
-import Sortable from 'sortablejs'
-
-
-
-const gutter = { xs: 24, sm: 24, md: 12, xl: 8 }
-function DataCenter() {
-    const { state, getOverview, dispatch, getDaily, getChanne } = useModel('useData.useDataCenter')
-    const { currentUser }: any = useModel('@@initialState', model => ({ currentUser: model.initialState?.currentUser }))
-    const { state: userState } = useModel('useOperating.useUser')
-    const { state: { groupActionWx } } = useModel('useOperating.useWxGroupList')
-    const { selectdName, isFell } = userState
-    const { state: { pitcher } } = useModel('useData.useTableData')
-    const [total, setTotal] = useState<number>(0)
-    const [size, setSize] = useState<'small' | 'middle' | 'large'>('small')
-    const [page, setPage] = useState<number>(1)
-    const [pageSize, setPageSize] = useState<number>(100)
-    const [visible, setVisible] = useState<boolean>(false)
-    const { LineData1, LineData2, LineData3, tableValue, date_range, channel, start, end, tableData, order_by, order } = state
-    const [selectedKeys, setSelectedKeys] = useState<any[]>([])
-    const [targetKeys, setTargetKeys] = useState<any[]>(localStorage?.getItem(`日期汇总`) ? JSON.parse(localStorage?.getItem(`日期汇总`) as string) : [])
-    const [sortArr, setSortArr] = useState<any[]>([])
-    const [fixedNum, setFixedNum] = useState<number | string>(localStorage.getItem(`日期汇总fixedNum`) || 1)
-    const [newColumns, setNewColumns] = useState<any[]>([])
-    const [moveArr, setMoveArr] = useState<any[]>([])
-    const [statistical, setStatistical] = useState<any>({})
-    const [tabKey, setTabKey] = useState<string>('1')
-    const [showZj, setShowZj] = useState<boolean>(false)
-    const [sortOrder, setSortOrder] = useState<{ columnKey: string, order: 'descend' | 'ascend' | undefined }>({ columnKey: '', order: undefined })
-    const { Line } = useEcharts()
-    const ref = useRef(null)
-    //获取日报数据
-    useEffect(() => {
-        let obj: any = {}
-        dispatch({ type: 'setState', params: { overview: obj } })
-        let dataQuery: any = { user_id: currentUser.userId == 1 ? userState.selectdUserId : currentUser.userId }
-        pitcher && (dataQuery['pitcher'] = pitcher)
-        getOverview.run(dataQuery).then((res: any) => {
-            let data = res?.data
-            if (data?.length > 0) {
-                Object.keys(data[0]).forEach((key: string) => {
-                    if (typeof data[0][key] === 'number') {
-                        obj[key] = parseFloat(data[0][key].toFixed(4))
-                    } else {
-                        obj[key] = data[0][key]
-                    }
-                })
-            }
-            dispatch({ type: 'setState', params: { overview: obj } })
-        })
-    }, [pitcher, userState.selectdUserId, currentUser.userId])
-    //获取tables表格数据
-    useEffect(() => {
-        tableSubmut({ current: 1, pageSize: 100 })
-    }, [pitcher, tableValue, selectdName])
-    /**图表日期选择 */
-    const lineDayChange = useCallback((vlaue: '7' | '15') => {
-        dispatch({ type: 'LineDay', params: { LineDay: vlaue } })
-        console.log(vlaue)
-    }, [])
-    /**table切换事件 */
-    const tableChange = useCallback((e: RadioChangeEvent) => {
-        setTargetKeys([])//清空选中数组
-        setMoveArr([])//清空移动数组
-        setNewColumns([])//清空渲染列表
-        dispatch({ type: 'setState', params: { tableData: [] } })//清空数据
-        let value = e.target.value
-        let name = value === '1' ? '日期汇总' : '公众号汇总'
-        setFixedNum(localStorage.getItem(`${name}fixedNum`) || 1)
-        setSort(value)//排序函数
-        dispatch({ type: 'tableChange', params: { tableValue: value } })
-        let newTargetKeys = localStorage?.getItem(`${name}`) ? JSON.parse(localStorage?.getItem(`${name}`) as string) : []
-        setTargetKeys(newTargetKeys)//读取字段配置
-        filterColumns(newTargetKeys, value)
-    }, [fixedNum, targetKeys])
-    /**table搜索事件 */
-    const tableSubmut = useCallback((pagination?: { current?: number, pageSize?: number }, filters?: any, sortData?: { column: { dataIndex: string }, order?: "ascend" | "descend", columnKey: string }) => {
-        let data = { page: pagination?.current || 1, page_size: pagination?.pageSize || 100 }
-        pitcher && (data['pitcher'] = pitcher)
-        setPageSize(pagination?.pageSize || 100)
-        setPage(pagination?.current || 1)
-        channel && (data['channel'] = channel)
-        start && (data['start'] = start)
-        end && (data['end'] = end)
-        userState.selectdUserId && (data['user_id'] = currentUser.userId == 1 ? userState.selectdUserId : currentUser.userId)
-        // date_range && (data['date_range'] = date_range);
-        sortOrder?.order && (data['order'] = sortOrder?.order === 'ascend' ? 'asc' : 'desc');
-        sortOrder?.columnKey && (data['order_by'] = sortOrder?.columnKey)
-        sortData?.order && (data['order'] = sortData?.order === 'ascend' ? 'asc' : 'desc');
-        sortData?.column?.dataIndex && (data['order_by'] = sortData?.column?.dataIndex)
-        if (sortData) { // 返回排序
-            setSortOrder({ columnKey: sortData.columnKey, order: sortData?.order })
-        }
-        let ajax = tableValue === '1' ? getDaily : getChanne
-        ajax.run(data).then((res: any) => {
-            let data: any = res?.data
-            setStatistical(res?.total_data)
-            if (tableValue === '1') {
-                let LineData1 = [{ legendName: '消耗' }]
-                let LineData2 = [{ legendName: '充值' }]
-                let LineData3 = [{ legendName: 'ROI' }]
-                let newData = data?.length > 0 ? (JSON.parse(JSON.stringify(data))).sort((a: { date: string }, b: { date: string }) => {
-                    return new Date(a.date).getTime() - new Date(b.date).getTime()
-                }) : []
-                newData?.map((item: { date: string, cost: number, first_roi: number, order_amount: number }) => {
-                    LineData1[0][item.date] = item.cost
-                    LineData2[0][item.date] = item.order_amount
-                    LineData3[0][item.date] = item.first_roi
-                })
-                dispatch({ type: 'setState', params: { LineData1, LineData2, LineData3 } })
-            }
-            dispatch({
-                type: 'setState',
-                params: {
-                    tableData: data || []
-                }
-            })
-            setTotal(res?.total)
-        })
-    }, [channel, start, end, date_range, selectdName, sortOrder, tableValue, order_by, order, userState.selectdUserId, pitcher, currentUser.userId])
-    /**tableDay事件 */
-    const tableDayChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
-        let value = e.target.value
-        dispatch({ type: 'setState', params: { date_range: value, start: '', end: '' } })
-    }, [])
-    /**tableAppid事件 */
-    const tableAppidChange = useCallback((value: SelectValue) => {
-        dispatch({ type: 'tableAppid', params: { channel: value as string } })
-    }, [])
-    /**tableDate事件 */
-    const tableDateChange = useCallback((arr: Moment[], formatString: string | string[]) => {
-        dispatch({ type: 'setState', params: { start: (formatString as string[])[0], end: (formatString as string[])[1], date_range: '' } })
-    }, [])
-    /**table字段设置 */
-    const handleChange = useCallback((nextTargetKeys: string[], direction: TransferDirection, moveKeys: string[]) => {
-        setTargetKeys(nextTargetKeys)
-        filterColumns(nextTargetKeys, tableValue as '1' | '2')
-    }, [tableValue, fixedNum])
-    const handleSelectChange = useCallback((sourceSelectedKeys: string[], targetSelectedKeys: string[]) => {
-        setSelectedKeys([...sourceSelectedKeys, ...targetSelectedKeys])
-    }, [])
-    const handleScroll = (direction: TransferDirection, e: React.SyntheticEvent<HTMLUListElement, Event>) => {
-        // console.log('direction:', direction);
-        // console.log('target:', e.target);
-    };
-    //获取排序列表
-    const setSort = useCallback((tableValue?: any) => {
-        let arr: any[] = []
-        let columns = tableValue === '1' ? dateColumns : weChatColumns
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        setSortArr(arr)
-    }, [])
-    /**首次加载 */
-    useEffect(() => {
-        setSort('1')
-        filterColumns(localStorage?.getItem(`日期汇总`) ? JSON.parse(localStorage?.getItem(`日期汇总`) as string) : [], '1')
-    }, [])
-    /** 计算新的渲染Columns*/
-    const filterColumns = (targetKeys: any[], tableValue: '1' | '2') => {
-        let arr: any[] = []
-        if (targetKeys && targetKeys.length > 0) {
-            let fixedNum: any = localStorage.getItem(`${tableValue === '1' ? '日期汇总fixedNum' : '公众号汇总fixedNum'}`) ? localStorage.getItem(`${tableValue === '1' ? '日期汇总fixedNum' : '公众号汇总fixedNum'}`) : 1
-            let columns = tableValue === '1' ? dateColumns() : weChatColumns()
-            targetKeys?.forEach((v: string, index: number) => {
-                columns?.forEach((item: any) => {
-
-                    if (item.dataIndex === v) {
-                        if (index < fixedNum) {
-                            item.fixed = true
-                        } else {
-                            item.fixed = false
-                        }
-                        arr.push(item)
-                    }
-                })
-            })
-            localStorage.setItem(`${tableValue === '1' ? '日期汇总' : '公众号汇总'}`, JSON.stringify(targetKeys))//保存至本地浏览器
-            setNewColumns(arr)
-        }
-    }
-    /**拖动排序 */
-    useEffect(() => {
-        if (visible) {
-            let ul: any = document.getElementsByClassName('ant-transfer-list-content-show-remove')[0]
-            if (ul) {
-                new Sortable(ul, {
-                    animation: 150, onEnd: () => {
-                        let arr: any = []
-                        for (let item of ul?.children) {
-                            arr.push(item.title)
-                        }
-                        setMoveArr(arr)
-                    }
-                })
-            }
-        }
-    }, [visible])
-    /**计算当前UL的顺序生成新的key表 */
-    useEffect(() => {
-        if (moveArr.length > 0) {
-            let newTargetKeys: any[] = []
-            moveArr?.forEach((t: string) => {
-                sortArr?.forEach((arr: any) => {
-                    if (t === arr?.title) {
-                        newTargetKeys.push(arr?.key)
-                    }
-                })
-            })
-            filterColumns(newTargetKeys, tableValue as '1' | '2')
-            setTargetKeys(newTargetKeys)
-        }
-    }, [moveArr, sortArr, tableValue])
-
-    const content = <Row gutter={[20, 20]} >
-        {/**日报 */}
-        <div className={style.gktitle}>
-            <div> {(pitcher ? pitcher : currentUser.userId == 1 ? selectdName : currentUser.name) + ' -- ' + '概况'} </div>
-        </div>
-        <Col span={24} >
-            {
-                state.overview && JSON.stringify(state.overview) !== '{}' ?
-                    <DailyReport {...state.overview} /> : <DailyReport {...{}} />
-            }
-        </Col>
-        {/**图表 */}
-        <Col span={24}>
-            <Row className={style.chart} gutter={[20, 20]} >
-                <Col span={24} >
-                    <Card
-                        hoverable
-                        title={(pitcher ? pitcher : currentUser.userId == 1 ? selectdName : currentUser.name) + '--' + (tabKey === '1' ? `消耗图表` : tabKey === '2' ? '充值图表' : 'ROI图表')}
-                        headStyle={{ textAlign: 'center' }}
-                        tabList={[{ key: '1', tab: '消耗图表' }, { key: '2', tab: '充值图表' }, { key: '3', tab: 'ROI图表' }]}
-                        activeTabKey={tabKey}
-                        onTabChange={(key: string) => {
-                            setTabKey(key)
-                        }}
-                        loading={getDaily?.loading}
-                    >
-                        {
-                            tabKey === '1' && <Line
-                                style={{ width: '100%', height: 300, display: 'flex', justifyContent: 'center' }}
-                                data={LineData1}
-                                areaStyle
-                                color={'#607d8b'}
-                                markPoint={[
-                                    { type: 'max', name: '最大值' },
-                                    { type: 'min', name: '最小值' }
-                                ]}
-                            />
-                        }
-                        {
-                            tabKey === '2' && <Line
-                                style={{ width: '100%', height: 300, display: 'flex', justifyContent: 'center' }}
-                                data={LineData2}
-                                areaStyle
-                                color={'#009688'}
-                                markPoint={[
-                                    { type: 'max', name: '最大值' },
-                                    { type: 'min', name: '最小值' }
-                                ]}
-                            />
-                        }
-                        {
-                            tabKey === '3' && <Line
-                                style={{ width: '100%', height: 300, display: 'flex', justifyContent: 'center' }}
-                                data={LineData3}
-                                areaStyle
-                                color={'#00bcd4'}
-                                markPoint={[
-                                    { type: 'max', name: '最大值' },
-                                    { type: 'min', name: '最小值' }
-                                ]}
-                            />
-                        }
-                    </Card>
-                </Col>
-            </Row>
-        </Col>
-        {/**table */}
-        <Col span={24} ref={ref} style={isFell ? { background: '#fff' } : {}}>
-            <Card
-                hoverable
-                title={(pitcher ? pitcher : currentUser.userId == 1 ? selectdName : currentUser.name) + '--' + (tableValue === '1' ? '日期汇总数据' : '公众号汇总数据')}
-                headStyle={{ textAlign: 'center' }}
-            >
-                <Row gutter={[0, 20]}>
-                    {/**头部搜索 */}
-                    <Col span={24}>
-                        <Row>
-                            <Col style={{ display: 'flex', justifyContent: 'space-between', width: '100%' }}>
-                                <Space>
-                                    {
-                                        tableValue === '2' && <Select
-                                            style={{ width: 150 }}
-                                            placeholder="输入搜索公众号"
-                                            onChange={tableAppidChange}
-                                            showArrow
-                                            showSearch
-                                            allowClear
-                                            value={channel}
-                                        >
-                                            {
-                                                groupActionWx?.map((list: any, eq: number) => {
-                                                    return <Select.Option key={list?.id} value={list?.nickName}>
-                                                        <img src={list?.headImg || localStorage?.bookImg} className={style.item_img} /> {list?.nickName}
-                                                    </Select.Option>
-                                                })
-                                            })
-                                        </Select>
-                                    }
-                                    <DatePickePage model='RangePicker' DatePickerChange={tableDateChange} allowClear date={start ? [start, end] : ['', '']} />
-                                    {/* <Input
-                                        style={{ width: 120 }}
-                                        onChange={tableDayChange}
-                                        allowClear
-                                        placeholder='过去N天'
-                                        value={date_range}
-                                    >
-                                    </Input> */}
-                                    <Button type='primary' onClick={() => tableSubmut()}><SearchOutlined />搜索</Button>
-                                </Space>
-                                <Space style={{ float: 'right' }}>
-                                    {/* {<Button
-                                        size='small'
-                                        type='link'
-                                        onClick={() => {
-                                            setShowZj(!showZj)
-                                        }}>
-                                        {showZj ? '隐藏总计' : '展示总计'}
-                                    </Button>} */}
-                                    <Button
-                                        size='small'
-                                        type='text'
-                                        onClick={() => {
-                                            setVisible(true)
-                                        }}>
-                                        <SettingOutlined />
-                                    </Button>
-                                    <Button
-                                        type='text'
-                                        onClick={() => {
-                                            if (ref?.current) {
-                                                quanpin(ref?.current)
-                                            }
-                                        }}>
-                                        {
-                                            <Tooltip title={!isFell ? '全屏' : '退出全屏'}>{!isFell ? <FullscreenOutlined /> : <FullscreenExitOutlined />}</Tooltip>
-                                        }
-                                    </Button>
-                                    <Drawer
-                                        title="table字段设置"
-                                        width={420}
-                                        visible={visible}
-                                        getContainer={ref?.current || false}
-                                        onClose={() => {
-                                            setVisible(false)
-                                        }}
-                                    >
-                                        <div>
-                                            <span>请输入固定列数值:</span>
-                                            <InputNumber
-                                                size="small"
-                                                min={1}
-                                                max={100000}
-                                                onChange={(v) => {
-                                                    setFixedNum(v as number)
-                                                    localStorage.setItem(`${tableValue === '1' ? '日期汇总fixedNum' : '公众号汇总fixedNum'}`, `${v}`)
-                                                    filterColumns(targetKeys, tableValue as '1' | '2')
-                                                }}
-                                                value={fixedNum}
-                                                style={{ marginBottom: 10 }}
-                                                placeholder='请输入固定列数值'
-                                            />
-                                        </div>
-                                        <Transfer
-                                            dataSource={sortArr || []}
-                                            titles={['不展示', '展示']}
-                                            showSearch
-                                            targetKeys={targetKeys || []}
-                                            selectedKeys={selectedKeys || []}
-                                            onChange={handleChange}
-                                            onSelectChange={handleSelectChange}
-                                            onScroll={handleScroll}
-                                            render={(item: any) => item?.title}
-                                            oneWay
-                                            style={{ marginBottom: 16 }}
-                                            listStyle={{
-                                                height: 'calc(100vh - 100px)',
-                                            }}
-                                        />
-                                    </Drawer>
-                                </Space>
-                            </Col>
-                        </Row>
-                    </Col>
-
-                    {/**表格 */}
-                    <Col span={24}>
-                        <div className={style[size]}>
-                            <Tables
-                                columns={newColumns?.length > 0 ? newColumns : dateColumns()}
-                                dataSource={[{ ...statistical, id: 1 }]}
-                                pagination={false}
-                                hideOnSinglePage
-                                bordered
-                                size='small'
-                                scroll={isFell ? { y: document.body.clientHeight - 300, x: 1000 } : { y: 600, x: 1000 }}
-                                className='total_table'
-                            />
-                            <Tables
-                                bordered
-                                columns={newColumns?.length > 0 ? newColumns : dateColumns({ sortOrder })}
-                                dataSource={showZj ? [{ ...statistical, id: 1 }] : tableData || []}
-                                pageSize={pageSize}
-                                current={showZj ? 1 : page}
-                                // rowClassName={(record: { color: string }) => style[record['color']]}
-                                loading={getDaily?.loading}
-                                size={size}
-                                defaultPageSize={100}
-                                total={showZj ? 1 : total}
-                                scroll={isFell ? { y: document.body.clientHeight - 280, x: 1000 } : { y: 600, x: 1000 }}
-                                onChange={tableSubmut}
-                                className='all_table'
-                            // summary={() => {
-                            //     let arr: any[] = []
-                            //     if (targetKeys.length > 0) {
-                            //         arr = targetKeys
-                            //     } else {
-                            //         dateColumns().forEach((item: any) => {
-                            //             arr.push(item.dataIndex)
-                            //         })
-                            //     }
-                            //     if (arr.length > 0 && JSON.stringify(statistical) !== '{}') {
-                            //         return <Table.Summary.Row >
-                            //             {
-                            //                 arr.map((key: string, index: number) => {
-                            //                     let str: any = ''
-                            //                     if (typeof statistical[key] === 'string') {
-                            //                         str = statistical[key]
-                            //                     }
-                            //                     if (typeof statistical[key] === 'number' && ((key as string)?.includes('roi') || (key as string)?.includes('rate'))) {
-                            //                         if (key === 'first_roi' && statistical[key] <= 8) {
-                            //                             let a = statistical[key] ? parseFloat((statistical[key] * 100).toFixed(2)) : 0
-                            //                             str = <span style={{ color: a <= 8 ? 'green' : '' }}>{a + '%'}</span>
-                            //                         } else {
-                            //                             str = statistical[key] ? `${parseFloat((statistical[key] * 100).toFixed(2))}%` : '0%'
-                            //                         }
-
-                            //                     } else if(typeof statistical[key] === 'number'){
-                            //                         str = <Statistic value={statistical[key] || 0} />
-                            //                     }
-                            //                     return <Table.Summary.Cell
-                            //                         index={index}
-                            //                         key={key}
-                            //                         align='center'
-                            //                     >{str}</Table.Summary.Cell>
-                            //                 })
-                            //             }
-                            //         </Table.Summary.Row>
-                            //     }
-                            //     return null
-                            // }}
-                            />
-                            {/* {
-                                tableValue === '2' && <Tables
-                                    bordered
-                                    columns={newColumns?.length > 0 ? newColumns : weChatColumns()}
-                                    onChange={tableSubmut}
-                                    dataSource={tableData || []}
-                                    pageSize={pageSize}
-                                    current={page}
-                                    // rowClassName={(record: { color: string }) => style[record['color']]}
-                                    loading={getDaily?.loading || getChanne?.loading}
-                                    size={size}
-                                    defaultPageSize={30}
-                                    total={total}
-                                    scroll={isFell ? { y: document.body.clientHeight - 200, x: 1000 } : { y: 600, x: 1000 }}
-                                />
-                            } */}
-                        </div>
-                    </Col>
-                </Row>
-            </Card>
-        </Col>
-    </Row>
-
-    return <>
-        <GroupWxTabs height='calc(100vh - 180px)' isUserSelect isFadminQTab>
-            {content}
-        </GroupWxTabs>
-    </>
-}
-export default HocError(DataCenter)

+ 0 - 345
src/pages/dataStatistics/pitcher/dataCenter/tableConfig.tsx

@@ -1,345 +0,0 @@
-import { Statistic, Tooltip } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-/**日期table配置 */
-function dateColumns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    const newArr: ColumnsType<any> = [
-        {
-            title: '日期',
-            dataIndex: 'date',
-            key: 'date',
-            align: 'center',
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'date' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '今日消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            sorter:true,
-            align: 'center',
-            sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '首日新用户充值',
-            dataIndex: 'first_order_amount',
-            key: 'first_order_amount',
-            align: 'center',
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'first_order_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic  value={a || 0}  />
-            },
-        },
-        {
-            title: '首日回收率',
-            dataIndex: 'first_roi',
-            key: 'first_roi',
-            align: 'center',
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'first_roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '全账号今日充值',
-            dataIndex: 'order_amount',
-            key: 'order_amount',
-            align: 'center',
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'order_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic  value={a || 0}  />
-            },
-        },
-        {
-            title: '累计新用户充值',
-            dataIndex: 'reg_amount',
-            key: 'reg_amount',
-            align: 'center',
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'reg_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic  value={a || 0}  />
-            },
-        },
-        {
-            title: '日回收率',
-            dataIndex: 'today_roi',
-            key: 'today_roi',
-            align: 'center',
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'today_roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '毛利',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'profit' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-        // {
-        //     title: '累计总消耗',
-        //     dataIndex: 'total_cost',
-        //     key: 'total_cost',
-        //     align: 'center',
-        //     sorter:true,
-        //     render: (a: number) => {
-        //         return <Statistic  value={a || 0}  />
-        //     },
-        // },
-        // {
-        //     title: '累计总充值',
-        //     dataIndex: 'total_amount',
-        //     key: 'total_amount',
-        //     align: 'center',
-        //     sorter:true,
-        //     render: (a: number) => {
-        //         return <Statistic value={a || 0}  />
-        //     },
-        // },
-        // {
-        //     title: <Tooltip title={'累计总充值-累计总消耗'}>总毛利额</Tooltip>,
-        //     dataIndex: 'total_profit',
-        //     key: 'total_profit',
-        //     align: 'center',
-        //     sorter:true,
-        //     render: (a: number) => {
-        //         return <Statistic value={a || 0}  />
-        //     },
-        // },
-        // {
-        //     title: '累计回收率',
-        //     dataIndex: 'total_roi',
-        //     key: 'total_roi',
-        //     align: 'center',
-        //     sorter:true,
-        //     render: (a: number) => {
-        //         a = a ? parseFloat((a * 100).toFixed(2)) : 0
-        //         return a + '%'
-        //     },
-        // },
-    ]
-    return newArr
-}
-
-/**公众号table配置 */
-function weChatColumns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    const newArr: ColumnsType<any> = [
-        {
-            title: '时间',
-            dataIndex: 'date',
-            key: 'date',
-            align: 'center',
-            fixed: 'left',
-            width: 90,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'date' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '公众号',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            fixed: 'left',
-            width: 70,
-        },
-        {
-            title: '期数',
-            dataIndex: 'stage',
-            key: 'stage',
-            align: 'center',
-            width: 70,
-        },
-        {
-            title: '平台',
-            dataIndex: 'platform',
-            key: 'platform',
-            align: 'center',
-            width: 70,
-        },
-        {
-            title: '主投书',
-            dataIndex: 'book',
-            key: 'book',
-            align: 'center',
-            width: 70,
-            ellipsis: true,
-        },
-        {
-            title: '今日消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '首日下单金额',
-            dataIndex: 'first_order_amount',
-            key: 'first_order_amount',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'first_order_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic  value={a || 0}  />
-            },
-        },
-        {
-            title: '首日ROI',
-            dataIndex: 'first_roi',
-            key: 'first_roi',
-            align: 'center',
-            width: 60,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'first_roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return a + '%'
-            },
-        },
-        {
-            title: '首日下单人数',
-            dataIndex: 'first_order_user',
-            key: 'first_order_user',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'first_order_user' && props?.sortOrder?.order) || undefined,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '首日下单次数',
-            dataIndex: 'first_order_count',
-            key: 'first_order_count',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'first_order_count' && props?.sortOrder?.order) || undefined,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '首日下单成本',
-            dataIndex: 'first_per_cost',
-            key: 'first_per_cost',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'first_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '浏览次数',
-            dataIndex: 'view_count',
-            key: 'view_count',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'view_count' && props?.sortOrder?.order) || undefined,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '点击次数',
-            dataIndex: 'click_count',
-            key: 'click_count',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'click_count' && props?.sortOrder?.order) || undefined,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '关注人数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'follow_user' && props?.sortOrder?.order) || undefined,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '关注率',
-            dataIndex: 'follow_rate',
-            key: 'follow_rate',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'follow_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return a + '%'
-            },
-        },
-        {
-            title: '关注成本',
-            dataIndex: 'follow_per_cost',
-            key: 'follow_per_cost',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'follow_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        // {
-        //     title: '累计消耗',
-        //     dataIndex: 'total_cost',
-        //     key: 'total_cost',
-        //     align: 'center',
-        //     width: 80,
-        //     sorter:true,
-        //     render: (a: number) => {
-        //         return <Statistic  value={a || 0}  />
-        //     },
-        // },
-        {
-            title: '回本率',
-            dataIndex: 'back_rate',
-            key: 'back_rate',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            sortOrder: (props?.sortOrder?.columnKey === 'back_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return a + '%'
-            },
-        },
-    ]
-    return newArr
-}
-
-export { weChatColumns, dateColumns }

+ 0 - 52
src/pages/dataStatistics/pitcher/overview/index.tsx

@@ -1,52 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-
-
-/**投手个人付费趋势表 */
-function Page() {
-    const { state: { dataSource }, getPitcherOverview } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //  //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isUserId
-            isDownload
-            isLoginId
-            isGroupTab={false}
-            isTableDateArr
-            isDataSelectPitcher
-            sortArr={sortArr}
-            columns={columns}
-            dataSource={data}
-            title='投手总数据'
-            scroll={{ x: 1000, y: 600 }}
-            ajax={getPitcherOverview}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 332
src/pages/dataStatistics/pitcher/overview/tableConfig.tsx

@@ -1,332 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 60,
-            fixed: 'left',
-        },
-        {
-            title: '最早消耗时间',
-            dataIndex: 'start_date',
-            key: 'start_date',
-            align: 'center',
-            width: 90,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'start_date' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '最晚消耗时间',
-            dataIndex: 'end_date',
-            key: 'end_date',
-            align: 'center',
-            width: 90,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'end_date' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '注册用户充值',
-            dataIndex: 'amount',
-            key: 'amount',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日充值',
-            dataIndex: 'first_amount',
-            key: 'first_amount',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '回收率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日回收率',
-            dataIndex: 'first_roi',
-            key: 'first_roi',
-            width: 70,
-            align: 'center',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '七日回收率',
-            dataIndex: 'roi7',
-            key: 'roi7',
-            align: 'center',
-            width: 95,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi7' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '30日回收率',
-            dataIndex: 'roi30',
-            key: 'roi30',
-            align: 'center',
-            width: 100,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi30' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '毛利额',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'profit' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '点击率',
-            dataIndex: 'click_rate',
-            key: 'click_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'click_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '关注率',
-            dataIndex: 'follow_rate',
-            key: 'follow_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '下单率',
-            dataIndex: 'order_rate',
-            key: 'order_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日下单率',
-            dataIndex: 'first_order_rate',
-            key: 'first_order_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '曝光量',
-            dataIndex: 'view_count',
-            key: 'view_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'view_count' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '点击量',
-            dataIndex: 'click_count',
-            key: 'click_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'click_count' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '关注人数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_user' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '首日充值人数',
-            dataIndex: 'first_order_user',
-            key: 'first_order_user',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '关注成本',
-            dataIndex: 'follow_cost',
-            key: 'follow_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值成本',
-            dataIndex: 'order_cost',
-            key: 'order_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日充值成本',
-            dataIndex: 'first_order_cost',
-            key: 'first_order_cost',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '客单价',
-            dataIndex: 'avg_amount',
-            key: 'avg_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'avg_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '今日充值',
-            dataIndex: 'td_amount',
-            key: 'td_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'td_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '昨日充值',
-            dataIndex: 'yd_amount',
-            key: 'yd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'yd_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '前日充值',
-            dataIndex: 'byd_amount',
-            key: 'byd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'byd_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 52
src/pages/dataStatistics/pitcher/pitcherChannel/component/advertising/index.tsx

@@ -1,52 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useEffect, useMemo } from 'react'
-import { useModel } from 'umi'
-import TableDataTab from '../../../../components/TableData/indexTab'
-import { columns } from './tableConfig'
-/**广告投放详细数据 */
-function Page() {
-    const { state: { dataSource }, getChannelOverview } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableDataTab
-            isBook
-            isQs
-            isTableDateArr
-            isZj
-            isGroupTab={false}
-            isAdmin
-            isUserId
-            isPitcher={true}
-            sortArr={sortArr}
-            columns={columns}
-            ajax={getChannelOverview}
-            title='广告投放详细数据'
-            dataSource={data}
-            scroll={{ x: 1000, y: 600 }}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 366
src/pages/dataStatistics/pitcher/pitcherChannel/component/advertising/tableConfig.tsx

@@ -1,366 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-
-function columns() {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '时间',
-            dataIndex: 'date',
-            key: 'date',
-            align: 'center',
-            width: 95,
-            fixed: 'left',
-            sorter:true
-        },
-        {
-            title: '公众号',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 70,
-            fixed: 'left',
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 50,
-            fixed: 'left',
-        },
-        {
-            title: '期数',
-            dataIndex: 'stage',
-            key: 'stage',
-            align: 'center',
-            width: 85,
-            fixed: 'left',
-        },
-        {
-            title: '主投书',
-            dataIndex: 'book',
-            key: 'book',
-            width: 90,
-            align: 'center',
-            fixed: 'left',
-            ellipsis: true
-        },
-        {
-            title: '投放位置',
-            dataIndex: 'type',
-            key: 'type',
-            width: 40,
-            align: 'center',
-            fixed: 'left',
-        },
-        {
-            title: '曝光量',
-            dataIndex: 'view_count',
-            key: 'view_count',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '点击量',
-            dataIndex: 'click_count',
-            key: 'click_count',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '点击率',
-            dataIndex: 'click_rate',
-            key: 'click_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '点击关注率',
-            dataIndex: 'click_follow_rate',
-            key: 'click_follow_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '关注次数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 100,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        // {
-        //     title: '关注率',
-        //     dataIndex: 'follow_rate',
-        //     key: 'follow_rate',
-        //     align: 'center',
-        //     width: 75,
-        //     sorter:true,
-        //     render: (a: number) => {
-        //         a = a ? parseFloat((a * 100).toFixed(2)) : 0
-        //         return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-        //     },
-        // },
-        {
-            title: '关注充值率',
-            dataIndex: 'follow_order_rate',
-            key: 'follow_order_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '关注成本',
-            dataIndex: 'follow_per_cost',
-            key: 'follow_per_cost',
-            align: 'center',
-            width: 60,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '首日新用户充值成本',
-            dataIndex: 'first_order_user_per_cost',
-            key: 'first_order_user_per_cost',
-            align: 'center',
-            width: 95,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '客单价',
-            dataIndex: 'user_per_amount',
-            key: 'user_per_amount',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '下单率',
-            dataIndex: 'order_rate',
-            key: 'order_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic  value={a || 0}  />
-            },
-        },
-        {
-            title: '新用户充值次数',
-            dataIndex: 'first_order_count',
-            key: 'first_order_count',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '新用户充值人数',
-            dataIndex: 'first_order_user',
-            key: 'first_order_user',
-            align: 'center',
-            width: 85,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '新用户充值金额',
-            dataIndex: 'first_order_amount',
-            key: 'first_order_amount',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic  value={a || 0}  />
-            },
-        },
-        {
-            title: '充值次数',
-            dataIndex: 'order_count',
-            key: 'order_count',
-            align: 'center',
-            width: 100,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 100,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '充值金额',
-            dataIndex: 'order_amount',
-            key: 'order_amount',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic  value={a || 0}  />
-            },
-        },
-        {
-            title: '老用户充值金额',
-            dataIndex: 'old_order_amount',
-            key: 'old_order_amount',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '首日客单价',
-            dataIndex: 'first_amount_per_user',
-            key: 'first_amount_per_user',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '单位关注收益',
-            dataIndex: 'amount_per_follow',
-            key: 'amount_per_follow',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '新用户充值成本',
-            dataIndex: 'first_cost_per_user',
-            key: 'first_cost_per_user',
-            align: 'center',
-            width: 85,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '新用户累计充值',
-            dataIndex: 'reg_user_amount',
-            key: 'reg_user_amount',
-            align: 'center',
-            width: 85,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '新用户充值率',
-            dataIndex: 'new_user_order_rate',
-            key: 'new_user_order_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日回收率',
-            dataIndex: 'day_roi',
-            key: 'day_roi',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '当日回收率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '复充率',
-            dataIndex: 'old_user_once_order_rate',
-            key: 'old_user_once_order_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 111
src/pages/dataStatistics/pitcher/pitcherChannel/component/testVirtualTable/index.tsx

@@ -1,111 +0,0 @@
-import React, { useState, useEffect, useRef } from 'react';
-import { VariableSizeGrid as Grid } from 'react-window';
-import ResizeObserver from 'rc-resize-observer';
-import classNames from 'classnames';
-import { Table } from 'antd';
-
-function VirtualTable(props: Parameters<typeof Table>[0]) {
-  const { columns, scroll } = props;
-
-  const [tableWidth, setTableWidth] = useState(0);
-  const widthColumnCount = columns!.filter(({ width }) => !width).length;
-  const mergedColumns = columns!.map(column => {
-    if (column.width) {
-      return column;
-    }
-
-    return {
-      ...column,
-      width: Math.floor(tableWidth / widthColumnCount),
-    };
-  });
-
-  const gridRef = useRef<any>();
-  const [connectObject] = useState<any>(() => {
-    const obj = {};
-    Object.defineProperty(obj, 'scrollLeft', {
-      get: () => null,
-      set: (scrollLeft: number) => {
-        if (gridRef.current) {
-          gridRef.current.scrollTo({ scrollLeft });
-        }
-      },
-    });
-
-    return obj;
-  });
-
-  const resetVirtualGrid = () => {
-    gridRef.current.resetAfterIndices({
-      columnIndex: 0,
-      shouldForceUpdate: false,
-    });
-  };
-
-  useEffect(() => resetVirtualGrid, [tableWidth]);
-
-  const renderVirtualList = (rawData: object[], { scrollbarSize, ref, onScroll }: any) => {
-    ref.current = connectObject;
-    const totalHeight = rawData.length * 54;
-
-    return (
-      <Grid
-        ref={gridRef}
-        className="virtual-grid"
-        columnCount={mergedColumns.length}
-        columnWidth={(index: number) => {
-          const { width } = mergedColumns[index];
-          return totalHeight > scroll!.y! && index === mergedColumns.length - 1
-            ? (width as number) - scrollbarSize - 1
-            : (width as number);
-        }}
-        height={scroll!.y as number}
-        rowCount={rawData.length}
-        rowHeight={() => 54}
-        width={tableWidth}
-        onScroll={({ scrollLeft }: { scrollLeft: number }) => {
-          onScroll({ scrollLeft });
-        }}
-      >
-        {({
-          columnIndex,
-          rowIndex,
-          style,
-        }: {
-          columnIndex: number;
-          rowIndex: number;
-          style: React.CSSProperties;
-        }) => (
-          <div
-            className={classNames('virtual-table-cell', {
-              'virtual-table-cell-last': columnIndex === mergedColumns.length - 1,
-            })}
-            style={style}
-          >
-            {(rawData[rowIndex] as any)[(mergedColumns as any)[columnIndex].dataIndex]}
-          </div>
-        )}
-      </Grid>
-    );
-  };
-
-  return (
-    <ResizeObserver
-      onResize={({ width }) => {
-        setTableWidth(width);
-      }}
-    >
-      <Table
-        {...props}
-        className="virtual-table"
-        columns={mergedColumns}
-        pagination={false}
-        components={{
-          body: renderVirtualList as any,
-        }}
-      />
-    </ResizeObserver>
-  );
-}
-
-export default VirtualTable

+ 0 - 55
src/pages/dataStatistics/pitcher/pitcherChannel/component/weChatList/index.tsx

@@ -1,55 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableDataTab from '../../../../components/TableData/indexTab'
-import { columns } from './tableConfig'
-/**公众号总数据 */
-function Page() {
-    const { state: { dataSource }, getChannelStatChannel } = useModel('useData.useTableData')
-
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-            if(typeof item.title === 'object' && typeof  item.title.props.children[0] === 'string' ){
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-
-    return <>
-        <TableDataTab
-            ajax={getChannelStatChannel}
-            isTableId
-            isLocation
-            isZj
-            isAdmin
-            isUserId
-            isDownload
-            isTableDateArr
-            columns={columns}
-            isPitcher={true}
-            isGroupTab={false}
-            sortArr={sortArr}
-            dataSource={data}
-            title='公众号总数据'
-            scroll={{ x: 1000, y: 600 }}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 207
src/pages/dataStatistics/pitcher/pitcherChannel/component/weChatList/tableConfig.tsx

@@ -1,207 +0,0 @@
-import { Statistic, Tooltip } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-import { Link } from 'umi'
-function columns() {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '公众号名称',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 75,
-            fixed: 'left',
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 50,
-            fixed: 'left',
-        },
-        {
-            title: '期数',
-            dataIndex: 'stage',
-            key: 'stage',
-            align: 'center',
-            width: 60,
-            fixed: 'left',
-        },
-        {
-            title: '状态',
-            dataIndex: 'state',
-            key: 'state',
-            align: 'center',
-            width: 40,
-        },
-        {
-            title: '投放位置',
-            dataIndex: 'location',
-            key: 'location',
-            align: 'center',
-            width: 40,
-        },
-        {
-            title: '最早消耗日期',
-            dataIndex: 'start',
-            key: 'start',
-            align: 'center',
-            width: 70,
-            sorter:true,
-        },
-        {
-            title: '最晚消耗日期',
-            dataIndex: 'end',
-            key: 'end',
-            align: 'center',
-            width: 70,
-            sorter:true,
-        },
-        {
-            title: '累计消耗',
-            dataIndex: 'total_cost',
-            key: 'total_cost',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '累计充值',
-            dataIndex: 'total_amount',
-            key: 'total_amount',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '总毛利额',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-        {
-            title: '回本率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 70,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '总关注人数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 70,
-            sorter:true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '平均关注人数成本',
-            dataIndex: 'follow_per_cost',
-            key: 'follow_per_cost',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '总充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值转化比率',
-            dataIndex: 'order_tran_rate',
-            key: 'order_tran_rate',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            render: (a: number) => {
-                return a ?  (a * 100)?.toFixed(2) + '%' : '0%'
-            }
-        },
-        {
-            title: '充值转化成本',
-            dataIndex: 'order_tran_cost',
-            key: 'order_tran_cost',
-            align: 'center',
-            width:90,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '今日充值',
-            dataIndex: 'td_amount',
-            key: 'td_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '昨日充值',
-            dataIndex: 'yd_amount',
-            key: 'yd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '前日充值',
-            dataIndex: 'byd_amount',
-            key: 'byd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '操作',
-            dataIndex: 'action',
-            key: 'action',
-            align: 'center',
-            width: 40,
-            render: (a: any, b: { channel: string }) => {
-                return <Link to={`/dataStatistics/weChat/advertising?channel=${b.channel}`}>进入</Link>
-            }
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 61
src/pages/dataStatistics/pitcher/pitcherChannel/index.tsx

@@ -1,61 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-
-
-/**投手投放号 */
-function Page() {
-    const { state: { dataSource }, getPitcherChannel } = useModel('useData.useTableData')
-
-    
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-
-
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-            if(typeof item.title === 'object' && typeof  item.title.props.children[0] === 'string' ){
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-
-  
-    return <>
-        <TableData
-            ajax={getPitcherChannel}
-            isTableId
-            isLocation
-            isZj
-            isAdmin
-            isUserId
-            isDownload
-            isDataSelectPitcher
-            isSelctAcc
-            isTableDateArr
-            columns={columns}
-            isGroupTab={false}
-            sortArr={sortArr}
-            dataSource={data}
-            title='投手投放号'
-            scroll={{ x: 1000, y: 600 }}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 222
src/pages/dataStatistics/pitcher/pitcherChannel/tableConfig.tsx

@@ -1,222 +0,0 @@
-import { Statistic, Tooltip } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import { Link } from 'umi'
-function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '公众号名称',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 75,
-            fixed: 'left',
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 50,
-            fixed: 'left',
-        },
-        {
-            title: '期数',
-            dataIndex: 'stage',
-            key: 'stage',
-            align: 'center',
-            width: 60,
-            fixed: 'left',
-        },
-        {
-            title: '状态',
-            dataIndex: 'state',
-            key: 'state',
-            align: 'center',
-            width: 40,
-        },
-        {
-            title: '投放位置',
-            dataIndex: 'location',
-            key: 'location',
-            align: 'center',
-            width: 40,
-        },
-        {
-            title: '最早消耗日期',
-            dataIndex: 'start',
-            key: 'start',
-            align: 'center',
-            width: 78,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'start' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '最晚消耗日期',
-            dataIndex: 'end',
-            key: 'end',
-            align: 'center',
-            width: 78,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'end' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '累计消耗',
-            dataIndex: 'total_cost',
-            key: 'total_cost',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'total_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '累计充值',
-            dataIndex: 'total_amount',
-            key: 'total_amount',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'total_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '总毛利额',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'profit' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-        {
-            title: '回本率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 70,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '总关注人数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 70,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '平均关注人数成本',
-            dataIndex: 'follow_per_cost',
-            key: 'follow_per_cost',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: string) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '总充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值转化比率',
-            dataIndex: 'order_tran_rate',
-            key: 'order_tran_rate',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_tran_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return a ?  (a * 100)?.toFixed(2) + '%' : '0%'
-            }
-        },
-        {
-            title: '充值转化成本',
-            dataIndex: 'order_tran_cost',
-            key: 'order_tran_cost',
-            align: 'center',
-            width:90,
-            sorter:true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_tran_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '今日充值',
-            dataIndex: 'td_amount',
-            key: 'td_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'td_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '昨日充值',
-            dataIndex: 'yd_amount',
-            key: 'yd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'yd_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '前日充值',
-            dataIndex: 'byd_amount',
-            key: 'byd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'byd_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '操作',
-            dataIndex: 'action',
-            key: 'action',
-            align: 'center',
-            width: 40,
-            render: (a: any, b: { channel: string }) => {
-                return <Link to={`/dataStatistics/weChat/advertising?channel=${b.channel}`}>进入</Link>
-            }
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 305
src/pages/dataStatistics/pitcher/pitcherChannel/tableConfigVertising.tsx

@@ -1,305 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-function columns() {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 60,
-            fixed: 'left',
-        },
-        {
-            title: '最早消耗时间',
-            dataIndex: 'start_date',
-            key: 'start_date',
-            align: 'center',
-            width: 90,
-            sorter: true,
-        },
-        {
-            title: '最晚消耗时间',
-            dataIndex: 'end_date',
-            key: 'end_date',
-            align: 'center',
-            width: 90,
-            sorter: true,
-        },
-        {
-            title: '消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '注册用户充值',
-            dataIndex: 'amount',
-            key: 'amount',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日充值',
-            dataIndex: 'first_amount',
-            key: 'first_amount',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '回收率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日回收率',
-            dataIndex: 'first_roi',
-            key: 'first_roi',
-            width: 70,
-            align: 'center',
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '七日回收率',
-            dataIndex: 'roi7',
-            key: 'roi7',
-            align: 'center',
-            width: 95,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '30日回收率',
-            dataIndex: 'roi30',
-            key: 'roi30',
-            align: 'center',
-            width: 100,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '毛利额',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '点击率',
-            dataIndex: 'click_rate',
-            key: 'click_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '关注率',
-            dataIndex: 'follow_rate',
-            key: 'follow_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '下单率',
-            dataIndex: 'order_rate',
-            key: 'order_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日下单率',
-            dataIndex: 'first_order_rate',
-            key: 'first_order_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '曝光量',
-            dataIndex: 'view_count',
-            key: 'view_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '点击量',
-            dataIndex: 'click_count',
-            key: 'click_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '关注人数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '首日充值人数',
-            dataIndex: 'first_order_user',
-            key: 'first_order_user',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '关注成本',
-            dataIndex: 'follow_cost',
-            key: 'follow_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值成本',
-            dataIndex: 'order_cost',
-            key: 'order_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日充值成本',
-            dataIndex: 'first_order_cost',
-            key: 'first_order_cost',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '客单价',
-            dataIndex: 'avg_amount',
-            key: 'avg_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '今日充值',
-            dataIndex: 'td_amount',
-            key: 'td_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '昨日充值',
-            dataIndex: 'yd_amount',
-            key: 'yd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '前日充值',
-            dataIndex: 'byd_amount',
-            key: 'byd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 41
src/pages/dataStatistics/pitcher/pitcherPay/index.less

@@ -1,41 +0,0 @@
-.dbox{
-    display: flex;
-    flex-flow: column;
-    align-items: center;
-    // padding: 10px;
-    >span{
-        display: flex;
-        justify-content: left;
-        width: 100%;
-    }
-}
-.show {
-    background: rgba(59, 116, 255, 0.08);
-    border: 1px solid rgba(59, 116, 255, 0.12);
-  }
-  .red {
-    background: rgba(255, 86, 45, 0.08);
-    border: 1px solid rgba(255, 86, 45, 0.12);
-    position: relative;
-    overflow: hidden;
-    &::before{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(146deg);
-        position: absolute;
-        top: 56%;
-        left: -10px;
-    }
-    &::after{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(-146deg);
-        position: absolute;
-        top: 44%;
-        left: -10px;
-    }
-  }

+ 0 - 53
src/pages/dataStatistics/pitcher/pitcherPay/index.tsx

@@ -1,53 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-
-
-/**投手个人付费趋势表 */
-function Page() {
-    const { state: { dataSource }, getPitcherTrend } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //  //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isUserId
-            isAdmin
-            isGroupTab={false}
-            isTableDateArr
-            isZj
-            isDataSelectPitcher
-            isCPitcher={false}
-            sortArr={sortArr}
-            columns={columns}
-            dataSource={data}
-            title='投手个人付费趋势表'
-            scroll={{ x: 1000, y: 600 }}
-            ajax={getPitcherTrend}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 272
src/pages/dataStatistics/pitcher/pitcherPay/tableConfig.tsx

@@ -1,272 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import style from './index.less'
-function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let arr: ColumnsType<any> = Array(30).fill('').map((i: string, index: number) => {
-        return {
-            title: `D${index + 1}`,
-            dataIndex: `d${index + 1}`,
-            key: `d{index + 1}`,
-            render: (a: { amount: number, roi: number, add: number, mult: number }) => {
-                if (a?.amount) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#0f538a', fontWeight: 600 }}>充:<span><Statistic value={a?.amount || 0} valueStyle={{ color: '#0f538a',fontWeight:600  }} /></span></span>
-                        <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 100
-        }
-    })
-    let newArr: ColumnsType<any> = [
-        {
-            title: '时间',
-            dataIndex: 'dt',
-            key: 'dt',
-            align: 'center',
-            width: 90,
-            fixed: 'left',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'dt' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 60,
-            fixed: 'left',
-        },
-        {
-            title: '当天消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '当天新用户总充值',
-            dataIndex: 'reg_amount',
-            key: 'reg_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'reg_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '首日新用户充值',
-            dataIndex: 'first_amount',
-            key: 'first_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '当天回本率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '毛利',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'profit' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-        {
-            title: '预期盈亏',
-            dataIndex: 'expect_profit',
-            key: 'expect_profit',
-            align: 'center',
-            width:110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'expect_profit' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-        {
-            title: '预期年收益',
-            dataIndex: 'annual_expect_profit',
-            key: 'annual_expect_profit',
-            align: 'center',
-            width:110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'annual_expect_profit' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-        {
-            title: '首日roi',
-            dataIndex: 'first_roi',
-            key: 'first_roi',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '七日ROI',
-            dataIndex: 'roi7',
-            key: 'roi7',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi7' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '当日三十天回本金额',
-            dataIndex: 'reg_amount30',
-            key: 'reg_amount30',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'reg_amount30' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '当日三十天回本率',
-            dataIndex: 'roi30',
-            key: 'roi30',
-            align: 'center',
-            width: 90,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi30' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        // {
-        //     title: '累计消耗',
-        //     dataIndex: 'cost_total',
-        //     key: 'cost_total',
-        //     align: 'center',
-        //     width: 60,
-        //     sorter: true,
-        //     render: (a: number) => {
-        //         return <Statistic value={a || 0} />
-        //     },
-        // },
-        // {
-        //     title: '累计充值',
-        //     dataIndex: 'amount_total',
-        //     key: 'amount_total',
-        //     align: 'center',
-        //     width: 60,
-        //     sorter: true,
-        //     render: (a: number) => {
-        //         return <Statistic value={a || 0} />
-        //     },
-        // },
-        // {
-        //     title: '总毛利额',
-        //     dataIndex: 'profit_total',
-        //     key: 'profit_total',
-        //     align: 'center',
-        //     width: 60,
-        //     sorter: true,
-        //     render: (a: number) => {
-        //         return <span style={a < 0 ? { color: 'red' } : {}}><Statistic value={a || 0} valueStyle={a < 0 ? { color: 'red' } : {}} /></span >
-        //     },
-        // },
-        // {
-        //     title: '总回本率',
-        //     dataIndex: 'roi_total',
-        //     key: 'roi_total',
-        //     align: 'center',
-        //     width: 60,
-        //     sorter: true,
-        //     render: (a: number) => {
-        //         return a ? (a * 100)?.toFixed(2) + '%' : '0%'
-        //     }
-        // },
-        // {
-        //     title: '个人三十天累计回本',
-        //     dataIndex: 'amount_total30',
-        //     key: 'amount_total30',
-        //     align: 'center',
-        //     width: 90,
-        //     sorter: true,
-        //     render: (a: number) => {
-        //         return <Statistic value={a || 0} />
-        //     },
-        // },
-        // {
-        //     title: '个人三十天回本率',
-        //     dataIndex: 'roi_total30',
-        //     key: 'roi_total30',
-        //     align: 'center',
-        //     width: 90,
-        //     sorter: true,
-        //     render: (a: number) => {
-        //         return a ? (a * 100)?.toFixed(2) + '%' : '0%'
-        //     }
-        // },
-        // {
-        //     title: '个人三十天总毛利额',
-        //     dataIndex: 'profit_total30',
-        //     key: 'profit_total30',
-        //     align: 'center',
-        //     width: 90,
-        //     sorter: true,
-        //     render: (a: number) => {
-        //         return <Statistic value={a || 0} />
-        //     },
-        // },
-        // {
-        //     title: '平均ROI',
-        //     dataIndex: 'roi_avg',
-        //     key: 'roi_avg',
-        //     align: 'center',
-        //     width: 70,
-        //     sorter: true,
-        //     render: (a: number) => {
-        //         return a ? (a * 100)?.toFixed(2) + '%' : '0%'
-        //     }
-        // },
-        ...arr
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 10
src/pages/dataStatistics/pitcher/recoveryQuery/index.less

@@ -1,10 +0,0 @@
-.ringRatio {
-    padding: 0 !important;
-    &>div {
-        width: 100%;
-        height: 30px;
-        line-height: 30px;
-        background-color: #ececec;
-        font-weight: 600;
-    }
-}

+ 0 - 56
src/pages/dataStatistics/pitcher/recoveryQuery/index.tsx

@@ -1,56 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-
-
-/**投手个人付费趋势表 */
-function Page() {
-    const { state: { dataSource, pitcher }, getRecoveryQuery } = useModel('useData.useTableData')
-    // 加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //  //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isUserId
-            isDownload
-            isLoginId
-            isGroupTab={false}
-            isZj
-            isDepleteDateArr
-            isOrderDateArr
-            isDataSelectPitcher
-            isPitcherId
-            sortArr={sortArr}
-            columns={columns}
-            dataSource={data}
-            title={`${pitcher || ''}投手回收查询`}
-            scroll={{ x: 1000, y: 600 }}
-            ajax={getRecoveryQuery}
-            // isSummaryHis
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 70
src/pages/dataStatistics/pitcher/recoveryQuery/tableConfig.tsx

@@ -1,70 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-import './index.less'
-function columns() {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 80,
-        },
-        {
-            title: '消耗时间',
-            dataIndex: 'cost_time',
-            key: 'cost_time',
-            align: 'center',
-            width: 160,
-            // sorter: true,
-        },
-        {
-            title: '充值时间',
-            dataIndex: 'order_time',
-            key: 'order_time',
-            align: 'center',
-            width: 90,
-            // sorter: true,
-        },
-        {
-            title: '总消耗',
-            dataIndex: `cost`,
-            key: `cost`,
-            align: 'center',
-            width: 85,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-            }
-        },
-        {
-            title: '总充值',
-            dataIndex: `amount`,
-            key: `amount`,
-            align: 'center',
-            width: 85,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-            }
-        },
-        {
-            title: '回收率',
-            dataIndex: `roi`,
-            key: `roi`,
-            width: 85,
-            align: 'center',
-            sorter: true,
-            render: (a: any) => {
-                return a === 999999999 ? <div>--</div> : a ?
-                    <div style={a >= 1 ? {  color: 'red'  } : { color: '#0f990f' }}>{(a * 100).toFixed(2) + '%'}</div>
-                    : a === 0 ?
-                        <div>0</div>
-                        : <div>--</div>
-            }
-        }
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 10
src/pages/dataStatistics/rechargeMonitor/index.less

@@ -1,10 +0,0 @@
-.ringRatio {
-    padding: 0 !important;
-    &>div {
-        width: 100%;
-        height: 30px;
-        line-height: 30px;
-        background-color: #ececec;
-        font-weight: 600;
-    }
-}

+ 0 - 60
src/pages/dataStatistics/rechargeMonitor/rechargeHis/index.tsx

@@ -1,60 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-
-
-/**充值历史 */
-function Page() {
-    const { state: { dataSource }, getRechargeHis } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //  //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isUserId
-            isDownload
-            isLoginId
-            isGroupTab={false}
-            isShowTotal={false}
-            isSelctAccTags
-            isDepleteDateArr
-            isOrderDateArr
-            isPitcherSelf
-            isDataSelectPitcher
-            isDataSelectPitcher_isDisabled
-            isPitcherId
-            sortArr={sortArr}
-            columns={columns}
-            dataSource={data}
-            title='充值历史'
-            subTitle={<span style={{fontSize: 12, color: 'red'}}>本模块数据只作为运营监控作用,不做财务对账的作用(不考虑公众号更换投手的场景)</span>}
-            scroll={{ x: 1000, y: 600 }}
-            ajax={getRechargeHis}
-            isSummaryHis
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 249
src/pages/dataStatistics/rechargeMonitor/rechargeHis/tableConfig.tsx

@@ -1,249 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-import moment from 'moment'
-import '../index.less'
-const week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
-function columns() {
-    let newArr: ColumnsType<any> = [
-        // {
-        //     title: '投手',
-        //     dataIndex: 'pitcher',
-        //     key: 'pitcher',
-        //     align: 'center',
-        //     width: 60,
-        //     fixed: 'left',
-        // },
-        {
-            title: '消耗时间(监控数据源)',
-            dataIndex: 'cost_time',
-            key: 'cost_time',
-            align: 'center',
-            width: 160,
-            // sorter: true,
-        },
-        {
-            title: '日期',
-            dataIndex: 'date',
-            key: 'date',
-            align: 'center',
-            width: 90,
-            // sorter: true,
-        },
-        {
-            title: '星期',
-            dataIndex: 'week',
-            key: 'week',
-            width: 90,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.date ? week[moment(b?.date).day()] : '--'
-            }
-        },
-        {
-            title: '10:00',
-            dataIndex: 'ten_amount',
-            key: 'ten_amount',
-            width: 90,
-            align: 'center',
-            children: [
-                {
-                    title: '充值',
-                    dataIndex: `ten_amount`,
-                    key: `ten_amount`,
-                    align: 'center',
-                    width: 85,
-                    render: (a: any) => {
-                        return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-                    }
-                },
-                {
-                    title: '环比',
-                    dataIndex: `ten_rate`,
-                    key: `ten_rate`,
-                    width: 85,
-                    align: 'center',
-                    className: 'ringRatio',
-                    render: (a: any) => {
-                        return a === 999999999 ? <div>--</div> : a ?
-                            <div style={a <= 0.25 ? { backgroundColor: '#b9e19e' } : {}}>{(a * 100).toFixed(2) + '%'}</div>
-                            : a === 0 ?
-                                <div style={a <= 0.25 ? { backgroundColor: '#b9e19e' } : {}}>0</div>
-                                : <div>--</div>
-                    }
-                },
-                {
-                    title: '回收率',
-                    dataIndex: `ten_roi`,
-                    key: `ten_roi`,
-                    width: 85,
-                    align: 'center',
-                    className: 'ringRatio',
-                    render: (a: any) => {
-                        return a === 999999999 ? <div>--</div> : a ?
-                            <div style={a >= 0.5 ? { color: '#0f990f' } : {  color: 'red'  }}>{(a * 100).toFixed(2) + '%'}</div>
-                            : a === 0 ?
-                                <div>0</div>
-                                : <div>--</div>
-                    }
-                },
-            ]
-        },
-        {
-            title: '14:00',
-            dataIndex: 'fourteen_amount',
-            key: 'fourteen_amount',
-            width: 90,
-            align: 'center',
-            children: [
-                {
-                    title: '充值',
-                    dataIndex: `fourteen_amount`,
-                    key: `fourteen_amount`,
-                    align: 'center',
-                    width: 85,
-                    render: (a: any) => {
-                        return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-                    }
-                },
-                {
-                    title: '环比',
-                    dataIndex: `fourteen_rate`,
-                    key: `fourteen_rate`,
-                    width: 85,
-                    align: 'center',
-                    className: 'ringRatio',
-                    render: (a: any) => {
-                        return a === 999999999 ? <div>--</div> : a ?
-                            <div style={a <= 0.45 ? { backgroundColor: '#b9e19e' } : {}}>{(a * 100).toFixed(2) + '%'}</div>
-                            : a === 0 ? <div style={a <= 0.45 ? { backgroundColor: '#b9e19e' } : {}}>0</div>
-                                : <div>--</div>
-                    }
-                },
-                {
-                    title: '回收率',
-                    dataIndex: `fourteen_roi`,
-                    key: `fourteen_roi`,
-                    width: 85,
-                    align: 'center',
-                    className: 'ringRatio',
-                    render: (a: any) => {
-                        return a === 999999999 ? <div>--</div> : a ?
-                            <div style={a >= 0.5 ? { color: '#0f990f' } : {  color: 'red'  }}>{(a * 100).toFixed(2) + '%'}</div>
-                            : a === 0 ?
-                                <div>0</div>
-                                : <div>--</div>
-                    }
-                },
-            ]
-        },
-        {
-            title: '17:00',
-            dataIndex: 'eighteen_amount',
-            key: 'eighteen_amount',
-            width: 90,
-            align: 'center',
-            children: [
-                {
-                    title: '充值',
-                    dataIndex: `eighteen_amount`,
-                    key: `eighteen_amount`,
-                    align: 'center',
-                    width: 85,
-                    render: (a: any) => {
-                        return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-                    }
-                },
-                {
-                    title: '环比',
-                    dataIndex: `eighteen_rate`,
-                    key: `eighteen_rate`,
-                    width: 85,
-                    align: 'center',
-                    className: 'ringRatio',
-                    render: (a: any) => {
-                        return a === 999999999 ? <div>--</div> : a ?
-                            <div style={a <= 0.6 ? { backgroundColor: '#ffbfbf' } : {}}>{a ? (a * 100).toFixed(2) + '%' : a === 0 ? 0 : '--'}</div>
-                            : a === 0 ? <div style={a <= 0.6 ? { backgroundColor: '#ffbfbf' } : {}}>0</div>
-                                : <div>--</div>
-                    }
-                },
-                {
-                    title: '回收率',
-                    dataIndex: `eighteen_roi`,
-                    key: `eighteen_roi`,
-                    width: 85,
-                    align: 'center',
-                    className: 'ringRatio',
-                    render: (a: any) => {
-                        return a === 999999999 ? <div>--</div> : a ?
-                            <div style={a >= 0.5 ? { color: '#0f990f' } : {  color: 'red'  }}>{(a * 100).toFixed(2) + '%'}</div>
-                            : a === 0 ?
-                                <div>0</div>
-                                : <div>--</div>
-                    }
-                },
-            ]
-        },
-        {
-            title: '24:00',
-            dataIndex: 'twentyfour_amount',
-            key: 'twentyfour_amount',
-            width: 90,
-            align: 'center',
-            children: [
-                {
-                    title: '充值',
-                    dataIndex: `twentyfour_amount`,
-                    key: `twentyfour_amount`,
-                    align: 'center',
-                    width: 85,
-                    render: (a: any) => {
-                        return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-                    }
-                },
-                {
-                    title: '环比',
-                    dataIndex: `twentyfour_rate`,
-                    key: `twentyfour_rate`,
-                    width: 85,
-                    align: 'center',
-                    className: 'ringRatio',
-                    render: (a: any) => {
-                        return a === 999999999 ? <div>--</div> : a ?
-                            <div style={a < 1 ? { backgroundColor: '#ffbfbf' } : {}}>{a ? (a * 100).toFixed(2) + '%' : a === 0 ? 0 : '--'}</div>
-                            : a === 0 ? <div style={a < 1 ? { backgroundColor: '#ffbfbf' } : {}}>0</div>
-                                : <div>--</div>
-                    }
-                },
-                {
-                    title: '回收率',
-                    dataIndex: `twentyfour_roi`,
-                    key: `twentyfour_roi`,
-                    width: 85,
-                    align: 'center',
-                    className: 'ringRatio',
-                    render: (a: any) => {
-                        return a === 999999999 ? <div>--</div> : a ?
-                            <div style={a >= 0.5 ? { color: '#0f990f' } : {  color: 'red'  }}>{(a * 100).toFixed(2) + '%'}</div>
-                            : a === 0 ?
-                                <div>0</div>
-                                : <div>--</div>
-                    }
-                },
-                {
-                    title: '消耗',
-                    dataIndex: `twentyfour_cost`,
-                    key: `twentyfour_cost`,
-                    align: 'center',
-                    width: 85,
-                    render: (a: any) => {
-                        return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-                    }
-                },
-            ]
-        }
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 61
src/pages/dataStatistics/rechargeMonitor/rechargeHisYear/index.tsx

@@ -1,61 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-
-/**充值历史(年) */
-function Page() {
-    const { state: { dataSource }, getRechargeHisYaer } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    // 获取排序列表 今年以前月份倒序
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.key })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.key })
-            }
-        })
-        return arr
-    }, [columns])
-    
-    return <>
-        <TableData
-            isUserId
-            // isDownload
-            isLoginId
-            isShowTotal={false}
-            isCostYear
-            isSelctAccTags
-            isGroupTab={false}
-            isOrderMonth
-            isLastReverse
-            isHideSort
-            isPitcherSelf
-            isDataSelectPitcher
-            isDataSelectPitcher_isDisabled
-            isPitcherId
-            sortArr={sortArr}
-            columns={columns}
-            dataSource={data}
-            title='充值历史(年)'
-            subTitle={<span style={{fontSize: 12, color: 'red'}}>本模块数据只作为运营监控作用,不做财务对账的作用(不考虑公众号更换投手的场景)</span>}
-            scroll={{ x: 1000, y: 600 }}
-            ajax={getRechargeHisYaer}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 160
src/pages/dataStatistics/rechargeMonitor/rechargeHisYear/tableConfig.tsx

@@ -1,160 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-import '../index.less'
-function columns() {
-
-    let arr: ColumnsType<any> = Array(12).fill('').map((i: string, index: number) => {
-        return {
-            title: `${index + 1}月(总消耗)`,
-            align: 'center',
-            key: `${index + 1}`,
-            dataIndex: `${index + 1}_ten`,
-            children: [
-                {
-                    title: '10:00',
-                    align: 'center',
-                    key: `${index + 1}_ten_01`,
-                    dataIndex: `${index + 1}_ten_01`,
-                    children: [
-                        {
-                            title: '充值',
-                            dataIndex: `${index + 1}_ten_amount`,
-                            key: `${index + 1}_ten_amount`,
-                            align: 'center',
-                            width: 85,
-                            render: (a: any) => {
-                                return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-                            }
-                        },
-                        {
-                            title: '环比',
-                            dataIndex: `${index + 1}_ten_rate`,
-                            key: `${index + 1}_ten_rate`,
-                            width: 85,
-                            align: 'center',
-                            className: 'ringRatio',
-                            render: (a: any) => {
-                                return a === 999999999 ? <div>--</div> : a ?
-                                    <div style={a <= 0.25 ? { backgroundColor: '#b9e19e' } : {}}>{(a * 100).toFixed(2) + '%'}</div>
-                                    : a === 0 ?
-                                        <div style={a <= 0.25 ? { backgroundColor: '#b9e19e' } : {}}>0</div>
-                                        : <div>--</div>
-                            }
-                        },
-                    ]
-                },
-                {
-                    title: '14:00',
-                    align: 'center',
-                    key: `${index + 1}_ten_02`,
-                    dataIndex: `${index + 1}_ten_02`,
-                    children: [
-                        {
-                            title: '充值',
-                            dataIndex: `${index + 1}_fourteen_amount`,
-                            key: `${index + 1}_fourteen_amount`,
-                            align: 'center',
-                            width: 85,
-                            render: (a: any) => {
-                                return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-                            }
-                        },
-                        {
-                            title: '环比',
-                            dataIndex: `${index + 1}_fourteen_rate`,
-                            key: `${index + 1}_fourteen_rate`,
-                            width: 85,
-                            align: 'center',
-                            className: 'ringRatio',
-                            render: (a: any) => {
-                                return a === 999999999 ? <div>--</div> : a ?
-                                    <div style={a <= 0.45 ? { backgroundColor: '#b9e19e' } : {}}>{(a * 100).toFixed(2) + '%'}</div>
-                                    : a === 0 ? <div style={a <= 0.45 ? { backgroundColor: '#b9e19e' } : {}}>0</div>
-                                        : <div>--</div>
-                            }
-                        },
-                    ]
-                },
-                {
-                    title: '17:00',
-                    align: 'center',
-                    key: `${index + 1}_ten_03`,
-                    dataIndex: `${index + 1}_ten_03`,
-                    children: [
-                        {
-                            title: '充值',
-                            dataIndex: `${index + 1}_eighteen_amount`,
-                            key: `${index + 1}_eighteen_amount`,
-                            align: 'center',
-                            width: 85,
-                            render: (a: any) => {
-                                return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-                            }
-                        },
-                        {
-                            title: '环比',
-                            dataIndex: `${index + 1}_eighteen_rate`,
-                            key: `${index + 1}_eighteen_rate`,
-                            width: 85,
-                            align: 'center',
-                            className: 'ringRatio',
-                            render: (a: any) => {
-                                return a === 999999999 ? <div>--</div> : a ?
-                                    <div style={a <= 0.6 ? { backgroundColor: '#ffbfbf' } : {}}>{a ? (a * 100).toFixed(2) + '%' : a === 0 ? 0 : '--'}</div>
-                                    : a === 0 ? <div style={a <= 0.6 ? { backgroundColor: '#ffbfbf' } : {}}>0</div>
-                                        : <div>--</div>
-                            }
-                        },
-                    ]
-                },
-                {
-                    title: '24:00',
-                    align: 'center',
-                    key: `${index + 1}_ten_04`,
-                    dataIndex: `${index + 1}_ten_04`,
-                    children: [
-                        {
-                            title: '充值',
-                            dataIndex: `${index + 1}_twentyfour_amount`,
-                            key: `${index + 1}_twentyfour_amount`,
-                            align: 'center',
-                            width: 85,
-                            render: (a: any) => {
-                                return <Statistic value={a ? (a as number).toFixed(2) : a === 0 ? 0 : '--'} />
-                            }
-                        },
-                        {
-                            title: '环比',
-                            dataIndex: `${index + 1}_twentyfour_rate`,
-                            key: `${index + 1}_twentyfour_rate`,
-                            width: 85,
-                            align: 'center',
-                            className: 'ringRatio',
-                            render: (a: any) => {
-                                return a === 999999999 ? <div>--</div> : a ?
-                                    <div style={a < 1 ? { backgroundColor: '#ffbfbf' } : {}}>{a ? (a * 100).toFixed(2) + '%' : a === 0 ? 0 : '--'}</div>
-                                    : a === 0 ? <div style={a < 1 ? { backgroundColor: '#ffbfbf' } : {}}>0</div>
-                                        : <div>--</div>
-                            }
-                        }
-                    ]
-                }
-            ]
-        }
-    })
-
-    let newArr: ColumnsType<any> = [
-        {
-            title: '充值日期',
-            dataIndex: 'time',
-            key: 'time',
-            align: 'center',
-            width: 90,
-            fixed: 'left'
-        },
-        ...arr
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 28
src/pages/dataStatistics/weChat/ChannelAnalysis/index.less

@@ -1,28 +0,0 @@
-.tabls_box {
-  border: 1px solid #efefef;
-  list-style: none;
-  width: 500px;
-  margin: 0;
-  padding: 0;
-  > li {
-    list-style: none;
-    display: flex;
-    flex-flow: row;
-    justify-content: space-between;
-    border-bottom: 1px solid #efefef;
-    &:last-child{
-        border-bottom: 0px;
-    }
-    > span,
-    b {
-      display: flex;
-      width: 50%;
-      align-items: center;
-      justify-content: center;
-      border-right: 1px solid #efefef;
-      &:last-child{
-          border-right: 0px;
-      }
-    }
-  }
-}

+ 0 - 61
src/pages/dataStatistics/weChat/ChannelAnalysis/index.tsx

@@ -1,61 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useEffect, useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-/**公众号用户充值查询 */
-function Page() {
-    const { state: { dataSource}, getChannelAnalysis, dispatch } = useModel('useData.useTableData')
-    useEffect(() => {
-        if (window.location.hash?.indexOf('?') !== -1 && window.location.hash?.indexOf('channel') !== -1) {
-            let cs = window.location.hash?.split('?')
-            let channel = cs[1]?.split('=')[1]
-            dispatch({ type: 'channel', params: { channel: decodeURI(channel) } })
-        }
-    }, [])
-
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-
-    return <>
-        <TableData
-            isTableDateArr
-            isTableDateArrSt
-            isZj
-            isGroupTab={false}
-            isAdmin
-            isUserId
-            isSelctAcc
-            // isSelctAccTags
-            sortArr={sortArr}
-            columns={columns}
-            ajax={getChannelAnalysis}
-            title='公众号用户充值查询'
-            dataSource={data}
-            scroll={{ x: 1000, y: 600 }}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 59
src/pages/dataStatistics/weChat/ChannelAnalysis/tableConfig.tsx

@@ -1,59 +0,0 @@
-import { Popover, Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import style from './index.less'
-
-function columns(props?: { getDetails?: (channel: string) => void, data?: any[], sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '公众号',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 90,
-            fixed: 'left',
-        },
-        {
-            title: '消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值',
-            dataIndex: 'amount',
-            key: 'amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number, b: any) => {
-                return <Popover
-                    placement="top"
-                    content={<ul className={style.tabls_box}>
-                        <li><b>日期</b><b>充值</b></li>
-                        {
-                            props?.data?.map((item: any, index: number) => {
-                                return <li key={index}><span>{item?.dt}</span><span><Statistic value={item?.amount || 0} /></span></li>
-                            })
-                        }
-                    </ul>} title={b?.channel}>
-                    <div onMouseOver={() => { props?.getDetails && props?.getDetails(b?.channel) }}>
-                        <Statistic value={a || 0} />
-                    </div>
-                </Popover>
-
-            },
-        },
-
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 66
src/pages/dataStatistics/weChat/advertising/index.tsx

@@ -1,66 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useEffect, useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-/**广告投放详细数据 */
-function Page() {
-    const { state: { dataSource }, getChannelOverview, dispatch } = useModel('useData.useTableData')
-    
-
-    useEffect(()=> {
-        if(window.location.hash?.indexOf('?') !== -1 && window.location.hash?.indexOf('channel') !== -1) {
-            let cs = window.location.hash?.split('?')
-            let channel = cs[1]?.split('=')[1]
-            dispatch({ type: 'channel', params: { channel: decodeURI(channel) } })
-        }
-    }, [])
-
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isBook
-            isQs
-            isTableDateArr
-            isZj
-            isDownload
-            isGroupTab={false}
-            isAdmin
-            defaultSortOrder={{ columnKey: 'cost', order: 'descend'}}
-            isUserId
-            isSelctAcc
-            isDataSelectPitcher
-            sortArr={sortArr}
-            columns={columns}
-            ajax={getChannelOverview}
-            title='广告投放详细数据'
-            dataSource={data}
-            scroll={{ x: 1000, y: 600 }}
-            className='ranking'
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 408
src/pages/dataStatistics/weChat/advertising/tableConfig.tsx

@@ -1,408 +0,0 @@
-import { Progress, Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-
-function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '时间',
-            dataIndex: 'date',
-            key: 'date',
-            align: 'center',
-            width: 95,
-            fixed: 'left',
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'date' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '公众号',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 70,
-            fixed: 'left',
-            ellipsis: true
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 50,
-            fixed: 'left',
-        },
-        {
-            title: '期数',
-            dataIndex: 'stage',
-            key: 'stage',
-            align: 'center',
-            width: 85,
-            fixed: 'left',
-        },
-        {
-            title: '主投书',
-            dataIndex: 'book',
-            key: 'book',
-            width: 90,
-            align: 'center',
-            fixed: 'left',
-            ellipsis: true
-        },
-        {
-            title: '投放位置',
-            dataIndex: 'type',
-            key: 'type',
-            width: 40,
-            align: 'center',
-            fixed: 'left',
-            ellipsis: true
-        },
-        {
-            title: '消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <div style={{ height: 25, position: 'relative' }}>
-                    <Progress
-                        strokeColor={{
-                            from: '#108ee9',
-                            to: '#87d068',
-                        }}
-                        status="active"
-                        showInfo={false}
-                        percent={a ? a / 60000 * 100 : 0}
-                    />
-                    <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0 }}><Statistic value={a || 0} valueStyle={a >= 10000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }} /></span>
-                </div>
-            },
-        },
-        {
-            title: '首日回收率',
-            dataIndex: 'day_roi',
-            key: 'day_roi',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'day_roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '当日回收率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '新用户充值金额',
-            dataIndex: 'first_order_amount',
-            key: 'first_order_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值金额',
-            dataIndex: 'order_amount',
-            key: 'order_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '首日客单价',
-            dataIndex: 'first_amount_per_user',
-            key: 'first_amount_per_user',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_amount_per_user' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 15 ? { color: '#0f990f' } : a >= 40 ? { color: 'red' } : {}}/>
-            },
-        },
-        {
-            title: '新用户累计充值',
-            dataIndex: 'reg_user_amount',
-            key: 'reg_user_amount',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'reg_user_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '复充率',
-            dataIndex: 'old_user_once_order_rate',
-            key: 'old_user_once_order_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'old_user_once_order_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '关注次数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 100,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '关注成本',
-            dataIndex: 'follow_per_cost',
-            key: 'follow_per_cost',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 15 ? { color: 'red' } : a >= 30 ? { color: '#0f990f' } : {}}/>
-            },
-        },
-        {
-            title: '客单价',
-            dataIndex: 'user_per_amount',
-            key: 'user_per_amount',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'user_per_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '曝光量',
-            dataIndex: 'view_count',
-            key: 'view_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'view_count' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '点击量',
-            dataIndex: 'click_count',
-            key: 'click_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'click_count' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '点击率',
-            dataIndex: 'click_rate',
-            key: 'click_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'click_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '点击关注率',
-            dataIndex: 'click_follow_rate',
-            key: 'click_follow_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'click_follow_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-
-        // {
-        //     title: '关注率',
-        //     dataIndex: 'follow_rate',
-        //     key: 'follow_rate',
-        //     align: 'center',
-        //     width: 75,
-        //     sorter:true,
-        //     render: (a: number) => {
-        //         a = a ? parseFloat((a * 100).toFixed(2)) : 0
-        //         return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-        //     },
-        // },
-        {
-            title: '关注充值率',
-            dataIndex: 'follow_order_rate',
-            key: 'follow_order_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'follow_order_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日新用户充值成本',
-            dataIndex: 'first_order_user_per_cost',
-            key: 'first_order_user_per_cost',
-            align: 'center',
-            width: 95,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_user_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '下单率',
-            dataIndex: 'order_rate',
-            key: 'order_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '新用户充值次数',
-            dataIndex: 'first_order_count',
-            key: 'first_order_count',
-            align: 'center',
-            width: 90,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_count' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '新用户充值人数',
-            dataIndex: 'first_order_user',
-            key: 'first_order_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值次数',
-            dataIndex: 'order_count',
-            key: 'order_count',
-            align: 'center',
-            width: 100,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_count' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 100,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '老用户充值金额',
-            dataIndex: 'old_order_amount',
-            key: 'old_order_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'old_order_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '单位关注收益',
-            dataIndex: 'amount_per_follow',
-            key: 'amount_per_follow',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'amount_per_follow' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '新用户充值成本',
-            dataIndex: 'first_cost_per_user',
-            key: 'first_cost_per_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_cost_per_user' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '新用户充值率',
-            dataIndex: 'new_user_order_rate',
-            key: 'new_user_order_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'new_user_order_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 0
src/pages/dataStatistics/weChat/osoRoi/index.less


+ 0 - 55
src/pages/dataStatistics/weChat/osoRoi/index.tsx

@@ -1,55 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-
-
-/**投手个人付费趋势表 */
-function Page() {
-    const { state: { dataSource, pitcher }, getOsoRoi } = useModel('useData.useTableData')
-    // 加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //  //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isZj
-            isUserId
-            // isDownload
-            isLoginId
-            isGroupTab={false}
-            isSelctAcc
-            isDepleteDateArr
-            isOrderDateArr
-            isDownload
-            sortArr={sortArr}
-            columns={columns}
-            dataSource={data}
-            title='公众号回收查询'
-            scroll={{ x: 1000, y: 600 }}
-            ajax={getOsoRoi}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 62
src/pages/dataStatistics/weChat/osoRoi/tableConfig.tsx

@@ -1,62 +0,0 @@
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-import './index.less'
-function columns() {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '公众号',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 100,
-            ellipsis: true
-        },
-        {
-            title: '消耗时间',
-            dataIndex: 'cost_time',
-            key: 'cost_time',
-            align: 'center',
-            width: 160,
-        },
-        {
-            title: '充值时间',
-            dataIndex: 'date',
-            key: 'date',
-            align: 'center',
-            width: 90,
-        },
-        {
-            title: '总消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            align: 'center',
-            width: 100,
-            sorter: true,
-        },
-        {
-            title: '总充值',
-            dataIndex: 'amount',
-            key: 'amount',
-            align: 'center',
-            width: 100,
-            sorter: true,
-        },
-        {
-            title: '回收率',
-            dataIndex: `roi`,
-            key: `roi`,
-            width: 85,
-            align: 'center',
-            sorter: true,
-            render: (a: any) => {
-                return a === 999999999 ? <div>--</div> : a ?
-                    <div style={a >= 1 ? {  color: 'red'  } : { color: '#0f990f' }}>{(a * 100).toFixed(2) + '%'}</div>
-                    : a === 0 ?
-                        <div>0</div>
-                        : <div>--</div>
-            }
-        }
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 41
src/pages/dataStatistics/weChat/payFans/index.less

@@ -1,41 +0,0 @@
-.dbox{
-    display: flex;
-    flex-flow: column;
-    align-items: center;
-    // padding: 10px;
-    >span{
-        display: flex;
-        justify-content: left;
-        width: 100%;
-    }
-}
-.show {
-    background: rgba(59, 116, 255, 0.08);
-    border: 1px solid rgba(59, 116, 255, 0.12);
-  }
-  .red {
-    background: rgba(255, 86, 45, 0.08);
-    border: 1px solid rgba(255, 86, 45, 0.12);
-    position: relative;
-    overflow: hidden;
-    &::before{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(146deg);
-        position: absolute;
-        top: 56%;
-        left: -10px;
-    }
-    &::after{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(-146deg);
-        position: absolute;
-        top: 44%;
-        left: -10px;
-    }
-  }

+ 0 - 52
src/pages/dataStatistics/weChat/payFans/index.tsx

@@ -1,52 +0,0 @@
-import React, { useMemo } from 'react'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-import { useModel } from 'umi'
-import HocError from '@/Hoc/HocError'
-/**公众号付费粉丝30日激活趋势 */
-function Page() {
-    const { state: { dataSource }, getChannelActive } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //  //获取排序列表
-     const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-            if(typeof item.title === 'object' && typeof  item.title.props.children[0] === 'string' ){
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isGroupTab={false}
-            isAdmin
-            isSelctAcc
-            isUserId
-            isDataSelectPitcher
-            isDataSelectPitcher_isDisabled
-            isTableDateArr
-            sortArr={sortArr}
-            columns={columns}
-            dataSource={data}
-            ajax={getChannelActive}
-            title='公众号付费粉丝30日激活趋势'
-            scroll={{x:1000,y:600}}
-            // isTdColor
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 263
src/pages/dataStatistics/weChat/payFans/tableConfig.tsx

@@ -1,263 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import style from './index.less'
-function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let arr: ColumnsType<any> = Array(30).fill('').map((i: string, index: number) => {
-        return {
-            title: `D${index + 1}`,
-            dataIndex: `d${index + 1}`,
-            key: `d${index + 1}`,
-            // className: 'table_color_bule',
-            // children: [
-            //     {
-            //         title:<span style={{ color: '#2196f3' }}>人数</span>,
-            //         dataIndex: `D${index + 1}`,
-            //         width: 50,
-            //         align:'center',
-            //         render: (a: any, b: any) => {
-            //            return <Statistic value={b[`d${index + 1}`]?.act_user || 0} valueStyle={{ color: '#2196f3' }} />
-            //         }
-            //     },
-            //     {
-            //         title:  <span style={{ color: '#311b92' }}>成本</span>,
-            //         dataIndex: `D${index + 1}`,
-            //         width: 65,
-            //         align:'center',
-            //         render: (a: any, b: any) => {
-            //           return  <Statistic value={b[`d${index + 1}`]?.act_cost_per_cost || 0} valueStyle={{ color: '#311b92' }} />
-            //         }
-            //     },
-            //     {
-            //         title: <span style={{ color: '#ff5722' }}>占比</span>,
-            //         dataIndex: `D${index + 1}`,
-            //         width: 65,
-            //         align:'center',
-            //         render: (a: any, b: any) => {
-            //           return  <span style={{ color: '#ff5722' }}>{b[`d${index + 1}`]?.act_rate ? (b[`d${index + 1}`]?.act_rate * 100)?.toFixed(2) + '%' : '0%'}</span>
-            //         }
-            //     },
-            // ],
-            // align: 'center',
-            render: (a: any, b: any) => {
-                if (b[`d${index + 1}`]?.act_user) {
-                    return <div className={`${style.dbox}`}>
-                        <span style={{ color: '#0f538a',fontWeight:600 }}>人数:<span><Statistic value={b[`d${index + 1}`]?.act_user || 0} valueStyle={{ color: '#0f538a',fontWeight:600 }} /></span></span>
-                        <span style={{ color: 'rgb(12,130,16)',fontWeight:600 }}>成本:<span><Statistic value={b[`d${index + 1}`]?.act_cost_per_cost || 0} valueStyle={{ color: '#311b92' }} /></span></span>
-                        <span style={{ color: '#ff5722',fontWeight:600 }}>占比:<span>{b[`d${index + 1}`]?.act_rate ? (b[`d${index + 1}`]?.act_rate * 100)?.toFixed(2) + '%' : ''}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width:110
-        }
-    })
-    let newArr: ColumnsType<any> = [
-        {
-            title: '时间',
-            dataIndex: 'date',
-            key: 'date',
-            align: 'center',
-            width: 95,
-            fixed: 'left',
-            //sortOrder: (props?.sortOrder?.columnKey === 'date' && props?.sortOrder?.order) || undefined,
-            sorter: true,
-        },
-        {
-            title: '公众号',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 85,
-            fixed: 'left',
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 50,
-            fixed: 'left',
-        },
-        {
-            title: '期数',
-            dataIndex: 'stage',
-            key: 'stage',
-            align: 'center',
-            width: 70,
-            fixed: 'left',
-        },
-        {
-            title: '主投书',
-            dataIndex: 'book',
-            key: 'book',
-            align: 'center',
-            width: 95,
-            fixed: 'left',
-            ellipsis:true
-        },
-        {
-            title: '当天消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            align: 'center',
-            width: 100,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic  value={a || 0} />
-            },
-        },
-        {
-            title: '当日新用户累计充值',
-            dataIndex: 'reg_amount',
-            key: 'reg_amount',
-            align: 'center',
-            width: 95,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'reg_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '回本率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '新增粉丝数',
-            dataIndex: 'new_follow_user',
-            key: 'new_follow_user',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'new_follow_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '新增粉丝成本',
-            dataIndex: 'new_follow_per_cost',
-            key: 'new_follow_per_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'new_follow_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '总充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '总充值次数',
-            dataIndex: 'order_count',
-            key: 'order_count',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_count' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值用户成本',
-            dataIndex: 'order_user_per_cost',
-            key: 'order_user_per_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_user_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic  value={a || 0} />
-            },
-        },
-        {
-            title: '七日平均激活率',
-            dataIndex: 'day7_avg_act_rate',
-            key: 'day7_avg_act_rate',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'day7_avg_act_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '七日平均激活成本',
-            dataIndex: 'day7_avg_act_per_cost',
-            key: 'day7_avg_act_per_cost',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'day7_avg_act_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic  value={a || 0} />
-            },
-        },
-        {
-            title: '30日平均激活率',
-            dataIndex: 'day30_avg_act_rate',
-            key: 'day30_avg_act_rate',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'day30_avg_act_rate' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '30日平均激活成本',
-            dataIndex: 'day30_avg_act_cost',
-            key: 'day30_avg_act_cost',
-            align: 'center',
-            width: 95,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'day30_avg_act_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic  value={a || 0} />
-            },
-        },
-        {
-            title: '总激活成本',
-            dataIndex: 'act_per_cost',
-            key: 'act_per_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'act_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        ...arr
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 41
src/pages/dataStatistics/weChat/payTrend/index.less

@@ -1,41 +0,0 @@
-.dbox{
-    display: flex;
-    flex-flow: column;
-    align-items: center;
-    // padding: 10px;
-    >span{
-        display: flex;
-        justify-content: left;
-        width: 100%;
-    }
-}
-.show {
-    background: rgba(59, 116, 255, 0.08);
-    border: 1px solid rgba(59, 116, 255, 0.12);
-  }
-  .red {
-    background: rgba(255, 86, 45, 0.08);
-    border: 1px solid rgba(255, 86, 45, 0.12);
-    position: relative;
-    overflow: hidden;
-    &::before{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(146deg);
-        position: absolute;
-        top: 56%;
-        left: -10px;
-    }
-    &::after{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(-146deg);
-        position: absolute;
-        top: 44%;
-        left: -10px;
-    }
-  }

+ 0 - 54
src/pages/dataStatistics/weChat/payTrend/index.tsx

@@ -1,54 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-function Page() {
-    const { state: { dataSource }, getChannelOrderTrend } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        let arr: any[] = []
-        if (dataSource) {
-            dataSource?.forEach((item: any, index: number) => {
-                item['id'] = index
-                arr.push(item)
-            })
-        }
-        return arr
-    }, [dataSource])
-    //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            isGroupTab={false}
-            isAdmin
-            isDownload
-            isSelctAccTags
-            isUserId
-            isDataSelectPitcher
-            isDataSelectPitcher_isDisabled
-            isTableDateArr
-            isZj
-            sortArr={sortArr}
-            ajax={getChannelOrderTrend}
-            columns={columns}
-            dataSource={data}
-            title='公众号单号付费趋势'
-            // tableTotal={tableTotal}
-            scroll={{ x: 1000, y: 600 }}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 324
src/pages/dataStatistics/weChat/payTrend/tableConfig.tsx

@@ -1,324 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import style from './index.less'
-function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let arr: ColumnsType<any> = Array(60).fill('').map((i: string, index: number) => {
-        return {
-            title: `D${index + 1}`,
-            dataIndex: `d${index + 1}`,
-            key: `d${index + 1}`,
-            render: (a: { order: number, roi: number, add: number, mult: number }) => {
-                if (a?.order) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#2196f3', fontWeight: 600 }}>充:<span><Statistic value={a?.order || 0} valueStyle={{ color: '#2196f3', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: '#311b92', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 100
-        }
-    })
-    let newArr: ColumnsType<any> = [
-        {
-            title: '时间',
-            dataIndex: 'date',
-            key: 'date',
-            align: 'center',
-            fixed: 'left',
-            width: 90,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'date' && props?.sortOrder?.order) || undefined,
-        },
-        {
-            title: '公众号',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 70,
-            fixed: 'left',
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 50,
-            fixed: 'left',
-        },
-        {
-            title: '期数',
-            dataIndex: 'stage',
-            key: 'stage',
-            align: 'center',
-            width: 50,
-            fixed: 'left',
-        },
-        {
-            title: '主投书',
-            dataIndex: 'book',
-            key: 'book',
-            width: 90,
-            align: 'center',
-            fixed: 'left',
-            ellipsis: true
-        },
-        {
-            title: '首日roi',
-            dataIndex: 'first_roi',
-            key: 'first_roi',
-            width: 70,
-            align: 'center',
-            fixed: 'left',
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '要求首日roi',
-            dataIndex: 'require_roi',
-            key: 'require_roi',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'require_roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '要求倍数',
-            dataIndex: 'require_mult',
-            key: 'require_mult',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'require_mult' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '当天消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '当日新用户累计充值',
-            dataIndex: 'reg_amount',
-            key: 'reg_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'reg_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日新用户充值',
-            dataIndex: 'first_amount',
-            key: 'first_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'first_amount' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '回本率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '预期盈亏',
-            dataIndex: 'expect_profit',
-            key: 'expect_profit',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'expect_profit' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-        {
-            title: '预期年倍数',
-            dataIndex: 'annual_mult',
-            key: 'annual_mult',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'annual_mult' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return a
-            }
-        },
-        {
-            title: '预期年收益',
-            dataIndex: 'annual_expect_profit',
-            key: 'annual_expect_profit',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'annual_expect_profit' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-        {
-            title: '毛利',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'profit' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-
-        {
-            title: '新增粉丝数',
-            dataIndex: 'new_follow_user',
-            key: 'new_follow_user',
-            align: 'center',
-            width: 90,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'new_follow_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '新增粉丝成本',
-            dataIndex: 'new_follow_per_cost',
-            key: 'new_follow_per_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'new_follow_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 90,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_user' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值次数',
-            dataIndex: 'order_count',
-            key: 'order_count',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_count' && props?.sortOrder?.order) || undefined,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值用户成本',
-            dataIndex: 'order_user_per_cost',
-            key: 'order_user_per_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            //sortOrder: (props?.sortOrder?.columnKey === 'order_user_per_cost' && props?.sortOrder?.order) || undefined,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        ...arr,
-        {
-            title: 'M3',
-            dataIndex: 'm3',
-            key: 'm3',
-            render: (a: { order: number, roi: number, add: number, mult: number }) => {
-                if (a?.order) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#2196f3', fontWeight: 600 }}>充:<span><Statistic value={a?.order || 0} valueStyle={{ color: '#2196f3', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: '#311b92', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 100
-        },
-        {
-            title: 'M4',
-            dataIndex: 'm4',
-            key: 'm4',
-            // align: 'center',
-            className: 'table_color_bule',
-            render: (a: { order: number, roi: number, add: number, mult: number }) => {
-                if (a?.order) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#2196f3', fontWeight: 600 }}>充:<span><Statistic value={a?.order || 0} valueStyle={{ color: '#2196f3', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: '#311b92', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 100,
-        },
-        {
-            title: 'M5',
-            dataIndex: 'm5',
-            key: 'm5',
-            // align: 'center',
-            className: 'table_color_bule',
-            render: (a: { order: number, roi: number, add: number, mult: number }) => {
-                if (a?.order) {
-                    return <div className={style.dbox}>
-                        <span style={{ color: '#2196f3', fontWeight: 600 }}>充:<span><Statistic value={a?.order || 0} valueStyle={{ color: '#2196f3', fontWeight: 600 }} /></span></span>
-                        <span style={{ color: '#311b92', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                        <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                    </div>
-                }
-                return '--'
-            },
-            width: 100,
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 41
src/pages/dataStatistics/weChat/payTrendCom/index.less

@@ -1,41 +0,0 @@
-.dbox{
-    display: flex;
-    flex-flow: column;
-    align-items: center;
-    // padding: 10px;
-    >span{
-        display: flex;
-        justify-content: left;
-        width: 100%;
-    }
-}
-.show {
-    background: rgba(59, 116, 255, 0.08);
-    border: 1px solid rgba(59, 116, 255, 0.12);
-  }
-  .red {
-    background: rgba(255, 86, 45, 0.08);
-    border: 1px solid rgba(255, 86, 45, 0.12);
-    position: relative;
-    overflow: hidden;
-    &::before{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(146deg);
-        position: absolute;
-        top: 56%;
-        left: -10px;
-    }
-    &::after{
-        content: '';
-        width: 121%;
-        height: 1px;
-        background: rgba(255, 86, 45, 0.1);
-        transform: rotate(-146deg);
-        position: absolute;
-        top: 44%;
-        left: -10px;
-    }
-  }

+ 0 - 88
src/pages/dataStatistics/weChat/payTrendCom/index.tsx

@@ -1,88 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import { Form, InputNumber, message, Modal } from 'antd'
-import React, { useMemo, useRef, useState } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { fcolumns } from './tableConfig'
-function Page() {
-    const { state: { dataSource }, getChannelOrderTrendPay, setPay } = useModel('useData.useTableData')
-    const [show, setShow] = useState<boolean>(false)
-    const [queryForm, setQueryForm] = useState<{ date: string, channel: string, pay: number, cost: number }>({ date: '', channel: '', pay: 0, cost: 0 })
-    const { currentUser }: any = useModel('@@initialState', model => ({ currentUser: model.initialState?.currentUser }))
-    const cRef: any = useRef(null)
-
-    const data = useMemo(() => {
-        let arr: any[] = []
-        if (dataSource) {
-            dataSource?.forEach((item: any, index: number) => {
-                item['id'] = index
-                arr.push(item)
-            })
-        }
-        return arr
-    }, [dataSource])
-    //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        fcolumns()().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [fcolumns])
-
-    // 设置赔付金
-    const editPay = (date: string, channel: string, pay: number, cost: number) => {
-        console.log(channel, pay)
-        setQueryForm({ date, channel, pay: pay || 0, cost: cost || 0 })
-        setShow(true)
-    }
-    const handleOk = () => {
-        setPay.run({ ...queryForm, pay: queryForm.pay.toString(), cost: queryForm.cost.toString(), user_id: currentUser.userId }).then((res: any) => {
-            if (res?.data) {
-                setQueryForm({ date: '', channel: '', pay: 0, cost: 0 });
-                setShow(false)
-                if(cRef.current) {
-                    cRef.current?.tableSubmut({})
-                }
-                message.success('设置成功')
-            }
-        })
-    }
-
-    return <>
-        <Modal title={`设置 ${queryForm.channel} 赔付金`} width={400} confirmLoading={setPay.loading} visible={show} onOk={handleOk} onCancel={() => { setQueryForm({ date: '', channel: '', pay: 0, cost: 0 }); setShow(false) }}>
-            <Form>
-                <Form.Item label="赔付金">
-                    <InputNumber value={queryForm.pay} style={{ width: "100%" }} onChange={(e) => { setQueryForm({ ...queryForm, pay: e }) }} />
-                </Form.Item>
-            </Form>
-        </Modal>
-        <TableData
-            ref={cRef}
-            isGroupTab={false}
-            isAdmin
-            isDownload
-            isSelctAcc
-            isUserId
-            isDataSelectPitcher
-            isDataSelectPitcher_isDisabled
-            isTableDateArr
-            isZj
-            sortArr={sortArr}
-            ajax={getChannelOrderTrendPay}
-            columns={fcolumns(editPay)}
-            dataSource={data}
-            title='公众号付费趋势(含赔付金)'
-            // tableTotal={tableTotal}
-            scroll={{ x: 1000, y: 600 }}
-        // isTdColor
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 372
src/pages/dataStatistics/weChat/payTrendCom/tableConfig.tsx

@@ -1,372 +0,0 @@
-import { EditOutlined } from '@ant-design/icons'
-import { Space, Statistic, Tooltip } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import style from './index.less'
-
-function fcolumns(editPay?: (date: string, channel: string, pay: number, cost: number) => void): any {
-    return function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-        let arr: ColumnsType<any> = Array(60).fill('').map((i: string, index: number) => {
-            return {
-                title: `D${index + 1}`,
-                dataIndex: `d${index + 1}`,
-                key: `d${index + 1}`,
-                render: (a: { order: number, roi: number, add: number, mult: number }) => {
-                    if (a?.order) {
-                        return <div className={style.dbox}>
-                            <span style={{ color: '#2196f3', fontWeight: 600 }}>充:<span><Statistic value={a?.order || 0} valueStyle={{ color: '#2196f3', fontWeight: 600 }} /></span></span>
-                            <span style={{ color: '#311b92', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                            <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                            <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                        </div>
-                    }
-                    return '--'
-                },
-                width: 100
-            }
-        })
-        let newArr: ColumnsType<any> = [
-            {
-                title: '时间',
-                dataIndex: 'date',
-                key: 'date',
-                align: 'center',
-                fixed: 'left',
-                width: 90,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'date' && props?.sortOrder?.order) || undefined,
-            },
-            {
-                title: '公众号',
-                dataIndex: 'channel',
-                key: 'channel',
-                align: 'center',
-                width: 80,
-                fixed: 'left',
-                ellipsis: {
-                    showTitle: false
-                },
-                render: (address) => (<Tooltip placement="topLeft" title={address}>
-                    {address}
-                </Tooltip>)
-            },
-            {
-                title: '投手',
-                dataIndex: 'pitcher',
-                key: 'pitcher',
-                align: 'center',
-                width: 50,
-                fixed: 'left',
-            },
-            {
-                title: '期数',
-                dataIndex: 'stage',
-                key: 'stage',
-                align: 'center',
-                width: 60,
-                fixed: 'left',
-                ellipsis: {
-                    showTitle: false
-                },
-                render: (address) => (<Tooltip placement="topLeft" title={address}>
-                    {address}
-                </Tooltip>)
-            },
-            {
-                title: '主投书',
-                dataIndex: 'book',
-                key: 'book',
-                width: 90,
-                align: 'center',
-                fixed: 'left',
-                ellipsis: {
-                    showTitle: false
-                },
-                render: (address) => (<Tooltip placement="topLeft" title={address}>
-                    {address}
-                </Tooltip>)
-            },
-            {
-                title: '首日roi',
-                dataIndex: 'first_roi',
-                key: 'first_roi',
-                width: 85,
-                align: 'center',
-                fixed: 'left',
-                render: (a: number) => {
-                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                    return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-                },
-            },
-            {
-                title: '要求首日roi',
-                dataIndex: 'require_roi',
-                key: 'require_roi',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'require_roi' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                    return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-                },
-            },
-            {
-                title: '要求倍数',
-                dataIndex: 'require_mult',
-                key: 'require_mult',
-                align: 'center',
-                width: 60,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'require_mult' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '当天消耗',
-                dataIndex: 'old_cost',
-                key: 'old_cost',
-                align: 'center',
-                width: 110,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '赔付金',
-                dataIndex: 'pay',
-                key: 'pay',
-                align: 'center',
-                width: 90,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-                render: (a: number, b: any) => {
-                    return <Space>
-                        <Statistic value={a || 0} />
-                        {b?.channel && <EditOutlined style={{color: '#1890ff', fontSize: 12}} onClick={() => { editPay && editPay(b?.date, b?.channel, a, b?.cost) }}/>}
-                    </Space>
-                }
-            },
-            {
-                title: '实际消耗',
-                dataIndex: 'cost',
-                key: 'cost',
-                align: 'center',
-                width: 110,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '当日新用户累计充值',
-                dataIndex: 'reg_amount',
-                key: 'reg_amount',
-                align: 'center',
-                width: 110,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'reg_amount' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '首日新用户充值',
-                dataIndex: 'first_amount',
-                key: 'first_amount',
-                align: 'center',
-                width: 110,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'first_amount' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                },
-            },
-            {
-                title: '回本率',
-                dataIndex: 'roi',
-                key: 'roi',
-                align: 'center',
-                width: 85,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                    return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-                },
-            },
-            {
-                title: '预期盈亏',
-                dataIndex: 'expect_profit',
-                key: 'expect_profit',
-                align: 'center',
-                width: 110,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'expect_profit' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-                }
-            },
-            {
-                title: '预期年倍数',
-                dataIndex: 'annual_mult',
-                key: 'annual_mult',
-                align: 'center',
-                width: 80,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'annual_mult' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return a
-                }
-            },
-            {
-                title: '预期年收益',
-                dataIndex: 'annual_expect_profit',
-                key: 'annual_expect_profit',
-                align: 'center',
-                width: 110,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'annual_expect_profit' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-                }
-            },
-            {
-                title: '毛利',
-                dataIndex: 'profit',
-                key: 'profit',
-                align: 'center',
-                width: 110,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'profit' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-                }
-            },
-    
-            {
-                title: '新增粉丝数',
-                dataIndex: 'new_follow_user',
-                key: 'new_follow_user',
-                align: 'center',
-                width: 90,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'new_follow_user' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '新增粉丝成本',
-                dataIndex: 'new_follow_per_cost',
-                key: 'new_follow_per_cost',
-                align: 'center',
-                width: 70,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'new_follow_per_cost' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '充值人数',
-                dataIndex: 'order_user',
-                key: 'order_user',
-                align: 'center',
-                width: 90,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'order_user' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '充值次数',
-                dataIndex: 'order_count',
-                key: 'order_count',
-                align: 'center',
-                width: 80,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'order_count' && props?.sortOrder?.order) || undefined,
-                render: (a: any) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            {
-                title: '充值用户成本',
-                dataIndex: 'order_user_per_cost',
-                key: 'order_user_per_cost',
-                align: 'center',
-                width: 70,
-                sorter: true,
-                //sortOrder: (props?.sortOrder?.columnKey === 'order_user_per_cost' && props?.sortOrder?.order) || undefined,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                }
-            },
-            ...arr,
-            {
-                title: 'M3',
-                dataIndex: 'm3',
-                key: 'm3',
-                render: (a: { order: number, roi: number, add: number, mult: number }) => {
-                    if (a?.order) {
-                        return <div className={style.dbox}>
-                            <span style={{ color: '#2196f3', fontWeight: 600 }}>充:<span><Statistic value={a?.order || 0} valueStyle={{ color: '#2196f3', fontWeight: 600 }} /></span></span>
-                            <span style={{ color: '#311b92', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                            <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                            <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                        </div>
-                    }
-                    return '--'
-                },
-                width: 100
-            },
-            {
-                title: 'M4',
-                dataIndex: 'm4',
-                key: 'm4',
-                // align: 'center',
-                className: 'table_color_bule',
-                render: (a: { order: number, roi: number, add: number, mult: number }) => {
-                    if (a?.order) {
-                        return <div className={style.dbox}>
-                            <span style={{ color: '#2196f3', fontWeight: 600 }}>充:<span><Statistic value={a?.order || 0} valueStyle={{ color: '#2196f3', fontWeight: 600 }} /></span></span>
-                            <span style={{ color: '#311b92', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                            <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                            <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                        </div>
-                    }
-                    return '--'
-                },
-                width: 100,
-            },
-            {
-                title: 'M5',
-                dataIndex: 'm5',
-                key: 'm5',
-                // align: 'center',
-                className: 'table_color_bule',
-                render: (a: { order: number, roi: number, add: number, mult: number }) => {
-                    if (a?.order) {
-                        return <div className={style.dbox}>
-                            <span style={{ color: '#2196f3', fontWeight: 600 }}>充:<span><Statistic value={a?.order || 0} valueStyle={{ color: '#2196f3', fontWeight: 600 }} /></span></span>
-                            <span style={{ color: '#311b92', fontWeight: 600 }}>增:<span>{(a?.add * 100)?.toFixed(2)}%</span></span>
-                            <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(a?.roi * 100)?.toFixed(2)}%</span></span>
-                            <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{a?.mult}</span></span>
-                        </div>
-                    }
-                    return '--'
-                },
-                width: 100,
-            },
-        ]
-        return newArr
-    }
-}
-export { fcolumns }

+ 0 - 44
src/pages/dataStatistics/weChat/sevenDay/index.less

@@ -1,44 +0,0 @@
-.column {
-  display: flex;
-  flex-flow: column;
-  align-content: center;
-
-  >span {
-    text-align: left;
-
-    span {
-      width: 50%;
-      text-align: right;
-      display: inline-block;
-    }
-  }
-}
-
-.sevenDay .ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table {
-  margin: -8px -8px -8px -6px;
-}
-
-.sumTable {
-  .ant-table-tbody>tr>td {
-    padding: 0 !important;
-  }
-}
-
-.my_progrss {
-  width: 100%;
-  position: relative;
-  .ant-progress-bg {
-    height: 15px !important;
-  }
-  .ant-progress-inner {
-    box-shadow: 0 0 0 1px #c2c2c2
-  }
-  >.content {
-    position: absolute;
-    top: 50%;
-    left: 50%;
-    transform: translate(-50%, -50%);
-    z-index: 10;
-    color: #000;
-  }
-}

+ 0 - 71
src/pages/dataStatistics/weChat/sevenDay/index.tsx

@@ -1,71 +0,0 @@
-import React, { useEffect, useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-import { expandedRowRender } from './sonTableConfig'
-import HocError from '@/Hoc/HocError'
-import './index.less'
-import moment from 'moment'
-/**公众号单号付费趋势 */
-function Page() {
-    const { state: { dataSource, start }, getChannelAgainOrderTrend, dispatch } = useModel('useData.useTableData')
-    useEffect(() => {
-        if (!start) {
-            dispatch({ type: 'tableDateArr', params: { start: moment().format('YYYY-MM-DD'), end: moment().format('YYYY-MM-DD') } })
-        }
-    }, [])
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //  //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableData
-            className='sevenDay'
-            // isTableName
-            // isTableDateArr15
-            isTableDate15
-            columns={columns}
-            isdownload
-            sortArr={sortArr}
-            dataSource={data}
-            isSelctAcc
-            isGroupTab={false}
-            isAdmin
-            title='公众号15日复充'
-            ajax={getChannelAgainOrderTrend}
-            expandedRowRender={expandedRowRender}
-            scroll={{ x: 1600, y: 600 }}
-            tooltip={
-                <span>
-                    说明:<br />
-                    回:截止该日期的累计回本率<br />
-                    增:相较前一天增长的回本率<br />
-                    平均回:每个日期的D1到Dn充值之和/每个日期的成本之和(未到达第n天的日期不计算)<br />
-                    平均增:每个日期的Dn充值之和/每个日期的成本之和(未到达第n天的日期不计算)<br />
-                    注:根据选定的日期实时计算,可能有所延迟
-                </span>
-            }
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 92
src/pages/dataStatistics/weChat/sevenDay/sonTableConfig.tsx

@@ -1,92 +0,0 @@
-import { useAddTime } from '@/Hook/useDate';
-import { FallOutlined, RiseOutlined } from '@ant-design/icons';
-import { Col, Progress, Row, Statistic, Table, } from 'antd';
-import moment from 'moment';
-import React from 'react'
-import style from './table.less'
-import './index.less'
-export const expandedRowRender = (data: any) => {
-    let columns: any = [
-        {
-            title: '15日复充数据',
-            dataIndex: 'date',
-            key: 'date',
-            align: 'center',
-            render: (a: string, b: any) => {
-                let data: any[] = b?.data || []
-                let firstData: any = {}
-                if (data?.length > 0) {
-                    firstData = data[0]
-                }
-                let col: any[] = []
-                let index = 0
-                let nowDate = moment().format('YYYY-MM-DD')
-                let end = b?.date || moment().format('YYYY-MM-DD')
-                let count = moment(nowDate).diff(end,'day')
-                if (Object.keys(firstData).length > 0) {
-                    Object.keys(firstData).map((item: any, eq: number) => {
-                        if (item !== 'user_order_count') {
-                            col.push({
-                                title: index === 0 ? b?.date : useAddTime(index, 'days', 'YYYY-MM-DD', b?.date),
-                                dataIndex: 'd' + (index + 1),
-                                key: 'd' + (index + 1),
-                                align: 'center',
-                                render: (value1: any, value2: any) => {
-                                    return <Row gutter={[10, 0]} key={eq} className={`${style.mytable_body_div} ${moment(new Date).format('YYYY-MM-DD') >= useAddTime(eq - 1, 'days', 'YYYY-MM-DD', b?.date) ? style.show : style.red}`} >
-                                        {count + 1 < eq && <div className={style.red}></div>}
-                                        <Col style={{ color: '#3f51b5', fontWeight: 600 }} span={24} ><span>原:</span>
-                                            <Statistic value={value1?.origin || 0} valueStyle={{ color: '#3f51b5', fontSize: 12, fontWeight: 600 }} />
-                                        </Col>
-                                        <Col style={{ color: '#ff9800', fontWeight: 600 }} span={24} ><span>现:</span>
-                                            <Statistic value={value1.now || 0} valueStyle={{ color: '#ff9800', fontSize: 12, fontWeight: 600 }} />
-                                        </Col>
-                                        <Col style={{ color: 'red', fontWeight: 600 }} span={24} ><span>增:</span>
-                                            <Statistic value={value1?.new || 0} valueStyle={{ color: 'red', fontSize: 12, fontWeight: 600 }} prefix={<RiseOutlined />} />
-                                        </Col>
-                                        <Col style={{ color: 'green', fontWeight: 600 }} span={24} ><span>移:</span>
-                                            <Statistic value={value1?.move || 0} valueStyle={{ color: 'green', fontSize: 12, fontWeight: 600 }} prefix={<FallOutlined />} />
-                                        </Col>
-                                        <Col style={{ color: '#000', fontWeight: 600 }} span={24} >
-                                            <div className={style.bitRate}>
-                                                <span>比:</span>
-                                                <div className="my_progrss">
-                                                    <span className='content'>{(value1?.follow_order_rate * 100)?.toFixed(2) || '0.00'}%</span>
-                                                    <Progress
-                                                        strokeColor="#82d0fa"
-                                                        showInfo={false}
-                                                        style={{ height: 25 }}
-                                                        percent={(value1?.follow_order_rate * 100) || 0}
-                                                    />
-                                                </div>
-                                            </div>
-                                        </Col>
-                                    </Row>
-                                }
-                            })
-                            index++
-                        }
-                    })
-                }
-                const columns: any = [
-                    {
-                        title: '充值次数',
-                        dataIndex: 'user_order_count',
-                        key: 'user_order_count',
-                        width: 40,
-                        align: 'center'
-                    },
-                    ...col
-                ]
-                data = data?.map((item, index: number) => {
-                    if (index === 0) {
-                        return { ...item, id: Math.random() + index + 1 }
-                    }
-                    return { ...item, id: Math.random() + index + 1 }
-                })
-                return <Table columns={columns} className="sumTable" dataSource={data} bordered pagination={false} />
-            }
-        },
-
-    ];
-    return <Table columns={columns} dataSource={[data]} pagination={false} rowKey='id' bordered />;
-};

+ 0 - 34
src/pages/dataStatistics/weChat/sevenDay/table.less

@@ -1,34 +0,0 @@
-.mytable_body_div {
-  display: flex;
-  justify-content: space-between;
-  flex-flow: row wrap;
-  padding: 5px;
-  // margin-right: 10px;
-  box-sizing: border-box;
-  margin: 0 !important;
-  position: relative;
-  >div {
-    display: flex;
-    justify-content: start;
-    font-size: 12px;
-  }
-  >.red {
-    background: rgb(255, 233, 227);
-    position: absolute;
-    top: 0;
-    left: 0;
-    bottom: 0;
-    right: 0;
-    z-index: 20;
-  }
-}
-
-.show {
-  // background: #fff;
-}
-.bitRate {
-  width: 100%;
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
-}

+ 0 - 151
src/pages/dataStatistics/weChat/sevenDay/tableConfig.tsx

@@ -1,151 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-function columns() {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '公众号',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            // width: 150,
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 80,
-        },
-        {
-            title: '期数',
-            dataIndex: 'stage',
-            key: 'stage',
-            align: 'center',
-            width: 80,
-        },
-        {
-            title: '主投书',
-            dataIndex: 'book',
-            key: 'book',
-            align: 'center',
-            ellipsis: true,
-            // width: 150,
-        },
-        {
-            title: '当天消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            align: 'center',
-            // width: 150,
-            render: (a: number) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '当日新用户累计充值',
-            dataIndex: 'reg_amount',
-            key: 'reg_amount',
-            align: 'center',
-            // width: 150,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '回本率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            // width: 150,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '新增粉丝数',
-            dataIndex: 'new_follow',
-            key: 'new_follow',
-            align: 'center',
-            // width: 150,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '新增粉丝成本',
-            dataIndex: 'new_follow_per_cost',
-            key: 'new_follow_per_cost',
-            align: 'center',
-            // width: 150,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '总充值人数',
-            dataIndex: 'reg_user',
-            key: 'reg_user',
-            align: 'center',
-            // width: 150,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '总充值次数',
-            dataIndex: 'reg_count',
-            key: 'reg_count',
-            align: 'center',
-            // width: 150,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值用户成本',
-            dataIndex: 'cost_per_user',
-            key: 'cost_per_user',
-            align: 'center',
-            // width: 150,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '平均复充比率',
-            dataIndex: 'avg_again_order_rate',
-            key: 'avg_again_order_rate',
-            align: 'center',
-            // width: 150,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '平均充值金额',
-            dataIndex: 'avg_order_amount',
-            key: 'avg_order_amount',
-            align: 'center',
-            // width: 150,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '平均充值次数',
-            dataIndex: 'order_count',
-            key: 'order_count',
-            align: 'center',
-            // width: 150,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        // ...arr
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 62
src/pages/dataStatistics/weChat/todayRanking/index.tsx

@@ -1,62 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useEffect, useMemo, useState } from 'react'
-import { useAccess, useModel } from 'umi'
-import TableData from '../../components/TableData'
-import  fcolumns  from './tableConfig'
-/**广告投放详细数据 */
-function Page() {
-    const { state: { dataSource, pitcher }, dispatch, getBookRank, getUserAjax } = useModel('useData.useTableData')
-    const access = useAccess()
-    const { currentUser }: any = useModel('@@initialState', model => ({ currentUser: model.initialState?.currentUser }))
-    const [pitcherId, setPitcherId] = useState<number>(0)
-
-    useEffect(() => {
-        if (pitcher) {
-            let pitcherData = getUserAjax?.data?.data?.find((item: { nick_name: string }) => item.nick_name === pitcher)
-            setPitcherId(pitcherData?.user_id || 0)
-        }
-    }, [pitcher])
-
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        fcolumns()().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [fcolumns])
-    return <>
-        <TableData
-            isBook
-            isTableDateArr={access['是否组长显示所有时间']}
-            isTableDateOne={!access['是否组长显示所有时间']}
-            isQs
-            isType
-            isGroupTab={false}
-            sortArr={sortArr}
-            columns={fcolumns(dispatch, pitcherId, currentUser.userId)}
-            ajax={getBookRank}
-            title='今日消耗排行榜'
-            dataSource={data}
-            scroll={{ x: 1000, y: 600 }}
-            className='ranking'
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 238
src/pages/dataStatistics/weChat/todayRanking/tableConfig.tsx

@@ -1,238 +0,0 @@
-import { message, Progress, Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import { getAccApi } from '@/services/dataStatistics/dataCenter'
-/**日期table配置 */
-function fcolumns(dispatch?: any, pitcherId?: number, userId?: number): any {
-    return function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-        const setChannel = (channel: string) => {
-            if (dispatch) {
-                getAccApi({user_id: userId, name: channel, pitcher_id: pitcherId}).then(res => {
-                    if(res && res?.data && res?.data?.length > 0) {
-                        if (res?.data?.findIndex((item: { nick_name: string }) => item?.nick_name === channel) === -1) {
-                            message.error('没有这个公众号的权限')
-                            return
-                        }
-                    } else {
-                        message.error('没有这个公众号的权限')
-                        return
-                    }
-                    dispatch({ type: 'channels', params: { channels: [decodeURI(channel)] } })
-                    window.location.href = '#/dataStatistics/weChat/payTrend'
-                })
-                // dispatch({ type: 'channel', params: { channel: decodeURI(channel) } })
-            }
-        }
-
-        const newArr: ColumnsType<any> = [
-            {
-                title: '日期',
-                dataIndex: 'date',
-                key: 'date',
-                align: 'center',
-                width: 140
-            },
-            {
-                title: '投手',
-                dataIndex: 'pitcher',
-                key: 'pitcher',
-                align: 'center',
-                width: 50
-            },
-            {
-                title: '公众号名称',
-                dataIndex: 'channel',
-                key: 'channel',
-                align: 'center',
-                width: 70,
-                render: (a: string) => {
-                    let newchannel: string = ''
-                    if (a?.length > 1) {
-                        let b = a.split('')
-                        b[1] = '*'
-                        b[2] = '*'
-                        newchannel = b.join('')
-                    }
-                    return <a onClick={() => { setChannel(a) }}>{newchannel || a}</a>
-                },
-            },
-            {
-                title: '投放位置',
-                dataIndex: 'type',
-                key: 'type',
-                align: 'center',
-                width: 40,
-            },
-            {
-                title: '期数',
-                dataIndex: 'stage',
-                key: 'stage',
-                align: 'center',
-                width: 90
-            },
-            {
-                title: '小说',
-                dataIndex: 'book',
-                key: 'book',
-                align: 'center',
-                ellipsis: true,
-                width: 70,
-                render: (str) => {
-                    return <a href={`#/dataStatistics/weChat/todayRanking?bookName=${str}`}>{str}</a>
-                }
-            },
-            {
-                title: '消耗',
-                dataIndex: 'cost',
-                key: 'cost',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'cost' && props?.sortOrder?.order) || undefined,
-                width: 80,
-                render: (a: number) => {
-                    return <div style={{ height: 25, position: 'relative' }}>
-                        <Progress
-                            strokeColor={{
-                                from: '#108ee9',
-                                to: '#87d068',
-                            }}
-                            status="active"
-                            showInfo={false}
-                            percent={a ? a / 60000 * 100 : 0}
-                        />
-                        {/* style={a >= 10000 ? { background: '#FFDEAD', display: 'block' } : {}} */}
-                        <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0 }}><Statistic value={a || 0} valueStyle={a >= 10000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }} /></span>
-                    </div>
-                },
-            },
-            {
-                title: '曝光量',
-                dataIndex: 'view_count',
-                key: 'view_count',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'view_count' && props?.sortOrder?.order) || undefined,
-                width: 70,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                },
-            },
-            {
-                title: '点击量',
-                dataIndex: 'click_count',
-                key: 'click_count',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'click_count' && props?.sortOrder?.order) || undefined,
-                width: 70,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                },
-            },
-            {
-                title: '点击率',
-                dataIndex: 'click_rate',
-                key: 'click_rate',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'click_rate' && props?.sortOrder?.order) || undefined,
-                width: 70,
-                render: (a: number) => {
-                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                    return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-                },
-            },
-            {
-                title: '千次曝光成本',
-                dataIndex: 'thousand_view_cost',
-                key: 'thousand_view_cost',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'thousand_view_cost' && props?.sortOrder?.order) || undefined,
-                width: 70,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                },
-            },
-            {
-                title: '新增付费人数',
-                dataIndex: 'reg_user',
-                key: 'reg_user',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'reg_user' && props?.sortOrder?.order) || undefined,
-                width: 70,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                },
-            },
-            {
-                title: '新用户充值次数',
-                dataIndex: 'reg_count',
-                key: 'reg_count',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'reg_count' && props?.sortOrder?.order) || undefined,
-                width: 90,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                },
-            },
-            {
-                title: '新用户首日充值',
-                dataIndex: 'first_amount',
-                key: 'first_amount',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'first_amount' && props?.sortOrder?.order) || undefined,
-                width: 90,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                },
-            },
-            {
-                title: '新用户累计充值',
-                dataIndex: 'reg_amount',
-                key: 'reg_amount',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'reg_amount' && props?.sortOrder?.order) || undefined,
-                width: 90,
-                render: (a: number) => {
-                    return <Statistic value={a || 0} />
-                },
-            },
-            {
-                title: '首日roi',
-                dataIndex: 'first_roi',
-                key: 'first_roi',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'first_roi' && props?.sortOrder?.order) || undefined,
-                width: 60,
-                render: (a: number) => {
-                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                    return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-                },
-            },
-            {
-                title: '总回本率',
-                dataIndex: 'roi',
-                key: 'roi',
-                align: 'center',
-                sorter: true,
-                // sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-                width: 60,
-                render: (a: number) => {
-                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                    return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-                },
-            },
-        ]
-        return newArr
-    }
-}
-
-
-export default fcolumns

+ 0 - 52
src/pages/dataStatistics/weChat/weChatList/component/advertising/index.tsx

@@ -1,52 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useEffect, useMemo } from 'react'
-import { useModel } from 'umi'
-import TableDataTab from '../../../../components/TableData/indexTab'
-import { columns } from './tableConfig'
-/**广告投放详细数据 */
-function Page() {
-    const { state: { dataSource }, getChannelOverview } = useModel('useData.useTableData')
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-    //获取排序列表
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-            if (typeof item.title === 'object' && typeof item.title.props.children[0] === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex, key: item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-    return <>
-        <TableDataTab
-            isBook
-            isQs
-            isTableDateArr
-            isZj
-            isGroupTab={false}
-            isAdmin
-            isUserId
-            isPitcher={true}
-            sortArr={sortArr}
-            columns={columns}
-            ajax={getChannelOverview}
-            title='广告投放详细数据'
-            dataSource={data}
-            scroll={{ x: 1000, y: 600 }}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 366
src/pages/dataStatistics/weChat/weChatList/component/advertising/tableConfig.tsx

@@ -1,366 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-
-function columns() {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '时间',
-            dataIndex: 'date',
-            key: 'date',
-            align: 'center',
-            width: 95,
-            fixed: 'left',
-            sorter:true
-        },
-        {
-            title: '公众号',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 70,
-            fixed: 'left',
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 50,
-            fixed: 'left',
-        },
-        {
-            title: '期数',
-            dataIndex: 'stage',
-            key: 'stage',
-            align: 'center',
-            width: 85,
-            fixed: 'left',
-        },
-        {
-            title: '主投书',
-            dataIndex: 'book',
-            key: 'book',
-            width: 90,
-            align: 'center',
-            fixed: 'left',
-            ellipsis: true
-        },
-        {
-            title: '投放位置',
-            dataIndex: 'type',
-            key: 'type',
-            width: 40,
-            align: 'center',
-            fixed: 'left',
-        },
-        {
-            title: '曝光量',
-            dataIndex: 'view_count',
-            key: 'view_count',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '点击量',
-            dataIndex: 'click_count',
-            key: 'click_count',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '点击率',
-            dataIndex: 'click_rate',
-            key: 'click_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '点击关注率',
-            dataIndex: 'click_follow_rate',
-            key: 'click_follow_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '关注次数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 100,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        // {
-        //     title: '关注率',
-        //     dataIndex: 'follow_rate',
-        //     key: 'follow_rate',
-        //     align: 'center',
-        //     width: 75,
-        //     sorter:true,
-        //     render: (a: number) => {
-        //         a = a ? parseFloat((a * 100).toFixed(2)) : 0
-        //         return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-        //     },
-        // },
-        {
-            title: '关注充值率',
-            dataIndex: 'follow_order_rate',
-            key: 'follow_order_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '关注成本',
-            dataIndex: 'follow_per_cost',
-            key: 'follow_per_cost',
-            align: 'center',
-            width: 60,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '首日新用户充值成本',
-            dataIndex: 'first_order_user_per_cost',
-            key: 'first_order_user_per_cost',
-            align: 'center',
-            width: 95,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '客单价',
-            dataIndex: 'user_per_amount',
-            key: 'user_per_amount',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '下单率',
-            dataIndex: 'order_rate',
-            key: 'order_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic  value={a || 0}  />
-            },
-        },
-        {
-            title: '新用户充值次数',
-            dataIndex: 'first_order_count',
-            key: 'first_order_count',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '新用户充值人数',
-            dataIndex: 'first_order_user',
-            key: 'first_order_user',
-            align: 'center',
-            width: 85,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '新用户充值金额',
-            dataIndex: 'first_order_amount',
-            key: 'first_order_amount',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic  value={a || 0}  />
-            },
-        },
-        {
-            title: '充值次数',
-            dataIndex: 'order_count',
-            key: 'order_count',
-            align: 'center',
-            width: 100,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 100,
-            sorter:true,
-            render:(a:any)=>{
-                return <Statistic  value={a || 0}  />
-            }
-        },
-        {
-            title: '充值金额',
-            dataIndex: 'order_amount',
-            key: 'order_amount',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic  value={a || 0}  />
-            },
-        },
-        {
-            title: '老用户充值金额',
-            dataIndex: 'old_order_amount',
-            key: 'old_order_amount',
-            align: 'center',
-            width: 110,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '首日客单价',
-            dataIndex: 'first_amount_per_user',
-            key: 'first_amount_per_user',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '单位关注收益',
-            dataIndex: 'amount_per_follow',
-            key: 'amount_per_follow',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '新用户充值成本',
-            dataIndex: 'first_cost_per_user',
-            key: 'first_cost_per_user',
-            align: 'center',
-            width: 85,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '新用户累计充值',
-            dataIndex: 'reg_user_amount',
-            key: 'reg_user_amount',
-            align: 'center',
-            width: 85,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0}  />
-            },
-        },
-        {
-            title: '新用户充值率',
-            dataIndex: 'new_user_order_rate',
-            key: 'new_user_order_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日回收率',
-            dataIndex: 'day_roi',
-            key: 'day_roi',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '当日回收率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '复充率',
-            dataIndex: 'old_user_once_order_rate',
-            key: 'old_user_once_order_rate',
-            align: 'center',
-            width: 75,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 111
src/pages/dataStatistics/weChat/weChatList/component/testVirtualTable/index.tsx

@@ -1,111 +0,0 @@
-import React, { useState, useEffect, useRef } from 'react';
-import { VariableSizeGrid as Grid } from 'react-window';
-import ResizeObserver from 'rc-resize-observer';
-import classNames from 'classnames';
-import { Table } from 'antd';
-
-function VirtualTable(props: Parameters<typeof Table>[0]) {
-  const { columns, scroll } = props;
-
-  const [tableWidth, setTableWidth] = useState(0);
-  const widthColumnCount = columns!.filter(({ width }) => !width).length;
-  const mergedColumns = columns!.map(column => {
-    if (column.width) {
-      return column;
-    }
-
-    return {
-      ...column,
-      width: Math.floor(tableWidth / widthColumnCount),
-    };
-  });
-
-  const gridRef = useRef<any>();
-  const [connectObject] = useState<any>(() => {
-    const obj = {};
-    Object.defineProperty(obj, 'scrollLeft', {
-      get: () => null,
-      set: (scrollLeft: number) => {
-        if (gridRef.current) {
-          gridRef.current.scrollTo({ scrollLeft });
-        }
-      },
-    });
-
-    return obj;
-  });
-
-  const resetVirtualGrid = () => {
-    gridRef.current.resetAfterIndices({
-      columnIndex: 0,
-      shouldForceUpdate: false,
-    });
-  };
-
-  useEffect(() => resetVirtualGrid, [tableWidth]);
-
-  const renderVirtualList = (rawData: object[], { scrollbarSize, ref, onScroll }: any) => {
-    ref.current = connectObject;
-    const totalHeight = rawData.length * 54;
-
-    return (
-      <Grid
-        ref={gridRef}
-        className="virtual-grid"
-        columnCount={mergedColumns.length}
-        columnWidth={(index: number) => {
-          const { width } = mergedColumns[index];
-          return totalHeight > scroll!.y! && index === mergedColumns.length - 1
-            ? (width as number) - scrollbarSize - 1
-            : (width as number);
-        }}
-        height={scroll!.y as number}
-        rowCount={rawData.length}
-        rowHeight={() => 54}
-        width={tableWidth}
-        onScroll={({ scrollLeft }: { scrollLeft: number }) => {
-          onScroll({ scrollLeft });
-        }}
-      >
-        {({
-          columnIndex,
-          rowIndex,
-          style,
-        }: {
-          columnIndex: number;
-          rowIndex: number;
-          style: React.CSSProperties;
-        }) => (
-          <div
-            className={classNames('virtual-table-cell', {
-              'virtual-table-cell-last': columnIndex === mergedColumns.length - 1,
-            })}
-            style={style}
-          >
-            {(rawData[rowIndex] as any)[(mergedColumns as any)[columnIndex].dataIndex]}
-          </div>
-        )}
-      </Grid>
-    );
-  };
-
-  return (
-    <ResizeObserver
-      onResize={({ width }) => {
-        setTableWidth(width);
-      }}
-    >
-      <Table
-        {...props}
-        className="virtual-table"
-        columns={mergedColumns}
-        pagination={false}
-        components={{
-          body: renderVirtualList as any,
-        }}
-      />
-    </ResizeObserver>
-  );
-}
-
-export default VirtualTable

+ 0 - 55
src/pages/dataStatistics/weChat/weChatList/component/weChatList/index.tsx

@@ -1,55 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableDataTab from '../../../../components/TableData/indexTab'
-import { columns } from './tableConfig'
-/**公众号总数据 */
-function Page() {
-    const { state: { dataSource }, getChannelStatChannel } = useModel('useData.useTableData')
-
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-            if(typeof item.title === 'object' && typeof  item.title.props.children[0] === 'string' ){
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-
-    return <>
-        <TableDataTab
-            ajax={getChannelStatChannel}
-            isTableId
-            isLocation
-            isZj
-            isAdmin
-            isUserId
-            isDownload
-            isTableDateArr
-            columns={columns}
-            isPitcher={true}
-            isGroupTab={false}
-            sortArr={sortArr}
-            dataSource={data}
-            title='公众号总数据'
-            scroll={{ x: 1000, y: 600 }}
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 207
src/pages/dataStatistics/weChat/weChatList/component/weChatList/tableConfig.tsx

@@ -1,207 +0,0 @@
-import { Statistic, Tooltip } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-import { Link } from 'umi'
-function columns() {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '公众号名称',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 75,
-            fixed: 'left',
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 50,
-            fixed: 'left',
-        },
-        {
-            title: '期数',
-            dataIndex: 'stage',
-            key: 'stage',
-            align: 'center',
-            width: 60,
-            fixed: 'left',
-        },
-        {
-            title: '状态',
-            dataIndex: 'state',
-            key: 'state',
-            align: 'center',
-            width: 40,
-        },
-        {
-            title: '投放位置',
-            dataIndex: 'location',
-            key: 'location',
-            align: 'center',
-            width: 40,
-        },
-        {
-            title: '最早消耗日期',
-            dataIndex: 'start',
-            key: 'start',
-            align: 'center',
-            width: 70,
-            sorter:true,
-        },
-        {
-            title: '最晚消耗日期',
-            dataIndex: 'end',
-            key: 'end',
-            align: 'center',
-            width: 70,
-            sorter:true,
-        },
-        {
-            title: '累计消耗',
-            dataIndex: 'total_cost',
-            key: 'total_cost',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '累计充值',
-            dataIndex: 'total_amount',
-            key: 'total_amount',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '总毛利额',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 80,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-        {
-            title: '回本率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 70,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '总关注人数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 70,
-            sorter:true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '平均关注人数成本',
-            dataIndex: 'follow_per_cost',
-            key: 'follow_per_cost',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '总充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值转化比率',
-            dataIndex: 'order_tran_rate',
-            key: 'order_tran_rate',
-            align: 'center',
-            width: 90,
-            sorter:true,
-            render: (a: number) => {
-                return a ?  (a * 100)?.toFixed(2) + '%' : '0%'
-            }
-        },
-        {
-            title: '充值转化成本',
-            dataIndex: 'order_tran_cost',
-            key: 'order_tran_cost',
-            align: 'center',
-            width:90,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '今日充值',
-            dataIndex: 'td_amount',
-            key: 'td_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '昨日充值',
-            dataIndex: 'yd_amount',
-            key: 'yd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '前日充值',
-            dataIndex: 'byd_amount',
-            key: 'byd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '操作',
-            dataIndex: 'action',
-            key: 'action',
-            align: 'center',
-            width: 40,
-            render: (a: any, b: { channel: string }) => {
-                return <Link to={`/dataStatistics/weChat/advertising?channel=${b.channel}`}>进入</Link>
-            }
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 58
src/pages/dataStatistics/weChat/weChatList/index.tsx

@@ -1,58 +0,0 @@
-import HocError from '@/Hoc/HocError'
-import React, { useMemo } from 'react'
-import { useModel } from 'umi'
-import TableData from '../../components/TableData'
-import { columns } from './tableConfig'
-
-/**公众号总数据 */
-function Page() {
-    const { state: { dataSource }, getChannelStatChannel } = useModel('useData.useTableData')
-    
-    //加工数据
-    const data = useMemo(() => {
-        if (dataSource) {
-            return dataSource?.map((item: any, index: number) => {
-                item['id'] = index
-                return item
-            })
-        }
-        return []
-    }, [dataSource])
-
-
-
-    const sortArr = useMemo(() => {
-        let arr: any[] = []
-        columns().map((item: any) => {
-            if (typeof item.title === 'string') {
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-            if(typeof item.title === 'object' && typeof  item.title.props.children[0] === 'string' ){
-                arr.push({ title: item.title, value: item.dataIndex ,key:item.dataIndex })
-            }
-        })
-        return arr
-    }, [columns])
-
-    return <>
-        <TableData
-            ajax={getChannelStatChannel}
-            isTableId
-            isZj
-            isAdmin
-            isUserId
-            isDownload
-            isSelctAcc
-            isTableDateArr
-            columns={columns}
-            isGroupTab={false}
-            sortArr={sortArr}
-            dataSource={data}
-            title='公众号总数据'
-            scroll={{ x: 1000, y: 600 }}
-            className='ranking'
-        />
-    </>
-}
-
-export default HocError(Page)

+ 0 - 234
src/pages/dataStatistics/weChat/weChatList/tableConfig.tsx

@@ -1,234 +0,0 @@
-import { Progress, Statistic, Tooltip } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import { SortOrder } from 'antd/lib/table/interface'
-import React from 'react'
-import { Link } from 'umi'
-function columns(props?: { sortOrder?: { columnKey: string, order: SortOrder | undefined } }) {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '公众号名称',
-            dataIndex: 'channel',
-            key: 'channel',
-            align: 'center',
-            width: 75,
-            fixed: 'left',
-        },
-        // {
-        //     title: '投手',
-        //     dataIndex: 'pitcher',
-        //     key: 'pitcher',
-        //     align: 'center',
-        //     width: 50,
-        //     fixed: 'left',
-        // },
-        // {
-        //     title: '期数',
-        //     dataIndex: 'stage',
-        //     key: 'stage',
-        //     align: 'center',
-        //     width: 60,
-        //     fixed: 'left',
-        // },
-        {
-            title: '状态',
-            dataIndex: 'state',
-            key: 'state',
-            align: 'center',
-            width: 40,
-        },
-        // {
-        //     title: '投放位置',
-        //     dataIndex: 'location',
-        //     key: 'location',
-        //     align: 'center',
-        //     width: 40,
-        // },
-        {
-            title: '最早消耗日期',
-            dataIndex: 'start',
-            key: 'start',
-            align: 'center',
-            width: 80,
-            // sortOrder: (props?.sortOrder?.columnKey === 'start' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-        },
-        {
-            title: '最晚消耗日期',
-            dataIndex: 'end',
-            key: 'end',
-            align: 'center',
-            width: 80,
-            // sortOrder: (props?.sortOrder?.columnKey === 'end' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-        },
-        {
-            title: '累计消耗',
-            dataIndex: 'total_cost',
-            key: 'total_cost',
-            align: 'center',
-            width: 100,
-            // sortOrder: (props?.sortOrder?.columnKey === 'total_cost' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-            render: (a: number) => {
-                return <div style={{ height: 25, position: 'relative' }}>
-                    <Progress
-                        strokeColor={{
-                            from: '#108ee9',
-                            to: '#87d068',
-                        }}
-                        status="active"
-                        showInfo={false}
-                        percent={a ? a / 60000 : 0}
-                    />
-                    <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0 }}><Statistic value={a || 0} valueStyle={a >= 10000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }} /></span>
-                </div>
-            },
-        },
-        {
-            title: '累计充值',
-            dataIndex: 'total_amount',
-            key: 'total_amount',
-            align: 'center',
-            width: 115,
-            // sortOrder: (props?.sortOrder?.columnKey === 'total_amount' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '总毛利额',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 100,
-            // sortOrder: (props?.sortOrder?.columnKey === 'profit' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} valueStyle={a < 0 ? { color: '#0f990f', fontWeight: 600 } : {}} />
-            }
-        },
-        {
-            title: '回本率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 85,
-            // sortOrder: (props?.sortOrder?.columnKey === 'roi' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '总关注人数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 70,
-            // sortOrder: (props?.sortOrder?.columnKey === 'follow_user' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '平均关注人数成本',
-            dataIndex: 'follow_per_cost',
-            key: 'follow_per_cost',
-            align: 'center',
-            width: 90,
-            // sortOrder: (props?.sortOrder?.columnKey === 'follow_per_cost' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '总充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 90,
-            // sortOrder: (props?.sortOrder?.columnKey === 'order_user' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '充值转化比率',
-            dataIndex: 'order_tran_rate',
-            key: 'order_tran_rate',
-            align: 'center',
-            width: 90,
-            // sortOrder: (props?.sortOrder?.columnKey === 'order_tran_rate' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-            render: (a: number) => {
-                return a ?  (a * 100)?.toFixed(2) + '%' : '0%'
-            }
-        },
-        {
-            title: '充值转化成本',
-            dataIndex: 'order_tran_cost',
-            key: 'order_tran_cost',
-            align: 'center',
-            width:90,
-            // sortOrder: (props?.sortOrder?.columnKey === 'order_tran_cost' && props?.sortOrder?.order) || undefined,
-            sorter:true,
-            render: (a: string) => {
-                return <Statistic  value={a || 0} />
-            }
-        },
-        {
-            title: '今日充值',
-            dataIndex: 'td_amount',
-            key: 'td_amount',
-            align: 'center',
-            width: 110,
-            // sortOrder: (props?.sortOrder?.columnKey === 'td_amount' && props?.sortOrder?.order) || undefined,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '昨日充值',
-            dataIndex: 'yd_amount',
-            key: 'yd_amount',
-            align: 'center',
-            width: 110,
-            // sortOrder: (props?.sortOrder?.columnKey === 'yd_amount' && props?.sortOrder?.order) || undefined,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '前日充值',
-            dataIndex: 'byd_amount',
-            key: 'byd_amount',
-            align: 'center',
-            width: 110,
-            // sortOrder: (props?.sortOrder?.columnKey === 'byd_amount' && props?.sortOrder?.order) || undefined,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '操作',
-            dataIndex: 'action',
-            key: 'action',
-            align: 'center',
-            fixed: 'right',
-            width: 40,
-            render: (a: any, b: { channel: string }) => {
-                return <Link to={`/dataStatistics/weChat/advertising?channel=${b.channel}`}>进入</Link>
-            }
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 305
src/pages/dataStatistics/weChat/weChatList/tableConfigVertising.tsx

@@ -1,305 +0,0 @@
-import { Statistic } from 'antd'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-function columns() {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '投手',
-            dataIndex: 'pitcher',
-            key: 'pitcher',
-            align: 'center',
-            width: 60,
-            fixed: 'left',
-        },
-        {
-            title: '最早消耗时间',
-            dataIndex: 'start_date',
-            key: 'start_date',
-            align: 'center',
-            width: 90,
-            sorter: true,
-        },
-        {
-            title: '最晚消耗时间',
-            dataIndex: 'end_date',
-            key: 'end_date',
-            align: 'center',
-            width: 90,
-            sorter: true,
-        },
-        {
-            title: '消耗',
-            dataIndex: 'cost',
-            key: 'cost',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '注册用户充值',
-            dataIndex: 'amount',
-            key: 'amount',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日充值',
-            dataIndex: 'first_amount',
-            key: 'first_amount',
-            width: 110,
-            align: 'center',
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '回收率',
-            dataIndex: 'roi',
-            key: 'roi',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日回收率',
-            dataIndex: 'first_roi',
-            key: 'first_roi',
-            width: 70,
-            align: 'center',
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '七日回收率',
-            dataIndex: 'roi7',
-            key: 'roi7',
-            align: 'center',
-            width: 95,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '30日回收率',
-            dataIndex: 'roi30',
-            key: 'roi30',
-            align: 'center',
-            width: 100,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '毛利额',
-            dataIndex: 'profit',
-            key: 'profit',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '点击率',
-            dataIndex: 'click_rate',
-            key: 'click_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '关注率',
-            dataIndex: 'follow_rate',
-            key: 'follow_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '下单率',
-            dataIndex: 'order_rate',
-            key: 'order_rate',
-            align: 'center',
-            width: 60,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '首日下单率',
-            dataIndex: 'first_order_rate',
-            key: 'first_order_rate',
-            align: 'center',
-            width: 75,
-            sorter: true,
-            render: (a: number) => {
-                a = a ? parseFloat((a * 100).toFixed(2)) : 0
-                return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
-            },
-        },
-        {
-            title: '曝光量',
-            dataIndex: 'view_count',
-            key: 'view_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '点击量',
-            dataIndex: 'click_count',
-            key: 'click_count',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '关注人数',
-            dataIndex: 'follow_user',
-            key: 'follow_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值人数',
-            dataIndex: 'order_user',
-            key: 'order_user',
-            align: 'center',
-            width: 85,
-            sorter: true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '首日充值人数',
-            dataIndex: 'first_order_user',
-            key: 'first_order_user',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '关注成本',
-            dataIndex: 'follow_cost',
-            key: 'follow_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            render: (a: number) => {
-                return <Statistic value={a || 0} />
-            },
-        },
-        {
-            title: '充值成本',
-            dataIndex: 'order_cost',
-            key: 'order_cost',
-            align: 'center',
-            width: 70,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '首日充值成本',
-            dataIndex: 'first_order_cost',
-            key: 'first_order_cost',
-            align: 'center',
-            width: 80,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '客单价',
-            dataIndex: 'avg_amount',
-            key: 'avg_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '今日充值',
-            dataIndex: 'td_amount',
-            key: 'td_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '昨日充值',
-            dataIndex: 'yd_amount',
-            key: 'yd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-        {
-            title: '前日充值',
-            dataIndex: 'byd_amount',
-            key: 'byd_amount',
-            align: 'center',
-            width: 110,
-            sorter: true,
-            render: (a: any) => {
-                return <Statistic value={a || 0} />
-            }
-        },
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 50
src/pages/launchSystem/adMonitor/adMonitorList/components/box.tsx

@@ -1,50 +0,0 @@
-import { Popover, Space } from 'antd'
-import React, { useMemo } from 'react'
-
-function Box(props: { b: any }) {
-    const { b } = props
-    let el = useMemo(() => {
-        if (b?.imagePreviewUrl?.length > 0 || b?.videoKeyFrameImageUrl) {//图片存在? 或者视频首针图存在?
-            return <div className='imagesConfig'>
-                <Popover placement='right' content={
-                    <div>
-                        {b?.title && <div style={{ maxWidth: 300 }}><strong style={{ fontSize: 15 }}>标题:</strong>{b?.title}</div>}
-                        <Space style={{ maxWidth: 300, display: 'flex',  flexFlow: 'row wrap',margin:'10px 0' }}>
-                            {
-                                b?.imagePreviewUrl?.length > 0 ? b?.imagePreviewUrl?.map((img: string | undefined) => {
-                                    return <img src={img} key={img} width={b?.imagePreviewUrl?.length === 1 ? 200 : b?.imagePreviewUrl?.length === 3 ? 70 : b?.imagePreviewUrl?.length === 4 ? 100 : 70} />
-                                }) : <img src={b?.videoKeyFrameImageUrl} width={200} />
-                            }
-                        </Space>
-                        {b?.description && <small style={{ fontSize: 10, maxWidth: 300, display: 'inline-block' }}><strong style={{ fontSize: 13 }}>描述:</strong>{b?.description}</small>}
-                    </div>
-                }>
-                    <img src={b?.imagePreviewUrl ?  b?.imagePreviewUrl[0] : b?.videoKeyFrameImageUrl} width={24} />
-                </Popover>
-            </div>
-        } else if (b?.videoPreviewUrl) {//视频存在?
-            return <Popover placement='right' content={
-                <div>
-                    {b?.title && <div style={{ maxWidth: 300 }}><strong style={{ fontSize: 15 }}>标题:</strong>{b?.title}</div>}
-                    <video src='https://img-baofun.zhhainiao.com/pcwallpaper_ugc/preview/b946235d4e4f078cdfe5099736e1dbc8_preview.mp4' style={{ maxWidth: 300 }} controls />
-                    {b?.description && <small style={{ fontSize: 10, maxWidth: 300, display: 'inline-block' }}><strong style={{ fontSize: 13 }}>描述:</strong>{b?.description}</small>}
-                </div>
-            }>
-                <video src='https://img-baofun.zhhainiao.com/pcwallpaper_ugc/preview/b946235d4e4f078cdfe5099736e1dbc8_preview.mp4' style={{ width: 24 }} />
-            </Popover>
-        } else {
-            return <Popover placement='right' content={
-                <div>
-                     {b?.title && <div style={{ maxWidth: 300 }}><strong style={{ fontSize: 15 }}>标题:</strong>{b?.title}</div>}
-                    {b?.description && <small style={{ fontSize: 10, maxWidth: 300, display: 'inline-block' }}><strong style={{ fontSize: 13 }}>描述:</strong>{b?.description}</small>}
-                </div>
-            }>
-                <div style={{width:'100%',height:'100%'}}>
-                    --
-                </div>
-            </Popover>
-        }
-    }, [b])
-    return el
-}
-export default React.memo(Box)

+ 0 - 179
src/pages/launchSystem/adMonitor/adMonitorList/components/planDetail.tsx

@@ -1,179 +0,0 @@
-import Tables from "@/components/Tables";
-import useEcharts from "@/Hook/useEcharts";
-import { CloudDownloadOutlined, RedoOutlined } from "@ant-design/icons";
-import { Button, Card, DatePicker, Modal, Radio, Space, Spin, Statistic, Tag } from "antd";
-import moment, { Moment } from "moment";
-import React, { useCallback, useEffect, useState } from "react";
-import { useModel } from "umi";
-import columns from './tableConfig'
-import { compare } from '@/utils/utils'
-import { formatDate, downloadFile1 } from '@/utils/downloadFile'
-import { downLoadSpeedApi } from '@/services/launch/adMonitor'
-
-type Props = {
-    visible?: boolean,
-    onClose?: () => void,
-    adId?: any,
-    dataStartTime?: string
-    dataEndTime?: string
-}
-
-function PlanDetail(props: Props) {
-    const { adId, pitcherId, mpAppId } = props.adId
-    const { getCostSpeed } = useModel('useLaunch.useMonitor')
-
-    /** 变量start */
-    const { visible, onClose, dataStartTime, dataEndTime } = props
-    const { LineMonitor } = useEcharts()
-    const [lineDis, setLineDis] = useState<any[]>([])
-    const [queryForm, setQueryForm] = useState<any>({ adId, mpAppIds: mpAppId, pitcherIds: pitcherId, timeUnit: dataStartTime || dataEndTime ? 'day' : 'hour', startTime: dataStartTime || moment().format('YYYY-MM-DD'), endTime: dataEndTime || moment().format('YYYY-MM-DD') })
-    const [speedData, setSpeedData] = useState<{ totalCost: string, impressionCount: string, clickCount: string, clickRate: string, orderRate: string, costSpeed: string, adCostSpeedDtoList: any[] }>()
-    const [adCostSpeedDtoListOri, setAdCostSpeedDtoListOri] = useState<any[]>([])
-    const [downLoadLoading, setDownLoadLoading] = useState<boolean>(false)
-    /** 变量end */
-    useEffect(() => {
-        getList()
-    }, [queryForm])
-    const getList = useCallback(() => {
-        getCostSpeed.run(queryForm).then((res: any) => {
-            setSpeedData(() => res?.data)
-            setAdCostSpeedDtoListOri(() => [...res?.data?.adCostSpeedDtoList])
-            let spendData: any = { legendName: '花费' }
-            let exposureData: any = { legendName: '曝光次数' }
-            res?.data?.adCostSpeedDtoList?.reverse()?.forEach((item: { time: string, cost: string, impressionCount: string }) => {
-                if (item?.time) {
-                    spendData[item?.time] = item?.cost
-                    exposureData[item?.time] = item?.impressionCount
-                }
-            });
-            setLineDis(() => [spendData, exposureData])
-        })
-    }, [queryForm, adCostSpeedDtoListOri, speedData])
-    // 设置获取图标数据区间 设置时间
-    const setTime = useCallback((str: string[]) => {
-        setQueryForm({ ...queryForm, startTime: str[0], endTime: str[1] })
-    }, [queryForm])
-
-    const disabledDate = (date: Moment) => {
-        if (queryForm?.timeUnit === 'hour') {
-            return date && (date < moment().startOf('day').subtract(9, 'day') || date > moment().endOf('day'))
-        } else {
-            return false
-        }
-    }
-
-    const downLoadExcel = useCallback(() => {
-        setDownLoadLoading(true)
-        downLoadSpeedApi(queryForm).then(res => {
-            setDownLoadLoading(false)
-            downloadFile1(res, 'octet-stream', formatDate(new Date()) + ".xlsx")
-        }).catch(() => setDownLoadLoading(false))
-    }, [queryForm, downLoadLoading])
-
-    return <Modal
-        title={<><Space>
-            <span style={{ fontSize: 15, color: '#999' }}>计划名称:<span style={{ color: '#40a9ff' }}>{props?.adId?.campaignName}</span></span>
-            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <span style={{ fontSize: 15, color: '#999' }}>广告名称:<span style={{ color: '#40a9ff' }}>{props?.adId?.adName}</span></span>
-        </Space></>}
-        visible={visible}
-        width={900}
-        bodyStyle={{ padding: '0 5px', backgroundColor: '#f2f2f2' }}
-        footer={null}
-        onCancel={() => { onClose && onClose() }}
-    >
-        <Space direction='vertical' style={{ width: '100%', marginBottom: 10 }}>
-            <Card hoverable size='small'>
-                <div style={{ display: 'flex', justifyContent: 'space-between' }}>
-                    <Space>
-                        <DatePicker.RangePicker disabledDate={disabledDate} allowClear={false} onChange={(mo: any, str: string[]) => { setTime(str) }} value={queryForm?.startTime && queryForm?.endTime ? [moment(queryForm?.startTime), moment(queryForm?.endTime)] : null} />
-                        <Radio.Group
-                            value={queryForm?.timeUnit}
-                            buttonStyle="solid"
-                            size='small'
-                            onChange={(e) => {
-                                if (e.target.value === 'hour') {
-                                    setQueryForm({ ...queryForm, timeUnit: e.target.value, startTime: moment().format('YYYY-MM-DD'), endTime: moment().format('YYYY-MM-DD') })
-                                } else {
-                                    setQueryForm({ ...queryForm, timeUnit: e.target.value })
-                                }
-                            }}>
-                            {/* <Radio.Button value="minute">5min</Radio.Button> */}
-                            <Radio.Button value="day">分天</Radio.Button>
-                            <Radio.Button value="hour">小时</Radio.Button>
-                        </Radio.Group>
-                    </Space>
-                    <Space style={{ marginRight: 30 }}>
-                        <span style={{ fontSize: 10, color: '#999' }}>刷新时间:{getCostSpeed?.data?.reqTime}</span>
-                        <Tag color="#2db7f5" onClick={() => { getList() }}><RedoOutlined />   刷新</Tag>
-                    </Space>
-                </div>
-            </Card>
-            <Card
-                hoverable
-                title='数据展示'
-            >
-                <Spin spinning={getCostSpeed?.loading}>
-                    <div className='overviewData'>
-                        <div>
-                            <div>总消耗</div>
-                            <Statistic value={speedData?.totalCost || 0} valueStyle={{ color: '#03A613', fontSize: 16 }} />
-                        </div>
-                        <div>
-                            <div>曝光次数</div>
-                            <Statistic value={speedData?.impressionCount || 0} valueStyle={{ fontSize: 16 }} />
-                        </div>
-                        <div>
-                            <div>点击次数</div>
-                            <Statistic value={speedData?.clickCount || 0} valueStyle={{ fontSize: 16 }} />
-                        </div>
-                        <div>
-                            <div>点击率</div>
-                            <Statistic value={(speedData?.clickRate ? Number(speedData?.clickRate) * 100 : 0).toFixed(2)} precision={2} valueStyle={{ color: '#3f8600', fontSize: 16 }} suffix="%" />
-                        </div>
-                        <div>
-                            <div>所选时间内平均消耗速度</div>
-                            <Statistic value={speedData?.costSpeed ? Number(speedData?.costSpeed).toFixed(2) : 0} valueStyle={{ color: '#cf1322', fontSize: 16 }} />
-                        </div>
-                    </div>
-                </Spin>
-            </Card>
-            <Card
-                hoverable
-                title='趋势图'
-            >
-                <div style={{ width: '100%', height: 260, textAlign: 'center' }}>
-                    {getCostSpeed?.loading ? <Spin /> : <LineMonitor style={{ width: '100%', height: 260 }} series smooth data={lineDis} />}
-                </div>
-            </Card>
-            <Card
-                hoverable
-                title={<Space>
-                    <div>明细表</div>
-                    <Button size="small" icon={<CloudDownloadOutlined />} loading={downLoadLoading} onClick={downLoadExcel}>下载</Button>
-                </Space>}
-            >
-                <Tables
-                    columns={columns()}
-                    dataSource={speedData?.adCostSpeedDtoList || []}
-                    total={speedData?.adCostSpeedDtoList?.length}
-                    loading={getCostSpeed?.loading}
-                    size="small"
-                    bordered
-                    sortDirections={['ascend', 'descend', null]}
-                    onChange={(pagination: any, filters: any, sorter: any) => {
-                        if (JSON.stringify(sorter) !== '{}') {
-                            let { field, order } = sorter   // descend 降序 大到小  ascend 升序 小到大
-                            if (JSON.stringify(speedData) !== '{}') {
-                                setSpeedData({ ...speedData as any, adCostSpeedDtoList: order ? speedData?.adCostSpeedDtoList?.sort(compare(field, order)) : [...adCostSpeedDtoListOri] })
-                            }
-                        }
-                    }}
-                />
-            </Card>
-        </Space>
-
-    </Modal>
-}
-
-export default React.memo(PlanDetail)

+ 0 - 70
src/pages/launchSystem/adMonitor/adMonitorList/components/tableConfig.tsx

@@ -1,70 +0,0 @@
-import { Statistic } from "antd"
-import React from "react"
-let columns = () => [
-    {
-        title: '时间',
-        dataIndex: 'time',
-        key: 'time',
-        align: 'center'
-    },
-    {
-        title: '曝光次数',
-        dataIndex: 'impressionCount',
-        key: 'impressionCount',
-        align: 'center',
-        sorter: true
-    },
-    {
-        title: '点击次数',
-        dataIndex: 'clickCount',
-        key: 'clickCount',
-        align: 'center',
-        width: 120,
-        sorter: true,
-        render: (a: any, b: any) => {
-            return <span style={{fontSize: "12px"}}>{a}</span>
-        }
-    },
-    {
-        title: '点击率',
-        dataIndex: 'clickRate',
-        key: 'clickRate',
-        align: 'center',
-        sorter: true,
-        render: (a: any, b: any) => {
-            return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
-        }
-    },
-    {
-        title: '下单量',
-        dataIndex: 'orderCount',
-        key: 'orderCount',
-        align: 'center',
-        sorter: true,
-        render: (a: any, b: any) => {
-            return <span style={{fontSize: "12px"}}>{a}</span>
-        }
-    },
-    {
-        title: '下单率',
-        dataIndex: 'orderRate',
-        key: 'orderRate',
-        align: 'center',
-        sorter: true,
-        render: (a: any, b: any) => {
-            return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
-        }
-    },
-    {
-        title: '消耗',
-        dataIndex: 'cost',
-        key: 'cost',
-        align: 'center',
-        sorter: true,
-        render: (a: any, b: any) => {
-            return <Statistic value={a || 0} />
-        }
-    },
-]
-
-export default columns

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini