Pārlūkot izejas kodu

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

wjx 2 gadi atpakaļ
vecāks
revīzija
b10c67c3cc
100 mainītis faili ar 2977 papildinājumiem un 13652 dzēšanām
  1. 4 4
      config/config.ts
  2. 1 1
      config/defaultSettings.ts
  3. 6 488
      config/routerConfig.ts
  4. 10 2
      src/Hook/useAjax.tsx
  5. 0 2
      src/access.ts
  6. 0 90
      src/pages/enterpriseWeChat/complaint/index.tsx
  7. 0 76
      src/pages/enterpriseWeChat/complaint/tableConfig.tsx
  8. 0 47
      src/pages/enterpriseWeChat/userManage/expandedRowRenderConfig.tsx
  9. 0 19
      src/pages/enterpriseWeChat/userManage/index.less
  10. 0 347
      src/pages/enterpriseWeChat/userManage/index.tsx
  11. 0 48
      src/pages/enterpriseWeChat/userManage/indexTableConfig.tsx
  12. 0 16
      src/pages/enterpriseWeChat/userManage/upConfig.tsx
  13. 161 0
      src/pages/launchSystemNew/components/TableData/color.less
  14. 69 0
      src/pages/launchSystemNew/components/TableData/index.less
  15. 215 0
      src/pages/launchSystemNew/components/TableData/index.tsx
  16. 610 0
      src/pages/launchSystemNew/components/TableData/indexTab.tsx
  17. 125 0
      src/pages/launchSystemNew/components/TableData/tableConfig.tsx
  18. 29 0
      src/pages/launchSystemNew/launchManage/localAd/ad/config.tsx
  19. 121 0
      src/pages/launchSystemNew/launchManage/localAd/ad/index.tsx
  20. 244 0
      src/pages/launchSystemNew/launchManage/localAd/ad/modal.tsx
  21. 48 0
      src/pages/launchSystemNew/launchManage/localAd/ad/tableConfig.tsx
  22. 200 0
      src/pages/launchSystemNew/launchManage/localAd/adenum.ts
  23. 122 0
      src/pages/launchSystemNew/launchManage/localAd/creative/index.tsx
  24. 177 0
      src/pages/launchSystemNew/launchManage/localAd/creative/modal.tsx
  25. 48 0
      src/pages/launchSystemNew/launchManage/localAd/creative/tableConfig.tsx
  26. 47 0
      src/pages/launchSystemNew/launchManage/localAd/index.less
  27. 28 0
      src/pages/launchSystemNew/launchManage/localAd/index.tsx
  28. 106 0
      src/pages/launchSystemNew/launchManage/localAd/targeting/index.tsx
  29. 576 0
      src/pages/launchSystemNew/launchManage/localAd/targeting/modal.tsx
  30. 30 0
      src/pages/launchSystemNew/launchManage/localAd/targeting/tableConfig.tsx
  31. 0 502
      src/pages/operatePage/account/Darwer.tsx
  32. 0 80
      src/pages/operatePage/account/EditModal.tsx
  33. 0 275
      src/pages/operatePage/account/Lins.tsx
  34. 0 106
      src/pages/operatePage/account/Pitcher.tsx
  35. 0 325
      src/pages/operatePage/account/editBook.tsx
  36. 0 109
      src/pages/operatePage/account/headerConfig.tsx
  37. 0 81
      src/pages/operatePage/account/index.less
  38. 0 167
      src/pages/operatePage/account/index.tsx
  39. 0 1091
      src/pages/operatePage/account/tablesConfig.tsx
  40. 0 30
      src/pages/operatePage/account/wxCode.tsx
  41. 0 138
      src/pages/operatePage/accountyyb/addAccount.tsx
  42. 0 148
      src/pages/operatePage/accountyyb/changeRecord.tsx
  43. 0 79
      src/pages/operatePage/accountyyb/checkAccount.tsx
  44. 0 302
      src/pages/operatePage/accountyyb/index.tsx
  45. 0 200
      src/pages/operatePage/accountyyb/tablesConfig.tsx
  46. 0 110
      src/pages/operatePage/advertisements/course/index.less
  47. 0 157
      src/pages/operatePage/advertisements/course/index.tsx
  48. 0 15
      src/pages/operatePage/advertisements/dataCensus/index.less
  49. 0 207
      src/pages/operatePage/advertisements/dataCensus/index.tsx
  50. 0 117
      src/pages/operatePage/advertisements/dataCensus/tableConfig.tsx
  51. 0 140
      src/pages/operatePage/apitest/index.tsx
  52. 0 1141
      src/pages/operatePage/automation/create/detailsTableConfig.tsx
  53. 0 32
      src/pages/operatePage/automation/create/index.less
  54. 0 245
      src/pages/operatePage/automation/create/index.tsx
  55. 0 167
      src/pages/operatePage/automation/create/platformText.tsx
  56. 0 87
      src/pages/operatePage/automation/create/tableConfig.tsx
  57. 0 20
      src/pages/operatePage/automation/links/index.less
  58. 0 396
      src/pages/operatePage/automation/links/index.tsx
  59. 0 2277
      src/pages/operatePage/automation/links/tableConfig.tsx
  60. 0 110
      src/pages/operatePage/books/book/formConfig.tsx
  61. 0 58
      src/pages/operatePage/books/book/formConfigRoi.tsx
  62. 0 54
      src/pages/operatePage/books/book/headerConfig.tsx
  63. 0 423
      src/pages/operatePage/books/book/index.tsx
  64. 0 47
      src/pages/operatePage/books/book/table.less
  65. 0 184
      src/pages/operatePage/books/book/tableConfig.tsx
  66. 0 86
      src/pages/operatePage/books/book/tableConfigRoi.tsx
  67. 0 44
      src/pages/operatePage/books/bookcity/formConfig.tsx
  68. 0 26
      src/pages/operatePage/books/bookcity/headerConfig.tsx
  69. 0 39
      src/pages/operatePage/books/bookcity/index.tsx
  70. 0 176
      src/pages/operatePage/books/bookcity/periods.tsx
  71. 0 152
      src/pages/operatePage/books/bookcity/periodsTableConfig.tsx
  72. 0 24
      src/pages/operatePage/books/bookcity/table.less
  73. 0 83
      src/pages/operatePage/books/bookcity/tableConfig.tsx
  74. 0 78
      src/pages/operatePage/books/bookcity/vipFormConfig.tsx
  75. 0 12
      src/pages/operatePage/books/bookify/formConfig.tsx
  76. 0 17
      src/pages/operatePage/books/bookify/headerConfig.tsx
  77. 0 111
      src/pages/operatePage/books/bookify/index.tsx
  78. 0 24
      src/pages/operatePage/books/bookify/table.less
  79. 0 41
      src/pages/operatePage/books/bookify/tableConfig.tsx
  80. 0 10
      src/pages/operatePage/examine/components/look/index.less
  81. 0 23
      src/pages/operatePage/examine/components/look/index.tsx
  82. 0 145
      src/pages/operatePage/examine/components/look/lockUP.tsx
  83. 0 97
      src/pages/operatePage/examine/components/review/index.tsx
  84. 0 65
      src/pages/operatePage/examine/components/userList/index.less
  85. 0 131
      src/pages/operatePage/examine/components/userList/index.tsx
  86. 0 217
      src/pages/operatePage/examine/examineAdvanced/index.tsx
  87. 0 58
      src/pages/operatePage/examine/examineAdvanced/sonTableConfig.tsx
  88. 0 18
      src/pages/operatePage/examine/examineAdvanced/table.less
  89. 0 180
      src/pages/operatePage/examine/examineAdvanced/tableConfig.tsx
  90. 0 63
      src/pages/operatePage/examine/examineAservice/daysTableConfig.tsx
  91. 0 224
      src/pages/operatePage/examine/examineAservice/index.tsx
  92. 0 18
      src/pages/operatePage/examine/examineAservice/table.less
  93. 0 172
      src/pages/operatePage/examine/examineAservice/tableConfig.tsx
  94. 0 136
      src/pages/operatePage/examine/examineAtemplate/index.tsx
  95. 0 53
      src/pages/operatePage/examine/examineAtemplate/sonTableConfig.tsx
  96. 0 18
      src/pages/operatePage/examine/examineAtemplate/table.less
  97. 0 167
      src/pages/operatePage/examine/examineAtemplate/tableConfig.tsx
  98. 0 113
      src/pages/operatePage/examine/examineInteract/index.tsx
  99. 0 53
      src/pages/operatePage/examine/examineInteract/sonTableConfig.tsx
  100. 0 18
      src/pages/operatePage/examine/examineInteract/table.less

+ 4 - 4
config/config.ts

@@ -2,7 +2,7 @@
 import { defineConfig } from 'umi';
 import defaultSettings from './defaultSettings';
 import proxy from './proxy';
-import { operatePage, dataStatistics, launchSystem ,enterpriseWeChat} from './routerConfig';
+import {  launchSystem } from './routerConfig';
 // const CompressionWebpackPlugin = require('compression-webpack-plugin');
 const { REACT_APP_ENV } = process.env;
 export default defineConfig({
@@ -50,10 +50,10 @@ export default defineConfig({
         },
       ],
     },
-    operatePage, //运营配置
-    dataStatistics, //数据中心配置
+    // operatePage, //运营配置
+    // dataStatistics, //数据中心配置
     launchSystem, // 投放系统
-    enterpriseWeChat,//企业微信
+    // enterpriseWeChat,//企业微信
     {
       path: '/',
       redirect: '/',

+ 1 - 1
config/defaultSettings.ts

@@ -4,7 +4,7 @@ export default {
   // 拂晓蓝
   primaryColor: '#1890ff',//全局主色https://ant.design/docs/react/customize-theme-cn
   layout: 'mix',//导航模式
-  navTheme:'realDark',//整体风格
+  navTheme:'dark',//整体风格
   headerTheme:'dark',
   contentWidth: 'Fluid',
   fixedHeader: true,

+ 6 - 488
config/routerConfig.ts

@@ -14,31 +14,6 @@ function headrRouter(initialState: any, history: any) {
             }
         }
     })
-    if (history?.location?.pathname === '/operatePage') { //当切换一级菜单的辅助跳转
-        history?.goBack()
-        initialState?.menu?.data.forEach((item: { roles: string[], path: string, routes: { path: string, routes: any[] }[] }) => {
-            if (item?.routes?.some((i: { path: string }) => i.path?.includes('/operatePage'))) {
-                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
-                // history.push(path)
-                isPhone ? history.push(path) : window.open(location.origin+'/#'+path) 
-                // window.open(location.origin+'/#'+path)
-            }
-        })
-
-        // localStorage.setItem('bg', 'light')
-    }
-    if (history?.location?.pathname === '/dataStatistics') { //当切换一级菜单的辅助跳转
-        history?.goBack()
-        initialState?.menu?.data.forEach((item: { roles: string[], path: string, routes: { path: string, routes: any[] }[] }) => {
-            if (item?.routes?.some((i: { path: string }) => i.path?.includes('/dataStatistics'))) {
-                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
-                // history.push(path)
-                // window.open(location.origin+'/#'+path)
-                isPhone ? history.push(path) : window.open(location.origin+'/#'+path) 
-            }
-        })
-        // localStorage.setItem('bg', 'dark')
-    }
     if (history?.location?.pathname === '/launchSystemNew') { //当切换一级菜单的辅助跳转
         history?.goBack()
         initialState?.menu?.data.forEach((item: { roles: string[], path: string, routes: { path: string, routes: any[] }[] }) => {
@@ -51,18 +26,6 @@ function headrRouter(initialState: any, history: any) {
         })
         // localStorage.setItem('bg', 'dark')
     }
-    if (history?.location?.pathname === '/enterpriseWeChat') { //当切换一级菜单的辅助跳转
-        history?.goBack()
-        initialState?.menu?.data.forEach((item: { roles: string[], path: string, routes: { path: string, routes: any[] }[] }) => {
-            if (item?.routes?.some((i: { path: string }) => i.path?.includes('/enterpriseWeChat'))) {
-                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
-                // history.push(path)
-                // window.open(location.origin+'/#'+path)
-                isPhone ? history.push(path) : window.open(location.origin+'/#'+path) 
-            }
-        })
-        // localStorage.setItem('bg', 'dark')
-    }
 }
 //返回按钮路由
 function btnFun(items: any) {
@@ -114,436 +77,6 @@ function getMyMenu(code: any, data: any,) {
     }
     return newData
 }
-/**本地运营路由配置 */
-let operatePage = {
-    path: '/operatePage',
-    access: 'operatePage',
-    name: '运营',
-    routes: [
-        {
-            path: '/operatePage/account/wxcode',
-            layout: false,
-            routes: [
-                {
-                    name: 'wxcode',
-                    path: '/operatePage/account/wxcode',
-                    component: './operatePage/account/wxcode',
-                },
-            ],
-        },
-        {
-            path: '/operatePage/operate',
-            name: '运营中心',
-            access: 'operate',
-            icon: 'DesktopOutlined',
-            component: './operatePage/operate',
-        },
-        {
-            path: '/operatePage/interact',
-            name: '智能互动',
-            access: 'interact',
-            icon: 'MessageOutlined',
-            routes: [
-                {
-                    name: '智能推送',
-                    path: '/operatePage/interact/push',
-                    access: 'push',
-                    component: './operatePage/interact/push',
-                },
-                {
-                    name: '关注回复',
-                    path: '/operatePage/interact/reply',
-                    access: 'reply',
-                    component: './operatePage/interact/reply',
-                },
-                {
-                    name: '关键字回复',
-                    path: '/operatePage/interact/keyword',
-                    access: 'keyword',
-                    component: './operatePage/interact/keyword',
-                },
-                {
-                    name: '自定义菜单',
-                    path: '/operatePage/interact/custommenu',
-                    access: 'custommenu',
-                    component: './operatePage/interact/custommenu',
-                }
-            ]
-        },
-        {
-            path: '/operatePage/news',
-            name: '群发推送',
-            access: 'news',
-            icon: 'SendOutlined',
-            routes: [
-                {
-                    name: '客服消息',
-                    path: '/operatePage/news/aservice',
-                    access: 'aservice',
-                    component: './operatePage/news/aservice',
-                },
-                {
-                    name: '模板消息',
-                    path: '/operatePage/news/atemplate',
-                    access: 'atemplate',
-                    component: './operatePage/news/atemplate',
-                },
-                {
-                    name: '高级群发',
-                    path: '/operatePage/news/advanced',
-                    access: 'advanced',
-                    component: './operatePage/news/advanced',
-                }
-            ]
-        },
-        {
-            path: '/operatePage/fans',
-            name: '粉丝管理',
-            access: 'fans',
-            icon: 'TeamOutlined',
-            routes: [
-                {
-                    name: '粉丝消息',
-                    path: '/operatePage/fans/message',
-                    access: 'message',
-                    component: './operatePage/fans/message',
-                },
-                {
-                    name: '粉丝列表',
-                    path: '/operatePage/fans/list',
-                    access: 'list',
-                    component: './operatePage/fans/list',
-                },
-                {
-                    name: '粉丝标签',
-                    path: '/operatePage/fans/tag',
-                    access: 'tag',
-                    component: './operatePage/fans/tag',
-                }
-            ]
-        },
-        {
-            path: '/operatePage/material',
-            name: '素材管理',
-            access: 'material',
-            icon: 'DatabaseOutlined',
-            routes: [
-                {
-                    name: '本地素材',
-                    path: '/operatePage/material/cloud',
-                    access: 'cloud',
-                    component: './operatePage/material/cloud',
-                },
-                {
-                    name: '微信素材',
-                    path: '/operatePage/material/weChat',
-                    access: 'weChat',
-                    component: './operatePage/material/weChat',
-                }
-            ],
-        },
-        {
-            path: '/operatePage/account',
-            name: '公众号管理',
-            access: 'account',
-            icon: 'QrcodeOutlined',
-            component: './operatePage/account',
-        },
-        {
-            path: '/operatePage/weMenu',
-            name: '公众号菜单管理',
-            access: 'weMenu',
-            icon: 'MobileOutlined',
-            component: './operatePage/weMenu',
-        },
-        {
-            path: '/operatePage/books',
-            name: '小说平台管理',
-            access: 'books',
-            icon: 'ReadOutlined',
-            routes: [
-                {
-                    name: '小说平台管理',
-                    path: '/operatePage/books/bookcity',
-                    access: 'bookcity',
-                    component: './operatePage/books/bookcity',
-                },
-                {
-                    name: '小说分类管理',
-                    path: '/operatePage/books/bookify',
-                    access: 'bookify',
-                    component: './operatePage/books/bookify',
-                },
-                {
-                    name: '书籍管理',
-                    path: '/operatePage/books/book',
-                    access: 'book',
-                    component: './operatePage/books/book',
-                },
-            ],
-        },
-        {
-            path: '/operatePage/automation',
-            name: '自动化管理',
-            access: 'automation',
-            icon: 'ReadOutlined',
-            routes: [
-                {
-                    name: '自动化创建',
-                    path: '/operatePage/automation/create',
-                    access: 'automationCreate',
-                    component: './operatePage/automation/create',
-                },
-                {
-                    name: '书城链接',
-                    path: '/operatePage/automation/links',
-                    access: 'automationLinks',
-                    component: './operatePage/automation/links',
-                },
-            ],
-        },
-        {
-            path: '/operatePage/advertisements',
-            name: '广告',
-            access: 'advertisements',
-            icon: 'DesktopOutlined',
-            routes: [
-                {
-                    name: '广告变现说明',
-                    path: '/operatePage/advertisements/course',
-                    access: 'course',
-                    component: './operatePage/advertisements/course'
-                },
-                {
-                    name: '广告数据统计',
-                    path: '/operatePage/advertisements/dataCensus',
-                    access: 'course',
-                    component: './operatePage/advertisements/dataCensus'
-                },
-            ],
-        },
-        {
-            path: '/operatePage/examine',
-            name: '消息审查',
-            access: 'examine',
-            icon: 'DesktopOutlined',
-            routes: [
-                {
-                    name: '高级群发',
-                    path: '/operatePage/examine/examineAdvanced',
-                    access: 'examineAdvanced',
-                    component: './operatePage/examine/examineAdvanced'
-                },
-                {
-                    name: '客服消息',
-                    path: '/operatePage/examine/examineAservice',
-                    access: 'examineAservice',
-                    component: './operatePage/examine/examineAservice'
-                },
-                {
-                    name: '模板消息',
-                    path: '/operatePage/examine/examineAtemplate',
-                    access: 'examineAtemplate',
-                    component: './operatePage/examine/examineAtemplate'
-                },
-                {
-                    name: '立即/延迟消息',
-                    path: '/operatePage/examine/examineInteract',
-                    access: 'examineInteract',
-                    component: './operatePage/examine/examineInteract'
-                },
-            ],
-        },
-        {
-            path: '/operatePage/accountyyb',
-            name: '账号管理',
-            access: 'accountyyb',
-            icon: 'ReadOutlined',
-            component: './operatePage/accountyyb',
-        },
-        {
-            path: '/operatePage/kyyBoxManage',
-            name: '快应用包管理',
-            access: 'kyyBoxManage',
-            icon: 'ReadOutlined',
-            component: './operatePage/kyyBoxManage',
-        },
-        {
-            path: '/operatePage/apitest',
-            name: 'api测试',
-            access: 'apitest',
-            icon: 'ReadOutlined',
-            component: './operatePage/apitest',
-        },
-    ]
-}
-/**本地数据中心路由配置 */
-const dataStatistics = {
-    path: '/dataStatistics',
-    routes: [
-        {
-            path: '/dataStatistics/weChat',
-            name: '公众号数据',
-            access: 'weChat',
-            routes: [
-                {
-                    path: '/dataStatistics/weChat/weChatList',
-                    name: '公众号总数据',
-                    access: 'weChatList',
-                    component: './dataStatistics/weChat/weChatList',
-                },
-                {
-                    path: '/dataStatistics/weChat/advertising',
-                    name: '广告投放数据',
-                    access: 'advertising',
-                    component: './dataStatistics/weChat/advertising',
-                },
-                {
-                    path: '/dataStatistics/weChat/ChannelAnalysis',
-                    name: '公众号用户充值查询',
-                    access: 'ChannelAnalysis',
-                    component: './dataStatistics/weChat/ChannelAnalysis',
-                },
-                {
-                    path: '/dataStatistics/weChat/todayRanking',
-                    name: '今日消耗排行',
-                    access: 'todayRanking',
-                    component: './dataStatistics/weChat/todayRanking',
-                },
-                {
-                    path: '/dataStatistics/weChat/sevenDay',
-                    name: '公众号7日复充趋势',
-                    access: 'sevenDay',
-                    component: './dataStatistics/weChat/sevenDay',
-                },
-                {
-                    path: '/dataStatistics/weChat/payFans',
-                    name: '公众号付费粉丝激活数据',
-                    access: 'payFans',
-                    component: './dataStatistics/weChat/payFans',
-                },
-                {
-                    path: '/dataStatistics/weChat/payTrend',
-                    name: '公众号付费趋势表',
-                    access: 'payTrend',
-                    component: './dataStatistics/weChat/payTrend',
-                },
-                {
-                    path: '/dataStatistics/weChat/payTrendCom',
-                    name: '公众号付费趋势(含赔付金)',
-                    access: 'payTrend',
-                    component: './dataStatistics/weChat/payTrendCom',
-                },
-                {
-                    path: '/dataStatistics/weChat/osoRoi',
-                    name: '公众号回收查询',
-                    access: 'osoRoi',
-                    component: './dataStatistics/weChat/osoRoi',
-                },
-            ]
-        },
-        {
-            path: '/dataStatistics/pitcher',
-            name: '投手数据',
-            access: 'pitcher',
-            routes: [
-                {
-                    path: '/dataStatistics/pitcher/pitcherPay',
-                    name: '投手付费趋势表',
-                    access: 'pitcherPay',
-                    component: './dataStatistics/pitcher/pitcherPay',
-                },
-                {
-                    path: '/dataStatistics/pitcher/dataCenter',
-                    name: '投手概况',
-                    access: 'dataCenter',
-                    component: './dataStatistics/pitcher/dataCenter',
-                },
-                {
-                    path: '/dataStatistics/pitcher/overview',
-                    name: '投手总数据',
-                    access: 'overview',
-                    component: './dataStatistics/pitcher/overview',
-                },
-                {
-                    path: '/dataStatistics/pitcher/pitcherChannel',
-                    name: '投手投放号',
-                    access: 'pitcherChannel',
-                    component: './dataStatistics/pitcher/pitcherChannel',
-                },
-                {
-                    path: '/dataStatistics/pitcher/recoveryQuery',
-                    name: '投手回收查询',
-                    access: 'recoveryQuery',
-                    component: './dataStatistics/pitcher/recoveryQuery',
-                },
-            ]
-        },
-        {
-            path: '/dataStatistics/book',
-            name: '小说数据',
-            access: 'novel',
-            routes: [
-                {
-                    path: '/dataStatistics/book/payTrend',
-                    name: '小说付费趋势',
-                    access: 'payTrend',
-                    component: './dataStatistics/book/payTrend',
-                },
-                {
-                    path: '/dataStatistics/book/summarizing',
-                    name: '小说总数据',
-                    access: 'summarizing',
-                    component: './dataStatistics/book/summarizing',
-                },
-            ]
-        },
-        {
-            path: '/dataStatistics/imageRank',
-            name: '素材数据',
-            access: 'imageRank',
-            routes: [
-                {
-                    path: '/dataStatistics/imageRank/imageLibrary',
-                    name: '素材库',
-                    access: 'imageLibrary',
-                    component: './dataStatistics/imageRank/imageLibrary',
-                },
-                {
-                    path: '/dataStatistics/imageRank/adCost',
-                    name: '素材消耗排行榜',
-                    access: 'adCost',
-                    component: './dataStatistics/imageRank/adCost',
-                },
-            ]
-        },
-        {
-            path: '/dataStatistics/rechargeMonitor',
-            name: '充值监控',
-            access: 'rechargeMonitor',
-            routes: [
-                {
-                    path: '/dataStatistics/rechargeMonitor/rechargeHis',
-                    name: '充值历史',
-                    access: 'rechargeHis',
-                    component: './dataStatistics/rechargeMonitor/rechargeHis',
-                },
-                {
-                    path: '/dataStatistics/rechargeMonitor/rechargeHisYear',
-                    name: '充值历史(年)',
-                    access: 'rechargeHisYear',
-                    component: './dataStatistics/rechargeMonitor/rechargeHisYear',
-                },
-            ]
-        },
-        {
-            path: '/dataStatistics/allSurvey',
-            name: '整体概况',
-            access: 'allSurvey',
-            component: './dataStatistics/allSurvey',
-        },
-    ]
-}
 /** 投放系统 */
 const launchSystem = {
     path: '/launchSystemNew',
@@ -559,6 +92,12 @@ const launchSystem = {
                     access: 'adAuthorize',
                     component: './launchSystemNew/launchManage/adAuthorize',
                 },
+                {
+                    path: '/launchSystemNew/launchManage/localAd',
+                    name: '广告模板',
+                    access: 'localAd',
+                    component: './launchSystemNew/launchManage/localAd',  
+                }
                 // {
                 //     path: '/launchSystemNew/launchManage/weChat',
                 //     name: '微信',
@@ -589,30 +128,9 @@ const launchSystem = {
         },
     ]
 }
-/** 企业微信 */
-const enterpriseWeChat = {
-    path: '/enterpriseWeChat',
-    routes: [
-        {
-            path: '/enterpriseWeChat/userManage',
-            name: '账号管理',
-            access: 'enterpriseWeChatUserManage',
-            component: './enterpriseWeChat/userManage'
-        },
-        {
-            path: '/enterpriseWeChat/complaint',
-            name: '投诉信息',
-            access: 'enterpriseWeChatComplaint',
-            component: './enterpriseWeChat/complaint'
-        },
-    ]
-}
 
 export {
     headrRouter,
     getMyMenu,
-    operatePage,
-    dataStatistics,
     launchSystem,
-    enterpriseWeChat
 }

+ 10 - 2
src/Hook/useAjax.tsx

@@ -1,3 +1,4 @@
+import {  CombineService, Mutate } from '@ahooksjs/use-request/lib/types'
 import { message } from 'antd'
 import moment from 'moment'
 import { useRequest } from 'umi'
@@ -32,7 +33,14 @@ interface Options {
  * @param  msgNmae?: string,//操作完成提示文字
  * 
  */
-export function useAjax(fnc: (params?: any) => Promise<any>, options?: Options) {
+export interface FnAjax<T>{
+    loading:boolean,
+    data:T,
+    run:(...args:any)=>Promise<any>,
+    refresh:()=>Promise<any>,
+    mutate: Mutate<any>
+}
+export function useAjax(fnc: CombineService<any, any>, options?: Options){
     const ajax = useRequest(fnc, {
         manual: options?.manual || true,
         cacheKey: options?.cacheKey,
@@ -41,7 +49,7 @@ export function useAjax(fnc: (params?: any) => Promise<any>, options?: Options)
         // throttleInterval:500,
         formatResult: (res) => {
             let reqTime = moment().format('YYYY-MM-DD HH:mm:ss')
-            return options?.formatResult ? {...res,reqTime} : res.data
+            return options?.formatResult ? {...res,reqTime} : {...res.data,reqTime}
         },
         onSuccess: (res) => {
             if (res) {

+ 0 - 2
src/access.ts

@@ -1,5 +1,4 @@
 // src/access.ts
-import { operatePage, dataStatistics } from '../config/routerConfig'
 export default function access(initialState: { currentUser?: API.CurrentUser | undefined, menu?: any }) {
   const { currentUser, menu } = initialState || {};
   let obj = {}
@@ -61,7 +60,6 @@ export default function access(initialState: { currentUser?: API.CurrentUser | u
   }
   if (menu) {
     nameMap(menu.data)//后端菜单列表
-    nameMaps([operatePage, dataStatistics])//本地菜单列表
   }
   return { ...bdObj, ...obj };//合并本地和线上菜单,因为线上菜单不返回隐藏的菜单,所以需要本地全部菜单合并线上菜单才能正常控制前端权限,pro路由逻辑需要
 }

+ 0 - 90
src/pages/enterpriseWeChat/complaint/index.tsx

@@ -1,90 +0,0 @@
-import React, { useState, useCallback, useEffect } from 'react'
-import { Button, Input, Space, Table, DatePicker, Tag, Modal, message } from 'antd'
-import tableConfig from './tableConfig'
-import { useAjax } from '@/Hook/useAjax'
-import { getCorpComplainList } from '@/services/enterpriseWeChat/complaint'
-import { SearchOutlined } from '@ant-design/icons'
-import moment from 'moment'
-import useCopy from '@/Hook/useCopy'
-const { RangePicker } = DatePicker;
-function Complaint() {
-    let listData = useAjax((params) => getCorpComplainList(params))
-    let [visible, setVisible] = useState(false)
-    let [kf, setKf] = useState('')
-    let [kfLink, setKfLink] = useState('')
-    let { copy } = useCopy()
-    let link = 'http://corp.complaint.zanxiangnet.com/html/index.html?kf='
-    // 企微列表搜索条件
-    const [queryValue, setQueryValue] = useState({
-        operateSign: '',//运营
-        startTime: moment(new Date()).format('YYYY-MM-DD'),//开始日期
-        endTime: moment(new Date()).format('YYYY-MM-DD'),//结束日期
-    })
-    useEffect(() => {
-        getList(1, 20)
-    }, [])
-    const getList = useCallback((pageNum, pageSize) => {
-        listData.run({ ...queryValue, pageNum, pageSize })
-    }, [queryValue])
-    return <div>
-        {/* 头部 */}
-        <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 15 }}>
-            <Space>
-                <Input placeholder='请输入客服标记筛选' allowClear value={queryValue?.operateSign} onChange={(e: any) => {
-                    let value = e.target.value?.replace(/\s/ig, '')
-                    setQueryValue({ ...queryValue, operateSign: value })
-                }} />
-                <RangePicker onChange={(date, dataString) => {
-                    setQueryValue({ ...queryValue, startTime: dataString[0], endTime: dataString[1] })
-                }} value={[queryValue.startTime ? moment(queryValue.startTime) : null, queryValue.endTime ? moment(queryValue.endTime) : null]} />
-                <Button onClick={() => { getList(1, 20) }} type='primary'><SearchOutlined />查询</Button>
-            </Space>
-            <Button onClick={() => { setVisible(true) }} type='primary'>生成客服专属投诉链接</Button>
-        </div>
-        <Table
-            dataSource={listData?.data?.records}
-            size='small'
-            columns={tableConfig()}
-            pagination={{
-                total: listData?.data?.total,
-                current: listData?.data?.current,
-                pageSize: listData?.data?.size,
-                showSizeChanger: true,
-                pageSizeOptions: ['10', '20', '50', '70', '100'],
-                showTotal: (total) => <Tag color="cyan">总共{total}数据</Tag>,
-                onChange: (page, pageSize) => {
-                    getList(page, pageSize)
-                }
-            }}
-        />
-        <Modal
-            visible={visible}
-            width={400}
-            closable={false}
-            onOk={() => {
-                if (kf) {
-                    copy(link + kf)
-                    setVisible(false)
-                } else {
-                    message.error('请输入客服标记')
-                }
-            }}
-            onCancel={() => {
-                setVisible(false)
-            }}
-        >
-            <Input value={kf} onChange={(e) => {
-                let v = e.target.value;
-                if(!v.match(/[\u4e00-\u9fa5',.。\s]/)){
-                    setKf(v)
-                }
-            }
-            } placeholder='请输入客服标记,确定生成后直接粘贴就行!' />
-            <div>
-                <strong>注:</strong>
-                <span style={{ color: 'red' }}>客服标记与投诉信息挂钩,用来查询对应客服的投诉记录,请勿输入中文。支持26位字母和数字!!!</span>
-            </div>
-        </Modal>
-    </div>
-}
-export default Complaint

+ 0 - 76
src/pages/enterpriseWeChat/complaint/tableConfig.tsx

@@ -1,76 +0,0 @@
-import { Space,Image } from 'antd'
-import React from 'react'
-const tableConfig:any = () => {
-    return [
-        {
-            title: 'ID',
-            dataIndex: 'id',
-            key: 'id',
-            width:50,
-            align: 'center',
-        },
-        {
-            title: '投诉时间',
-            dataIndex: 'createTime',
-            align:'center',
-            ellipsis: true,
-            width:160,
-        },
-        {
-            title: '用户',
-            dataIndex: 'nickName',
-            key: 'nickName',
-            align: 'center',
-            width:180,
-            render: (a: any, b: any) => {
-                return <div>
-                    <Space>
-                        {b?.headImgUrl && <img src={b?.headImgUrl} style={{ width: 30, height: 30 }} />} 
-                        <span>{a}</span>
-                    </Space>
-                </div>
-            }
-        },
-        {
-            title: '客服',
-            align: 'center',
-            dataIndex: 'operateSign',
-            key: 'operateSign',
-            width:150,
-        },
-        {
-            title: '图片',
-            dataIndex: 'pictureUrlList',
-            key: 'pictureUrlList',
-            align: 'center',
-            width:200,
-            render:(a: any)=>{
-                return <Space>
-                    {a?.map((item: string | undefined)=>{
-                        return <Image src={item} style={{width:25,height:25}} />
-                    })}
-                </Space>
-            }
-        },
-        {
-            title: '投诉内容',
-            dataIndex: 'contentList',
-            key: 'contentList',
-            align: 'center',
-            ellipsis: true,
-            width:200,
-            render:(a: any[])=>{
-                return a? a[0] :'/'
-            }
-        },
-        {
-            title: '投诉描述',
-            dataIndex: 'message',
-            key: 'message',
-            align: 'center',
-            ellipsis: true,
-        },
-    ]
-}
-
-export default tableConfig

+ 0 - 47
src/pages/enterpriseWeChat/userManage/expandedRowRenderConfig.tsx

@@ -1,47 +0,0 @@
-import React from "react"
-import {Badge} from 'antd'
-
-function expandedRowRenderConfig(handelGetActionSet:(v:any)=>void):any {
-    return [
-        {
-            title: '公众号名称',
-            dataIndex: 'wechatAccountName',
-            align:'center',
-            render:(a:any,b:any)=>{
-                return b?.adAccountInfo?.wechatAccountName
-            },
-        },
-        {
-            title: '公众号ID',
-            dataIndex: 'wechatAccountId',
-            align:'center',
-            render:(a:any,b:any)=>{
-                return b?.adAccountInfo?.wechatAccountId
-            }
-        },
-        {
-            title: '数据源ID',
-            dataIndex: 'userActionSetId',
-            align:'center',
-        },
-        {
-            title: '是否默认上报',
-            dataIndex: 'reportDefaulted',
-            with:100,
-            align:'center',
-            render: (a: any) => {
-                return a ? <Badge status="success" text='是'/> : <Badge status="error" text='否'/>
-            }
-        },
-        {
-            title:'操作',
-            dataIndex: 'cz',
-            align:'center',
-            render:(a:any,b:any)=>{
-                return <a onClick={()=>{handelGetActionSet(b)}}>选择数据源</a>
-            }
-        }
-    ]
-}
-
-export default expandedRowRenderConfig

+ 0 - 19
src/pages/enterpriseWeChat/userManage/index.less

@@ -1,19 +0,0 @@
-.dtcs {
-  > div {
-    display: flex;
-    flex-flow: row wrap;
-    margin-bottom: 10px;
-    justify-content: center;
-    align-items: baseline;
-    > strong {
-      width: 130px;
-      text-align: right;
-      font-size: 15px;
-      margin-right: 5px;
-    }
-    >a{
-        width: 400px;
-        font-size: 12px;
-    }
-  }
-}

+ 0 - 347
src/pages/enterpriseWeChat/userManage/index.tsx

@@ -1,347 +0,0 @@
-import { useAjax } from '@/Hook/useAjax';
-import { addCorpAccount, addRelation, getAdAccountAll, getCorpAccountList, getListByCorpAccount, getActionSet, configReportDefault } from '@/services/enterpriseWeChat/userMange';
-import { Button, Space, Table, Tag, Modal, Input, Form, Transfer } from 'antd';
-import React, { useEffect, useState, useCallback } from 'react';
-import indexTableConfig from './indexTableConfig';
-import style from './index.less'
-import useCopy from '@/Hook/useCopy';
-import { HeartFilled, HeartOutlined, PlusOutlined, SearchOutlined } from '@ant-design/icons';
-import { TransferDirection } from 'antd/lib/transfer';
-import expandedRowRenderConfig from './expandedRowRenderConfig';
-import upConfig from './upConfig';
-function userManage() {
-    // =====变量========
-    // 复制
-    const { copy } = useCopy()
-    // 配置参数详情弹窗
-    const [dtVisible, setDtVisible] = useState(false)
-    // add账号弹窗
-    const [addVisible, setAddVisible] = useState(false)
-    // 绑定微信弹窗
-    const [showWx, setShowWx] = useState(false)
-    //上报选择弹窗
-    const [showUp, setShowUp] = useState(false)
-    // 设置当前操作的企微
-    const [actionQw, setActionQw] = useState<any>(null)
-    // 设置当前展开的企微
-    const [targetQw, setTargetQw] = useState<any>(null)
-    // 企微列表搜索条件
-    const [queryValue, setQueryValue] = useState({ corpName: '', corpId: '' })
-    // 公众号列表
-    const [wxList, setWxList] = useState<any>([])
-    // 默认上报公众号
-    const [dWx, setDwx] = useState<any>(0)
-    // 当前企微绑定的公众号
-    const [allWx, setAllWx] = useState<any>([])
-    // 选中默认上报公众号数据源
-    const [userActionSetId, setUserActionSetId] = useState<any>(0)
-    // 当前选中的公众号
-    const [acWx, setAcWx] = useState<any>(null)
-    // form表单
-    const [form] = Form.useForm();
-
-    // ============接口==============
-    // 获取企业微信列表
-    const get_corpAccount_list = useAjax((params) => getCorpAccountList(params))
-    // 新增企业微信接口
-    const add_corpAccount = useAjax((params) => addCorpAccount(params), { msgNmae: '新增' })
-    // 获取公众列表
-    const get_adAccount_all = useAjax(() => getAdAccountAll())
-    // 获取企业下绑定的公众号列表
-    const get_listByCorpAccount = useAjax((corpAccountId) => getListByCorpAccount(corpAccountId))
-    // 绑定公众号
-    const add_relation = useAjax((params) => addRelation(params))
-    // 获取当前公众号的数据源
-    const get_actionSet = useAjax((adAccountId) => getActionSet(adAccountId))
-    //设置上报源
-    const config_report_default = useAjax((params) => configReportDefault(params))
-
-    // ===========操作事件==============
-    // 首次加载获取对应数据
-    useEffect(() => {
-        get_adAccount_all.run().then(res => {
-            res = res?.map((item: { [x: string]: any; id: any; }) => { return { ...item, key: item.id } })
-            setWxList(res)
-        })
-        get_corpAccount_list.run({ pageNum: 1, pageSize: 20 })
-    }, [])
-    //查看配置参数
-    const lock = useCallback((value: any) => {
-        setActionQw(value)
-        setDtVisible(true)
-    }, [])
-    // 新增企业微信操作
-    const add = useCallback(async () => {
-        let values = await form.validateFields()
-        add_corpAccount.run(values).then(res => {
-            if (res) {
-                setAddVisible(false)
-                form.setFieldsValue({ corpName: '', corpId: '', userSecret: '', externalUserSecret: '', remark: '' })
-            }
-        })
-    }, [])
-    //条件查询企微列表
-    const query = useCallback((params: any) => {
-        Object.keys(queryValue).forEach(key => {
-            if (!queryValue[key]) {
-                delete queryValue[key]
-            }
-        })
-        get_corpAccount_list.run({ ...params, ...queryValue })
-    }, [queryValue])
-    // 获取当前企微下的公众号
-    const getWx = useCallback((record: any) => {
-        let corpAccountId = record?.id
-        get_listByCorpAccount.run(corpAccountId).then(res => {
-            setTargetQw(record)//设置当前展开的企微数据
-            let values = res?.map((item: { adAccountId: any; }) => item.adAccountId)
-            let updef = res?.filter((item: { userActionSetId: any, reportDefaulted: boolean }) => item.userActionSetId && item.reportDefaulted)[0]//查找哪个是默认上报
-            setAllWx(values)//设置默认当前企微绑定公众号
-            setUserActionSetId(updef?.userActionSetId)
-        })
-    }, [])
-    // 绑定公众号
-    const bind = useCallback(() => {
-        add_relation.run({ corpAccountId: actionQw.id, adAccountIds: allWx }).then(res => {
-            if (res) {
-                setShowWx(false)
-                setAllWx([])
-                setActionQw(null)
-                setDwx(0)
-                get_listByCorpAccount.refresh()
-            }
-        })
-    }, [dWx, allWx, actionQw, get_listByCorpAccount])
-    // 微信公众弹窗
-    const wxShow = useCallback((value: any) => {
-        setShowWx(true)
-        setActionQw(value)
-        setTargetQw(value)
-    }, [])
-    // 公众号选择事件
-    const wxSelect = useCallback((targetKeys: string[], direction: TransferDirection, moveKeys: string[]) => {
-        setAllWx(targetKeys)
-    }, [allWx])
-    // 获取当前公众号下的数据源
-    const handelGetActionSet = useCallback((value: any) => {
-        get_actionSet.run(value?.adAccountId).then(res => {
-            if (res) {
-                setShowUp(true)
-                setAcWx(value)
-            }
-        })
-    }, [])
-    // 设置上报数据源
-    const setY = useCallback(() => {
-        config_report_default.run({ corpAccountId: targetQw?.id, adAccountId: acWx?.adAccountId, userActionSetId }).then(res => {
-            if (res) {
-                setShowUp(false)
-                get_listByCorpAccount.refresh()
-            }
-        })
-    }, [userActionSetId, acWx, targetQw, get_listByCorpAccount])
-    // ============== dom渲染==============
-    return <div>
-        {/* 头部 */}
-        <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 15 }}>
-            <Space>
-                <Input placeholder='企业名称搜索' allowClear value={queryValue?.corpName} onChange={(e: any) => {
-                    let value = e.target.value?.replace(/\s/ig, '')
-                    setQueryValue({ ...queryValue, corpName: value })
-                }} />
-                <Input placeholder='企业ID搜索' allowClear value={queryValue?.corpId} onChange={(e: any) => {
-                    let value = e.target.value?.replace(/\s/ig, '')
-                    setQueryValue({ ...queryValue, corpId: value })
-                }} />
-                <Button onClick={() => { query({ pageNum: 1, pageSize: 20 }) }}><SearchOutlined />查询</Button>
-            </Space>
-            <Button onClick={() => { setAddVisible(true) }} type='primary'><PlusOutlined />新增企业微信</Button>
-        </div>
-        {/* table表 */}
-        <Table
-            size='small'
-            columns={indexTableConfig(lock, wxShow)}
-            dataSource={get_corpAccount_list?.data?.records || []}
-            loading={get_adAccount_all?.loading}
-            rowKey={(record) => {
-                return record?.id
-            }}
-            bordered
-            pagination={{ current: get_corpAccount_list?.data?.current, pageSize: get_corpAccount_list?.data?.size, total: get_corpAccount_list?.data?.total, showTotal: () => <Tag color="cyan">总共{get_corpAccount_list?.data?.total}数据</Tag>, defaultPageSize: 20 }}
-            onChange={(pagination) => {
-                query({ pageNum: pagination.current, pageSize: pagination.pageSize })
-            }}
-            expandable={{
-                expandRowByClick: true,
-                expandedRowKeys: targetQw !== null ? [targetQw?.id] : [],
-                onExpand: (expanded, record) => {
-                    expanded && getWx(record)
-                    !expanded && setTargetQw(null)
-                },
-                expandedRowRender: (record, index, indent, expanded) => {
-                    return <div style={{ marginLeft: 18 }}>
-                        <Table bordered columns={expandedRowRenderConfig(handelGetActionSet)} dataSource={get_listByCorpAccount?.data} pagination={false} loading={get_listByCorpAccount?.loading} rowKey={(record) => {
-                            return record?.adAccountId
-                        }} />
-                    </div>
-                }
-            }}
-        />
-        {/* 配置参数展示弹窗 */}
-        <Modal
-            visible={dtVisible}
-            title='配置参数'
-            width={600}
-            maskClosable={false}
-            footer={null}
-            onCancel={() => {
-                setDtVisible(false)
-                setActionQw(null)
-            }}
-        >
-            {actionQw && <div className={style.dtcs}>
-                {
-                    ['aesKey', 'eventNotifyUrl', 'token'].map((name) => {
-                        let newName = name === 'token' ? 'Token' : name === 'eventNotifyUrl' ? '回调URL' : 'EncodingAESKey'
-                        return <div key={name}><strong >{newName}:</strong><a onClick={() => { copy(actionQw[name]) }}>{actionQw[name]}</a></div>
-                    })
-                }
-            </div>}
-        </Modal>
-        {/* 添加企微弹窗 */}
-        <Modal
-            visible={addVisible}
-            title='新增企业微信'
-            width={480}
-            maskClosable={false}
-            onCancel={() => {
-                setAddVisible(false)
-            }}
-            onOk={add}
-            confirmLoading={add_corpAccount?.loading}
-        >
-            <Form
-                form={form}
-                name="basic"
-                labelCol={{ span: 5 }}
-                wrapperCol={{ span: 19 }}
-                autoComplete="off"
-            >
-                <Form.Item
-                    label="企业名称"
-                    name="corpName"
-                    rules={[{ required: true, message: '请输入企业名称!' }]}
-                >
-                    <Input allowClear />
-                </Form.Item>
-                <Form.Item
-                    label="企业ID"
-                    name="corpId"
-                    rules={[{ required: true, message: '请输入企业ID!' }]}
-                >
-                    <Input allowClear />
-                </Form.Item>
-                <Form.Item
-                    label="通讯录密钥"
-                    name="userSecret"
-                    rules={[{ required: true, message: '请输入通讯录密钥!' }]}
-                >
-                    <Input allowClear />
-                </Form.Item>
-                <Form.Item
-                    label="客户密钥"
-                    name="externalUserSecret"
-                    rules={[{ required: true, message: '请输入客户密钥!' }]}
-                >
-                    <Input allowClear />
-                </Form.Item>
-                <Form.Item
-                    label="备注"
-                    name="remark"
-                    rules={[{ required: false, message: '请输入备注!' }]}
-                >
-                    <Input.TextArea allowClear role='2' />
-                </Form.Item>
-            </Form>
-        </Modal>
-        {/* 绑定公众号 */}
-        <Modal
-            visible={showWx}
-            title={<div>绑定公众号</div>}
-            width={580}
-            maskClosable={false}
-            onCancel={() => {
-                setShowWx(false)
-            }}
-            onOk={bind}
-            confirmLoading={add_relation?.loading}
-        >
-            <Transfer
-                dataSource={wxList}
-                showSearch
-                listStyle={{
-                    width: 250,
-                    height: 300,
-                }}
-                operations={['添加', '移除']}
-                targetKeys={allWx}
-                onChange={wxSelect}
-                filterOption={(inputValue, option) => {
-                    let reg = /[^\u4E00-\u9FA5]/
-                    if (!reg.test(inputValue)) {
-                        if (option['wechatAccountName']?.includes(inputValue)) {
-                            return true
-                        }
-                        return false
-                    } else {
-                        return true
-                    }
-                }}
-                render={item => <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
-                    {item?.wechatAccountName || item?.wechatAccountId}
-                    {
-                        allWx.some((i: any) => i === item.id) && <span
-                            onClick={(e) => {
-                                e.stopPropagation()
-                                setDwx(dWx === item?.id ? 0 : item?.id)
-                            }} >
-                        </span>
-                    }
-                </div>
-                }
-            />
-
-        </Modal>
-        {/* 设置默认上报源 */}
-        <Modal
-            visible={showUp}
-            title={<div>选择上报源</div>}
-            width={580}
-            maskClosable={false}
-            onCancel={() => {
-                setShowUp(false)
-            }}
-            onOk={setY}
-            confirmLoading={add_relation?.loading}
-        >
-            <Table
-                bordered
-                columns={upConfig(handelGetActionSet)}
-                dataSource={get_actionSet?.data}
-                pagination={false}
-                loading={get_actionSet?.loading}
-
-                rowSelection={{
-                    type: 'radio',
-                    selectedRowKeys: [userActionSetId],
-                    onSelect: (record) => {
-                        setUserActionSetId(record?.userActionSetId)
-                    }
-                }}
-                rowKey={(record) => {
-                    return record?.userActionSetId
-                }} />
-        </Modal>
-    </div>
-}
-export default userManage

+ 0 - 48
src/pages/enterpriseWeChat/userManage/indexTableConfig.tsx

@@ -1,48 +0,0 @@
-import { Badge, Space } from 'antd'
-import React from 'react'
-const status = {
-    'SUCCESS': 'processing',
-    'ING': 'warning',
-    'ERROR': 'error',
-}
-const statusDict={
-    'SUCCESS': '配置成功',
-    'ING': '待配置',
-    'ERROR': '配置失败',
-}
-function indexTableConfig(lock:(a:any)=>void,wxShow:(a:any)=>void){
-    return [
-        {
-            title: '创建时间',
-            dataIndex: 'createTime',
-        },
-        {
-            title: '企业ID',
-            dataIndex: 'corpId', 
-        },
-        {
-            title: '企业名称',
-            dataIndex: 'corpName', 
-        },
-        {
-            title: '状态',
-            dataIndex: 'configStatus', 
-            render:(a:any)=>{
-                return <Badge status={status[a]} text={statusDict[a]} />
-            }
-        },
-        {
-            title:'操作',
-            dataIndex: 'cz', 
-            render:(a:any,b:any)=>{
-                return <Space>
-                    <a onClick={()=>{wxShow(b)}}>绑定公众号</a>
-                    {//配置不成功展示配置参数弹窗操作
-                        b?.configStatus !== 'SUCCESS' && <a onClick={()=>{lock(b)}}>配置参数</a>
-                    }
-                </Space>
-            }
-        }
-    ]
-}
-export default indexTableConfig

+ 0 - 16
src/pages/enterpriseWeChat/userManage/upConfig.tsx

@@ -1,16 +0,0 @@
-import React from "react"
-
-function upConfig(handelGetActionSet:(v:any)=>void) {
-    return [
-        {
-            title: '数据源名称',
-            dataIndex: 'name',
-        },
-        {
-            title: '数据源ID',
-            dataIndex: 'userActionSetId',
-        },
-    ]
-}
-
-export default upConfig

+ 161 - 0
src/pages/launchSystemNew/components/TableData/color.less

@@ -0,0 +1,161 @@
+.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;
+}

+ 69 - 0
src/pages/launchSystemNew/components/TableData/index.less

@@ -0,0 +1,69 @@
+@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;
+  }
+}
+
+.example {
+  margin: 20px 0;
+  margin-bottom: 20px;
+  padding: 30px 50px;
+  text-align: center;
+  // background: rgba(0, 0, 0, 0.05);
+  border-radius: 4px;
+}

+ 215 - 0
src/pages/launchSystemNew/components/TableData/index.tsx

@@ -0,0 +1,215 @@
+import CustomListModel from '@/components/CustomList'
+import Tables from '@/components/Tables'
+import { quanpin } from '@/utils/fullScreen'
+import { FullscreenExitOutlined, FullscreenOutlined, RedoOutlined, SettingOutlined } from '@ant-design/icons'
+import { Button, Card, Col, Row, Space, Spin, Tooltip, } from 'antd'
+import { ColumnsType } from 'antd/lib/table'
+import React, { useEffect, useRef, useState, useCallback } from 'react'
+import { useModel } from 'umi'
+import style from './index.less'
+interface Prosp {
+    // sortArr?: { label: string, value: string ,key:any}[],//排序参数名列表
+    isZj?: boolean,//是否查总计
+    tableTotal?: { [key: string]: string },//是个开启总计
+    scroll?: { x?: number, y?: number },//开启行滑动并设置容器最大宽度
+    columns: () => ColumnsType<any>,//table列表配置
+    title?: string,//tabel的标题
+    tooltip?: JSX.Element,//是否在标题后加问号展示说明
+    dataSource: any[],//table的数据
+    expandedRowRender?: (data: any) => JSX.Element,
+    className?: string,//自定义class
+    isdownload?: boolean,
+    leftChild?: JSX.Element,
+    config?: any,
+    configName?: any,
+    page?: number,
+    pageSize?: number,
+    size?: 'small' | 'middle' | 'large',
+    total?: number,
+    loading?: boolean,
+    onChange?: (props: {
+        pagination?: { current?: number, pageSize?: number, gzh?: string },
+        filters?: any,
+        sortData?: {
+            column: { dataIndex: string },
+            order?: "ascend" | "descend"
+        }
+    }) => void,
+    ajax?: any,//接口刷新
+}
+
+function TableData(props: Prosp) {
+    const { isZj, scroll, columns, title, dataSource, expandedRowRender, className, leftChild, page = undefined, pageSize = undefined, size = 'small', total = 0, loading = false, onChange, config, configName, ajax } = props
+    const { state: userState } = useModel('useOperating.useUser')
+    const { isFell } = userState
+    const [visible, setVisible] = useState<boolean>(false)
+    const [oldSelectData, setoldSelectData] = useState<any[]>([])
+    const [oldFixed, setoldFixed] = useState<any>({ left: '0', right: '0' })
+    const [newColumns, setNewColumns] = useState<any[]>([])
+    // const [oldConfigName, setOldConfigName] = useState<any>('')//上次的配置名称
+    const [selectData, setSelectData] = useState<{ selectData: any[], fixed: { left: string, right: string } }>({ selectData: [], fixed: { left: '0', right: '0' } })
+    const ref = useRef(null)
+    const oldName = useRef(null)
+    const version = '1.0.0'
+    // // /**重组选中的字段 */
+    useEffect(() => {
+        let oldConfigName = oldName.current || ''
+        if (configName) {
+        // if (dataSource?.length > 0) {
+            const defSelectData = localStorage.getItem(`myAdMonitorConfig${version}_` + configName)
+            const defFixed = localStorage.getItem(`myAdMonitorConfigFixed${version}_` + configName)
+            const newConfig = config?.map((item: { data: any }) => item.data)?.flat()
+            if (defSelectData && (selectData?.selectData?.length === 0 || configName !== oldConfigName)) {//首次查找个人配置是否存在,并且selectData为空,存在用个人配置设置selectData
+                console.log('首次使用个人配置赋值')
+                let newDefSelectData = JSON.parse(defSelectData)
+                newDefSelectData = newDefSelectData.filter((item: any) => !!item && newConfig.some((c: { dataIndex: any }) => c.dataIndex === item.dataIndex))//去除空项
+                setSelectData(() => ({ selectData: newDefSelectData, fixed: defFixed ? JSON.parse(defFixed) : { left: '0', right: '0' } }))
+            }
+            if (!defSelectData && (selectData?.selectData?.length === 0 || configName !== oldConfigName)) {//首次查找个人配置是否存在,并且selectData为空,不存在默认配置设置selectData
+                let newSelectData: any[] = []
+                config?.forEach((item: { data: { default: any }[] }) => {
+                    item?.data?.forEach((d: { default: any }) => {
+                        if (d.default) {
+                            newSelectData[d.default - 1] = d
+                        }
+                    })
+                })
+                console.log('首次使用默认配置赋值')
+                setSelectData(() => ({ selectData: newSelectData, fixed: { left: '0', right: configName.includes('起量') ? '2' : '0' } }))
+            }
+            if ((JSON.stringify(oldSelectData) !== JSON.stringify(selectData?.selectData)) || (JSON.stringify(selectData.fixed) !== JSON.stringify(oldFixed))) {
+                console.log('设置配置改变重新赋值')
+                setoldSelectData(() => selectData.selectData)
+                setoldFixed(() => selectData.fixed)
+                let newArr: any = []
+                selectData?.selectData?.forEach((data: { dataIndex: any, width: number }, index: number) => {
+                    columns()?.forEach((item: any) => {
+                        if (data.dataIndex === item.dataIndex) {
+                            if (index < Number(selectData?.fixed?.left)) {//设置左悬浮
+                                item['fixed'] = 'left'
+                            } else if (index > (selectData?.selectData?.length - Number(selectData?.fixed?.right) - 1)) {//设置右悬浮
+                                item['fixed'] = 'right'
+                            } else {
+                                item['fixed'] = false
+                            }
+                            if (data?.width) {
+                                item['width'] = data.width
+                            }
+                            newArr.push(item)
+                        }
+                    })
+                })
+                setNewColumns(() => newArr)
+            }
+        }
+        if (configName !== oldConfigName) {
+            oldName.current = configName
+        }
+    }, [selectData, oldSelectData, dataSource, oldFixed, configName, config, columns]) // selectData, oldSelectData, dataSource, oldFixed, configName, oldConfigName, config, columns
+    //拖动宽度设置设置保存
+    const handelResize = useCallback((columns: any) => {
+        if (configName) {
+            let newSelectData = selectData?.selectData?.map((item, index) => {
+                item['width'] = columns[index]['width']
+                return item
+            })
+            localStorage.setItem(`myAdMonitorConfig${version}_` + configName, JSON.stringify(newSelectData))
+        }
+    }, [configName, selectData])
+    const header = <Col span={24}>
+        <Row gutter={[0, 10]}>
+            <Col span={24} style={{
+                display: 'flex',
+                justifyContent: 'space-between',
+                alignItems: 'end'
+            }}>
+                <Space>
+                    {leftChild}
+                </Space>
+                {/*紧凑*/}
+                <Space style={{ float: 'right' }}>
+                    {
+                        ajax && <Button
+                            size='small'
+                            type='text'
+                            onClick={() => {
+                                ajax.refresh()
+                            }}>
+                            <span style={{ fontSize: 10, color: '#999' }}>刷新时间:{ajax?.data?.reqTime}</span>
+                            <Tooltip title='刷新'><RedoOutlined /></Tooltip>
+                        </Button>
+                    }
+                   {config && <Button
+                        size='small'
+                        type='text'
+                        onClick={() => {
+                            setVisible(true)
+                        }}>
+                        <Tooltip title='设置'><SettingOutlined /></Tooltip>
+                    </Button>}
+                    <Button
+                        type='text'
+                        size='small'
+                        onClick={() => {
+                            if (ref?.current) {
+                                quanpin(ref?.current)
+                            }
+                        }}>
+                        {
+                            <Tooltip title={!isFell ? '全屏' : '退出全屏'}>{!isFell ? <FullscreenOutlined /> : <FullscreenExitOutlined />}</Tooltip>
+                        }
+                    </Button>
+                    {visible && <CustomListModel  version={version} config={config} configName={configName} visible={visible} onClose={() => { setVisible(false) }} onChange={(arr: any) => { setSelectData(arr) }} columns={newColumns?.length > 0 ? newColumns : columns()} />}
+                </Space>
+            </Col>
+        </Row>
+    </Col>
+    const content = <Row gutter={[0, 20]} ref={ref} style={isFell ? { background: '#fff' } : {}}>
+        {/**table */}
+        <Col span={24}>
+            <Card
+                hoverable
+                title={title}
+                headStyle={{ textAlign: 'left' }}
+            >
+                <Row gutter={[0, 20]}>
+                    {header}
+                    <Tab {...{ size, newColumns, handelResize, className, isZj, columns, loading, scroll, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax }} />
+                </Row>
+            </Card>
+        </Col>
+    </Row >
+    return <>
+        {content}
+    </>
+}
+
+/**表格 */
+const Tab = React.memo((props: any) => {
+    const { size, newColumns, className, handelResize, columns, scroll, loading, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax } = props
+    return < Col span={24} >
+        <div className={`${style[size]} ${className ? style[className] : ''} `}>
+            {dataSource || !ajax?.loading ? <Tables
+                className={`all_table ${className ? className : ''}`}
+                bordered
+                sortDirections={['ascend', 'descend', null]}
+                current={page}
+                pageSize={pageSize}
+                columns={newColumns?.length > 0 ? newColumns : columns()}
+                dataSource={dataSource}
+                scroll={scroll ? isFell ? { ...scroll, y: document.body.clientHeight - 300 } : scroll : {}}
+                onChange={(pagination: any, filters: any, sorter: any) => onChange && onChange({ pagination, filters, sortData: sorter })}
+                rowClassName={(record: { color: string }) => style[record['color']]}
+                expandedRowRender={expandedRowRender ? expandedRowRender : undefined}
+                size={size}
+                total={total}
+                loading={loading}
+                defaultPageSize={20}
+                handelResize={((columns: any) => handelResize(columns))}
+            /> : <div className={style.example}>
+                <Spin />
+            </div>}
+        </div>
+    </Col >
+})
+export default React.memo(TableData)

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

@@ -0,0 +1,610 @@
+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

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

@@ -0,0 +1,125 @@
+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 }

+ 29 - 0
src/pages/launchSystemNew/launchManage/localAd/ad/config.tsx

@@ -0,0 +1,29 @@
+/**广告原始table表*/
+const adConfig = [
+    {
+        label: '设置信息',
+        data: [
+            { title: '数据日期', dataIndex: 'dataTime', label: '设置信息', default: 1 },
+            { title: '广告名称/ID', dataIndex: 'adName/adId', label: '设置信息', default: 2 },
+            { title: '投放计划名称/ID', dataIndex: 'campaignName/campaignId', label: '设置信息', default: 3 },
+            { title: '广告主名称/APPID', dataIndex: 'mpName/mpAppId', label: '设置信息', default: 4 },
+            { title: '创意名称/ID', dataIndex: 'adCreativeName/adCreativeId', label: '设置信息', default: 5 },
+            { title: '创意预览', dataIndex: 'creativePreview', label: '设置信息', default: 6, width: 80 },
+            { title: '服务商', dataIndex: 'serviceProviderName', label: '设置信息', default: 7, width: 140 },
+            { title: '投手', dataIndex: 'pitcherName', label: '设置信息', default: 8 },
+            { title: '主投书', dataIndex: 'mainBookName', label: '设置信息', default: 9 },
+            { title: '创建日期', dataIndex: 'adCreateTime', label: '设置信息' },
+            // { title: '广告位置', dataIndex: 'adSeat', label: '设置信息', default: 12 },
+            { title: '广告状态', dataIndex: 'adStatus', label: '设置信息', default: 10 },
+            { title: '创意状态', dataIndex: 'adCreativeStatus', label: '设置信息', default: 11 },
+            { title: '购买类型', dataIndex: 'adBuyType', label: '设置信息' },
+            // { title: '自动扩量', dataIndex: 'autoExpand', label: '设置信息' },
+            // { title: '曝光评估', dataIndex: 'impressionAppraise', label: '设置信息', default: 15 },
+            { title: '投放时间', dataIndex: 'adStartTime', label: '设置信息', default: 12 },
+            // { title: '当日成本偏差', dataIndex: 'dayCostOffset', label: '设置信息' },
+            { title: '推广目标', dataIndex: 'spreadTarget', label: '设置信息', default: 13 },
+            // { title: '深度优化目标', dataIndex: 'depthOptimizeTarget', label: '设置信息' },
+        ]
+    },
+]
+export default adConfig

+ 121 - 0
src/pages/launchSystemNew/launchManage/localAd/ad/index.tsx

@@ -0,0 +1,121 @@
+import { FnAjax, useAjax } from '@/Hook/useAjax'
+import { ListData, SysAdgroupsDTO } from '@/services/launchAdq'
+import { PromotedObjectType } from '@/services/launchAdq/enum'
+import { createSysAdgroups, getSysAdgroupsList } from '@/services/launchAdq/localAd'
+import { Col, Row, Input, Select, Button } from 'antd'
+import React, { useEffect, useState, useCallback } from 'react'
+import TableData from '../../../components/TableData'
+import AdModal from './modal'
+import tableConfig from './tableConfig'
+
+export interface ModalConfig {
+    visible: boolean;
+    title?: string;
+}
+
+function Ad() {
+    // 变量
+    const [modalConfig, setModalConfig] = useState<ModalConfig>({
+        visible: true,
+        title: '新建'
+    })
+    const [oldsearchData, setOldsearchData] = useState<any>(null)
+    // api方法
+    const sysAdgroupsList: FnAjax<ListData<SysAdgroupsDTO>> = useAjax((params) => getSysAdgroupsList(params))
+    const createSysAdgroup = useAjax((params) => createSysAdgroups(params))
+    // 初始获取列表
+    useEffect(() => {
+        getList({ pageSize: 20, pageNum: 1 })
+    }, [])
+    // 获取列表
+    const getList = useCallback((arg: { pageSize: number, pageNum: number, adgroupName?: string, promotedObjectType?: string }) => {
+        Object.keys(arg).forEach(key => {
+            !arg[key] && delete arg[key]
+        })
+        if (JSON.stringify(arg) !== JSON.stringify(oldsearchData)) {
+            setOldsearchData(arg)
+            sysAdgroupsList.run(arg)
+        }
+    }, [oldsearchData])
+
+    // 设置变量
+    const handleModalConfig = useCallback((arg: ModalConfig) => {
+        setModalConfig({ ...modalConfig, ...arg })
+    }, [modalConfig])
+    // submit
+    const submit = useCallback((arg: any) => {
+        console.log(arg)
+        createSysAdgroup.run(arg).then(res => {
+            if (res) {
+                sysAdgroupsList.refresh()
+                handleModalConfig({ visible: false })
+            }
+        })
+    }, [sysAdgroupsList])
+    console.log(PromotedObjectType)
+    return <div>
+        <TableData
+            columns={tableConfig}
+            ajax={sysAdgroupsList}
+            dataSource={sysAdgroupsList?.data?.records}
+            loading={sysAdgroupsList?.loading}
+            scroll={{ y: 600 }}
+            total={sysAdgroupsList?.data?.total}
+            page={sysAdgroupsList?.data?.current}
+            pageSize={sysAdgroupsList?.data?.size}
+            leftChild={<>
+                <Row gutter={[10, 10]}>
+                    <Col span={24}><Button type='primary' onClick={() => {
+                        handleModalConfig({ visible: true })
+                    }}>新建广告模板</Button></Col>
+                    <Col>
+                        <Input
+                            placeholder='广告名称'
+                            allowClear
+                            onBlur={(e) => {
+                                let value = e.target.value
+                                getList({ pageNum: 1, pageSize: 20, adgroupName: value })
+                            }}
+                            onKeyDownCapture={(e: any) => {
+                                let key = e.key
+                                if (key === 'Enter') {
+                                    let value = e.target.value
+                                    getList({ pageNum: 1, pageSize: 20, adgroupName: value })
+                                }
+                            }}
+                            onChange={(e) => {
+                                let value = e.target.value
+                                if (!value) {
+                                    getList({ pageNum: 1, pageSize: 20, adgroupName: value })
+                                }
+                            }}
+                        />
+                    </Col>
+                    <Col>
+                        <Select placeholder='推广目标选择' style={{ minWidth: 200 }} showSearch filterOption={(input, option) =>
+                            (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
+                        } allowClear onChange={(value) => {
+                            getList({ pageNum: 1, pageSize: 20, promotedObjectType: value })
+                        }}>
+                            {
+                                Object.keys(PromotedObjectType).map(key => {
+                                    // let obj = JSON.parse(PromotedObjectType[key])
+                                    return <Select.Option value={key} key={key}>{PromotedObjectType[key]}</Select.Option>
+                                })
+                            }
+                        </Select>
+                    </Col>
+                </Row>
+            </>}
+            onChange={(props: any) => {
+                let { sortData, pagination } = props
+                let { current, pageSize } = pagination
+                getList({pageNum:current,pageSize})
+            }}
+        // config={guanggao}
+        // configName={'广告模板列表'}
+        />
+        {modalConfig.visible && <AdModal visible={modalConfig.visible} title={modalConfig.title} PupFn={handleModalConfig} callback={submit} confirmLoading={createSysAdgroup.loading} />}
+    </div>
+}
+export default Ad

+ 244 - 0
src/pages/launchSystemNew/launchManage/localAd/ad/modal.tsx

@@ -0,0 +1,244 @@
+import React, { useCallback, useEffect } from 'react'
+import { Modal, Form, Input, Divider, Select, Radio, DatePicker, Switch, Checkbox } from 'antd'
+import { SiteSetEnum, BidModeEnum, OptimizationGoalEnum, BidStrategyEnum, PromotedObjectType, EducationEnum } from '@/services/launchAdq/enum'
+import { ModalConfig } from '.'
+import moment from 'moment';
+import { useAjax } from '@/Hook/useAjax';
+import { getSceneTagsList } from '@/services/launchAdq/global';
+const { RangePicker }: { RangePicker: any } = DatePicker;
+let DatePickers: any = DatePicker
+interface Props {
+    title?: string,
+    visible: boolean,
+    PupFn: (arg: ModalConfig) => void,
+    callback: (params: any) => void,
+    confirmLoading: boolean
+}
+/**广告模板*/
+function AdModal(props: Props) {
+    let { visible, title, confirmLoading, PupFn, callback } = props
+    const sceneTagsList = useAjax((params) => getSceneTagsList(params))
+    const [form] = Form.useForm();
+    let dateType = Form.useWatch('dateType', form)
+    let bidMode = Form.useWatch('bidMode', form)
+    let smartBidType = Form.useWatch('smartBidType', form)
+    let autoAcquisitionEnabled = Form.useWatch('autoAcquisitionEnabled', form)
+    let siteSet = Form.useWatch('siteSet', form)
+    let wechatPositionType = Form.useWatch('wechatPositionType', form)
+    let wechatSceneType = Form.useWatch('wechatSceneType', form)
+    // 确定事件
+    const handleOk = useCallback(() => {
+        form.validateFields().then(values => {
+            let newValues = JSON.parse(JSON.stringify(values))
+            newValues.sceneSpec = {}
+            if (newValues.dateType === '2') {
+                newValues['beginDate'] = moment(newValues.date).format('YYYY-MM-DD')
+            } else {
+                newValues['beginDate'] = moment(newValues.date[0]).format('YYYY-MM-DD')
+                newValues['endDate'] = moment(newValues.date[1]).format('YYYY-MM-DD')
+            }
+            if (newValues.wechatPositionType === '1') {
+                newValues.sceneSpec = { ...newValues.sceneSpec, wechatPosition: newValues.wechatPosition }
+            }
+            if (newValues.wechatSceneType === '1') {
+                newValues.sceneSpec = { ...newValues.sceneSpec, wechatScene: {
+                    officialAccountMediaCategory:newValues.officialAccountMediaCategory,
+                    miniProgramAndMiniGame:newValues.miniProgramAndMiniGame,
+                    payScene:newValues.payScene
+                } }
+            }
+            if (newValues.sceneSpec.wechatPosition?.length === 0) {
+                delete newValues.sceneSpec.wechatPosition
+            }
+            // if(newValues.sceneSpec.wechatScene)
+            if (!newValues.sceneSpec.wechatPosition && !newValues.sceneSpec.wechatScene) {
+                delete newValues.sceneSpec
+            }
+            delete newValues.officialAccountMediaCategory
+            delete newValues.miniProgramAndMiniGame
+            delete newValues.payScene
+            delete newValues.wechatPositionType
+            delete newValues.wechatPosition
+            delete newValues.wechatScene
+            delete newValues['dateType']
+            delete newValues['date']
+            newValues['timeSeries'] = Array(336).fill(1).join('')
+            callback(newValues)
+        })
+        // PupFn({ visible: false })
+    }, [form])
+    // 场景定向
+    useEffect(() => {
+        sceneTagsList.run({ typeList: ['WECHAT_POSITION', 'OFFICIAL_ACCOUNT_MEDIA_CATEGORY', 'MINI_PROGRAM_AND_MINI_GAME', 'PAY_SCENE'] })
+    }, [])
+    console.log()
+    return <Modal
+        visible={visible}
+        title={title + '广告'}
+        onCancel={() => { PupFn({ visible: false }) }}
+        onOk={handleOk}
+        width={900}
+        confirmLoading={confirmLoading}
+    >
+        <Form
+            form={form}
+            labelCol={{ span: 5 }}
+            initialValues={
+                {
+                    bidMode: 'BID_MODE_OCPM',
+                    dateType: '2',
+                    bidStrategy: 'BID_STRATEGY_AVERAGE_COST',
+                    timeSeries: '1',
+                    smartBidType: 'SMART_BID_TYPE_CUSTOM',
+                    autoAcquisitionEnabled: false,
+                    wechatSceneType: '0',
+                    wechatPositionType: '0'
+                }
+            }
+        >
+            {/* ============================================================基本信息============================================================= */}
+            <Divider orientation='center'>基本信息</Divider>
+            <Form.Item label={<strong>广告名称</strong>} name='adgroupName' rules={[{ required: true, message: '请输入广告名称!' }]}>
+                <Input placeholder='广告名称' style={{ width: 300 }} />
+            </Form.Item>
+            <Form.Item label={<strong>推广目标类型</strong>} name='promotedObjectType' rules={[{ required: true, message: '请选择推广告推广目标类型!' }]}>
+                <Select style={{ width: 300 }} showSearch filterOption={(input, option) =>
+                    (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
+                } allowClear>
+                    {
+                        Object.keys(PromotedObjectType).map(key => {
+                            return <Select.Option value={key} key={key}>{PromotedObjectType[key]}</Select.Option>
+                        })
+                    }
+                </Select>
+            </Form.Item>
+            <Form.Item label={<strong>广告版位</strong>} name='siteSet' rules={[{ required: true, message: '请输入选择广告版位!' }]}>
+                <Select mode='multiple' style={{ width: 300 }} allowClear>
+                    {
+                        Object.keys(SiteSetEnum).map(key => {
+                            return <Select.Option value={key} key={key}>{SiteSetEnum[key]}</Select.Option>
+                        })
+                    }
+                </Select>
+            </Form.Item>
+            {
+                siteSet?.some((s: string) => s === 'SITE_SET_WECHAT') && <>
+                    <Form.Item label={<strong>微信公众号与小程序定投</strong>} name='wechatPositionType' style={wechatPositionType === '1' ? { marginBottom: 5 } : {}}>
+                        <Radio.Group >
+                            <Radio.Button value="0">不限</Radio.Button>
+                            <Radio.Button value="1">自定义</Radio.Button>
+                        </Radio.Group>
+                    </Form.Item>
+                    {wechatPositionType === '1' && <Form.Item style={{ marginLeft: 177 }} name='wechatPosition'>
+                        <Checkbox.Group options={sceneTagsList?.data?.WECHAT_POSITION?.map((item: { description: any; id: any; }) => ({ label: item.description, value: item.id }))} />
+                    </Form.Item>}
+                    <Form.Item label={<strong>微信公众号与小程序场景</strong>} name='wechatSceneType' style={wechatSceneType === '1' ? { marginBottom: 5 } : {}} >
+                        <Radio.Group >
+                            <Radio.Button value="0">不限</Radio.Button>
+                            <Radio.Button value="1">自定义</Radio.Button>
+                        </Radio.Group>
+                    </Form.Item>
+                    {wechatSceneType === '1' && <>
+                        <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>公众号媒体类型</strong></p>
+                        <Form.Item style={{ marginLeft: 177 }} name='officialAccountMediaCategory'>
+                            <Checkbox.Group options={sceneTagsList?.data?.OFFICIAL_ACCOUNT_MEDIA_CATEGORY?.filter((i: { description: string; }) => i.description !== '不限')?.map((item: { description: any; id: any; }) => ({ label: item.description, value: item.id }))} />
+                        </Form.Item>
+                        <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>小程序小游戏流量类型</strong></p>
+                        <Form.Item style={{ marginLeft: 177 }} name='miniProgramAndMiniGame'>
+                            <Checkbox.Group options={sceneTagsList?.data?.MINI_PROGRAM_AND_MINI_GAME?.filter((i: { description: string; }) => i.description !== '不限')?.map((item: { description: any; id: any; }) => ({ label: item.description, value: item.id }))} />
+                        </Form.Item>
+                        <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>订单详情页消费场景</strong></p>
+                        <Form.Item style={{ marginLeft: 177 }} name='payScene'>
+                            <Checkbox.Group options={sceneTagsList?.data?.PAY_SCENE?.filter((i: { description: string; }) => i.description !== '不限')?.map((item: { description: any; id: any; }) => ({ label: item.description, value: item.id }))} />
+                        </Form.Item>
+                    </>}
+                </>
+            }
+            {/* ============================================================排期与出价============================================================= */}
+            <Divider orientation='center'>排期与出价</Divider>
+            <Form.Item label={<strong>投放日期</strong>} name='dateType'>
+                <Radio.Group >
+                    <Radio.Button value="1">选择开始与结束日期</Radio.Button>
+                    <Radio.Button value="2">长期投放</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {/* 投放日期的不同展示不同的日期选择 */}
+            {
+                dateType === '1' ? <Form.Item name='date' rules={[{ required: true, message: '请选择日期' }]}>
+                    <RangePicker style={{ marginLeft: 177 }}></RangePicker>
+                </Form.Item> : <Form.Item name='date' style={{ marginLeft: 177 }} rules={[{ required: true, message: '请选择日期' }]}>
+                    <DatePickers />
+                </Form.Item>
+            }
+            <Form.Item label={<strong>投放时段</strong>}>
+                <Radio.Group name='timeSeries' defaultValue='1'>
+                    <Radio.Button value={'1'}>全天投放</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            <Form.Item label={<strong>出价方式</strong>} name='bidMode'>
+                <Radio.Group >
+                    {
+                        Object.keys(BidModeEnum).map(key => {
+                            return <Radio.Button value={key} key={key} disabled={!key.includes('CPM')}>{BidModeEnum[key]}</Radio.Button>
+                        })
+                    }
+
+                </Radio.Group>
+            </Form.Item>
+            {/* 出价方式为OCPM才展示 */}
+            {
+                bidMode === 'BID_MODE_OCPM' && <>
+                    <Form.Item label={<strong>优化目标</strong>} name='optimizationGoal' rules={[{ required: true, message: '请选择优化目标' }]}>
+                        <Select style={{ width: 300 }} showSearch filterOption={(input, option) =>
+                            (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
+                        } allowClear>
+                            {
+                                Object.keys(OptimizationGoalEnum).map(key => {
+                                    return <Select.Option value={key} key={key}>{OptimizationGoalEnum[key]}</Select.Option>
+                                })
+                            }
+                        </Select>
+                    </Form.Item>
+                    <Form.Item label={<strong>出价类型</strong>} name='smartBidType'>
+                        <Radio.Group >
+                            <Radio.Button value="SMART_BID_TYPE_CUSTOM">手动出价</Radio.Button>
+                            <Radio.Button value="SMART_BID_TYPE_SYSTEMATIC">自动出价</Radio.Button>
+                        </Radio.Group>
+                    </Form.Item>
+                    <Form.Item label={<strong>出价策略</strong>} name='bidStrategy'>
+                        <Radio.Group >
+                            {
+                                Object.keys(BidStrategyEnum).map(key => {
+                                    return <Radio.Button value={key} key={key} disabled={smartBidType === 'SMART_BID_TYPE_SYSTEMATIC' && key === 'BID_STRATEGY_PRIORITY_CAP_COST'}> {BidStrategyEnum[key]}</Radio.Button>
+                                })
+                            }
+                        </Radio.Group>
+                    </Form.Item>
+                </>
+            }
+            {/* 出价类型为手动出价才展示 */}
+            {
+                smartBidType !== 'SMART_BID_TYPE_SYSTEMATIC' && <>
+                    <Form.Item label={<strong>出价</strong>} name='bidAmount' rules={[{ required: true, message: '请输入价格' }]}>
+                        <Input placeholder='输入价格 元/千次曝光' style={{ width: 300 }} />
+                    </Form.Item>
+                    {/* 当版位选择大于1时才出现 */}
+                    {/* {siteSet?.length > 1 &&<Form.Item label={<strong>分版位出价</strong>} name='bidAdjustment'>
+                        <Switch checkedChildren="开启" unCheckedChildren="关闭" />
+                    </Form.Item>} */}
+                    <Form.Item label={<strong>一键起量</strong>} name='autoAcquisitionEnabled' valuePropName="checked">
+                        <Switch checkedChildren="开启" unCheckedChildren="关闭" />
+                    </Form.Item>
+                    {/* 一键起量开启时才出现 */}
+                    {autoAcquisitionEnabled && <Form.Item label={<strong>起量预算</strong>} name='autoAcquisitionBudget' rules={[{ required: true, message: '请输入起量预算' }]}>
+                        <Input placeholder='起量预算' style={{ width: 300 }} />
+                    </Form.Item>}
+                </>
+            }
+            <Form.Item label={<strong>广告日预算</strong>} name='dailyBudget'>
+                <Input placeholder='不填默认为不限' style={{ width: 300 }} />
+            </Form.Item>
+        </Form>
+    </Modal >
+}
+export default AdModal

+ 48 - 0
src/pages/launchSystemNew/launchManage/localAd/ad/tableConfig.tsx

@@ -0,0 +1,48 @@
+import { PromotedObjectType } from '@/services/launchAdq/enum'
+function tableConfig():any{
+    return [
+        {
+            title: 'ID',
+            dataIndex: 'id',
+            key: 'id',
+            align: 'center',
+        },
+        {
+            title: '广告名称',
+            dataIndex: 'adgroupName',
+            key: 'adgroupName',
+            align: 'center',
+        },
+        {
+            title: '广告推广目标类型',
+            dataIndex: 'promotedObjectType',
+            key: 'promotedObjectType',
+            align: 'center',
+           render:(a: string | number)=>{
+            return PromotedObjectType[a]
+           } 
+        },
+        {
+            title: '投放日期',
+            dataIndex: 'beginDate',
+            key: 'beginDate',
+            align: 'center',
+            render:(a: string,b: { endDate: string })=>{
+                return b?.endDate ? a+'~'+b.endDate : a+'~'+'长期投放'
+            }
+        },
+        {
+            title: '广告出价',
+            dataIndex: 'bidAmount',
+            key: 'bidAmount',
+            align: 'center',  
+        },
+        {
+            title: '创建时间',
+            dataIndex: 'createTime',
+            key: 'createTime',
+            align: 'center',
+        },
+    ]
+}
+export default tableConfig

+ 200 - 0
src/pages/launchSystemNew/launchManage/localAd/adenum.ts

@@ -0,0 +1,200 @@
+const ad_enum = {
+  /**推广计划类型*/
+  campaign_type: {
+    // CAMPAIGN_TYPE_NORMAL: {
+    //   label: '普通展示广告',
+    //   /**推广目标*/
+    //   promoted_object_type: {
+    //     PROMOTED_OBJECT_TYPE_LINK: {
+    //       label: '网页',
+    //       campaign_type: 'CAMPAIGN_TYPE_NORMAL',
+    //       site_set: 'SITE_SET_KANDIAN,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION',
+    //     },
+    //     PROMOTED_OBJECT_TYPE_LINK_WECHAT: {
+    //       label: '品牌网页',
+    //       campaign_type: 'CAMPAIGN_TYPE_NORMAL,PROMOTED_OBJECT_TYPE_LINK_WECHAT',
+    //       site_set: 'SITE_SET_MOMENTS',
+    //     },
+    //     PROMOTED_OBJECT_TYPE_ECOMMERCE: {
+    //       label: '商品推广',
+    //       campaign_type: 'CAMPAIGN_TYPE_NORMAL,CAMPAIGN_TYPE_WECHAT_MOMENTS',
+    //       site_set: 'SITE_SET_KANDIAN,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION,SITE_SET_MOMENTS',
+    //     },
+    //     PROMOTED_OBJECT_TYPE_APP_ANDROID: {
+    //       label: 'Android应用', //名称
+    //       campaign_type: 'CAMPAIGN_TYPE_NORMAL,CAMPAIGN_TYPE_WECHAT_MOMENTS', //关联的推广计划类型
+    //       site_set:
+    //         'SITE_SET_KANDIAN,SITE_SET_MINI_GAME_QQ,SITE_SET_MINI_GAME_WECHAT,SITE_SET_MOBILE_GAME,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION,SITE_SET_MOBILE_YYB,SITE_SET_MOMENTS',
+    //     },
+    //     PROMOTED_OBJECT_TYPE_APP_IOS: {
+    //       label: 'IOS应用',
+    //       campaign_type: 'CAMPAIGN_TYPE_NORMAL,CAMPAIGN_TYPE_WECHAT_MOMENTS',
+    //       site_set: 'SITE_SET_KANDIAN,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION,SITE_SET_MOMENTS',
+    //     },
+    //   },
+    // },
+    CAMPAIGN_TYPE_WECHAT_MOMENTS: {
+      label: '微信朋友圈广告',
+      /**推广目标*/
+      promoted_object_type: {
+        PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT: {
+          label: '微信公众号',
+          site_set: {
+            SITE_SET_MOMENTS: {
+              label: '微信朋友圈',
+            },
+            SITE_SET_WECHAT: {
+              label: '微信公众号与小程序',
+            },
+          },
+        },
+        // PROMOTED_OBJECT_TYPE_ECOMMERCE: {
+        //   label: '商品推广',
+        //   campaign_type: 'CAMPAIGN_TYPE_NORMAL,CAMPAIGN_TYPE_WECHAT_MOMENTS',
+        //   site_set: 'SITE_SET_KANDIAN,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION,SITE_SET_MOMENTS',
+        // },
+        // PROMOTED_OBJECT_TYPE_LINK_WECHAT: {
+        //   label: '品牌网页',
+        //   campaign_type: 'CAMPAIGN_TYPE_NORMAL,PROMOTED_OBJECT_TYPE_LINK_WECHAT',
+        //   site_set: 'SITE_SET_MOMENTS',
+        // },
+        // PROMOTED_OBJECT_TYPE_APP_ANDROID: {
+        //   label: 'Android应用', //名称
+        //   campaign_type: 'CAMPAIGN_TYPE_NORMAL,CAMPAIGN_TYPE_WECHAT_MOMENTS', //关联的推广计划类型
+        //   site_set:
+        //     'SITE_SET_KANDIAN,SITE_SET_MINI_GAME_QQ,SITE_SET_MINI_GAME_WECHAT,SITE_SET_MOBILE_GAME,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION,SITE_SET_MOBILE_YYB,SITE_SET_MOMENTS',
+        // },
+        // PROMOTED_OBJECT_TYPE_APP_IOS: {
+        //   label: 'IOS应用',
+        //   campaign_type: 'CAMPAIGN_TYPE_NORMAL,CAMPAIGN_TYPE_WECHAT_MOMENTS',
+        //   site_set: 'SITE_SET_KANDIAN,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION,SITE_SET_MOMENTS',
+        // },
+        // PROMOTED_OBJECT_TYPE_LEAD_AD: {
+        //   label: '销售线索',
+        //   campaign_type: 'CAMPAIGN_TYPE_NORMAL',
+        //   site_set: 'SITE_SET_MOMENTS',
+        // },
+        // PROMOTED_OBJECT_TYPE_MINI_GAME_WECHAT: {
+        //   label: '微信小游戏',
+        //   campaign_type: 'CAMPAIGN_TYPE_NORMAL,PROMOTED_OBJECT_TYPE_LINK_WECHAT',
+        //   site_set: '',
+        // },
+        // PROMOTED_OBJECT_TYPE_LOCAL_ADS_WECHAT: {
+        //   label: '本地门店',
+        //   campaign_type: 'CAMPAIGN_TYPE_NORMAL,PROMOTED_OBJECT_TYPE_LINK_WECHAT',
+        //   site_set: '',
+        // },
+      },
+    },
+  },
+  /**推广目标*/
+    promoted_object_type: {
+      PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT: {
+        label: '微信公众号',
+        campaign_type: 'CAMPAIGN_TYPE_WECHAT_MOMENTS',
+        site_set: 'SITE_SET_MOMENTS,SITE_SET_WECHAT',
+        adcreative_template_id: '720,',
+      },
+      PROMOTED_OBJECT_TYPE_APP_ANDROID: {
+        label: 'Android应用', //名称
+        campaign_type: 'CAMPAIGN_TYPE_NORMAL,CAMPAIGN_TYPE_WECHAT_MOMENTS', //关联的推广计划类型
+        site_set:
+          'SITE_SET_KANDIAN,SITE_SET_MINI_GAME_QQ,SITE_SET_MINI_GAME_WECHAT,SITE_SET_MOBILE_GAME,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION,SITE_SET_MOBILE_YYB,SITE_SET_MOMENTS',
+      },
+      PROMOTED_OBJECT_TYPE_APP_IOS: {
+        label: 'IOS应用',
+        campaign_type: 'CAMPAIGN_TYPE_NORMAL,CAMPAIGN_TYPE_WECHAT_MOMENTS',
+        site_set: 'SITE_SET_KANDIAN,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION,SITE_SET_MOMENTS',
+      },
+      PROMOTED_OBJECT_TYPE_MINI_GAME_WECHAT: {
+        label: '微信小游戏',
+        campaign_type: 'CAMPAIGN_TYPE_NORMAL,PROMOTED_OBJECT_TYPE_LINK_WECHAT',
+        site_set: '',
+      },
+      PROMOTED_OBJECT_TYPE_ECOMMERCE: {
+        label: '商品推广',
+        campaign_type: 'CAMPAIGN_TYPE_NORMAL,CAMPAIGN_TYPE_WECHAT_MOMENTS',
+        site_set: 'SITE_SET_KANDIAN,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION,SITE_SET_MOMENTS',
+      },
+      PROMOTED_OBJECT_TYPE_LEAD_AD: {
+        label: '销售线索',
+        campaign_type: 'CAMPAIGN_TYPE_NORMAL',
+        site_set: 'SITE_SET_MOMENTS',
+      },
+      PROMOTED_OBJECT_TYPE_LINK: {
+        label: '网页',
+        campaign_type: 'CAMPAIGN_TYPE_NORMAL',
+        site_set: 'SITE_SET_KANDIAN,SITE_SET_MOBILE_INNER,SITE_SET_MOBILE_UNION',
+      },
+      PROMOTED_OBJECT_TYPE_LINK_WECHAT: {
+        label: '品牌网页',
+        campaign_type: 'CAMPAIGN_TYPE_NORMAL,PROMOTED_OBJECT_TYPE_LINK_WECHAT',
+        site_set: 'SITE_SET_MOMENTS',
+      },
+      PROMOTED_OBJECT_TYPE_QQ_MESSAGE: {
+        label: 'QQ消息',
+        campaign_type: 'CAMPAIGN_TYPE_NORMAL',
+        site_set: 'SITE_SET_MOBILE_INNER',
+      },
+      PROMOTED_OBJECT_TYPE_APP_ANDROID_UNION: {
+        label: 'Android应用(优量汇推广)',
+        campaign_type: 'CAMPAIGN_TYPE_NORMAL',
+        site_set: 'SITE_SET_KANDIAN,SITE_SET_MOBILE_UNION',
+      },
+    },
+  /**广告版位*/
+  site_set: {
+    SITE_SET_MOMENTS: {
+      label: '微信朋友圈',
+    },
+    SITE_SET_WECHAT: {
+      label: '微信公众号与小程序',
+    },
+    SITE_SET_KANDIAN: {
+      label: '腾讯看点',
+    },
+    SITE_SET_MINI_GAME_QQ: {
+      label: 'QQ小游戏',
+    },
+    SITE_SET_MINI_GAME_WECHAT: {
+      label: '微信小游戏',
+    },
+    SITE_SET_MOBILE_GAME: {
+      label: 'App游戏',
+    },
+    SITE_SET_MOBILE_INNER: {
+      label: '移动内部站点',
+    },
+    SITE_SET_MOBILE_UNION: {
+      label: '优量汇',
+    },
+    SITE_SET_MOBILE_YYB: {
+      label: '应用宝',
+    },
+    SITE_SET_QQ_MUSIC_GAME: {
+      label: 'QQ、腾讯音乐及游戏',
+    },
+    SITE_SET_TENCENT_NEWS: {
+      label: '腾讯新闻',
+    },
+    SITE_SET_TENCENT_VIDEO: {
+      label: '腾讯视频',
+    },
+  },
+  /**创意形式ID*/
+  adcreative_template_id: {
+    720: {
+      label: '横版视频 16:9',
+    },
+  },
+  /**出价方式*/
+  bid_mode: {},
+  /**	广告优化目标类型*/
+  optimization_goal: {},
+  /**	落地页类型*/
+  page_type: {},
+  /**文字链跳转类型类型*/
+  link_page_type: {},
+  /**链接名称类型*/
+  link_name_type: {},
+};

+ 122 - 0
src/pages/launchSystemNew/launchManage/localAd/creative/index.tsx

@@ -0,0 +1,122 @@
+
+import { FnAjax, useAjax } from '@/Hook/useAjax'
+import { ListData, } from '@/services/launchAdq'
+import { PromotedObjectType } from '@/services/launchAdq/enum'
+import { createSysAdcreative, getSysAdcreativeList } from '@/services/launchAdq/creative'
+import { Col, Row, Input, Select, Button } from 'antd'
+import React, { useEffect, useState, useCallback } from 'react'
+import TableData from '../../../components/TableData'
+import AdModal from './modal'
+import tableConfig from './tableConfig'
+
+export interface ModalConfig {
+    visible: boolean;
+    title?: string;
+}
+
+function Creative() {
+    // 变量
+    const [modalConfig, setModalConfig] = useState<ModalConfig>({
+        visible: true,
+        title: '新建'
+    })
+    const [oldsearchData, setOldsearchData] = useState<any>(null)
+    // api方法
+    const sysAdcreativeList: FnAjax<ListData<any>> = useAjax((params) => getSysAdcreativeList(params))
+    const createSysAdgroup = useAjax((params) => createSysAdcreative(params))
+    // 初始获取列表
+    useEffect(() => {
+        getList({ pageSize: 20, pageNum: 1 })
+    }, [])
+    // 获取列表
+    const getList = useCallback((arg: { pageSize: number, pageNum: number, adcreativeName?: string, promotedObjectType?: string }) => {
+        Object.keys(arg).forEach(key => {
+            !arg[key] && delete arg[key]
+        })
+        if (JSON.stringify(arg) !== JSON.stringify(oldsearchData)) {
+            setOldsearchData(arg)
+            sysAdcreativeList.run(arg)
+        }
+    }, [oldsearchData])
+
+    // 设置变量
+    const handleModalConfig = useCallback((arg: ModalConfig) => {
+        setModalConfig({ ...modalConfig, ...arg })
+    }, [modalConfig])
+    // submit
+    const submit = useCallback((arg: any) => {
+        console.log(arg)
+        createSysAdgroup.run(arg).then(res => {
+            if (res) {
+                sysAdcreativeList.refresh()
+                handleModalConfig({ visible: false })
+            }
+        })
+    }, [sysAdcreativeList])
+    console.log(sysAdcreativeList)
+    return <div>
+        <TableData
+            columns={tableConfig}
+            ajax={sysAdcreativeList}
+            dataSource={sysAdcreativeList?.data?.records}
+            loading={sysAdcreativeList?.loading}
+            scroll={{ y: 600 }}
+            total={sysAdcreativeList?.data?.total}
+            page={sysAdcreativeList?.data?.current}
+            pageSize={sysAdcreativeList?.data?.size}
+            leftChild={<>
+                <Row gutter={[10, 10]}>
+                    <Col span={24}><Button type='primary' onClick={() => {
+                        handleModalConfig({ visible: true })
+                    }}>新建创意模板</Button></Col>
+                    <Col>
+                        <Input
+                            placeholder='创意名称'
+                            allowClear
+                            onBlur={(e) => {
+                                let value = e.target.value
+                                getList({ pageNum: 1, pageSize: 20, adcreativeName: value })
+                            }}
+                            onKeyDownCapture={(e: any) => {
+                                let key = e.key
+                                if (key === 'Enter') {
+                                    let value = e.target.value
+                                    getList({ pageNum: 1, pageSize: 20, adcreativeName: value })
+                                }
+                            }}
+                            onChange={(e) => {
+                                let value = e.target.value
+                                if (!value) {
+                                    getList({ pageNum: 1, pageSize: 20, adcreativeName: value })
+                                }
+                            }}
+                        />
+                    </Col>
+                    <Col>
+                        <Select placeholder='推广目标选择' style={{ minWidth: 200 }} showSearch filterOption={(input, option) =>
+                            (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
+                        } allowClear onChange={(value) => {
+                            getList({ pageNum: 1, pageSize: 20, promotedObjectType: value })
+                        }}>
+                            {
+                                Object.keys(PromotedObjectType).map(key => {
+                                    // let obj = JSON.parse(PromotedObjectType[key])
+                                    return <Select.Option value={key} key={key}>{PromotedObjectType[key]}</Select.Option>
+                                })
+                            }
+                        </Select>
+                    </Col>
+                </Row>
+            </>}
+            onChange={(props: any) => {
+                let { sortData, pagination } = props
+                let { current, pageSize } = pagination
+                getList({ pageNum: current, pageSize })
+            }}
+        // config={guanggao}
+        // configName={'广告模板列表'}
+        />
+        {modalConfig.visible && <AdModal visible={modalConfig.visible} title={modalConfig.title} PupFn={handleModalConfig} callback={submit} confirmLoading={createSysAdgroup.loading} />}
+    </div>
+}
+export default Creative

+ 177 - 0
src/pages/launchSystemNew/launchManage/localAd/creative/modal.tsx

@@ -0,0 +1,177 @@
+import React, { useCallback } from 'react'
+import { Modal, Form, Input, Divider, Select, Radio, DatePicker, Switch } from 'antd'
+import { SiteSetEnum, BidModeEnum, OptimizationGoalEnum, BidStrategyEnum, PromotedObjectType } from '@/services/launchAdq/enum'
+import { ModalConfig } from '.'
+import moment from 'moment';
+const { RangePicker }: { RangePicker: any } = DatePicker;
+let DatePickers: any = DatePicker
+interface Props {
+    title?: string,
+    visible: boolean,
+    PupFn: (arg: ModalConfig) => void,
+    callback: (params: any) => void,
+    confirmLoading: boolean
+}
+/**创意模板*/
+function AdModal(props: Props) {
+    let { visible, title, confirmLoading, PupFn, callback } = props
+    const [form] = Form.useForm();
+    let dateType = Form.useWatch('dateType', form)
+    let bidMode = Form.useWatch('bidMode', form)
+    let smartBidType = Form.useWatch('smartBidType', form)
+    let autoAcquisitionEnabled = Form.useWatch('autoAcquisitionEnabled', form)
+    // let siteSet = Form.useWatch('siteSet', form)
+
+    // 确定事件
+    const handleOk = useCallback(() => {
+        form.validateFields().then(values => {
+            let newValues = JSON.parse(JSON.stringify(values))
+            if (newValues.dateType === '2') {
+                newValues['beginDate'] = moment(newValues.date).format('YYYY-MM-DD')
+            } else {
+                newValues['beginDate'] = moment(newValues.date[0]).format('YYYY-MM-DD')
+                newValues['endDate'] = moment(newValues.date[1]).format('YYYY-MM-DD')
+            }
+            delete newValues['dateType']
+            delete newValues['date']
+            newValues['timeSeries'] = Array(336).fill(1).join('')
+            callback(newValues)
+        })
+        // PupFn({ visible: false })
+    }, [form])
+    return <Modal
+        visible={visible}
+        title={title + '创意'}
+        onCancel={() => { PupFn({ visible: false }) }}
+        onOk={handleOk}
+        width={900}
+        confirmLoading={confirmLoading}
+    >
+        <Form
+            form={form}
+            labelCol={{ span: 3 }}
+            initialValues={
+                {
+                    bidMode: 'BID_MODE_OCPM',
+                    dateType: '2',
+                    bidStrategy: 'BID_STRATEGY_AVERAGE_COST',
+                    timeSeries: '1',
+                    smartBidType: 'SMART_BID_TYPE_CUSTOM',
+                    autoAcquisitionEnabled: false,
+                }
+            }
+        >
+            {/* ============================================================基本信息============================================================= */}
+            <Divider orientation='center'>基本信息</Divider>
+            <Form.Item label={<strong>创意名称</strong>} name='adcreativeName' rules={[{ required: true, message: '请输入广告名称!' }]}>
+                <Input placeholder='创意名称' style={{ width: 300 }} />
+            </Form.Item>
+            <Form.Item label={<strong>广告版位</strong>} name='siteSet' rules={[{ required: true, message: '请输入选择广告版位!' }]}>
+                <Select mode='multiple' style={{ width: 300 }} allowClear>
+                    {
+                        Object.keys(SiteSetEnum).map(key => {
+                            return <Select.Option value={key} key={key}>{SiteSetEnum[key]}</Select.Option>
+                        })
+                    }
+                </Select>
+            </Form.Item>
+            <Form.Item label={<strong>推广目标类型</strong>} name='promotedObjectType' rules={[{ required: true, message: '请选择推广告推广目标类型!' }]}>
+                <Select style={{ width: 300 }} showSearch filterOption={(input, option) =>
+                    (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
+                } allowClear>
+                    {
+                        Object.keys(PromotedObjectType).map(key => {
+                            // let obj = JSON.parse(PromotedObjectType[key])
+                            return <Select.Option value={key} key={key}>{PromotedObjectType[key]}</Select.Option>
+                        })
+                    }
+                </Select>
+            </Form.Item>
+            {/* ============================================================排期与出价============================================================= */}
+            <Divider orientation='center'>排期与出价</Divider>
+            <Form.Item label={<strong>投放日期</strong>} name='dateType'>
+                <Radio.Group >
+                    <Radio.Button value="1">选择开始与结束日期</Radio.Button>
+                    <Radio.Button value="2">长期投放</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {/* 投放日期的不同展示不同的日期选择 */}
+            {
+                dateType === '1' ? <Form.Item name='date' rules={[{ required: true, message: '请选择日期' }]}>
+                    <RangePicker style={{ marginLeft: 107 }}></RangePicker>
+                </Form.Item> : <Form.Item name='date' style={{ marginLeft: 107 }} rules={[{ required: true, message: '请选择日期' }]}>
+                    <DatePickers />
+                </Form.Item>
+            }
+            <Form.Item label={<strong>投放时段</strong>}>
+                <Radio.Group name='timeSeries' defaultValue='1'>
+                    <Radio.Button value={'1'}>全天投放</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            <Form.Item label={<strong>出价方式</strong>} name='bidMode'>
+                <Radio.Group >
+                    {
+                        Object.keys(BidModeEnum).map(key => {
+                            return <Radio.Button value={key} key={key} disabled={!key.includes('CPM')}>{BidModeEnum[key]}</Radio.Button>
+                        })
+                    }
+
+                </Radio.Group>
+            </Form.Item>
+            {/* 出价方式为OCPM才展示 */}
+            {
+                bidMode === 'BID_MODE_OCPM' && <>
+                    <Form.Item label={<strong>优化目标</strong>} name='optimizationGoal' rules={[{ required: true, message: '请选择优化目标' }]}>
+                        <Select style={{ width: 300 }} showSearch filterOption={(input, option) =>
+                            (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
+                        } allowClear>
+                            {
+                                Object.keys(OptimizationGoalEnum).map(key => {
+                                    return <Select.Option value={key} key={key}>{OptimizationGoalEnum[key]}</Select.Option>
+                                })
+                            }
+                        </Select>
+                    </Form.Item>
+                    <Form.Item label={<strong>出价类型</strong>} name='smartBidType'>
+                        <Radio.Group >
+                            <Radio.Button value="SMART_BID_TYPE_CUSTOM">手动出价</Radio.Button>
+                            <Radio.Button value="SMART_BID_TYPE_SYSTEMATIC">自动出价</Radio.Button>
+                        </Radio.Group>
+                    </Form.Item>
+                    <Form.Item label={<strong>出价策略</strong>} name='bidStrategy'>
+                        <Radio.Group >
+                            {
+                                Object.keys(BidStrategyEnum).map(key => {
+                                    return <Radio.Button value={key} key={key} disabled={smartBidType === 'SMART_BID_TYPE_SYSTEMATIC' && key === 'BID_STRATEGY_PRIORITY_CAP_COST'}> {BidStrategyEnum[key]}</Radio.Button>
+                                })
+                            }
+                        </Radio.Group>
+                    </Form.Item>
+                </>
+            }
+            {/* 出价类型为手动出价才展示 */}
+            {
+                smartBidType !== 'SMART_BID_TYPE_SYSTEMATIC' && <>
+                    <Form.Item label={<strong>出价</strong>} name='bidAmount' rules={[{ required: true, message: '请输入价格' }]}>
+                        <Input placeholder='输入价格 元/千次曝光' style={{ width: 300 }} />
+                    </Form.Item>
+                    {/* 当版位选择大于1时才出现 */}
+                    {/* {siteSet?.length > 1 &&<Form.Item label={<strong>分版位出价</strong>} name='bidAdjustment'>
+                        <Switch checkedChildren="开启" unCheckedChildren="关闭" />
+                    </Form.Item>} */}
+                    <Form.Item label={<strong>一键起量</strong>} name='autoAcquisitionEnabled' valuePropName="checked">
+                        <Switch checkedChildren="开启" unCheckedChildren="关闭" />
+                    </Form.Item>
+                    {/* 一键起量开启时才出现 */}
+                    {autoAcquisitionEnabled && <Form.Item label={<strong>起量预算</strong>} name='autoAcquisitionBudget' rules={[{ required: true, message: '请输入起量预算' }]}>
+                        <Input placeholder='起量预算' style={{ width: 300 }} />
+                    </Form.Item>}
+                </>
+            }
+            <Form.Item label={<strong>广告日预算</strong>} name='dailyBudget'>
+                <Input placeholder='不填默认为不限' style={{ width: 300 }} />
+            </Form.Item>
+        </Form>
+    </Modal >
+}
+export default AdModal

+ 48 - 0
src/pages/launchSystemNew/launchManage/localAd/creative/tableConfig.tsx

@@ -0,0 +1,48 @@
+import { PromotedObjectType } from '@/services/launchAdq/enum'
+function tableConfig():any{
+    return [
+        {
+            title: 'ID',
+            dataIndex: 'id',
+            key: 'id',
+            align: 'center',
+        },
+        {
+            title: '广告名称',
+            dataIndex: 'adgroupName',
+            key: 'adgroupName',
+            align: 'center',
+        },
+        {
+            title: '广告推广目标类型',
+            dataIndex: 'promotedObjectType',
+            key: 'promotedObjectType',
+            align: 'center',
+           render:(a: string | number)=>{
+            return PromotedObjectType[a]
+           } 
+        },
+        {
+            title: '投放日期',
+            dataIndex: 'beginDate',
+            key: 'beginDate',
+            align: 'center',
+            render:(a: string,b: { endDate: string })=>{
+                return b?.endDate ? a+'~'+b.endDate : a+'~'+'长期投放'
+            }
+        },
+        {
+            title: '广告出价',
+            dataIndex: 'bidAmount',
+            key: 'bidAmount',
+            align: 'center',  
+        },
+        {
+            title: '创建时间',
+            dataIndex: 'createTime',
+            key: 'createTime',
+            align: 'center',
+        },
+    ]
+}
+export default tableConfig

+ 47 - 0
src/pages/launchSystemNew/launchManage/localAd/index.less

@@ -0,0 +1,47 @@
+.card-container p {
+    margin: 0;
+  }
+  .card-container > .ant-tabs-card .ant-tabs-content {
+    height: 120px;
+    margin-top: -16px;
+  }
+  .card-container > .ant-tabs-card .ant-tabs-content > .ant-tabs-tabpane {
+    padding: 16px;
+    background: #fff;
+  }
+  .card-container > .ant-tabs-card > .ant-tabs-nav::before {
+    display: none;
+  }
+  .card-container > .ant-tabs-card .ant-tabs-tab,
+  [data-theme='compact'] .card-container > .ant-tabs-card .ant-tabs-tab {
+    background: transparent;
+    border-color: transparent;
+  }
+  .card-container > .ant-tabs-card .ant-tabs-tab-active,
+  [data-theme='compact'] .card-container > .ant-tabs-card .ant-tabs-tab-active {
+    background: #fff;
+    border-color: #fff;
+  }
+  #components-tabs-demo-card-top .code-box-demo {
+    padding: 24px;
+    overflow: hidden;
+    background: #f5f5f5;
+  }
+  [data-theme='compact'] .card-container > .ant-tabs-card .ant-tabs-content {
+    height: 120px;
+    margin-top: -8px;
+  }
+  [data-theme='dark'] .card-container > .ant-tabs-card .ant-tabs-tab {
+    background: transparent;
+    border-color: transparent;
+  }
+  [data-theme='dark'] #components-tabs-demo-card-top .code-box-demo {
+    background: #000;
+  }
+  [data-theme='dark'] .card-container > .ant-tabs-card .ant-tabs-content > .ant-tabs-tabpane {
+    background: #141414;
+  }
+  [data-theme='dark'] .card-container > .ant-tabs-card .ant-tabs-tab-active {
+    background: #141414;
+    border-color: #141414;
+  }

+ 28 - 0
src/pages/launchSystemNew/launchManage/localAd/index.tsx

@@ -0,0 +1,28 @@
+import React, { useState } from 'react'
+import { Card, Button, Tabs } from 'antd';
+import './index.less'
+import Ad from './ad';
+import Creative from './creative';
+import Targeting from './targeting';
+const { TabPane } = Tabs;
+const tabsConfig = [
+    // { key: '1', tab: '计划模板',jsx:<Campaign/> },
+    { key: '1', tab: '广告模板',jsx:<Ad/>},
+    { key: '2', tab: '创意模板' ,jsx:<Creative/>},
+    { key: '3', tab: '定向模板' ,jsx:<Targeting/>},
+]
+function LocalAd() {
+    const [activeKey, setActiveKey] = useState('1')
+    return <Card>
+        <Tabs activeKey={activeKey} type="card"  onChange={(activeKey) => { setActiveKey(activeKey) }} >
+            {
+                tabsConfig?.map(item => {
+                    return <TabPane tab={item.tab} key={item.key} >
+                        {item.jsx}
+                    </TabPane>
+                })
+            }
+        </Tabs>
+    </Card>
+}
+export default LocalAd

+ 106 - 0
src/pages/launchSystemNew/launchManage/localAd/targeting/index.tsx

@@ -0,0 +1,106 @@
+
+import { FnAjax, useAjax } from '@/Hook/useAjax'
+import { ListData, } from '@/services/launchAdq'
+import { createsysTargeting, getsysTargetingList } from '@/services/launchAdq/targeting'
+import { Col, Row, Input,  Button } from 'antd'
+import React, { useEffect, useState, useCallback } from 'react'
+import TableData from '../../../components/TableData'
+import AdModal from './modal'
+import tableConfig from './tableConfig'
+
+export interface ModalConfig {
+    visible: boolean;
+    title?: string;
+}
+
+function Targeting() {
+    // 变量
+    const [modalConfig, setModalConfig] = useState<ModalConfig>({
+        visible: false,
+        title: '新建'
+    })
+    const [oldsearchData, setOldsearchData] = useState<any>(null)
+    // api方法
+    const list: FnAjax<ListData<any>> = useAjax((params) => getsysTargetingList(params))
+    const create = useAjax((params) => createsysTargeting(params))
+    // 初始获取列表
+    useEffect(() => {
+        getList({ pageSize: 20, pageNum: 1 })
+    }, [])
+    // 获取列表
+    const getList = useCallback((arg: { pageSize: number, pageNum: number, targetingName?: string, promotedObjectType?: string }) => {
+        Object.keys(arg).forEach(key => {
+            !arg[key] && delete arg[key]
+        })
+        if (JSON.stringify(arg) !== JSON.stringify(oldsearchData)) {
+            setOldsearchData(arg)
+            list.run(arg)
+        }
+    }, [oldsearchData])
+
+    // 设置变量
+    const handleModalConfig = useCallback((arg: ModalConfig) => {
+        setModalConfig({ ...modalConfig, ...arg })
+    }, [modalConfig])
+    // submit
+    const submit = useCallback((arg: any) => {
+        console.log(arg)
+        create.run(arg).then(res => {
+            if (res) {
+                list.refresh()
+                handleModalConfig({ visible: false })
+            }
+        })
+    }, [list])
+    return <div>
+        <TableData
+            columns={tableConfig}
+            ajax={list}
+            dataSource={list?.data?.records}
+            loading={list?.loading}
+            scroll={{ y: 600 }}
+            total={list?.data?.total}
+            page={list?.data?.current}
+            pageSize={list?.data?.size}
+            leftChild={<>
+                <Row gutter={[10, 10]}>
+                    <Col span={24}><Button type='primary' onClick={() => {
+                        handleModalConfig({ visible: true })
+                    }}>新建定向模板</Button></Col>
+                    <Col>
+                        <Input
+                            placeholder='定向名称'
+                            allowClear
+                            onBlur={(e) => {
+                                let value = e.target.value
+                                getList({ pageNum: 1, pageSize: 20, targetingName: value })
+                            }}
+                            onKeyDownCapture={(e: any) => {
+                                let key = e.key
+                                if (key === 'Enter') {
+                                    let value = e.target.value
+                                    getList({ pageNum: 1, pageSize: 20, targetingName: value })
+                                }
+                            }}
+                            onChange={(e) => {
+                                let value = e.target.value
+                                if (!value) {
+                                    getList({ pageNum: 1, pageSize: 20, targetingName: value })
+                                }
+                            }}
+                        />
+                    </Col>
+                </Row>
+            </>}
+            onChange={(props: any) => {
+                let { sortData, pagination } = props
+                let { current, pageSize } = pagination
+                getList({ pageNum: current, pageSize })
+            }}
+        // config={guanggao}
+        // configName={'广告模板列表'}
+        />
+        {modalConfig.visible && <AdModal visible={modalConfig.visible} title={modalConfig.title} PupFn={handleModalConfig} callback={submit} confirmLoading={create.loading} />}
+    </div>
+}
+export default Targeting

+ 576 - 0
src/pages/launchSystemNew/launchManage/localAd/targeting/modal.tsx

@@ -0,0 +1,576 @@
+import React, { useCallback, useState, useEffect } from 'react'
+import { Modal, Form, Input, Divider, Select, Radio, Checkbox, TreeSelect } from 'antd'
+import { GenderEnum, EducationEnum, ExcludedDimensionEnum, MaritalStatusEnum, OptimizationGoalEnum, UserOsEnum, DevicePriceEnum, NetworkEnum, WechatAdBehaviorEnum } from '@/services/launchAdq/enum'
+import { ModalConfig } from '.'
+import { useAjax } from '@/Hook/useAjax'
+import { getTagsList } from '@/services/launchAdq/global'
+interface Props {
+    title?: string,
+    visible: boolean,
+    PupFn: (arg: ModalConfig) => void,
+    callback: (params: any) => void,
+    confirmLoading: boolean
+}
+const ios_os = Object.keys(UserOsEnum).filter(key => key.includes('IOS'))
+const android_os = Object.keys(UserOsEnum).filter(key => key.includes('ANDROID'))
+/**创意模板*/
+function AdModal(props: Props) {
+    let { visible, title, confirmLoading, PupFn, callback } = props
+    const tagsList_REGION = useAjax((params) => getTagsList(params))
+    const tagsList_MODEL = useAjax((params) => getTagsList(params))
+    const [form] = Form.useForm();
+    const [indeterminateIos, setIndeterminateIos] = useState(false);
+    const [indeterminateAndroid, setIndeterminateAndroid] = useState(false);
+    const [modelList, setModelList] = useState([])
+    const [regionsList, setRegionsList] = useState([])
+    let educationType = Form.useWatch('educationType', form)
+    let ageType = Form.useWatch('ageType', form)
+    let age_min = Form.useWatch('age_min', form)
+    let age_max = Form.useWatch('age_max', form)
+    let maritalStatusType = Form.useWatch('maritalStatusType', form)
+    let excludedDimension = Form.useWatch('excludedDimension', form)
+    let userOsType = Form.useWatch('userOsType', form)
+    let userOsIos = Form.useWatch('userOsIos', form)
+    let userOsAndroid = Form.useWatch('userOsAndroid', form)
+    let devicePriceType = Form.useWatch('devicePriceType', form)
+    let networkType = Form.useWatch('networkType', form)
+    let wechatAdBehaviorType = Form.useWatch('wechatAdBehaviorType', form)
+    let actions = Form.useWatch('actions', form)
+    let excludedActions = Form.useWatch('excludedActions', form)
+    let deviceBrandModelType = Form.useWatch('deviceBrandModelType', form)
+    let deviceBrandModelList = Form.useWatch('deviceBrandModelList', form)
+    let geoLocationType = Form.useWatch('geoLocationType', form)
+
+    // 确定事件
+    const handleOk = useCallback(() => {
+        form.validateFields().then(values => {
+            let newValues = JSON.parse(JSON.stringify(values))
+            newValues.targeting = {}
+            Object.keys(newValues).forEach(key => {
+                switch (key) {
+                    case 'geoLocationType':
+                        if (newValues[key] === '1') {
+                            newValues.targeting.geoLocation = {
+                                locationTypes: ['LIVE_IN'],//对于微信流量(site_set=SITE_SET_WECHAT、SITE_SET_MOMENTS、SITE_SET_MINI_GAME_WECHAT),仅能选择"LIVE_IN"(常住);
+                                regions: newValues.regions
+                            }
+                        }
+                        delete newValues[key]
+                        delete newValues.regions
+                        break;
+                    case 'ageType'://年龄处理
+                        if (newValues[key] === '1') {
+                            newValues.targeting.age = {
+                                min: newValues.age_min,
+                                max: newValues.age_max
+                            }
+                        }
+                        delete newValues[key]
+                        delete newValues.age_min
+                        delete newValues.age_max
+                        break;
+                    case 'gender'://性别
+                        newValues[key] !== '0' && (newValues.targeting.gender = newValues[key])
+                        delete newValues[key]
+                        break;
+                    case 'educationType'://学历
+                        newValues[key] === '1' && (newValues.targeting.education = newValues.education)
+                        delete newValues[key]
+                        break;
+                    case 'maritalStatusType'://婚恋
+                        newValues[key] === '1' && (newValues.targeting.maritalStatus = newValues.maritalStatus)
+                        delete newValues[key]
+                        break;
+                    case 'customAudienceType'://定向人群
+                        break;
+                    case 'deviceBrandModelType'://品牌型号
+                        if (newValues[key] === '1') {
+                            newValues.targeting.deviceBrandModel = {}
+                            if (newValues.isexcluded) {
+                                newValues.targeting.deviceBrandModel.excludedList = newValues.deviceBrandModelList
+                                delete newValues.targeting.deviceBrandModel.includedList
+                            } else {
+                                newValues.targeting.deviceBrandModel.includedList = newValues.deviceBrandModelList
+                                delete newValues.targeting.deviceBrandModel.excludedList
+                            }
+                            if (!newValues.targeting.deviceBrandModel.excludedList && !newValues.targeting.deviceBrandModel.includedList) {
+                                delete newValues.targeting.deviceBrandModel
+                            }
+                        }
+                        delete newValues[key]
+                        delete newValues.deviceBrandModelList
+                        delete newValues.isexcluded
+                        break;
+                    case 'wechatAdBehaviorType'://微信再营销
+                        if (newValues[key] === '1') {
+                            newValues.targeting.wechatAdBehavior = {}
+                            if (newValues.actions) {
+                                newValues.targeting.wechatAdBehavior = { ...newValues.targeting.wechatAdBehavior, actions: newValues.actions }
+                            }
+                            if (newValues.excludedActions) {
+                                newValues.targeting.wechatAdBehavior = { ...newValues.targeting.wechatAdBehavior, excludedActions: newValues.excludedActions }
+                            }
+                            // 去除空值的参数
+                            Object.keys(newValues.targeting.wechatAdBehavior).forEach(key => {
+                                if (!newValues.targeting.wechatAdBehavior[key] || newValues.targeting.wechatAdBehavior[key]?.length === 0) {
+                                    delete newValues.targeting.wechatAdBehavior[key]
+                                }
+                            })
+                            // 什么都没删除参数
+                            if (!newValues.targeting.wechatAdBehavior.actions && !newValues.targeting.wechatAdBehavior.excludedActions) {
+                                delete newValues.targeting.wechatAdBehavior
+                            }
+                        }
+                        delete newValues[key]
+                        delete newValues.actions
+                        delete newValues.excludedActions
+                        break;
+                    case 'networkType'://联网方式
+                        newValues[key] === '1' && (newValues.targeting.networkType = newValues.network)
+                        delete newValues[key]
+                        delete newValues.network
+                        break;
+                    case 'devicePriceType'://手机价格
+                        newValues[key] === '1' && (newValues.targeting.network = newValues.network)
+                        delete newValues[key]
+                        delete newValues.devicePrice
+                        break;
+                    case 'userOsType'://手机系统
+                        if (newValues[key] === '1') {
+                            newValues.targeting.userOs = []
+                            if (newValues.userOsIos) {
+                                newValues.targeting.userOs = [...newValues.targeting.userOs, ...newValues.userOsIos]
+                            }
+                            if (newValues.userOsAndroid) {
+                                newValues.targeting.userOs = [...newValues.targeting.userOs, ...newValues.userOsAndroid]
+                            }
+                            if (newValues.targeting.userOs.length === 0) {
+                                delete newValues.targeting.userOs
+                            }
+                        }
+                        delete newValues[key]
+                        delete newValues.userOsIosAll
+                        delete newValues.userOsAndroidAll
+                        delete newValues.userOsIos
+                        delete newValues.userOsAndroid
+                        break;
+                    case 'excludedDimension'://排除已转化用户
+                        if (newValues[key] !== '0') {
+                            newValues.targeting.excludedConvertedAudience = newValues.conversionBehaviorList ? {
+                                excludedDimension: newValues.excludedDimension,
+                                conversionBehaviorList: [newValues.conversionBehaviorList]
+                            } : {
+                                excludedDimension: newValues.excludedDimension,
+                            }
+                        }
+                        delete newValues[key]
+                        delete newValues.conversionBehaviorList
+                        break;
+                }
+            })
+            // console.log(newValues)
+            callback(newValues)
+        })
+    }, [form])
+
+    // 监听ios系统全选事件
+    useEffect(() => {
+        setIndeterminateIos(!!userOsIos?.length && userOsIos?.length < ios_os.length)
+        form.setFieldsValue({ userOsIosAll: userOsIos?.length === ios_os.length })
+    }, [userOsIos])
+    // 监听android系统全选事件
+    useEffect(() => {
+        setIndeterminateAndroid(!!userOsAndroid?.length && userOsAndroid?.length < android_os.length)
+        form.setFieldsValue({ userOsAndroidAll: userOsAndroid?.length === android_os.length })
+    }, [userOsAndroid])
+    // 获取定向标签
+    useEffect(() => {
+        // 获取地域
+        tagsList_REGION.run({ type: 'REGION' }).then(res => {
+            let arr: any = Object.values(res).filter(v => typeof v !== 'string')
+            let parentList = arr.filter((item: { parentName: any }) => !item.parentName)
+            let childrenList = arr.filter((item: { parentName: any }) => item.parentName)
+            parentList = parentList.map((item: { name: any; id: any, parentId: any }) => {
+                let children = childrenList?.filter((c: { parentId: any }) => {
+                    return item.id === c.parentId
+                })
+                let obj = {
+                    title: item.name,
+                    value: item.id,
+                    key: item.id,
+                    parentId: item.parentId,
+                    disabled: item.id === 710000 || item.id === 810000 || item.id === 820000,
+                    children: children.map((item: { name: any; id: any, parentId: any }) => ({
+                        title: item.name,
+                        value: item.id,
+                        key: item.id,
+                        parentId: item.parentId
+                    }))
+                }
+                return obj
+            })
+            parentList = parentList.map((item: any) => {
+                let itemArr = item?.children?.map((c: any) => {
+                    let arr = childrenList.filter((d: { parentId: any }) => {
+                        return d.parentId === c.value
+                    })
+                    arr = arr.map((i: { name: any; id: any }) => ({
+                        title: i.name,
+                        value: i.id,
+                        key: i.id,
+                    }))
+                    return { ...c, children: arr }
+                })
+                return { ...item, children: itemArr }
+            })
+            // let zg = parentList.filter((item: { title: string }) => item.title === '中国')
+            let zg_children = parentList.filter((item: { title: string }) => (item.title !== '中国' && item.title !== '国外'))
+            // zg[0].children = zg_children
+            setRegionsList(zg_children)
+        })
+        // 获取手机
+        tagsList_MODEL.run({ type: 'DEVICE_BRAND_MODEL' }).then(res => {
+            let arr: any = Object.values(res).filter(v => typeof v !== 'string')
+            let parentList = arr.filter((item: { parentName: any }) => !item.parentName)
+            let childrenList = arr.filter((item: { parentName: any }) => item.parentName)
+            parentList = parentList.map((item: { name: any; id: any }) => {
+                let children = childrenList?.filter((c: { parentId: any }) => {
+                    return item.id === c.parentId
+                })
+                let obj = {
+                    title: item.name,
+                    value: item.id,
+                    key: item.id,
+                    children: children.map((item: { name: any; id: any }) => ({
+                        title: item.name,
+                        value: item.id,
+                        key: item.id,
+                    }))
+                }
+                return obj
+            })
+            setModelList(parentList)
+        })
+    }, [])
+    return <Modal
+        visible={visible}
+        title={title + '定向'}
+        onCancel={() => { PupFn({ visible: false }) }}
+        onOk={handleOk}
+        width={900}
+        confirmLoading={confirmLoading}
+    >
+        <Form
+            form={form}
+            labelCol={{ span: 3 }}
+            initialValues={
+                {
+                    geoLocationType: '0',
+                    educationType: '0',
+                    ageType: '0',
+                    gender: '0',
+                    maritalStatusType: '0',
+                    age_min: 14,
+                    age_max: 66,
+                    targetingName: '',
+                    excludedDimension: '0',
+                    userOsType: '0',
+                    devicePriceType: '0',
+                    networkType: '0',
+                    wechatAdBehaviorType: '0',
+                    deviceBrandModelType: '0'
+                }
+            }
+        >
+            {/* ============================================================基本信息============================================================= */}
+            <Divider orientation='left'><h3>基本信息</h3></Divider>
+            {/* ====================定向名称========================= */}
+            <Form.Item label={<strong>定向名称</strong>} name='targetingName' rules={[{ required: true, message: '请输入定向名称!' }]}>
+                <Input placeholder='定向名称' style={{ width: 300 }} />
+            </Form.Item>
+            {/* ====================定向描述========================= */}
+            <Form.Item label={<strong>定向描述</strong>} name='description' >
+                <Input.TextArea placeholder='定向名称' style={{ width: 300 }} rows={2} />
+            </Form.Item>
+            {/* ============================================================排期与出价============================================================= */}
+            <Divider orientation='left'>人口学数学</Divider>
+            {/* ====================地理位置========================= */}
+            <Form.Item label={<strong>地理位置</strong>} name='geoLocationType' style={geoLocationType === '1' ? { marginBottom: 5 } : {}}>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">按区域</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {
+                geoLocationType === '1' && <Form.Item
+                    style={{ marginLeft: 107, marginBottom: 10 }}
+                    name='regions'
+                    rules={[{ type: 'array', max: 1000, message: '最多选择1000' }]}
+                >
+                    <TreeSelect
+                        showSearch={true}
+                        maxTagCount={50}
+                        treeCheckable={true}
+                        showCheckedStrategy={TreeSelect.SHOW_PARENT}
+                        treeData={regionsList}
+                        style={{ width: '100%' }}
+                        allowClear
+                        filterTreeNode={(inputValue: string, treeNode: any) => {
+                            if (treeNode.title.includes(inputValue)) {
+                                return true
+                            } else {
+                                return false
+                            }
+                        }}
+                    />
+                </Form.Item>
+            }
+            {/* ====================年龄========================= */}
+            <Form.Item label={<strong>年龄</strong>} name='ageType' style={ageType === '1' ? { marginBottom: 5 } : {}}>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">自定义</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {
+                ageType === '1' && <div style={{ display: 'flex', justifyContent: 'left', alignItems: 'center' }}>
+                    <Form.Item style={{ marginLeft: 107 }} name='age_min'>
+                        <Select style={{ width: 120 }} >
+                            {
+                                Array(66 - 13).fill('').map((n, i) => i + 14).filter(i => i !== 15 && i !== 16 && i !== 17).map(i => {
+                                    return <Select.Option disabled={i > age_max} value={i} key={i}>{i === 66 ? '66 岁及以上' : i + ' 岁'}</Select.Option>
+                                })
+
+                            }
+
+                        </Select>
+                    </Form.Item>
+                    <Form.Item style={{ marginLeft: 10 }} name='age_max'>
+                        <Select style={{ width: 120 }}>
+                            {
+                                Array(66 - 17).fill('').map((n, i) => {
+                                    return <Select.Option disabled={i + 18 < age_min} value={i + 18} key={i + 18}>{i + 18 === 66 ? '66 岁及以上' : i + 18 + ' 岁'}</Select.Option>
+                                })
+                            }
+
+                        </Select>
+                    </Form.Item>
+                </div>
+            }
+            {/* ====================性别========================= */}
+            <Form.Item label={<strong>性别</strong>} name='gender'>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    {
+                        Object.keys(GenderEnum).map(key => {
+                            return <Radio.Button value={key} key={key}>{GenderEnum[key]}</Radio.Button>
+                        })
+                    }
+
+                </Radio.Group>
+            </Form.Item>
+            {/* ====================学历========================= */}
+            <Form.Item label={<strong>学历</strong>} name='educationType' style={educationType === '1' ? { marginBottom: 5 } : {}}>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">自定义</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {
+                educationType === '1' && <Form.Item style={{ marginLeft: 107 }} name='education'>
+                    <Checkbox.Group options={Object.keys(EducationEnum).map(key => ({ label: EducationEnum[key], value: key }))} />
+                </Form.Item>
+            }
+            {/* ====================婚恋育儿状态========================= */}
+            <Form.Item label={<strong>婚恋育儿状态</strong>} name='maritalStatusType' style={maritalStatusType === '1' ? { marginBottom: 5 } : {}}>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">自定义</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {
+                maritalStatusType === '1' && <Form.Item style={{ marginLeft: 107 }} name='maritalStatus'>
+                    <Checkbox.Group options={Object.keys(MaritalStatusEnum).map(key => ({ label: MaritalStatusEnum[key], value: key }))} />
+                </Form.Item>
+            }
+
+            {/* ============================================================用户行为============================================================= */}
+            <Divider orientation='left'>用户行为</Divider>
+            {/* <Form.Item label={<strong>行为兴趣意向</strong>} name='behaviorOrInterestType'>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">自定义</Radio.Button>
+                </Radio.Group>
+            </Form.Item> */}
+            {/* ====================排除已转化用户========================= */}
+            <Form.Item label={<strong>排除已转化用户</strong>} name='excludedDimension' style={excludedDimension !== '0' ? { marginBottom: 5 } : {}}>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    {
+                        Object.keys(ExcludedDimensionEnum).map(key => {
+                            return <Radio.Button value={key} key={key}>{ExcludedDimensionEnum[key]}</Radio.Button>
+                        })
+                    }
+                </Radio.Group>
+            </Form.Item>
+            {
+                excludedDimension !== '0' && <Form.Item style={{ marginLeft: 107 }} name='conversionBehaviorList'>
+                    <Select style={{ width: 300 }} showSearch filterOption={(input, option) =>
+                        (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
+                    } allowClear placeholder='转化行为,不选为默认行为'>
+                        {
+                            Object.keys(OptimizationGoalEnum).map(key => {
+                                return <Select.Option value={key} key={key}>{OptimizationGoalEnum[key]}</Select.Option>
+                            })
+                        }
+                    </Select>
+                </Form.Item>
+            }
+            {/* ============================================================自定义人群============================================================= */}
+            {/* <Divider orientation='left'>自定义人群</Divider> */}
+            {/* ====================自定义人群========================= */}
+            {/* <Form.Item label={<strong>自定义人群</strong>} name='customAudienceType'>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">自定义</Radio.Button>
+                </Radio.Group>
+            </Form.Item> */}
+
+            {/* ============================================================设备定向============================================================= */}
+            <Divider orientation='left'>设备定向</Divider>
+            {/* ====================设备品牌型号========================= */}
+            <Form.Item label={<strong>设备品牌型号</strong>} name='deviceBrandModelType' style={deviceBrandModelType === '1' ? { marginBottom: 5 } : {}}>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">自定义</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {
+                deviceBrandModelType === '1' && <>
+                    <Form.Item style={{ marginLeft: 107, marginBottom: 10 }}
+                        name='deviceBrandModelList'
+                        rules={[{ type: 'array', max: 400, message: '最多选择400个设备型号' }]}
+                    >
+                        <TreeSelect
+                            showSearch={true}
+                            maxTagCount={50}
+                            treeCheckable={true}
+                            showCheckedStrategy={TreeSelect.SHOW_CHILD}
+                            treeData={modelList}
+                            style={{ width: '100%' }}
+                            allowClear
+                            filterTreeNode={(inputValue: string, treeNode: any) => {
+                                if (treeNode.title.includes(inputValue)) {
+                                    return true
+                                } else {
+                                    return false
+                                }
+                            }}
+                        />
+                    </Form.Item>
+                    <Form.Item name='isexcluded' valuePropName="checked" style={{ marginLeft: 107, marginBottom: 10 }} >
+                        <Checkbox ><p style={{
+                            position: 'absolute',
+                            width: '95%',
+                            top: '50%',
+                            transform: 'translate(0, -50%)'
+                        }}>排除所选设备的用户 <span style={{ float: 'right' }}>已选 <span style={deviceBrandModelList?.length > 400 ? { color: 'red' } : {}}>{deviceBrandModelList?.length ?? 0}</span>/400</span></p></Checkbox>
+                    </Form.Item>
+                </>
+            }
+            {/* ====================操作系统版本========================= */}
+            <Form.Item label={<strong>操作系统版本</strong>} name='userOsType' style={userOsType === '1' ? { marginBottom: 5 } : {}}>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">自定义</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {
+                userOsType === '1' && <>
+                    <Form.Item style={{ marginLeft: 107, marginBottom: 0 }} name='userOsIosAll' valuePropName="checked" getValueFromEvent={(e) => {
+                        let checked = e.target.checked
+                        form.setFieldsValue({ userOsIos: checked ? ios_os : [] })
+                        setIndeterminateIos(false)
+                    }}>
+                        <Checkbox indeterminate={indeterminateIos} >
+                            IOS全选
+                        </Checkbox>
+                    </Form.Item>
+                    <Form.Item style={{ marginLeft: 107 }} name='userOsIos' >
+                        <Checkbox.Group
+                            options={
+                                ios_os.map(key => {
+                                    return { label: UserOsEnum[key], value: key }
+                                })
+                            }
+                        />
+                    </Form.Item>
+                    <Form.Item style={{ marginLeft: 107, marginBottom: 0 }} name='userOsAndroidAll' valuePropName="checked" getValueFromEvent={(e) => {
+                        let checked = e.target.checked
+                        form.setFieldsValue({ userOsAndroid: checked ? android_os : [] })
+                        setIndeterminateAndroid(false)
+                    }}>
+                        <Checkbox indeterminate={indeterminateAndroid}>
+                            Android全选
+                        </Checkbox>
+                    </Form.Item>
+                    <Form.Item style={{ marginLeft: 107 }} name='userOsAndroid'>
+                        <Checkbox.Group
+                            options={
+                                android_os.map(key => {
+                                    return { label: UserOsEnum[key], value: key }
+                                })
+                            }
+                        />
+                    </Form.Item>
+                </>
+            }
+            {/* ====================联网方式========================= */}
+            <Form.Item label={<strong>联网方式</strong>} name='networkType' style={networkType === '1' ? { marginBottom: 5 } : {}}>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">自定义</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {
+                networkType === '1' && <Form.Item style={{ marginLeft: 107 }} name='network'>
+                    <Checkbox.Group options={Object.keys(NetworkEnum).map(key => ({ label: NetworkEnum[key], value: key }))} />
+                </Form.Item>
+            }
+            {/* ====================设备价格========================= */}
+            <Form.Item label={<strong>设备价格</strong>} name='devicePriceType' style={devicePriceType === '1' ? { marginBottom: 5 } : {}}>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">自定义</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {
+                devicePriceType === '1' && <Form.Item style={{ marginLeft: 107 }} name='devicePrice'>
+                    <Checkbox.Group options={Object.keys(DevicePriceEnum).map(key => ({ label: DevicePriceEnum[key], value: key }))} />
+                </Form.Item>
+            }
+            {/* ============================================================流量方数学============================================================= */}
+            <Divider orientation='left'>流量方数学</Divider>
+            {/* ====================微信再营销========================= */}
+            <Form.Item label={<strong>微信再营销</strong>} name='wechatAdBehaviorType' style={wechatAdBehaviorType === '1' ? { marginBottom: 5 } : {}}>
+                <Radio.Group >
+                    <Radio.Button value="0">不限</Radio.Button>
+                    <Radio.Button value="1">自定义</Radio.Button>
+                </Radio.Group>
+            </Form.Item>
+            {
+                wechatAdBehaviorType === '1' && <>
+                    <p style={{ marginBottom: 5, marginLeft: 107 }}><strong style={{ marginRight: 20 }}>再营销</strong></p>
+                    <Form.Item style={{ marginLeft: 107, marginBottom: 10 }} name='actions'>
+                        <Checkbox.Group options={Object.keys(WechatAdBehaviorEnum).map(key => ({ label: WechatAdBehaviorEnum[key], value: key, disabled: excludedActions?.some((k: string) => k === key) }))} />
+                    </Form.Item>
+                    <p style={{ marginBottom: 5, marginLeft: 107 }}><strong style={{ marginRight: 20 }}>排除营销</strong></p>
+                    <Form.Item style={{ marginLeft: 107 }} name='excludedActions'>
+                        <Checkbox.Group options={Object.keys(WechatAdBehaviorEnum).map(key => ({ label: WechatAdBehaviorEnum[key], value: key, disabled: actions?.some((k: string) => k === key) }))} />
+                    </Form.Item>
+                </>
+            }
+        </Form>
+    </Modal >
+}
+export default AdModal

+ 30 - 0
src/pages/launchSystemNew/launchManage/localAd/targeting/tableConfig.tsx

@@ -0,0 +1,30 @@
+import { PromotedObjectType } from '@/services/launchAdq/enum'
+function tableConfig():any{
+    return [
+        {
+            title: 'ID',
+            dataIndex: 'id',
+            key: 'id',
+            align: 'center',
+        },
+        {
+            title: '定向名称',
+            dataIndex: 'targetingName',
+            key: 'targetingName',
+            align: 'center',
+        },
+        {
+            title: '定向描述',
+            dataIndex: 'description',
+            key: 'description',
+            align: 'center',
+        },
+        {
+            title: '创建时间',
+            dataIndex: 'createTime',
+            key: 'createTime',
+            align: 'center',
+        },
+    ]
+}
+export default tableConfig

+ 0 - 502
src/pages/operatePage/account/Darwer.tsx

@@ -1,502 +0,0 @@
-import React, { useCallback, useEffect, useMemo, useState } from 'react'
-import { Button, Card, Descriptions, Drawer, message, Row, Tabs } from 'antd'
-import Form from '@/components/Formitem'
-import { FormConfig } from '@/components/Formitem/type'
-import { useRequest } from 'umi';
-import { allBook, switchBook, logBook, getBookAll } from '@/services/operating/book';
-const { TabPane } = Tabs;
-interface Props {
-    name: string,
-    visible: boolean,
-    fnc: () => void,
-    mpid: string,
-    fnlist: any,
-    platformInfo?: {
-        id: string,
-        platformName: string,
-        remark: string,
-        bookName: string,
-        platformPassword: string,
-        platformAccount: string,
-        vipAccounts: {
-            id: number,
-            periodId: string,
-            account: string,
-            mpName: string,
-            periodInfo: {
-                period: string
-            }
-        }[]
-    }
-}
-
-let DarwerPage = React.memo((props: Props) => {
-    let { name, visible, fnc, mpid, platformInfo, fnlist } = props
-    const [arr, setArr] = useState<{ value: string, text: string }[]>([])//处理后的select数组
-    const [loding, setLoding] = useState<boolean>(false)//加载状态
-    const [books, setBooks] = useState<any[]>([])//加载状态
-    const allData = useRequest(() => allBook())//全部列表
-    const [pSubmit, setPSubmit] = useState<() => Promise<any>>()//切书城切书
-    const [submit, setSubmit] = useState<() => Promise<any>>()//切书
-    const callback = useCallback((fnc: () => Promise<any>) => setSubmit(fnc), [])
-    const callbackP = useCallback((fnc: () => Promise<any>) => setPSubmit(fnc), [])
-    const switchData = useRequest((params: { mpId: string, operType: string, remark: string, newBookName?: string, newPlatformId?: string } | any) => switchBook(params), { manual: true })
-    const logData = useRequest((params: { mpId: string }) => logBook(params), { manual: true })
-    const allbookData = useRequest(() => getBookAll(), { manual: true })
-    const [value, setValue] = useState<string>('')
-    const qsArr = useMemo(() => {
-        let arr: any = []
-        if (allData?.data && value) {
-            allData?.data?.forEach((data: { id: number, vipAccounts: any[] }) => {
-                if (value === data.id.toString()) {
-                    console.log(value, data.id)
-                    data?.vipAccounts?.forEach((item: { account: string, periodId: string, id: number, mpName: string, periodInfo: { id: number, period: string } }) => {
-                        arr.push({
-                            text: item?.mpName ? item?.periodInfo?.period + '--' + item?.mpName : item?.periodInfo?.period,
-                            value: item.id
-                        })
-                    })
-                }
-            })
-        }
-        return arr
-    }, [value, allData?.data])
-    useEffect(() => {
-        if (platformInfo?.id) {
-            setValue(platformInfo?.id?.toString())
-        }
-    }, [platformInfo?.id])
-    useEffect(() => {
-        allbookData.run().then(res => {
-            console.log(1111,res)
-            res = res?.map((item: any) => {
-                item.value = item.bookName
-                item.text = item.bookName
-                return item
-            })
-            setBooks(res)
-        })
-    }, [])
-    const shuqi = useMemo(() => {
-        if (platformInfo?.vipAccounts) {
-            return {
-                text: platformInfo?.vipAccounts[0]?.mpName ? platformInfo?.vipAccounts[0]?.periodInfo?.period + '--' + platformInfo?.vipAccounts[0]?.mpName : platformInfo?.vipAccounts[0]?.periodInfo?.period,
-                id: platformInfo?.vipAccounts[0]?.id
-            }
-        }
-        return { text: '', id: '' }
-    }, [platformInfo])
-    const platformConfig: FormConfig[] = [
-        {
-            label: '当前书城名称',
-            tag: 'input',
-            name: 'platformName',
-            width: 200,
-            disabled: true,
-            defaultValue: ''
-        },
-        {
-            label: '当前期数',
-            tag: 'input',
-            name: 'newPlatformId3',
-            children: arr,
-            width: 200,
-            disabled: true,
-        },
-        {
-            label: '当前对接书籍',
-            tag: 'input',
-            name: 'bookName',
-            width: 200,
-            disabled: true,
-            defaultValue: ''
-        },
-        {
-            label: '当前书城账号',
-            tag: 'input',
-            name: 'platformAccount',
-            width: 200,
-            disabled: true,
-            defaultValue: ''
-        },
-        {
-            label: '当前书城密码',
-            tag: 'input',
-            name: 'platformPassword',
-            width: 200,
-            disabled: true,
-            defaultValue: ''
-        },
-        {
-            label: '切换书城账号',
-            tag: 'input',
-            name: 'newAccount',
-            width: 200,
-            required: true,
-            defaultValue: ''
-        },
-        {
-            label: '切换书城密码',
-            tag: 'input',
-            name: 'newPassword',
-            width: 200,
-            required: true,
-            defaultValue: ''
-        },
-        {
-            label: '切换书城',
-            tag: 'select',
-            name: 'newPlatformId',
-            children: arr,
-            width: 200,
-            required: true,
-            change: true,
-            callback: (value: any) => { setValue(value) }
-        },
-        {
-            label: '期数',
-            tag: 'select',
-            name: 'newPlatformId1',
-            children: qsArr,
-            width: 200,
-            required: true,
-        },
-        {
-            label: '切换书籍',
-            tag: 'select',
-            name: 'newBookName',
-            width: 200,
-            children: books,
-            required: true,
-        },
-        {
-            label: '备注',
-            tag: 'TextArea',
-            name: 'remark',
-            width: 400,
-            placeholder: '请输入不少于十个字的备注',
-            required: true,
-            rows: 5,
-            Rule: { min: 10, type: 'string' }
-        }
-    ]
-    const userConfig: FormConfig[] = [
-        {
-            label: '当前书城',
-            tag: 'input',
-            name: 'platformName',
-            children: arr,
-            width: 200,
-            disabled: true,
-            defaultValue: ''
-        },
-        {
-            label: '当前书城账号',
-            tag: 'input',
-            name: 'platformAccount',
-            width: 200,
-            disabled: true,
-            defaultValue: ''
-        },
-        {
-            label: '当前书城密码',
-            tag: 'input',
-            name: 'platformPassword',
-            width: 200,
-            disabled: true,
-            defaultValue: ''
-        },
-        {
-            label: '切换书城账号',
-            tag: 'input',
-            name: 'newAccount',
-            width: 200,
-            required: true,
-            defaultValue: ''
-        },
-        {
-            label: '切换书城密码',
-            tag: 'input',
-            name: 'newPassword',
-            width: 200,
-            required: true,
-            defaultValue: ''
-        },
-        {
-            label: '备注',
-            tag: 'TextArea',
-            name: 'remark',
-            width: 400,
-            placeholder: '请输入不少于十个字的备注',
-            required: true,
-            rows: 5,
-            Rule: { min: 10, type: 'string' }
-        }
-    ]
-    const bookConfig: FormConfig[] = [
-        {
-            label: '当前书城',
-            tag: 'input',
-            name: 'platformName',
-            children: arr,
-            width: 200,
-            disabled: true,
-            defaultValue: ''
-        },
-        {
-            label: '当前期数',
-            tag: 'input',
-            name: 'newPlatformId3',
-            children: arr,
-            width: 200,
-            disabled: true,
-        },
-        {
-            label: '当前书籍',
-            tag: 'input',
-            name: 'bookName',
-            children: arr,
-            width: 200,
-            disabled: true,
-            defaultValue: ''
-        },
-        {
-            label: '期数',
-            tag: 'select',
-            name: 'newPlatformId1',
-            children: qsArr,
-            width: 200,
-            required: true,
-        },
-        {
-            label: '需要切换书名',
-            tag: 'select',
-            name: 'newBookName',
-            children: books,
-            width: 200,
-            required: true,
-        },
-        {
-            label: '备注',
-            tag: 'TextArea',
-            name: 'remark',
-            width: 400,
-            placeholder: '请输入不少于十个字的备注',
-            required: true,
-            rows: 5,
-            Rule: { min: 10, type: 'string' }
-        }
-    ]
-    //书城列表数据处理
-    useEffect(() => {
-        let a: { value: string, text: string }[] = []
-        allData?.data?.map((item: { id: string, platformName: string, remark: string }) => {
-            a.push({ value: item.id.toString(), text: item.platformName })
-        })
-        setArr(a)
-    }, [allData.data])
-    //切书城
-    let handleSubmit = useCallback(() => {
-        (submit as () => Promise<any>)().then((value: { newPlatformId1: string, remark: string, newBookName: string, newAccount: string, newPassword: string }) => {
-            if (value) {
-                let { newPlatformId1, remark, newBookName, newAccount, newPassword } = value
-                setLoding(true);
-                switchData.run({ mpId: mpid, operType: '10', newPlatformId: newPlatformId1, remark, newBookName, newAccount, newPassword }).then((res) => {
-                    setLoding(false);
-                    if (res) {
-                        message.success('切换成功!')
-                        fnlist.refresh()
-                        logData.refresh()
-                        fnc()
-                    }
-                }).catch(() => {
-                    setLoding(false);
-                })
-            }
-        })
-    }, [submit, fnlist, logData])
-    //切书
-    let handlePSubmit = useCallback(() => {
-        (pSubmit as () => Promise<any>)().then((value: { newPlatformId1: string, remark: string, newBookName: string }) => {
-            if (value) {
-                let { newPlatformId1, remark, newBookName } = value
-                setLoding(true);
-                switchData.run({ mpId: mpid, operType: '1', newPlatformId: newPlatformId1, remark, newBookName }).then((res) => {
-                    message.success('切换成功!')
-                    setLoding(false);
-                    fnlist.refresh()
-                    logData.refresh()
-                    fnc()
-                }).catch(() => {
-                    setLoding(false);
-                })
-            }
-        })
-    }, [pSubmit, fnlist, logData])
-    //密码
-    let handleUserSubmit = useCallback(() => {
-        (pSubmit as () => Promise<any>)().then((value: { newAccount: string, remark: string, newPassword: string }) => {
-            if (value) {
-                let { newAccount, remark, newPassword } = value
-                setLoding(true);
-                switchData.run({ mpId: mpid, operType: '11', newAccount, remark, newPassword }).then((res) => {
-                    message.success('切换成功!')
-                    setLoding(false);
-                    fnlist.refresh()
-                    logData.refresh()
-                    fnc()
-                }).catch(() => {
-                    setLoding(false);
-                })
-            }
-        })
-    }, [pSubmit, fnlist, logData])
-    useEffect(() => {
-        logData?.run({ mpId: mpid })
-    }, [mpid])
-    return (
-        <Drawer
-            destroyOnClose={true}
-            width={600}
-            placement='right'
-            visible={visible}
-            title={`当前公众号:${name}`}
-            onClose={fnc}
-        >
-            <Tabs type="card">
-                <TabPane tab="切书城/切书/切账号" key="1">
-                    {
-                        arr.length > 0 && <Form
-                            formConfig={platformConfig}
-                            flow='column'
-                            getFormSubmit={callback}
-                            defaultProps={{
-                                newPlatformId3: shuqi?.text,
-                                platformName: platformInfo?.platformName,
-                                bookName: platformInfo?.bookName,
-                                platformPassword: platformInfo?.platformPassword,
-                                platformAccount: platformInfo?.platformAccount
-                            }}
-                        />
-                    }
-                    <Row justify='center'>
-                        <Button type='primary' onClick={handleSubmit} loading={loding}>保存</Button>
-                    </Row>
-                </TabPane>
-                <TabPane tab="切书" key="2">
-                    {
-                        arr.length > 0 && <Form
-                            formConfig={bookConfig}
-                            flow="column"
-                            getFormSubmit={callbackP}
-                            defaultProps={{
-                                newPlatformId3: shuqi?.text,
-                                platformName: platformInfo?.platformName,
-                                bookName: platformInfo?.bookName,
-                                newPlatformId1: shuqi?.id,
-                                platformPassword: platformInfo?.platformPassword,
-                                platformAccount: platformInfo?.platformAccount
-                            }} />
-                    }
-
-                    <Row justify='center'>
-                        <Button type='primary' onClick={handlePSubmit} loading={loding}>保存</Button>
-                    </Row>
-                </TabPane>
-                <TabPane tab="切账号" key="4">
-                    {
-                        arr.length > 0 && <Form
-                            formConfig={userConfig}
-                            flow="column"
-                            getFormSubmit={callbackP}
-                            defaultProps={{
-                                newPlatformId3: shuqi?.text,
-                                platformName: platformInfo?.platformName,
-                                bookName: platformInfo?.bookName,
-                                newPlatformId1: shuqi?.id,
-                                platformPassword: platformInfo?.platformPassword,
-                                platformAccount: platformInfo?.platformAccount
-                            }} />
-                    }
-
-                    <Row justify='center'>
-                        <Button type='primary' onClick={handleUserSubmit} loading={loding}>保存</Button>
-                    </Row>
-                </TabPane>
-                <TabPane tab="操作日志" key="3">
-                    <Tabs defaultActiveKey="1" tabPosition={'top'} >
-                        {
-                            logData?.data?.map((item: any) => {
-                                let newqishu: string = ''
-                                let oldqishu: string = ''
-                                item?.newPlatformInfo?.vipAccounts?.forEach((vip: { id: number, account: string, mpName: string, periodInfo: { period: string } }) => {
-                                    if (vip.id === item?.newPlatformId) {
-                                        newqishu = vip?.mpName ? vip?.periodInfo?.period + '--' + vip?.mpName : vip?.periodInfo?.period
-                                    }
-                                })
-                                item?.oldPlatformInfo?.vipAccounts?.forEach((vip: { id: number, account: string, mpName: string, periodInfo: { period: string } }) => {
-                                    if (vip.id === item?.oldPlatformId) {
-                                        oldqishu = vip?.mpName ? vip?.periodInfo?.period + '--' + vip?.mpName : vip?.periodInfo?.period
-                                    }
-                                })
-                                return <TabPane tab={item.createTime.replace('T', ' ')} key={item.createTime} >
-                                    <h1>{item?.operType === 1 ? '切书日志' : item?.operType === 11 ? '切账号日志' : '切书城日志'}</h1>
-                                    <Card>
-                                        <Descriptions title="切换前" bordered column={1} >
-                                            <Descriptions.Item label="书城名称">{item?.oldPlatformInfo?.platformName}</Descriptions.Item>
-                                            <Descriptions.Item label="期数">{oldqishu}</Descriptions.Item>
-                                            {item?.operType !== 1 && <>
-                                                <Descriptions.Item label="书城账号">{item?.oldAccount}</Descriptions.Item>
-                                                <Descriptions.Item label="书城密码">{item?.oldPassword}</Descriptions.Item>
-                                            </>}
-                                            {
-                                                item?.operType !== 11 && <>
-                                                    <Descriptions.Item label="书籍名称" >{item?.oldBookName}</Descriptions.Item>
-                                                    {item?.operType === 10 && <Descriptions.Item label="书城备注" >{item?.oldPlatformInfo?.remark}</Descriptions.Item>}
-                                                </>
-                                            }
-                                        </Descriptions>
-                                    </Card>
-                                    <Card>
-                                        <Descriptions title="切换后" bordered column={1}>
-                                            <Descriptions.Item label="书城名称">{item?.newPlatformInfo?.platformName}</Descriptions.Item>
-                                            <Descriptions.Item label="期数">{newqishu}</Descriptions.Item>
-                                            {
-                                                item?.operType !== 1 && <>
-                                                    <Descriptions.Item label="书城账号">{item?.newAccount}</Descriptions.Item>
-                                                    <Descriptions.Item label="书城密码">{item?.newPassword}</Descriptions.Item>
-                                                </>
-                                            }
-                                            {
-                                                item?.operType !== 11 && <>
-                                                    <Descriptions.Item label="书籍名称">{item?.newBookName}</Descriptions.Item>
-                                                    {item?.operType === 10 && <Descriptions.Item label="书城备注">{item?.newPlatformInfo?.platformName}</Descriptions.Item>}
-                                                </>
-                                            }
-                                        </Descriptions>
-                                    </Card>
-                                    {
-                                        item?.operType !== 10 && <Card>
-                                            <Descriptions title={item?.operType === 1 ? '切书' : item?.operType === 11 ? '切账号' : ''} bordered column={1}>
-                                                <Descriptions.Item label="备注">{item?.remark}</Descriptions.Item>
-                                            </Descriptions>
-                                        </Card>
-                                    }
-                                    <Card>
-                                        <Descriptions title="操作账号" bordered column={1}>
-                                            <Descriptions.Item label="名称" >{item?.operUserInfo?.nickname}</Descriptions.Item>
-                                            <Descriptions.Item label="手机" >{item?.operUserInfo?.phone}</Descriptions.Item>
-                                            <Descriptions.Item label="email" >{item?.operUserInfo?.email}</Descriptions.Item>
-                                        </Descriptions>
-                                    </Card>
-                                </TabPane>
-                            })
-                        }
-                    </Tabs>
-                </TabPane>
-            </Tabs>
-        </Drawer>
-    )
-})
-
-export default DarwerPage

+ 0 - 80
src/pages/operatePage/account/EditModal.tsx

@@ -1,80 +0,0 @@
-import React, { useEffect, useState, useCallback } from 'react'
-import { editSubmit } from '@/services/operating/book';
-import { Modal, message, Form, Input } from 'antd'
-import { useRequest } from 'umi';
-interface Props {
-    name: string,
-    visible: boolean,
-    fnc: () => void,
-    mpid: string,
-    fnlist: any,
-    platformInfo?: { id: string, platformName: string, remark: string }
-}
-
-let EditModal = React.memo((props: Props) => {
-    let { name, visible, fnc, mpid, fnlist } = props
-    const [data, setData] = useState<{secret: string, account: string, password: string, managePhone: string, managePhoneNo: string}>({
-        secret: '',
-        account: '',
-        password: '',
-        managePhone: '',
-        managePhoneNo: ''
-    })
-    const edRequest = useRequest((params: { mpId: string, account: string, managePhone: string, managePhoneNo: string, password: string, secret: string }) => editSubmit(params), { manual: true })
-
-    useEffect(() => {
-        fnlist?.data?.records?.forEach((item: any)=>{
-            if(item.id === mpid){
-                setData({
-                    secret: item?.secret ? item?.secret : '',
-                    account: item?.account ? item?.account : '',
-                    password: item?.password ? item?.password : '',
-                    managePhone: item?.managePhone ? item?.managePhone : '',
-                    managePhoneNo: item?.managePhoneNo ? item?.managePhoneNo : ''
-                })
-            }
-        })
-    }, [fnlist])
-
-    let handleSubmit = useCallback(() => {
-        edRequest.run({ mpId: mpid, ...data }).then((res) => {
-            if(res){
-                message.success('设置成功!')
-                fnlist.refresh()
-                fnc()
-            }
-        })
-    }, [data])
-    return (
-        <Modal
-            title={`${name}`}
-            visible={visible}
-            onOk={handleSubmit}
-            onCancel={fnc}
-            okText='保存'
-            confirmLoading= {edRequest.loading}
-        >
-            <Form layout="vertical">
-                <Form.Item label="公众号secret">
-                    <Input value={data.secret} onChange={e=>setData({...data, secret: e.target.value})}/>
-                </Form.Item>
-                <Form.Item label="公众号账号">
-                    <Input value={data.account} onChange={e=>setData({...data, account: e.target.value})}/>
-                </Form.Item>
-                <Form.Item label="公众号密码">
-                    <Input type="password" style={{display:'none',width:'0',height:'0'}}/>
-                    <Input.Password autoComplete={'off'} value={data.password} onChange={e=>setData({...data, password: e.target.value})}/>
-                </Form.Item>
-                <Form.Item label="手机号">
-                    <Input maxLength={11} value={data.managePhone} onChange={e=>setData({...data, managePhone: e.target.value})}/>
-                </Form.Item>
-                <Form.Item label="手机号编号">
-                    <Input value={data.managePhoneNo} onChange={e=>setData({...data, managePhoneNo: e.target.value})}/>
-                </Form.Item>
-            </Form>
-           
-        </Modal>
-    )
-})
-
-export default EditModal

+ 0 - 275
src/pages/operatePage/account/Lins.tsx

@@ -1,275 +0,0 @@
-import { Col, DatePicker, Input, message, Modal, Row, Select, Space, Button, Popconfirm } from 'antd'
-import React, { useCallback, useEffect, useState } from 'react'
-import { useAjax } from "@/Hook/useAjax";
-import { allBook, businessGroup, getBookAll, getPeriodAll, lins, listByPlatform } from '@/services/operating/book';
-import { ReadOutlined } from '@ant-design/icons';
-import styles from './index.less'
-import moment from 'moment';
-import { verify } from '@/services/operating/account';
-import e from '@umijs/server/node_modules/@types/express';
-const { Option } = Select;
-/**临时切书弹窗*/
-function LinsModal(arg: { oldPlatformId?: any, mpId: any, list: any, oldPeriodId: any, oldPlatformAccountId: any, oldBookId: any, oldPutStatus: any, oldPutChannel: any, oldBusinessGroupId: any, oldRechargeTemplate: any }) {
-    const { oldPlatformId, mpId, list, oldPeriodId, oldPlatformAccountId, oldBookId, oldPutStatus, oldPutChannel, oldBusinessGroupId, oldRechargeTemplate } = arg
-    const linsQ = useAjax((params) => lins(params))//全部列表
-    const verifys = useAjax((params) => verify(params))//切书前验证
-    const [visible, setVisible] = useState<boolean>(false)
-    const [arr, setArr] = useState<{ value: string, text: string }[]>([])//处理后的select数组
-    const [platformId, setPlatformId] = useState<any>(oldPlatformId)//选中的书城
-    const [periodId, setPeriodId] = useState<any>(oldPeriodId)//选中期数
-    const [platformAccountId, setPlatformAccountId] = useState<any>(oldPlatformAccountId)//选中账号
-    const [bookId, setBookId] = useState<any>(oldBookId)//选中书
-    const [remark, setRemark] = useState<string>('')//描述
-    const allData = useAjax(() => allBook())//获取全部小说平台
-    const periodAll = useAjax(() => getPeriodAll())//获取全部期数
-    const platformAll = useAjax((platformId: number) => listByPlatform(platformId))//获取全部期数
-    const bookAll = useAjax(() => getBookAll())//获取书籍
-    const [beginTime, setBeginTime] = useState<any>(moment(new Date()).format('YYYY-MM-DD'))
-    const [businessGroupId, setBusinessGroupId] = useState<any>(oldBusinessGroupId)
-    const [putStatus, setPutStatus] = useState<any>(oldPutStatus)
-    const [rechargeTemplate, setRechargeTemplate] = useState<any>(oldRechargeTemplate)
-    const [putChannel, setPutChannel] = useState<any>(oldPutChannel)
-    const businessGroupALL = useAjax(() => businessGroup())//项目组
-    const [pvisible, setPvisible] = useState(false)
-    //书城列表数据处理
-    useEffect(() => {
-        if (visible) {
-            // 获取全部小说平台
-            allData.run().then((res: any) => {
-                let a: { value: string, text: string }[] = []
-                res?.map((item: { id: string, platformName: string, remark: string }) => {
-                    a.push({ value: item.id.toString(), text: item.platformName })
-                })
-                setArr(() => a)
-            })
-            // 获取全部期数
-            periodAll.run()
-            //获取书籍
-            bookAll.run()
-            businessGroupALL.run()
-        }
-    }, [visible])
-    // 获取书城账号列表
-    useEffect(() => {
-        if (platformId && visible) {
-            platformAll.run(platformId)
-        }
-    }, [platformId, visible])
-    useEffect(() => {
-        if (oldPlatformId) {
-            setPlatformId(JSON.stringify(oldPlatformId))
-        }
-    }, [oldPlatformId])
-    const yz = useCallback(() => {
-        if (beginTime) {
-            verifys.run({ resourceId: mpId, beginTime }).then(res => {
-                if (res) {
-                    submit()
-                } else {
-                    setPvisible(true)
-                }
-            })
-
-        } else {
-            message.error('请选择日期!')
-        }
-    }, [platformId, mpId, periodId, platformAccountId, remark, bookId, beginTime, businessGroupId, putStatus, rechargeTemplate, putChannel])
-    const submit = useCallback(() => {
-        linsQ.run({ platformId, resourceId: mpId, periodId, platformAccountId, bookId, remark, beginTime, businessGroupId, putStatus, rechargeTemplate, putChannel }).then((res) => {
-            if (res) {
-                list.refresh()
-                setVisible(false)
-                message.success('切换成功!')
-                setBeginTime(moment(new Date()).format('YYYY-MM-DD'))
-            }
-        })
-    }, [platformId, mpId, periodId, platformAccountId, remark, bookId, beginTime, businessGroupId, putStatus, rechargeTemplate, putChannel])
-    return <>
-        <span onClick={() => { setVisible(!visible) }} style={{ cursor: 'pointer' }}>
-            <ReadOutlined style={{ color: '#2db7f5' }} />
-        </span>
-        <Modal
-            visible={visible}
-            // onCancel={() => { setVisible(false) }}
-            // onOk={submit}
-            width={350}
-            title={'切书切平台'}
-            maskClosable={false}
-            footer={<div>
-                <Popconfirm title='会覆盖上一条,是否确定?' visible={pvisible} onCancel={() => { setPvisible(false) }} onConfirm={()=>{
-                    setPvisible(false)
-                    submit()
-                }}>
-                    <Button type={'primary'} onClick={yz}>确定</Button>
-                </Popconfirm>
-                <Button onClick={() => { setVisible(false) }}>取消</Button>
-            </div>}
-        >
-            <Row gutter={[10, 10]} className={styles.edit_book}>
-                <Col>
-                    <Space>
-                        <label><span style={{ color: 'red' }}>*</span>日期:</label>
-                        <DatePicker
-                            value={beginTime ? moment(beginTime) : undefined}
-                            onChange={(date, dateString) => {
-                                setBeginTime(dateString)
-                            }} />
-                    </Space>
-                </Col>
-                <Col>
-                    <Space>
-                        <label>期数:</label>
-                        <Select
-                            style={{ width: 200 }} value={periodId}
-                            onChange={(value: any,) => { setPeriodId(value) }}
-                            showSearch
-                            filterOption={(input, option: any) =>
-                                option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                            }
-                        >
-                            {
-                                periodAll?.data?.map((item: any) => {
-                                    return <Option value={item?.id} key={item?.id}>{item?.period}</Option>
-                                })
-                            }
-                        </Select>
-                    </Space>
-                </Col>
-                <Col>
-                    <Space>
-                        <label>书城: </label>
-                        <Select style={{ width: 200 }} value={platformId} onChange={(value: any,) => { setPlatformId(value) }}
-                            showSearch
-                            filterOption={(input, option: any) =>
-                                option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                            }
-                        >
-                            {
-                                arr.map((item) => {
-                                    return <Option value={item?.value} key={item?.value}>{item?.text}</Option>
-                                })
-                            }
-                        </Select>
-                    </Space>
-                </Col>
-                <Col>
-                    <Space>
-                        <label>账号:</label>
-                        <Select style={{ width: 200 }} value={platformAccountId} onChange={(value: any,) => { setPlatformAccountId(value) }} disabled={!platformId}
-                            showSearch
-                            filterOption={(input, option: any) =>
-                                option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                            }
-                        >
-                            {
-                                platformAll?.data?.map((item: any) => {
-                                    return <Option value={item?.id} key={item?.id}>{item?.account}</Option>
-                                })
-                            }
-                        </Select>
-                    </Space>
-                </Col>
-                <Col>
-                    <Space>
-                        <label>书籍:</label>
-                        <Select style={{ width: 200 }} value={bookId} onChange={(value: any,) => { setBookId(value) }}
-                            showSearch
-                            filterOption={(input, option: any) =>
-                                option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                            }
-                        >
-                            {
-                                bookAll?.data?.map((item: any) => {
-                                    return <Option value={item?.id} key={item?.id}>{item?.bookName}</Option>
-                                })
-                            }
-                        </Select>
-                    </Space>
-                </Col>
-                <Col>
-                    <Space>
-                        <label>项目组:</label>
-                        <Select
-                            allowClear
-                            onChange={(value) => {
-                                setBusinessGroupId(value)
-                            }}
-                            value={businessGroupId}
-                            style={{ width: 200 }}
-                            showSearch
-                            filterOption={(input, option: any) =>
-                                option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                            }
-                        >
-                            {
-                                businessGroupALL?.data?.map((item: any) => {
-                                    return <Select.Option value={item?.id}>{item?.businessGroupName}</Select.Option>
-                                })
-                            }
-                        </Select>
-                    </Space>
-                </Col>
-                <Col>
-                    <Space>
-                        <label>投放状态:</label>
-                        <Select
-                            allowClear
-                            onChange={(value) => {
-                                setPutStatus(value)
-                            }}
-                            value={putStatus}
-                            style={{ width: 200 }}
-                        >
-                            <Select.Option value='wait'>待投放</Select.Option>
-                            <Select.Option value='ing'>投放中</Select.Option>
-                            <Select.Option value='stop'>停投</Select.Option>
-                            <Select.Option value='destroy'>已注销</Select.Option>
-                        </Select>
-                    </Space>
-                </Col>
-                <Col>
-                    <Space>
-                        <label>投放渠道:</label>
-                        <Select
-                            allowClear
-                            onChange={(value) => {
-                                setPutChannel(value)
-                            }}
-                            value={putChannel}
-                            style={{ width: 200 }}
-                        >
-                            <Select.Option value='MP'>MP</Select.Option>
-                            <Select.Option value='GDT'>GDT</Select.Option>
-                            <Select.Option value='头条'>头条</Select.Option>
-                            <Select.Option value='企微'>企微</Select.Option>
-                        </Select>
-                    </Space>
-                </Col>
-                <Col>
-                    <Space>
-                        <label>充值模板:</label>
-                        <Input
-                            placeholder='请输入充值模板'
-                            value={rechargeTemplate}
-                            allowClear
-                            onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
-                                let value = e.target.value
-                                setRechargeTemplate(value)
-                            }}
-                        />
-                    </Space>
-                </Col>
-                <Col>
-                    <Space>
-                        <label>描述:</label>
-                        <Input.TextArea style={{ width: 208, marginLeft: -8 }} onChange={(e) => {
-                            setRemark(e.target.value)
-                        }} />
-                    </Space>
-                </Col>
-            </Row>
-        </Modal>
-    </>
-}
-
-export default LinsModal

+ 0 - 106
src/pages/operatePage/account/Pitcher.tsx

@@ -1,106 +0,0 @@
-import React, { useEffect, useState, useCallback } from 'react'
-import { getUserAll, switchPitcher } from '@/services/operating/book';
-import { Drawer, message, Popconfirm, Spin, Tooltip } from 'antd'
-import { useRequest, useModel } from 'umi';
-import { ExclamationCircleOutlined } from '@ant-design/icons'
-import style from './index.less'
-
-interface Props {
-    name: string,
-    visible: boolean,
-    fnc: () => void,
-    mpid: string,
-    fnlist: any,
-    platformInfo?: { id: string, platformName: string, remark: string }
-}
-
-let DarwerPage = React.memo((props: Props) => {
-    let { name, visible, fnc, mpid, fnlist } = props
-    const getAllUser = useRequest(() => getUserAll())
-    const setSwitchP = useRequest((params: { mpId: string, userId: string }) => switchPitcher(params), { manual: true })
-    const { currentUser }: any = useModel('@@initialState', model => ({ currentUser: model.initialState?.currentUser }))
-    const [putUserId, setPutUserId] = useState<string>('')
-    const [hoverItem, setHoverItem] = useState<any | {}>({})
-    const [isPitcher, setIsPitcher] = useState<boolean>(false)
-    const { getAllOfMember, getDataList } = useModel('useOperating.useWxGroupList')
-
-    const setupPitcher = (userid: string) => {
-        setSwitchP.run({ mpId: mpid, userId: userid }).then((res) => {
-            if(res){
-                message.success('设置成功!')
-                fnlist.refresh()
-                getAllOfMember.refresh()
-                getDataList.refresh()
-            }
-        }).catch(() => {
-        })
-    }
-    useEffect(() => {
-        fnlist?.data?.records?.forEach((item: any)=>{
-            if(item.id === mpid){
-                setPutUserId(item.putUserId)
-            }
-        })
-    }, [fnlist])
-
-    /**
-     * list鼠标移入
-     */
-    let hoverIn = useCallback((item: any) => {
-        setHoverItem(item)
-    }, [])
-    /**
-    * list鼠标移出
-    */
-    let hoverOut = useCallback(() => {
-        setHoverItem({})
-    }, [])
-
-    useEffect(() => {
-        getAllUser?.data?.forEach((item: any)=>{
-            if(item.userId === putUserId){
-                setIsPitcher(true)
-            }
-        })
-    }, [getAllUser, putUserId, fnlist])
-    return (
-        <Drawer
-            destroyOnClose={true}
-            width={250}
-            placement='right'
-            visible={visible}
-            title={`当前公众号:${name}`}
-            onClose={fnc}
-        >
-            {
-                getAllUser?.loading ? <Spin size="small" /> : 
-                <div className={style.darwerPage}>
-                    { !isPitcher ? 
-                        <div className={style.not_deploy}>
-                            <Tooltip title='点击下方人员可配置投手'>
-                                <ExclamationCircleOutlined className={style.ts_icon}/>
-                            </Tooltip>
-                            当前还没有配置投手
-                        </div> :
-                        <div className={style.a_deploy}>
-                            <Tooltip title='点击下方人员其他人员可切换投手'>
-                                <ExclamationCircleOutlined className={style.ts_icon}/>
-                            </Tooltip>
-                            标注<span style={{color: 'red'}}>*</span>为当前公众号投手
-                        </div>    
-                    }
-                    {
-                        getAllUser?.data?.map((ele: any) => {
-                            return ele.userId != currentUser.userId ? ele.userId == putUserId ? <div className={`${style.item} ${style.desc_item}`} key={ele.userId}>{ele.userId == putUserId && <span style={{color: 'red'}}>*</span>} {ele?.nickName}</div> :
-                                <Popconfirm title="确定要设置?" okText="是" cancelText="否" onConfirm={()=>setupPitcher(ele.userId)} key={ele.userId}>
-                                    <div className={style.item} style={{backgroundColor: hoverItem.userId === ele.userId ? '#efefef' : ''}} onMouseEnter={() => hoverIn(ele)} onMouseLeave={hoverOut}>{ele?.nickName}</div>
-                                </Popconfirm>  : ''
-                        })
-                    }
-                </div>
-            }
-        </Drawer>
-    )
-})
-
-export default DarwerPage

+ 0 - 325
src/pages/operatePage/account/editBook.tsx

@@ -1,325 +0,0 @@
-import { useAjax } from "@/Hook/useAjax"
-import {  getAllUser, modify2 } from "@/services/operating/account"
-import { allBook, businessGroup, getBookAll, getPeriodAll, listByPlatform } from "@/services/operating/book"
-import { Col, DatePicker, Input, message, Modal, Row, Select, Space } from "antd"
-import moment from "moment"
-import React, { useCallback, useEffect, useState } from "react"
-const { Option } = Select;
-import styles from './index.less'
-
-function EditBook(props:{editData: any, list: any,hide:any}) {
-    let {editData,list,hide} = props
-    const { beginTime, endTime, id, putStatus, putChannel, remark, rechargeTemplate, platformId, periodId, bookId, platformAccountId, businessGroupId,operUserId,putUserId } = editData
-    const edit = useAjax((params) => modify2(params))
-    const [arr, setArr] = useState<{ value: string, text: string }[]>([])//处理后的select数组
-    const allData = useAjax(() => allBook())//获取全部小说平台
-    const periodAll = useAjax(() => getPeriodAll())//获取全部期数
-    const platformAll = useAjax((platformId: number) => listByPlatform(platformId))//获取全部期数
-    const bookAll = useAjax(() => getBookAll())//获取书籍
-    const businessGroupALL = useAjax(() => businessGroup())//项目组
-    const allUsers = useAjax(() => getAllUser())//获取所有用户
-    const [oldPlatformId,setOldPlatformId]=useState<any>(platformId)//上次的书城
-    const [state, setState] = useState<any>({
-        beginTime,//开始时间
-        endTime,//结束时间
-        putChannel,//渠道
-        putStatus,//状态
-        remark,//备注
-        rechargeTemplate,//模板
-        platformId,//书城
-        periodId,//期数
-        bookId,//书籍
-        platformAccountId,//账号
-        businessGroupId,//项目组
-        operUserId,//运营
-        putUserId//投手
-    })
-    //书城列表数据处理
-    useEffect(() => {
-            businessGroupALL.run()
-            allUsers.run()
-            // 获取全部小说平台
-            allData.run().then((res: any) => {
-                let a: { value: string, text: string }[] = []
-                res?.map((item: { id: string, platformName: string, remark: string }) => {
-                    a.push({ value: item.id.toString(), text: item.platformName })
-                })
-                setArr(() => a)
-            })
-            // 获取全部期数
-            periodAll.run()
-            //获取书籍
-            bookAll.run()
-    }, [])
-    // 获取书城账号列表
-    useEffect(() => {
-        if (state?.platformId) {
-            platformAll.run(state?.platformId)
-        }
-    }, [state?.platformId])
-    // 切换书城
-    useEffect(()=>{
-        if(state?.platformId != oldPlatformId){
-            setState({...state,platformAccountId:''})//清空账号选项
-            setOldPlatformId(state?.platformId)//替换上次书城为本次选项
-        }
-    },[oldPlatformId,state])
-    const submit = useCallback(() => {
-        if (state.beginTime) {
-            edit.run({ changeRecordId: id, ...state }).then((res) => {
-                if (res) {
-                    list.refresh()
-                    message.success('切换成功!')
-                    setState({})
-                    hide()
-                }
-            })
-        } else {
-            message.error('请选择日期!')
-        }
-    }, [state, id])
-    return <Modal
-        onCancel={() => {hide()}}
-        width={350}
-        title={'编辑'}
-        onOk={submit}
-        visible={true}
-        maskClosable={false}
-    >
-        <Row gutter={[10, 10]} className={styles.edit_book}>
-            <Col>
-                <Space>
-                    <label><span style={{ color: 'red' }}>*</span>开始时间:</label>
-                    <DatePicker
-                        value={state?.beginTime ? moment(state?.beginTime): undefined}
-                        onChange={(date, dateString) => {
-                            setState({ ...state, beginTime: dateString ?moment(dateString).format('YYYY-MM-DD')  : '' })
-                        }} />
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>结束时间:</label>
-                    <DatePicker
-                        value={state?.endTime ? moment(state?.endTime) : undefined}
-                        onChange={(date, dateString) => {
-                            setState({ ...state, endTime:dateString ? moment(dateString).format('YYYY-MM-DD')  : ''  })
-                        }} />
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>项目组:</label>
-                    <Select
-                        allowClear
-                        onChange={(value) => {
-                            setState({ ...state, businessGroupId: value })
-                        }}
-                        value={state?.businessGroupId}
-                        style={{ width: 200 }}
-                        showSearch
-                        filterOption={(input, option: any) =>
-                            option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                        }
-                    >
-                        {
-                            businessGroupALL?.data?.map((item: any) => {
-                                return <Select.Option value={item?.id}>{item?.businessGroupName}</Select.Option>
-                            })
-                        }
-                    </Select>
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>运营:</label>
-                    <Select
-                        allowClear
-                        onChange={(value) => {
-                            setState({ ...state, operUserId: value })
-                        }}
-                        value={state?.operUserId}
-                        style={{ width: 200 }}
-                        showSearch
-                        filterOption={(input, option: any) =>
-                            option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                        }
-                    >
-                        {
-                            allUsers?.data?.map((item: any) => {
-                                return <Select.Option value={item?.userId}>{item?.nickname}</Select.Option>
-                            })
-                        }
-                    </Select>
-                </Space>
-            </Col>
-             <Col>
-                <Space>
-                    <label>投手:</label>
-                    <Select
-                        allowClear
-                        onChange={(value) => {
-                            setState({ ...state, putUserId: value })
-                        }}
-                        value={state?.putUserId}
-                        style={{ width: 200 }}
-                        showSearch
-                        filterOption={(input, option: any) =>
-                            option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                        }
-                    >
-                        {
-                            allUsers?.data?.map((item: any) => {
-                                return <Select.Option value={item?.userId}>{item?.nickname}</Select.Option>
-                            })
-                        }
-                    </Select>
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>期数:</label>
-                    <Select
-                        style={{ width: 200 }} value={state?.periodId}
-                        onChange={(value: any,) => {
-                            setState({ ...state, periodId: value })
-                        }}
-                        showSearch
-                        filterOption={(input, option: any) =>
-                            option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                        }
-                    >
-                        {
-                            periodAll?.data?.map((item: any) => {
-                                return <Option value={item?.id} key={item?.id}>{item?.period}</Option>
-                            })
-                        }
-                    </Select>
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>书城: </label>
-                    <Select style={{ width: 200 }} value={state?.platformId?.toString()} onChange={(value: any,) => {
-                        setState({ ...state, platformId: value })
-                    }}
-                        showSearch
-                        filterOption={(input, option: any) =>
-                            option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                        }
-                    >
-                        {
-                            arr.map((item) => {
-                                return <Option value={item?.value} key={item?.value}>{item?.text}</Option>
-                            })
-                        }
-                    </Select>
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>账号:</label>
-                    <Select style={{ width: 200 }}
-                        value={state?.platformAccountId}
-                        onChange={(value: any,) => {
-                            setState({ ...state, platformAccountId: value })
-                        }}
-                        disabled={!state?.platformId}
-                        showSearch
-                        filterOption={(input, option: any) =>
-                            option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                        }
-                    >
-                        {
-                            platformAll?.data?.map((item: any) => {
-                                return <Option value={item?.id} key={item?.id}>{item?.account}</Option>
-                            })
-                        }
-                    </Select>
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>书籍:</label>
-                    <Select style={{ width: 200 }} value={state?.bookId} onChange={(value: any,) => {
-                        setState({ ...state, bookId: value })
-                    }}
-                        showSearch
-                        filterOption={(input, option: any) =>
-                            option?.children?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0
-                        }
-                    >
-                        {
-                            bookAll?.data?.map((item: any) => {
-                                return <Option value={item?.id} key={item?.id}>{item?.bookName}</Option>
-                            })
-                        }
-                    </Select>
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>投放状态:</label>
-                    <Select
-                        allowClear
-                        onChange={(value) => {
-                            setState({ ...state, putStatus: value })
-                        }}
-                        value={state?.putStatus}
-                        style={{ width: 200 }}
-                    >
-                        <Select.Option value='wait'>待投放</Select.Option>
-                        <Select.Option value='ing'>投放中</Select.Option>
-                        <Select.Option value='stop'>停投</Select.Option>
-                        <Select.Option value='destroy'>已注销</Select.Option>
-                    </Select>
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>投放渠道:</label>
-                    <Select
-                        allowClear
-                        onChange={(value) => {
-                            setState({ ...state, putChannel: value })
-                        }}
-                        value={state?.putChannel}
-                        style={{ width: 200 }}
-                    >
-                        <Select.Option value='MP'>MP</Select.Option>
-                        <Select.Option value='GDT'>GDT</Select.Option>
-                        <Select.Option value='头条'>头条</Select.Option>
-                        <Select.Option value='企微'>企微</Select.Option>
-                    </Select>
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>充值模板:</label>
-                    <Input
-                        placeholder='请输入充值模板'
-                        value={state?.rechargeTemplate}
-                        allowClear
-                        onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
-                            let value = e.target.value
-                            setState({ ...state, rechargeTemplate: value })
-                        }}
-                    />
-                </Space>
-            </Col>
-            <Col>
-                <Space>
-                    <label>备注:</label>
-                    <Input.TextArea
-                        style={{ width: 208, marginLeft: -8 }}
-                        value={state?.remark}
-                        onChange={(e) => {
-                            setState({ ...state, remark: e?.target?.value })
-                        }} />
-                </Space>
-            </Col>
-        </Row>
-    </Modal>
-}
-
-export default EditBook

+ 0 - 109
src/pages/operatePage/account/headerConfig.tsx

@@ -1,109 +0,0 @@
-import { FormConfig } from '@/components/Formitem/type'
-import React, { useEffect, useState } from 'react'
-import { useModel, useRequest } from 'umi'
-import { allBook } from '@/services/operating/book';
-/**
- * 认证状态字典
-*/
-let verifyType: any[] = [
-    {
-        value: '', text: '全部认证状态'
-    },
-    {
-        value: -1, text: '未认证',
-    },
-    {
-        value: 0, text: '微信认证',
-    },
-    {
-        value: 1, text: '新浪微博认证',
-    },
-    {
-        value: 2, text: '腾讯微博认证',
-    },
-    {
-        value: 3, text: '已资质认证通过但还未通过名称认证',
-    },
-    {
-        value: 4, text: '已资质认证通过、还未通过名称认证,但通过了新浪微博认证',
-    },
-    {
-        value: 5, text: '已资质认证通过、还未通过名称认证,但通过了腾讯微博认证'
-    }
-]
-/**
- * 账号类型字典
-*/
-let serviceType: any[] = [
-    { value: '', text: '全部账号类型' },
-    { value: '0', text: '订阅号' },
-    { value: '1', text: '由历史老账号升级后的订阅号' },
-    { value: '2', text: '服务号' },
-]
-export const headerConfig = (headerSubmit: (v: any, key: string) => void) => {
-    const { listGroup } = useModel('useOperating.useWxGroupList', model => ({ listGroup: model.getDataList }))
-    const allData = useRequest(() => allBook())//全部列表
-    let group: any[] = [{ value: '', text: '全部公众号' }]
-    const [arr, setArr] = useState<{ value: string, text: string }[]>([])//处理后的select数组
-    listGroup?.data?.forEach((item: any) => {
-        group.push({ value: item.id, text: item.groupName })
-    })
-    //平台列表数据处理
-    useEffect(() => {
-        let a: { value: string, text: string }[] = []
-        allData?.data?.map((item: { id: string, platformName: string, remark: string }) => {
-            a.push({ value: item.id.toString(), text: item.platformName })
-        })
-        setArr(a)
-    }, [allData.data])
-    const headerConfig: FormConfig[] = [
-        {
-            label: '全部分组',
-            tag: 'select',
-            name: 'groupId',
-            defaultValue: '',
-            width: 200,
-            children: group,
-            callback: (v: string) => headerSubmit({ groupId: v }, 'groupId'),
-            change: true
-            // required:true
-        },
-        {
-            label: '公司主体',
-            tag: 'inputSearch',
-            name: 'principalName',
-            defaultValue: '',
-            callback: (v: string) => headerSubmit({ principalName: v }, 'principalName'),
-            width: 200,
-            change: true
-        },
-        // {
-        //     label: '书城',
-        //     tag: 'select',
-        //     name: 'newPlatformId',
-        //     defaultValue: '',
-        //     children: arr,
-        //     callback: (v: string) => headerSubmit({ platformId: v }, 'platformId'),
-        //     width: 200,
-        //     change: true
-        // },
-        {
-            tag: 'inputSearch',
-            name: 'nickName',
-            width: 200,
-            placeholder: '请输入公众号名称',
-            callback: (v: string) => headerSubmit({ nickName: v }, 'nickName'),
-            // required:true
-        },
-        // {
-        //     label: '添加公众号',
-        //     icon: <PlusOutlined />,
-        //     tag: 'button',
-        //     htmlType: 'button',
-        //     btnType: 'primary',
-        //     name: 'zx',
-        //     callback: modelPop
-        // },
-    ]
-    return headerConfig
-}

+ 0 - 81
src/pages/operatePage/account/index.less

@@ -1,81 +0,0 @@
-.group {
-  div {
-    padding-left: 0;
-    padding-right: 0;
-    padding-top: 0;
-  }
-}
-.group_popover {
-  width: 220px;
-  > div {
-    padding: 0px 16px;
-  }
-  > div:hover {
-    background-color: #efefef;
-  }
-  .group_popover_header {
-    background: #fafafa;
-    margin-bottom: 7px;
-    > div {
-      color: #999;
-    }
-  }
-}
-.list {
-  cursor: pointer;
-}
-.code {
-  display: flex;
-  justify-content: center;
-}
-.body {
-  display: flex;
-  justify-content: space-between;
-  > div {
-    &:last-child {
-      width: 100%;
-    }
-  }
-}
-.darwerPage {
-  > .not_deploy {
-    border: 1px solid rgb(245, 108, 108);
-    background-color: rgba(245, 108, 108, 0.2);
-    padding: 5px;
-    font-size: 14px;
-    margin-bottom: 5px;
-    .ts_icon {
-      color: red;
-      margin-right: 5px;
-    }
-  }
-  > .a_deploy {
-    border: 1px solid #91d5ff;
-    background-color: #e6f7ff;
-    padding: 5px;
-    font-size: 14px;
-    margin-bottom: 5px;
-    .ts_icon {
-      color: rgb(24, 144, 255);
-      margin-right: 5px;
-    }
-  }
-  .item {
-    padding: 8px 5px;
-    cursor: pointer;
-    box-sizing: border-box;
-  }
-  .desc_item {
-    background-color: #e6f7ff;
-    padding: 6px 5px;
-  }
-}
-
-.edit_book{
-  label{
-    width: 75px;
-    display: inline-block;
-    text-align: right;
-    font-weight: 600;
-  }
-}

+ 0 - 167
src/pages/operatePage/account/index.tsx

@@ -1,167 +0,0 @@
-import React, { useCallback, useEffect, useState } from 'react'
-import HeaderForm from '@/components/Formitem'
-import { headerConfig } from './headerConfig'
-import { Button, Card, Modal, Result } from 'antd'
-import Tables from '@/components/Tables'
-import { tablesConfig } from './tablesConfig'
-import { useModel, useRequest } from 'umi'
-import { getAccount, postList, Postlist } from '@/services/operating/account'
-import GroupWxTabs from '@/components/GroupWxTabs'
-import { useAjax } from '@/Hook/useAjax'
-import HocError from '@/Hoc/HocError'
-
-function Account() {
-    const [pageNum, setPageNum] = useState(1)
-    const [pageSize, setPageSize] = useState(10)
-    const { userId } = useModel('useOperating.useUser', model => ({ userId: model.state.selectdUserId }))
-    const [visible, setVisible] = useState<boolean>(false)//成功失败弹窗
-    const [query, setQuery] = useState<{ groupId: string, platformId: string, nickName: string, principalName: string }>({
-        groupId: '',
-        platformId: '',
-        nickName: '',
-        principalName: ''
-    })
-    /**
-     * 获取二维码
-    */
-    const codeData = useAjax((params: any) => getAccount(params))
-    /**
-     * 获取list列表
-     */
-    const listData = useRequest((params?: Postlist) => postList(params), {
-        manual: true,
-        formatResult: (res: any) => res.data,
-        cacheKey: 'list',
-    })
-
-    /**头部搜索数据 */
-    const headerSubmit = useCallback((v: any, key: string) => {
-        query[key] = v[key] || ''
-        setQuery(query)
-        let data: { groupId?: string, platformId?: string, nickName?: string, principalName?: string } = {}
-        if (query.groupId != "") {
-            data.groupId = query.groupId
-        }
-        if (query.platformId != "") {
-            data.platformId = query.platformId
-        }
-        if (query.nickName != "") {
-            data.nickName = query.nickName
-        }
-        if (query.principalName != "") {
-            data.principalName = query.principalName
-        }
-        listData.run({ ...data, pageNum, pageSize, userId })
-    }, [userId])
-    /**
-     * 打开链接扫码
-    */
-    const open = useCallback((mpId: string) => {
-        codeData.run({ params: 'http://mp.zanxiangnet.com/#/operatePage/account/wxCode', mpId }).then((res: any) => {
-            if (res) {
-                window.open(res)
-            }
-        })
-    }, [])
-    /**
-     * 分页操作
-     */
-    let pageChange = useCallback((page: number, pageSize?: number) => {
-        listData.run({ pageNum: page, pageSize: pageSize, ...query, userId })
-        setPageNum(page)
-        setPageSize(pageSize as number)
-    }, [userId, query])
-    let sizeChange = useCallback((current: number, size?: number) => {
-        listData.run({ pageNum: current, pageSize: size, ...query, userId })
-        setPageNum(current)
-        setPageSize(size as number)
-    }, [userId, query])
-    /**
-     * 副作用执行
-     */
-    useEffect(() => {
-        listData.run({ pageNum: '1', pageSize: '10', userId })
-    }, [userId])
-    /**监听code页面消息 */
-    let codeMsg = useCallback((e: any) => {
-        console.log('e.key===>', e.key)
-        if (e.key === 'code') {
-            if (e.newValue === 'ok') {
-                console.log('isOk')
-                setVisible(true)
-            } else {
-                console.log('err')
-                setVisible(true)
-            }
-        }
-    }, [listData])
-    useEffect(() => {
-        window.addEventListener('storage', codeMsg)
-        return () => {
-            window.removeEventListener('storage', codeMsg)
-        }
-    }, [])
-    return <>
-        <Card>
-            <HeaderForm flow='row' formConfig={headerConfig(headerSubmit)} submit={headerSubmit} />
-            <GroupWxTabs>
-                <Tables
-                    columns={tablesConfig(listData, open)}
-                    dataSource={listData?.data?.records}
-                    total={listData?.data?.total}
-                    pageChange={pageChange}
-                    sizeChange={sizeChange}
-                    current={listData?.data?.current}
-                    pageSize={listData?.data?.size}
-                    rowClassName='authStatus'
-                    scroll={{ x: 2000 }}
-                    size={'small'}
-                />
-            </GroupWxTabs>
-        </Card>
-        {visible && <Modal
-            closable={false}
-            visible={visible}
-            destroyOnClose
-            footer={false}
-        >
-            {
-                localStorage.getItem('code') === 'ok' ? <Result
-                    status="success"
-                    title="绑定公众号成功!"
-                    extra={[
-                        <Button type="primary" key="console" onClick={
-                            () => {
-                                setVisible(false)
-                                localStorage.removeItem('code')
-                                location.reload()
-                            }
-                        }>确定</Button>
-                    ]}
-                /> : <Result
-                    status="error"
-                    title="绑定公众号失败!"
-                    subTitle={localStorage.getItem('errMsg') || ''}
-                    extra={[
-                        // <Button type="primary" key="console" onClick={
-                        //     () => {
-                        //         setVisible(false)
-                        //         open()
-                        //     }
-                        // }>重新去绑定</Button>,
-                        <Button key="console" onClick={
-                            () => {
-                                setVisible(false)
-                                localStorage.removeItem('code')
-                                localStorage.removeItem('errMsg')
-                            }
-                        }>确定</Button>
-                    ]}
-                />
-            }
-        </Modal>}
-    </>
-
-}
-
-export default HocError(Account)

+ 0 - 1091
src/pages/operatePage/account/tablesConfig.tsx

@@ -1,1091 +0,0 @@
-import React, { useCallback, useEffect, useReducer, useRef, useState } from 'react'
-import { ColumnProps, ColumnsType } from 'antd/lib/table'
-import { Row, Col, Tooltip, Popconfirm, Popover, Button, Avatar, Input, Badge, Space, Table, Divider, Image, Drawer, Tag,  message } from 'antd'
-import { DeleteOutlined, UsergroupAddOutlined, QuestionCircleOutlined, EditOutlined, PlusCircleOutlined, ReloadOutlined, ReadOutlined,  WechatOutlined, CopyOutlined, QrcodeOutlined } from '@ant-design/icons'
-import { useModel, useRequest } from 'umi'
-import { del, putWx } from '@/services/operating/account'
-import style from './index.less'
-// import Pitcher from './Pitcher'
-
-import useCopy from '@/Hook/useCopy'
-import Modal from 'antd/lib/modal/Modal'
-import DatePickePage from '@/components/DatePicker'
-import LinsModal from './Lins'
-import { useAjax } from '@/Hook/useAjax'
-import { businessGroup, resourceChangeRecord } from '@/services/operating/book'
-import EditBook from './editBook'
-// import { bookImg } from '@/pages/public'
-
-/**
- * 分组
-*/
-interface List {
-    id: string,
-    operUserId: string,
-    groupName: string,
-    remark: string
-}
-/**
- * 分组
-*/
-function GroupPopover(props: { data: any, fncList: any }) {
-    const [isAdd, setIsAdd] = useState<boolean>(false)
-    const [ckItem, setCkItem] = useState<List | {}>({})
-    const [hoverItem, setHoverItem] = useState<List | {}>({})
-    const { groupAdd, groupEdit, groupDel, groupConfig } = useModel('useOperating.useAccount')
-    const { groupList } = useModel('useOperating.useWxGroupList', model => ({ groupList: model.getDataList }))
-    const inputRef: { current: any } = useRef(null)
-    const input1Ref: { current: any } = useRef(null)
-    /**
-     * 新增分组
-     */
-    let add = useCallback(() => {
-        setIsAdd(true)
-    }, [])
-    /**
-     * @param v 保存分组
-     */
-    let save = useCallback((v: string, e?: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLInputElement>) => {
-        e?.stopPropagation()
-        if ((ckItem as List).id) {//存在代表编辑
-            if (v) {//编辑名称
-                groupEdit.run({ groupId: (ckItem as List).id, groupName: v }).then(() => {
-                    groupList.run()//重新获取列表
-                    props.fncList.refresh()
-                })
-            }
-        } else {
-            if (v) {//新增分组
-                groupAdd.run({ groupName: v }).then(() => {
-                    groupList.run()//重新获取列表
-                    props.fncList.refresh()
-                })
-            }
-        }
-        setCkItem({})
-        setIsAdd(false)
-    }, [ckItem])
-    /**
-     * 删除分组
-     */
-    let del = useCallback((item: List, e?: React.MouseEvent<HTMLElement, MouseEvent>) => {
-        e?.stopPropagation()
-        groupDel.run({ groupId: item.id }).then(() => {
-            groupList.run()
-        })
-    }, [])
-    /**
-     * 编辑分组
-     */
-    let edit = useCallback((e: React.MouseEvent<HTMLSpanElement, MouseEvent>, item: List) => {
-        e.stopPropagation()
-        setCkItem(item)
-    }, [])
-    /**
-     * list鼠标移入
-     */
-    let hoverIn = useCallback((item: List) => {
-        setHoverItem(item)
-    }, [])
-    /**
-    * list鼠标移出
-    */
-    let hoverOut = useCallback(() => {
-        setHoverItem({})
-    }, [])
-    /**
-     * 修改所属分组
-     */
-    let clickGroup = useCallback((item: List) => {
-        groupConfig.run({ groupId: item.id, mpAccountId: props.data.id }).then(() => {
-            groupList.run();
-            props.fncList.refresh()
-        })
-    }, [])
-    useEffect(() => {
-        if (inputRef?.current) {
-            inputRef.current.focus()
-        }
-    }, [isAdd])
-    useEffect(() => {
-        if (input1Ref?.current) {
-            input1Ref.current.focus()
-        }
-    }, [ckItem])
-    let cursor = { cursor: 'pointer' }
-    let content = <div className={style.group_popover} >
-        <Row justify='space-between' gutter={[0, 10]} className={style.group_popover_header}>
-            <Col >移动至</Col>
-            <Col style={{ color: '#108ee9', ...cursor }} onClick={add}><PlusCircleOutlined />&nbsp;新增</Col>
-        </Row>
-        {
-            isAdd && <Row gutter={[0, 10]}>
-                <Col>
-                    <Input.Search
-                        placeholder="请输入组名"
-                        enterButton="保存"
-                        onSearch={save}
-                        ref={inputRef}
-                        onBlur={() => setIsAdd(false)}
-                    />
-                </Col>
-            </Row>
-        }
-        {
-            groupList?.data?.map((item: List) => {
-                return <Row justify='space-between' gutter={[0, 10]} key={item.id} className={style.list} onMouseEnter={() => hoverIn(item)} onMouseLeave={hoverOut} onClick={() => clickGroup(item)}>
-                    {
-                        (ckItem as List).id === item.id ? <Col>
-                            <Input.Search
-                                placeholder="请输入组名"
-                                enterButton="保存"
-                                onSearch={save}
-                                onClick={e => e.stopPropagation()}
-                                ref={input1Ref}
-                                onBlur={() => setCkItem({})}
-                            />
-                        </Col> :
-                            <>
-                                <Col >
-                                    {
-                                        props.data.groupId === item.id && <span style={{ color: "red" }}>*</span>
-                                    }
-                                    {item.groupName}
-                                </Col>
-                                <Col>
-                                    {
-                                        ((hoverItem as List).id === item.id && (hoverItem as List).id !== '0') && <Row gutter={[10, 0]} className={style.group_action}>
-                                            <Col>
-                                                <Tooltip title='修改名称'>
-                                                    <EditOutlined style={{ color: '#f90', ...cursor }} onClick={(e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => edit(e, item)} />
-                                                </Tooltip>
-                                            </Col>
-                                            <Col>
-                                                <Tooltip title='删除' placement="bottom">
-                                                    <Popconfirm
-                                                        title={
-                                                            <p>
-                                                                确定要删除<span style={{ color: 'red' }}>{item.groupName}</span>分组吗?
-                                                                <br />
-                                                                删除后该分组下的公众号将移动到“未分组”中
-                                                            </p>
-                                                        }
-                                                        onConfirm={(e?: React.MouseEvent<HTMLElement, MouseEvent>) => del(item, e)}
-                                                        onCancel={(e) => e?.stopPropagation()}
-                                                        okText="是"
-                                                        cancelText="否"
-                                                    >
-                                                        <DeleteOutlined style={{ color: 'red' }} onClick={e => e.stopPropagation()} />
-                                                    </Popconfirm>
-                                                </Tooltip>
-                                            </Col>
-                                        </Row>
-                                    }
-                                </Col>
-                            </>
-                    }
-
-                </Row >
-            })
-        }
-    </div >
-    return <Popover content={content} trigger="click" overlayClassName={style.group}>
-        <Tooltip title='分组' >
-            <Button size='small' style={{ borderColor: 'orange' }}><UsergroupAddOutlined style={{ color: 'orange' }} /></Button>
-        </Tooltip>
-    </Popover>
-}
-/**
- * 发送信息
- * */
-// function MsgPopover() {
-//     let content = <>
-//         <Row gutter={[1, 5]}><Link to='/'>高级群发</Link></Row>
-//         <Row gutter={[1, 5]}><Link to='/'>模板消息</Link></Row>
-//         <Row gutter={[1, 5]}><Link to='/'>客服消息</Link></Row>
-//     </>
-//     return <Popover content={content} trigger="focus" placement="bottom">
-//         <Button size='small' style={{ borderColor: 'orange' }}>
-//             <Tooltip title='发送消息'>
-//                 <SendOutlined style={{ color: 'orange' }} />
-//             </Tooltip>
-//         </Button>
-//     </Popover>
-// }
-/**
- *  公众号信息展示
- */
-let Gz = React.memo((props: { img: string, name: string, userName: string, authStatus: number, appid: string, verifyTypeInfo: any }) => {
-    const { copy } = useCopy()
-    return <>
-        <Row gutter={[5, 0]} >
-            <Col>
-                <Avatar src={props.img} size='large' shape='square' style={{ width: 65, height: 65 }} />
-            </Col>
-            <Col style={{ display: 'flex', flexFlow: 'column', justifyContent: 'space-between' }}>
-                <Row><strong style={{ fontSize: 15 }}>{props.name}{props?.authStatus === 1 ? <span style={{ color: 'red' }}>(未授权)</span> : ''}</strong></Row>
-                <Row>
-                    <Space>
-                        原始id:
-                        <span style={{ color: '#888', fontSize: '13px' }}>
-                            {props.userName ? props.userName : '--'}
-                        </span>
-                        {
-                            props.userName && <a>
-                                <CopyOutlined onClick={() => { copy(props?.userName) }} />
-                            </a>
-                        }
-                    </Space>
-                </Row>
-                <Row>
-                    <Space>
-                        appId: <span style={{ color: '#888', fontSize: '13px' }}>
-                            {props.appid ? props?.verifyTypeInfo == -1 ? <del>{props.appid}</del> : props.appid : '--'}
-                        </span>
-                        {
-                            props.appid && <a>
-                                <CopyOutlined onClick={() => { copy(props?.appid) }} />
-                            </a>
-                        }
-                    </Space>
-                </Row>
-            </Col>
-        </Row>
-    </>
-})
-
-
-// 公众号信息编辑reducer
-interface State {
-    gzhxxVisible?: boolean,
-    administratorCard?: string,//管理员身份证号码
-    administratorName?: string,//管理员名称
-    administratorWechat?: string,//管理员微信号
-    legalCard?: string,//法人身份证
-    legalName?: string,//法人姓名
-    legalWechat?: string,//法人手机号
-    authTime?: string,//认证时间
-    authTimeout?: string,//认证到期时间
-    businessGroupId?: string,//项目组
-    putStatus?: string,//投放状态
-    putChannel?: string,//投放渠道
-    rechargeTemplate?: string,//充值模板
-}
-interface Action {
-    type: 'addData' | 'init',
-    params?: State
-}
-const initGzhxx: State = {
-    gzhxxVisible: false,
-    administratorCard: '',
-    administratorName: '',
-    administratorWechat: '',
-    legalCard: '',
-    legalName: '',
-    legalWechat: '',
-    authTime: '',
-    authTimeout: '',
-    businessGroupId: '',
-    putStatus: '',
-    putChannel: '',
-    rechargeTemplate: '',
-}
-
-function reducer(state: State, action: Action) {
-    let { type, params } = action
-    switch (type) {
-        case 'addData':
-            let obj: any = {}
-            Object.keys(params as State).forEach((key: string) => {
-                obj[key] = (params as State)[key]
-            })
-            return { ...state, ...obj }
-        case 'init':
-            return { ...initGzhxx }
-        default:
-            return { ...state }
-    }
-
-}
-/**
- * 操作渲染
- */
-const Action = React.memo((props: { data: any, fncList: any }) => {
-    const [state, gzhxxDispacth] = useReducer(reducer, initGzhxx)
-    const { currentUser }: any = useModel('@@initialState', model => ({ currentUser: model.initialState?.currentUser }))
-    const { userId } = useModel('useOperating.useUser', model => ({ userId: model.state.selectdUserId }))
-    const { editStatus, perfectInformation } = useModel('useOperating.useAccount', model => ({ editStatus: model.editStatus, perfectInformation: model.perfectInformation }))
-    const [visible, setVisible] = useState<boolean>(false)
-    const [radio, setRadio] = useState<1 | 2 | 3>(props?.data?.approveStatus || 1)
-    const resourceList = useAjax((params) => resourceChangeRecord(params))
-    const businessGroupALL = useAjax((paams) => businessGroup())
-    const [editData, setEditData] = useState<any>(null)
-    const delLog = useAjax((changeRecordId) => del(changeRecordId))//删除日志
-    // 获取记录列表
-    let showModel = useCallback(() => {
-        setVisible(!visible)
-        handleResourceList({ pageNum: 1, pageSize: 10 })
-    }, [visible])
-    let handleResourceList = (params?: any) => {
-        resourceList.run({ ...params, resourceId: props?.data?.id })
-    }
-    useEffect(() => {
-        if (state.gzhxxVisible) {
-            businessGroupALL.run()
-        }
-
-    }, [state.gzhxxVisible])
-    let [qsCodeShow, setQsCodeShow] = useState<boolean>(false)
-    /**
-     * 同步微信
-     */
-    const weChat = useRequest((params: { id: string }) => putWx(params), {
-        manual: true,
-        formatResult: (res) => res.data,
-        cacheKey: 'weChat',
-    })
-    /**
-     * 同步操作
-     */
-    let handleweChat = () => {
-        weChat.run({ id: props.data.id }).then(() => {
-            props.fncList.refresh()
-        })
-    }
-    /**切换公众号状态 */
-    let handleStatus = () => {
-        editStatus.run({ mpId: props.data.id, status: radio }).then((res: any) => {
-            if (res) {
-                props.fncList.refresh()
-            }
-        })
-    }
-    /**修改公众号信息*/
-    let handleGzhxx = () => {
-        let { gzhxxVisible, ...params } = state
-        perfectInformation.run({ ...params, mpId: props.data.id }).then((res) => {
-            if (res) {
-                gzhxxDispacth({ type: 'init' })
-                props.fncList.refresh()
-            }
-        })
-    }
-    /**编辑切书日志*/
-    let handleEditShow = useCallback((obj: any) => {
-        setEditData(obj)
-    }, [])
-    /**删除日志*/
-    let handleDelLog = useCallback((id: number) => {
-        delLog.run(id).then(res => {
-            if(res){
-                message.success('删除成功!')
-                resourceList.refresh()
-            }
-        })
-    }, [resourceList])
-    let resource_columns: any = [
-        {
-            title: '开始时间',
-            dataIndex: 'beginTime',
-            key: 'beginTime',
-            width: 200,
-            align: 'center',
-            render: (a: any) => {
-                return a || '/'
-            }
-        },
-        {
-            title: '结束时间',
-            dataIndex: 'endTime',
-            key: 'endTime',
-            width: 200,
-            align: 'center',
-            render: (a: any) => {
-                return a || '/'
-            }
-        },
-        {
-            title: '公众号名称',
-            dataIndex: 'resourceName',
-            key: 'resourceName',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.resourceInfo?.resourceName || '/'
-            }
-        },
-        {
-            title: '项目组',
-            dataIndex: 'businessGroupName',
-            key: 'businessGroupName',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.businessGroupInfo?.businessGroupName || '/'
-            }
-        },
-        {
-            title: '运营',
-            dataIndex: 'operUserInfo?.nickname',
-            key: 'operUserInfo?.nickname',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.operUserInfo?.nickname || '/'
-            }
-        },
-        {
-            title: '投手',
-            dataIndex: 'putUserInfo.nickname',
-            key: 'putUserInfo.nickname',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.putUserInfo?.nickname || '/'
-            }
-        },
-        {
-            title: '期数',
-            dataIndex: 'period',
-            key: 'period',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.periodInfo?.period || '/'
-            }
-        },
-        {
-            title: '当前书城',
-            dataIndex: 'platformName',
-            key: 'platformName',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.platformInfo?.platformName || '/'
-            }
-        },
-        {
-            title: '书城VIP账号',
-            dataIndex: 'account',
-            key: 'account',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.platformAccountInfo?.account || '/'
-            }
-        },
-        {
-            title: '当前书籍',
-            dataIndex: 'bookName',
-            key: 'bookName',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.bookInfo?.bookName || '/'
-            }
-        },
-        {
-            title: '投放状态',
-            dataIndex: 'putStatus',
-            key: 'putStatus',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                let state = {
-                    wait: '待投放',
-                    ing: '投放中',
-                    stop: '停投',
-                    destroy: '已注销'
-                }
-                let status = {
-                    wait: 'error',
-                    ing: 'processing',
-                    stop: 'warning',
-                    destroy: 'default'
-                }
-                return <Badge status={status[a] as 'error' | 'processing' | 'warning' | 'default'} text={state[a]} />
-            }
-        },
-        {
-            title: '投放渠道',
-            dataIndex: 'putChannel',
-            key: 'putChannel',
-            width: 200,
-            align: 'center',
-            render: (a: any) => {
-                return a || '/'
-            }
-        },
-        {
-            title: '充值模板',
-            dataIndex: 'rechargeTemplate',
-            key: 'rechargeTemplate',
-            width: 200,
-            align: 'center',
-            render: (a: any) => {
-                return a || '/'
-            }
-        },
-        {
-            title: '操作人',
-            dataIndex: 'nickname',
-            key: 'nickname',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.createUser?.nickname || '/'
-            }
-        },
-        {
-            title: '备注',
-            dataIndex: 'remark',
-            key: 'remark',
-            width: 200,
-            align: 'center',
-            render: (a: any) => {
-                return a || '/'
-            }
-        },
-        {
-            title: '操作',
-            dataIndex: 'action',
-            key: 'action',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return <Space>
-                    <a onClick={() => { handleEditShow(b) }}>编辑</a>
-                    <Popconfirm
-                        title={'确定删除本条记录?'}
-                        onConfirm={()=>{handleDelLog(b?.id)}}
-                        okText="Yes"
-                        cancelText="No"
-                    >
-                        <a >删除</a>
-                    </Popconfirm>
-                </Space>
-            }
-        },
-    ]
-    return <Row gutter={[5, 5]} justify='center'>
-        <Col>
-            <Tooltip title='公众号信息完善'>
-                <Button size='small'
-                    style={{ borderColor: '#d12e3c' }}
-                    onClick={() => {
-                        gzhxxDispacth({
-                            type: 'addData',
-                            params: {
-                                gzhxxVisible: true,
-                                legalCard: props?.data?.legalCard || '',
-                                legalName: props?.data?.legalName || '',
-                                legalWechat: props?.data?.legalWechat || '',
-                                administratorCard: props?.data?.administratorCard || '',
-                                administratorName: props?.data?.administratorName || '',
-                                administratorWechat: props?.data?.administratorWechat || '',
-                                authTime: props?.data?.authTime || '',
-                                authTimeout: props?.data?.authTimeout || '',
-                                businessGroupId: props?.data?.resourceInfo?.businessGroupId || '',
-                                putStatus: props?.data?.resourceInfo?.putStatus || '',
-                                putChannel: props?.data?.resourceInfo?.putChannel || '',
-                                rechargeTemplate: props?.data?.resourceInfo?.rechargeTemplate || '',
-                            }
-                        })
-                    }}
-                >
-                    <EditOutlined style={{ color: '#d12e3c' }} />
-                </Button>
-                <Modal
-                    visible={state.gzhxxVisible}
-                    onOk={handleGzhxx}
-                    onCancel={() => {
-                        gzhxxDispacth({ type: 'init' })
-                    }}
-                    title='公众号信息完善'
-                    okText='保存'
-                    cancelText='取消'
-                >
-                    <Divider orientation='left'>法人信息</Divider>
-                    <Row gutter={[20, 20]}>
-                        <Col span={12}>
-                            <label>法人</label>
-                            <Input
-                                placeholder='请输入法人姓名'
-                                value={state.legalName}
-                                onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
-                                    let value = e.target.value
-                                    gzhxxDispacth({ type: 'addData', params: { legalName: value } })
-                                }}
-                            />
-                        </Col>
-                        <Col span={12}>
-                            <label>法人身份证</label>
-                            <Input
-                                placeholder='请输入法人身份证'
-                                value={state.legalCard}
-                                onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
-                                    let value = e.target.value
-                                    gzhxxDispacth({ type: 'addData', params: { legalCard: value } })
-                                }}
-                            />
-                        </Col>
-                        <Col span={12}>
-                            <label>法人微信</label>
-                            <Input
-                                placeholder='请输入法人微信'
-                                value={state.legalWechat}
-                                onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
-                                    let value = e.target.value
-                                    gzhxxDispacth({ type: 'addData', params: { legalWechat: value } })
-                                }}
-                            />
-                        </Col>
-                    </Row>
-                    <Divider orientation='left'>管理员信息</Divider>
-                    <Row gutter={[20, 20]}>
-                        <Col span={12}>
-                            <label>管理员姓名</label>
-                            <Input
-                                placeholder='请输入管理员姓名'
-                                value={state.administratorName}
-                                onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
-                                    let value = e.target.value
-                                    gzhxxDispacth({ type: 'addData', params: { administratorName: value } })
-                                }}
-                            />
-                        </Col>
-                        <Col span={12}>
-                            <label>管理员身份证</label>
-                            <Input
-                                placeholder='请输入管理员身份证'
-                                value={state.administratorCard}
-                                onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
-                                    let value = e.target.value
-                                    gzhxxDispacth({ type: 'addData', params: { administratorCard: value } })
-                                }}
-                            />
-                        </Col>
-                        <Col span={12}>
-                            <label>管理员微信</label>
-                            <Input
-                                placeholder='请输入管理员微信'
-                                value={state.administratorWechat}
-                                onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
-                                    let value = e.target.value
-                                    gzhxxDispacth({ type: 'addData', params: { administratorWechat: value } })
-                                }}
-                            />
-                        </Col>
-                    </Row>
-                    <Divider orientation='left'>认证信息</Divider>
-                    <Row gutter={[20, 20]}>
-                        <Col span={12} style={{ display: 'flex', flexFlow: 'column' }}>
-                            <label>认证时间</label>
-                            <DatePickePage
-                                placeholder='请输入认证时间'
-                                model='DatePicker'
-                                date={state?.authTime}
-                                DatePickerChange={(moment: any, formatString: string | string[]) => {
-                                    gzhxxDispacth({ type: 'addData', params: { authTime: formatString as string } })
-                                }}
-                                isDisabledDate={false}
-                            />
-                        </Col>
-                        <Col span={12} style={{ display: 'flex', flexFlow: 'column' }}>
-                            <label>认证到期时间</label>
-                            <DatePickePage
-                                placeholder='请输入认证到期时间'
-                                model='DatePicker'
-                                date={state?.authTimeout}
-                                DatePickerChange={(moment: any, formatString: string | string[]) => {
-                                    gzhxxDispacth({ type: 'addData', params: { authTimeout: formatString as string } })
-                                }}
-                                isDisabledDate={false}
-                            />
-                        </Col>
-                    </Row>
-                    
-                </Modal>
-            </Tooltip>
-        </Col>
-        {/* <Col>
-            <Tooltip title='账号状态'>
-                <Popconfirm
-                    title={
-
-                        <Radio.Group onChange={(e: RadioChangeEvent) => { setRadio(e.target.value) }} value={radio}>
-                            <Radio value={1}>投放中</Radio>
-                            <Radio value={2}>停投</Radio>
-                            <Radio value={3}>已注销</Radio>
-                        </Radio.Group>
-                    }
-                    onConfirm={handleStatus}
-                    okText="Yes"
-                    cancelText="No"
-                    icon={null}
-                >
-                    <Button size='small' style={{ borderColor: '#722ed1' }} >
-                        <SwapOutlined style={{ color: '#722ed1' }} />
-                    </Button>
-                </Popconfirm>
-            </Tooltip>
-        </Col> */}
-        {/* <Col >
-        <Access accessible={(access as any).account_add} fallback={null}>
-        <Tooltip title='切书管理'>
-            <Button size='small' style={{ borderColor: '#2db7f5' }} onClick={showModel}>
-                <ReadOutlined style={{ color: '#2db7f5' }} />
-            </Button>
-        </Tooltip>
-        </Access>
-        {visible && <DarwerPage
-                name={props.data.nickName}
-                visible={visible}
-                fnc={showModel}
-                mpid={props.data.id}
-                platformInfo={{
-                    bookName: props?.data?.bookName,
-                    ...props?.data?.platformInfo,
-                    platformAccount: props?.data?.platformAccount,
-                    platformPassword: props?.data?.platformPassword,
-                }}
-                fnlist={props.fncList} />}
-        </Col> */}
-        {
-            currentUser.userId == userId && <Col >
-                {/* <Access accessible={(access as any).account_fz} fallback={null}> */}
-                <GroupPopover data={props.data} fncList={props.fncList} />
-                {/* </Access> */}
-            </Col>
-        }
-        {/* 切书记录 */}
-        <Col>
-            <Tooltip title='切书记录'>
-                <Button size='small' style={{ borderColor: '#2db7f5' }} onClick={showModel}>
-                    <ReadOutlined style={{ color: '#2db7f5' }} />
-                </Button>
-            </Tooltip>
-            {visible && <Drawer
-                destroyOnClose={true}
-                height={600}
-                placement='top'
-                visible={visible}
-                title={`当前公众号:${props?.data?.nickName}`}
-                onClose={showModel}
-            >
-                <Table
-                    size='small'
-                    columns={resource_columns}
-                    dataSource={resourceList?.data?.records || []}
-                    pagination={{
-                        current: resourceList?.data?.current,
-                        pageSize: resourceList?.data?.size,
-                        total: resourceList?.data?.total,
-                        showSizeChanger: true,
-                        pageSizeOptions: ['10', '20', '50', '70', '100'],
-                        showTotal: (total) => <Tag color="cyan">总共{total}数据</Tag>,
-                        onChange: (page, pageSize) => {
-                            handleResourceList({ pageNum: page, pageSize, })
-                        }
-                    }}
-                />
-                {
-                    editData && <EditBook editData={editData} list={resourceList} hide={() => { handleEditShow(null) }} />
-                }
-            </Drawer>}
-        </Col>
-        {/* 同步 */}
-        <Col>
-            <Tooltip title='同步微信'>
-                <Button style={{ borderColor: '#87d068' }} size='small' onClick={handleweChat}>
-                    <ReloadOutlined style={{ color: '#87d068' }} />
-                </Button>
-            </Tooltip>
-        </Col>
-        <Col>
-            <Tooltip title='公众号二维码'>
-                <Button style={{ borderColor: '#8B572A' }} size='small' onClick={() => { setQsCodeShow(true) }}>
-                    <QrcodeOutlined style={{ color: '#8B572A' }} />
-                </Button>
-            </Tooltip>
-            {(qsCodeShow && props?.data?.qrcodeUrl) && <Modal title={props?.data?.nickName} visible={qsCodeShow} onCancel={() => { setQsCodeShow(false) }} footer={null} width={250}>
-                <Image
-                    width={204}
-                    height={204}
-                    src={props.data.qrcodeUrl}
-                />
-            </Modal>}
-        </Col>
-    </Row >
-})
-
-// let Title = <Tooltip title="48小时内互动(包括粉丝发送消息给公众号、 点击自定义菜单、关注公众号、 扫描二维码、 支付成功、用户维权等,阅读公众号文章不算互动) 的粉丝数。">互动粉丝数<QuestionCircleOutlined /></Tooltip>
-/**
- * Column配置
- */
-export let tablesConfig: (
-    listData: any, open: (mpId: string) => void
-) => ColumnProps<ColumnsType>[] = (listData, open) => {
-    const { copy } = useCopy()
-    return [
-        {
-            title: '公众号',
-            dataIndex: 'alias',
-            key: 'alias',
-            align: 'center',
-            width: 350,
-            fixed: 'left',
-            render: (a: any, b: any) => <Gz userName={b.userName} name={b.nickName} img={b.headImg || localStorage?.bookImg} authStatus={b?.authStatus} appid={b?.appid} verifyTypeInfo={b?.verifyTypeInfo} />
-        },
-        {
-            title: '粉丝数',
-            dataIndex: 'fansCount',
-            key: 'fansCount',
-            align: 'center',
-            width: 100,
-            sorter: (a: any, b: any) => {
-                return a?.fansCount - b?.fansCount
-            },
-            defaultSortOrder: 'descend'
-        },
-        {
-            title: <span>运营信息</span>,
-            dataIndex: 'isOperUser',
-            key: 'isOperUser',
-            align: 'center',
-            width: 180,
-            render: (a: any, b: any) => {
-                return <>
-                    {
-                        b?.operUserInfo ? <>
-                            <div>{b?.operUserInfo?.nickName}</div>
-                            <div>{b?.operUserInfo?.phone}</div>
-                        </> : <span style={{ color: 'red' }}>未配置</span>
-                    }
-                </>
-            }
-        },
-        {
-            title: '投手信息',
-            dataIndex: 'putUserInfo',
-            key: 'putUserInfo',
-            align: 'center',
-            width: 150,
-            render: (a: any, b: any) => {
-                return <>
-                    {
-                        b?.putUserInfo && Object.keys(b?.putUserInfo).length > 0 ? <>
-                            <div>{b?.putUserInfo?.nickName}</div>
-                            <div>{b?.putUserInfo?.phone}</div>
-                        </> : <span style={{ color: 'red' }}>未配置</span>
-                    }
-                </>
-            }
-        },
-        {
-            title: '当前书城',
-            dataIndex: 'platformInfo',
-            key: 'platformInfo',
-            width: 200,
-            align: 'center',
-            render: (a: any, b: any) => {
-                let { resourceInfo: { platformAccountInfo, platformInfo, bookInfo, periodInfo } } = b
-                return <div style={{ display: 'flex', flexFlow: 'column' }}>
-                    <span>
-                        <Space>
-                            {
-                                platformInfo?.platformName ? <a href={platformInfo?.vipLink?.search(/http[s]?:\/\//) === -1 ? 'http://' + platformInfo?.vipLink : platformInfo?.vipLink} target='_blank'>{platformInfo?.platformName}</a> : '无'
-                            }
-                            <LinsModal
-                                oldPlatformId={platformInfo?.id}//书城ID
-                                mpId={b?.resourceId}//resourceId
-                                list={listData}
-                                oldPeriodId={periodInfo?.id}//期数ID
-                                oldPlatformAccountId={platformAccountInfo?.id}//账号ID
-                                oldBookId={bookInfo?.id}//书ID
-                                oldBusinessGroupId={b?.resourceInfo?.businessGroupId}
-                                oldPutChannel={b?.resourceInfo?.putChannel}
-                                oldPutStatus={b?.resourceInfo?.putStatus}
-                                oldRechargeTemplate={b?.resourceInfo?.rechargeTemplate}
-                            // remark={}//描述
-                            />
-                        </Space>
-                    </span>
-                    <span>账号:{platformAccountInfo?.account || `无`} {
-                        platformAccountInfo?.account && <a>
-                            <CopyOutlined onClick={() => { copy(platformAccountInfo?.account) }} />
-                        </a>
-                    }</span>
-                    <span>密码:{platformAccountInfo?.password || `无`}{
-                        platformAccountInfo?.password && <a>
-                            <CopyOutlined onClick={() => { copy(platformAccountInfo?.password) }} />
-                        </a>
-                    }</span>
-
-                </div>
-            }
-        },
-        {
-            title: '所属期数',
-            dataIndex: 'qs',
-            key: 'qs',
-            width: 150,
-            align: 'center',
-            render: (a: any, b: any) => {
-                let { resourceInfo: { periodInfo } } = b
-                return periodInfo?.period || '无'
-            }
-        },
-        {
-            title: '当前书籍',
-            dataIndex: 'bookName',
-            key: 'bookName',
-            width: 150,
-            align: 'center',
-            render: (a: string, b: any) => {
-                let { resourceInfo: { bookInfo } } = b
-                return bookInfo?.bookName || '无'
-            }
-        },
-        {
-            title: <span>投放状态</span>,
-            dataIndex: 'approveStatus',
-            key: 'approveStatus',
-            align: 'center',
-            width: 150,
-            render: (a: any, b: any) => {
-                let state = {
-                    wait: '待投放',
-                    ing: '投放中',
-                    stop: '停投',
-                    destroy: '已注销'
-                }
-                let status = {
-                    wait: 'error',
-                    ing: 'processing',
-                    stop: 'warning',
-                    destroy: 'default'
-                }
-                let { resourceInfo: { putStatus } } = b
-                return <Badge status={status[putStatus] as 'error' | 'processing' | 'warning' | 'default'} text={state[putStatus]} />
-            }
-        },
-        {
-            title: '项目组',
-            dataIndex: 'groupInfo',
-            key: 'groupInfo',
-            align: 'center',
-            width: 150,
-            render: (a: any, b: any) => {
-                return b?.resourceInfo?.businessGroupInfo?.businessGroupName
-            }
-        },
-        {
-            title: '投放渠道',
-            dataIndex: 'groupInfo',
-            key: 'groupInfo',
-            align: 'center',
-            width: 150,
-            render: (a: any, b: any) => {
-                return b?.resourceInfo?.putChannel
-            }
-        },
-        {
-            title: '充值模板',
-            dataIndex: 'groupInfo',
-            key: 'groupInfo',
-            align: 'center',
-            width: 150,
-            render: (a: any, b: any) => {
-                return b?.resourceInfo?.rechargeTemplate
-            }
-        },
-        {
-            title: '公众号账号/密码',
-            dataIndex: 'platformAccount',
-            key: 'platformAccount',
-            width: 200,
-            align: 'center',
-            render: (a: string, b: any) => {
-                return <div style={{ display: 'flex', flexFlow: 'column' }}>
-                    <span>账号:{b?.account || `无`} {
-                        b?.account && <a>
-                            <CopyOutlined onClick={() => { copy(b?.account) }} />
-                        </a>
-                    }</span>
-                    <span>密码:{b?.password || `无`}{
-                        b?.password && <a>
-                            <CopyOutlined onClick={() => { copy(b?.password) }} />
-                        </a>
-                    }</span>
-                </div>
-            }
-        },
-        {
-            title: <span>公众号管理者<Tooltip title="管理者指此公众号在微信平台的真实管理员!"><QuestionCircleOutlined style={{ color: 'red', marginLeft: 5 }} /></Tooltip></span>,
-            dataIndex: 'admin',
-            key: 'admin',
-            width: 200,
-            align: 'center',
-            render: (a: string, b: any) => <div style={{ display: 'flex', flexFlow: 'column' }}>
-                <span>姓名:{b?.administratorName || `无`}</span>
-                <span>手机号:{b?.managePhone || `无`}</span>
-                <span>编号:{b?.managePhoneNo || `无`}</span>
-            </div>
-        },
-        {
-            title: '公司主体',
-            dataIndex: 'principalName',
-            key: 'principalName',
-            align: 'center',
-            width: 180,
-            render: (a: any, b: any) => {
-                return b?.principalName
-            }
-        },
-
-        {
-            title: '认证有效期截止',
-            dataIndex: 'authTimeout',
-            key: 'authTimeout',
-            align: 'center',
-            width: 150,
-            render: (a: string) => {
-                return a
-            }
-        },
-        {
-            title: '所属分组',
-            dataIndex: 'groupInfo',
-            key: 'groupInfo',
-            align: 'center',
-            width: 150,
-            render: (a: any, b: any) => {
-                return b?.groupInfo?.groupName
-            }
-        },
-
-        {
-            title: '操作',
-            key: 'cz',
-            fixed: 'right',
-            width: 150,
-            align: 'center',
-            render: (a: any, b: any) => {
-                if (b.authStatus === 0) {
-                    return <Action data={b} fncList={listData} />
-                }
-                if (b.authStatus === 1) {
-                    return <Tooltip title='授权'>
-                        <Button size='small' style={{ borderColor: '#1cac2f' }} onClick={() => {
-                            open(b.id)
-                        }}>
-                            <WechatOutlined style={{ color: '#1cac2f' }} />
-                        </Button>
-                    </Tooltip>
-                }
-                return null
-            }
-        }
-    ]
-}

+ 0 - 30
src/pages/operatePage/account/wxCode.tsx

@@ -1,30 +0,0 @@
-import React, { useEffect } from 'react'
-import { api } from '@/services/api'
-/**微信授权中间页 */
-const WxCode = React.memo(() => {
-    useEffect(() => {
-        if (window.location.hash.indexOf('?') !== -1) {
-            let url = location.hash?.split('?')[1];
-            fetch(api + `/system/mp/authSuccess?${url}`).then(res => {
-                console.log(res)
-                return res.json()
-            }).then((data) => {
-                console.log('data==>',data)
-                if (data?.code == 200) {
-                    localStorage.setItem("code", "ok");
-                    console.log('执行成功逻辑====>',localStorage.getItem('code'))
-                }
-                if (data?.code == 500) {
-                    localStorage.setItem("code", "false");
-                    localStorage.setItem("errMsg", data?.msg);
-                    console.log('执行失败逻辑====>',localStorage.getItem('code'),localStorage.getItem('errMsg'))
-                }
-                window.close()
-            })
-        }
-    }, [])
-
-    return <div></div>
-})
-
-export default WxCode

+ 0 - 138
src/pages/operatePage/accountyyb/addAccount.tsx

@@ -1,138 +0,0 @@
-import { DatePicker, Form, Input, Modal, Select } from "antd";
-import moment from "moment";
-import React, { useEffect, useState } from "react";
-import { useModel } from "umi";
-
-
-interface Props {
-    value?: any,
-    handleType?: 'addGDT' | 'addKYY' | 'editGDT' | 'editKYY'
-    type?: string,
-    visible?: boolean,
-    onChange?: () => void,
-    onClose?: () => void
-}
-function AddAccount(props: Props) {
-    const { value = {}, handleType = 'addGDT', type = '1', visible = false, onChange, onClose } = props
-    const { getResource, addGdtAccount, editGdtAccount, addQuickAppAccount, editQuickAppAccount } = useModel('useOperating.useAccountyyb')
-    const { userId } = useModel('useOperating.useUser', model => ({ userId: model.state.selectdUserId }))
-    const [titel, setTitle] = useState<string>('新增账号')
-    const [form] = Form.useForm()
-
-    useEffect(() => {
-        switch (handleType) {
-            case 'addGDT':
-                setTitle('新增账号')
-                break
-            case 'addKYY':
-                setTitle('新增账号')
-                break
-            case 'editGDT':
-                setTitle('修改账号')
-                break
-            case 'editKYY':
-                setTitle('修改账号')
-                break
-        }
-    }, [])
-    // 确认
-    const handleOk = async () => {
-        form.submit()
-        let data = await form.validateFields()
-        let { resourceNames, ...newData } = data
-        let proms = { ...newData, beginTime: moment(data.beginTime).format('YYYY-MM-DD'), userId }
-        switch (handleType) {
-            case 'addGDT':
-                addGdtAccount.run(proms).then(res => {
-                    if (res) {
-                        onChange && onChange()
-                    }
-                })
-                break
-            case 'addKYY':
-                addQuickAppAccount.run(proms).then(res => {
-                    if (res) {
-                        onChange && onChange()
-                    }
-                })
-                break
-            case 'editGDT':
-                proms = { ...newData, userId, gdtAccountId: value.gdtAccountId }
-                editGdtAccount.run(proms).then(res => {
-                    if (res) {
-                        onChange && onChange()
-                    }
-                })
-                break
-            case 'editKYY':
-                proms = { ...newData, userId, accountId: value.accountId }
-                editQuickAppAccount.run(proms).then(res => {
-                    if (res) {
-                        onChange && onChange()
-                    }
-                })
-                break
-        }
-    }
-
-    // 搜索资源
-    const handleSearch = (value: string) => {
-        getResource.run({ resourceName: value, resourceType: type === '1' ? 0 : 10 })
-    }
-
-    return <Modal title={titel} visible={visible} onOk={handleOk} onCancel={() => { onClose && onClose() }} confirmLoading={addGdtAccount.loading || editGdtAccount.loading || addQuickAppAccount.loading}>
-        <Form
-            name="basic"
-            form={form}
-            labelCol={{ span: 5 }}
-            wrapperCol={{ span: 19 }}
-            autoComplete="off"
-            initialValues={{ ...value }}
-        >
-            {handleType === 'addGDT' ? <Form.Item label="账号ID" name="accountIds" rules={[{ type: 'string', required: true, message: '请输入账号!' }]}>
-                <Input.TextArea autoSize placeholder="请输入账号ID(id1,id2,id3)" />
-            </Form.Item> : handleType === 'editGDT' ? <Form.Item label="账号ID" name="accountId" rules={[{ type: 'string', required: true, message: '请输入账号!' }]}>
-                <Input placeholder="请输入账号ID" />
-            </Form.Item> : handleType === 'addKYY' || handleType === 'editKYY' ? <>
-                {handleType === 'addKYY' ? <Form.Item label="账号ID" name="advertiserIds" rules={[{ type: 'string', required: true, message: '请输入账号ID!' }]}>
-                    <Input.TextArea autoSize placeholder="请输入账号ID(id1,id2,id3)" />
-                </Form.Item> : <Form.Item label="账号ID" name="advertiserId" rules={[{ type: 'string', required: true, message: '请输入账号ID!' }]}>
-                    <Input.TextArea autoSize placeholder="请输入账号ID" />
-                </Form.Item>}
-                <Form.Item label="总账号名称" name="accountName" rules={[{ type: 'string', required: true, message: '请输入总账号名称!' }]}>
-                    <Input placeholder="请输入总账号名称" />
-                </Form.Item>
-                <Form.Item label="总账号" name="account" rules={[{ type: 'string', required: true, message: '请输入总账号!' }]}>
-                    <Input placeholder="请输入总账号" />
-                </Form.Item>
-                <Form.Item label="总账号密码" name="accountPassword" rules={[{ type: 'string', required: true, message: '请输入总账号密码!' }]}>
-                    <Input placeholder="请输入总账号密码" />
-                </Form.Item>
-            </> : null}
-            {(handleType === 'editGDT' || handleType === 'editKYY') && <Form.Item label="当前投放信息" name="resourceNames">
-                <Input.TextArea autoSize disabled />
-            </Form.Item>}
-            {(handleType === 'addGDT' || handleType === 'addKYY') && <>
-                <Form.Item label="投放信息" name="putResourceId" rules={[{ type: 'number', required: true, message: '请选择投放信息!' }]}>
-                    <Select
-                        showSearch
-                        placeholder="选择投放信息"
-                        defaultActiveFirstOption={false}
-                        showArrow={false}
-                        filterOption={false}
-                        onSearch={handleSearch}
-                        notFoundContent={null}
-                    >
-                        {getResource?.data?.map((item: { id: number, resourceName: string }) => <Select.Option key={item.id} value={item.id}>{item.resourceName}</Select.Option>)}
-                    </Select>
-
-                </Form.Item>
-                <Form.Item label="开始时间" name="beginTime" rules={[{ type: 'object' as const, required: true, message: '请选择时间!' }]}>
-                    <DatePicker />
-                </Form.Item>
-            </>}
-        </Form>
-    </Modal>
-}
-
-export default React.memo(AddAccount)

+ 0 - 148
src/pages/operatePage/accountyyb/changeRecord.tsx

@@ -1,148 +0,0 @@
-import Tables from "@/components/Tables";
-import { DatePicker, Drawer, Form, Input, Modal, Select } from "antd";
-import moment from "moment";
-import React, { useCallback, useEffect, useState } from "react";
-import { useModel } from "umi";
-import { columnsCrGdt } from "./tablesConfig"
-
-type Props = {
-    data?: { name: string, id: number } | null,
-    type?: string,
-    visible?: boolean,
-    onChange?: () => void,
-    onClose?: () => void
-}
-function ChangeRecord(props: Props) {
-
-    const { data, visible, onClose, type = '1' } = props
-    const { getGdtChangeRecord, getAccountChangeRecord, editAccountChangeRecord, editGdtChangeRecord, getResource } = useModel('useOperating.useAccountyyb')
-    const [accountQueryForm, setAccountQueryForm] = useState<{ quickAppAccountId: number, pageNum: number, pageSize: number }>({ quickAppAccountId: data?.id as number, pageNum: 1, pageSize: 20 })
-    const [gdtQueryForm, setGdtQueryForm] = useState<{ gdtAccountId: number, pageNum: number, pageSize: number }>({ gdtAccountId: data?.id as number, pageNum: 1, pageSize: 20 })
-    const [editTitle, setEditTitle] = useState<string>('编辑')
-    const [form] = Form.useForm()
-    const [editData, setEditData] = useState<{ recordId: number, putResourceId: number | undefined, resourceNames: string, beginTime: any, endTime: any } | null>(null)
-    const [editVisible, setEditVisible] = useState<boolean>(false)
-
-    useEffect(() => {
-        getList()
-    }, [type, accountQueryForm, gdtQueryForm])
-
-    const getList = () => {
-        if (type === '1') { //广点通
-            getGdtChangeRecord.run(gdtQueryForm)
-        } else {  // 快应用
-            getAccountChangeRecord.run(accountQueryForm)
-        }
-    }
-
-    // 分页
-    const pageChange = useCallback((page: string | number, pageSize?: string | number) => {
-        if (type === '1') { //广点通
-            setGdtQueryForm({ ...gdtQueryForm, pageNum: page as number, pageSize: pageSize as number })
-        } else { // 快应用
-            setAccountQueryForm({ ...accountQueryForm, pageNum: page as number, pageSize: pageSize as number })
-        }
-    }, [accountQueryForm, gdtQueryForm, type])
-
-    // 编辑
-    const editHandle = useCallback((data: any) => {
-        const { beginTime, endTime, id, putResourceInfo } = data
-        setEditData({ beginTime: moment(beginTime), endTime: endTime ? moment(endTime) : null, recordId: id, putResourceId: undefined, resourceNames: putResourceInfo?.resourceName })
-        setEditTitle('编辑 ' + putResourceInfo?.resourceName)
-        setEditVisible(true)
-        setTimeout(() => {
-            form.resetFields()
-        }, 100)
-    }, [editData, editTitle, editVisible, form])
-
-    // 搜索资源
-    const handleSearch = (value: string) => {
-        getResource.run({ resourceName: value, resourceType: type === '1' ? 0 : 10 })
-    }
-
-    const handleOk = async () => {
-        form.submit()
-        let { resourceNames, ...data1 }  = await form.validateFields()
-        let proms = { ...data1, beginTime: moment(data1.beginTime).format('YYYY-MM-DD') + ' 00:00:00' }
-        if (data1.endTime) {
-            proms.endTime = moment(data1.endTime).format('YYYY-MM-DD') + ' 00:00:00'
-        }
-        if (type === '1') { //广点通
-            editGdtChangeRecord.run({ ...proms, recordId: editData?.recordId }).then(res => {
-                if(res) {
-                    setEditData(null);
-                    setEditVisible(false);
-                    getGdtChangeRecord.refresh()
-                }
-            })
-        } else {
-            editAccountChangeRecord.run({ ...proms, recordId: editData?.recordId }).then(res => {
-                if(res) {
-                    setEditData(null);
-                    setEditVisible(false);
-                    getAccountChangeRecord.refresh()
-                }
-            })
-        }
-    }
-
-    console.log('editData---->', editData)
-
-    return <div>
-
-        <Drawer title={data?.name + ' 变更记录'} placement="right" width={1200} onClose={() => { onClose && onClose() }} visible={visible}>
-            <Tables
-                columns={columnsCrGdt(editHandle)}
-                dataSource={type === '1' ? getGdtChangeRecord?.data?.records : getAccountChangeRecord?.data?.records}
-                total={type === '1' ? getGdtChangeRecord?.data?.total : getAccountChangeRecord?.data?.total}
-                loading={type === '1' ? getGdtChangeRecord?.loading : getAccountChangeRecord?.loading}
-                pageChange={pageChange}
-                sizeChange={pageChange}
-                current={type === '1' ? getGdtChangeRecord?.data?.current : getAccountChangeRecord?.data?.current}
-                pageSize={type === '1' ? getGdtChangeRecord?.data?.size : getAccountChangeRecord?.data?.size}
-                size={'small'}
-                scroll={{ x: 1100 }}
-            />
-        </Drawer>
-
-        {editVisible && <Modal title={editTitle} visible={editVisible} onOk={handleOk} onCancel={() => { setEditData(null); form.resetFields(); setEditVisible(false); }} confirmLoading={editAccountChangeRecord.loading || editGdtChangeRecord.loading}>
-            <Form
-                name="basic"
-                form={form}
-                labelCol={{ span: 5 }}
-                wrapperCol={{ span: 19 }}
-                autoComplete="off"
-                initialValues={{ ...editData }}
-            >
-                <Form.Item label="开始时间" name="beginTime" rules={[{ type: 'object' as const, required: true, message: '请选择时间!' }]}>
-                    <DatePicker />
-                </Form.Item>
-                <Form.Item label="结束时间" name="endTime">
-                    <DatePicker />
-                </Form.Item>
-                <Form.Item label="当前投放信息" name="resourceNames">
-                    <Input.TextArea autoSize disabled />
-                </Form.Item>
-                <Form.Item label="投放信息" name="putResourceId" rules={[{ type: 'number', required: true, message: '请选择投放信息!' }]}>
-                    <Select
-                        showSearch
-                        placeholder="选择投放信息"
-                        defaultActiveFirstOption={false}
-                        showArrow={false}
-                        filterOption={false}
-                        onSearch={handleSearch}
-                        notFoundContent={null}
-                    >
-                        {getResource?.data?.map((item: { id: number, resourceName: string }) => <Select.Option key={item.id} value={item.id}>{item.resourceName}</Select.Option>)}
-                    </Select>
-                </Form.Item>
-
-            </Form>
-
-        </Modal>}
-
-    </div>
-}
-
-
-export default React.memo(ChangeRecord)

+ 0 - 79
src/pages/operatePage/accountyyb/checkAccount.tsx

@@ -1,79 +0,0 @@
-import { DatePicker, Form, Input, Modal, Select } from "antd";
-import moment from "moment";
-import React from "react";
-import { useModel } from "umi";
-
-interface Props {
-    value?: any,
-    type?: string,
-    visible?: boolean,
-    onChange?: () => void,
-    onClose?: () => void
-}
-function CheckAccount(props: Props) {
-    const { value = {}, type = '1', visible = false, onChange, onClose } = props
-    const { userId } = useModel('useOperating.useUser', model => ({ userId: model.state.selectdUserId }))
-    const { getResource, checkGdtAccountGdt, checkQuickAppAccount } = useModel('useOperating.useAccountyyb')
-    const [form] = Form.useForm()
-    const handleOk = async () => {
-        form.submit()
-        let data = await form.validateFields()
-        let { accountIds, resourceNames, ...data1 } = data
-        if (type === '1') { // GDT
-            let proms = { ...data1, beginTime: moment(data.beginTime).format('YYYY-MM-DD'), userId, gdtAccountIds: value?.gdtAccountIds }
-            checkGdtAccountGdt.run(proms).then(res => {
-                if(res) {
-                    onChange && onChange()
-                }
-            })
-        } else {
-            let proms = { ...data1, beginTime: moment(data.beginTime).format('YYYY-MM-DD'), userId, quickAppAccountIds: value?.quickAppAccountIds }
-            checkQuickAppAccount.run(proms).then(res => {
-                if(res) {
-                    onChange && onChange()
-                }
-            })
-        }
-    }
-
-    // 搜索资源
-    const handleSearch = (value: string) => {
-        getResource.run({ resourceName: value, resourceType: type === '1' ? 0 : 10 })
-    }
-
-    return <Modal title={`${type === "1" ? 'GDT' : 'KYY'}切号`} visible={visible} onOk={handleOk} onCancel={() => { onClose && onClose() }} confirmLoading={checkGdtAccountGdt.loading}>
-        <Form 
-            name="basic"
-            form={form}
-            labelCol={{ span: 5 }}
-            wrapperCol={{ span: 19 }}
-            autoComplete="off"
-            initialValues={{ ...value }}
-        >
-            <Form.Item label="账号ID" name="accountIds" rules={[{ type: 'string', required: true, message: '请输入账号!' }]}>
-                <Input.TextArea autoSize placeholder="请输入账号ID(id1,id2,id3)" disabled/>
-            </Form.Item>
-            <Form.Item label="当前投放信息" name="resourceNames">
-                <Input.TextArea autoSize disabled/>
-            </Form.Item>
-            <Form.Item label="投放信息" name="putResourceId" rules={[{ type: 'number', required: true, message: '请选择投放信息!' }]}>
-                <Select
-                    showSearch
-                    placeholder="选择投放信息"
-                    defaultActiveFirstOption={false}
-                    showArrow={false}
-                    filterOption={false}
-                    onSearch={handleSearch}
-                    notFoundContent={null}
-                >
-                    {getResource?.data?.map((item: { id: number, resourceName: string }) => <Select.Option key={item.id} value={item.id}>{item.resourceName}</Select.Option>)} 
-                </Select>
-            </Form.Item>
-            <Form.Item label="开始时间" name="beginTime" rules={[{ type: 'object' as const, required: true, message: '请选择时间!' }]}>
-                <DatePicker />
-            </Form.Item>
-        </Form>
-    </Modal>
-}
-
-export default React.memo(CheckAccount)

+ 0 - 302
src/pages/operatePage/accountyyb/index.tsx

@@ -1,302 +0,0 @@
-import GroupYybTabs from "@/components/GroupWxTabs/yyb"
-import Tables from '@/components/Tables'
-import { Button, Input, Popconfirm, Select, Space, Tabs } from "antd"
-import React, { useCallback, useEffect, useState } from "react"
-import { useModel } from "umi"
-import { columns, columnsKyy } from "./tablesConfig"
-import { gdtAccountProps, QuickAppAccout } from '@/services/operating/accountyyb'
-import { DeleteOutlined, PlusOutlined, SwapOutlined } from "@ant-design/icons"
-import AddAccount from "./addAccount"
-import CheckAccount from "./checkAccount"
-import ChangeRecord from "./changeRecord"
-
-function Accountyyb() {
-
-    const { getGdtAccount, delGdtAccount, getQuickAppAccount, delQuickAppAccount, getResourceOfUser } = useModel('useOperating.useAccountyyb')
-    const { userId } = useModel('useOperating.useUser', model => ({ userId: model.state.selectdUserIdYyb }))
-    const [actionKey, setActionKye] = useState('1')
-    const [queryPlatformGdt, setQueryPlatformGdt] = useState<gdtAccountProps>({ pageNum: 1, pageSize: 10, userId })  // 获取GDT参数
-    const [addShow, setAddShow] = useState<boolean>(false)
-    const [checkAccShow, setCheckAccShow] = useState<boolean>(false)
-    const [data, setData] = useState<{
-        putResourceId?: number | undefined,
-        beginTime?: string | undefined,
-        gdtAccountId?: number,
-        accountIds?: string,
-        accountId?: string,
-        gdtAccountIds?: string,
-        resourceNames?: string,
-        advertiserId?: string,
-        accountName?: string,
-        account?: string,
-        accountPassword?: string,
-        quickAppAccountIds?: string
-    } | undefined>(undefined)
-    const [handleType, setHandleType] = useState<'addGDT' | 'addKYY' | 'editGDT' | 'editKYY'>('addGDT')
-    const [selectAccData, setSelectAccData] = useState<any[]>([])
-    const [queryPlatformKyy, setQueryPlatformKyy] = useState<QuickAppAccout>({ pageNum: 1, pageSize: 10, userId })  // 获取KYY参数
-    const [crShow, setCrShow] = useState<boolean>(false) // 变更记录控制
-    const [crData, setCrData] = useState<{ name: string, id: number } | null>(null)
-
-    // 切换key换接口数据
-    useEffect(() => {
-        if(userId) {
-            getList()
-        }
-    }, [actionKey, queryPlatformGdt, queryPlatformKyy, userId])
-
-    // 获取投放信息
-    useEffect(() => {
-        if (userId) {
-            getResourceOfUser.run({ userId, resourceType: actionKey === '1' ? 0 : 10 })
-        }
-    }, [actionKey, userId])
-
-    // 获取数据
-    const getList = () => {
-        if (actionKey === '1') {//广点通
-            getGdtAccount.run({ ...queryPlatformGdt, userId })
-        } else {//应用宝
-            getQuickAppAccount.run({ ...queryPlatformKyy, userId })
-        }
-    }
-
-    // 分页
-    const pageChange = useCallback((page: string | number, pageSize?: string | number) => {
-        if (actionKey === '1') { //广点通
-            setQueryPlatformGdt({ ...queryPlatformGdt, pageNum: page as number, pageSize: pageSize as number })
-        } else { //快应用
-            setQueryPlatformKyy({ ...queryPlatformKyy, pageNum: page as number, pageSize: pageSize as number })
-        }
-    }, [queryPlatformGdt, queryPlatformKyy, actionKey])
-
-    // 删除账号
-    const delAccount = (id: number[]) => {
-        if (actionKey === '1') {//广点通
-            delGdtAccount.run({ gdtAccountIds: id.toString() }).then(res => {
-                if (res) {
-                    getGdtAccount.refresh()
-                    setSelectAccData([])
-                }
-            })
-        } else {//应用宝
-            delQuickAppAccount.run({ quickAppAccountIds: id.toString() }).then(res => {
-                if (res) {
-                    getQuickAppAccount.refresh()
-                    setSelectAccData([])
-                }
-            })
-        }
-    }
-
-    // 编辑账号
-    const editAccountHandle = (value: any) => {
-        if (actionKey === '1') {//广点通
-            setHandleType('editGDT')
-            setData({ gdtAccountId: value.id, accountId: value.accountId, resourceNames: value?.putResourceInfo?.resourceName })
-        } else {//应用宝
-            setHandleType('editKYY')
-            setData({ accountId: value.id, resourceNames: value?.putResourceInfo?.resourceName, advertiserId: value.advertiserId, accountName: value.accountName, account: value.account, accountPassword: value.accountPassword })
-        }
-        setAddShow(true);
-    }
-
-    // 切号
-    const checkGdtAccountHandle = (value: any[]) => {
-        if (actionKey === '1') {//广点通
-            let ids = value?.map((item: any) => item.id)
-            setData({ resourceNames: value?.map((item: any) => item?.putResourceInfo?.resourceName).toString(), accountIds: value?.map((item: any) => item.accountId).toString(), gdtAccountIds: ids.toString(), putResourceId: undefined, beginTime: undefined })
-        } else {//应用宝
-            let ids = value?.map((item: any) => item.id)
-            setData({ resourceNames: value?.map((item: any) => item?.putResourceInfo?.resourceName).toString(), accountIds: value?.map((item: any) => item.account).toString(), quickAppAccountIds: ids.toString(), putResourceId: undefined, beginTime: undefined })
-        }
-        setCheckAccShow(true);
-    }
-
-    // 变更记录
-    const changeRecord = (name: string, id: number) => {
-        setCrData({ name, id })
-        setCrShow(true)
-    }
-
-    return <div>
-        {/* 新增 */}
-        {addShow && <AddAccount type={actionKey} handleType={handleType} value={data} visible={addShow} onChange={() => { getList(); setAddShow(false) }} onClose={() => { setAddShow(false) }} />}
-        {/* 切号 */}
-        {checkAccShow && <CheckAccount type={actionKey} value={data} visible={checkAccShow} onChange={() => { getList(); setCheckAccShow(false); setSelectAccData([]) }} onClose={() => { setCheckAccShow(false) }} />}
-        {/* 变更记录 */}
-        {crShow && <ChangeRecord visible={crShow} type={actionKey} data={crData} onClose={() => { setCrShow(false); setCrData(null) }} />}
-
-        <Space>
-            {actionKey === '1' ? <>
-                <Input placeholder="输入账号搜索" value={queryPlatformGdt.accountIds} allowClear onChange={(e) => { setQueryPlatformGdt({ ...queryPlatformGdt, accountIds: e.target.value }) }} />
-            </> :
-                <>
-                    <Input placeholder="输入账号ID搜索" value={queryPlatformKyy.advertiserIds} allowClear onChange={(e) => { setQueryPlatformKyy({ ...queryPlatformKyy, advertiserIds: e.target.value }) }} />
-                    <Input placeholder="输入总账号搜索" value={queryPlatformKyy.account} allowClear onChange={(e) => { setQueryPlatformKyy({ ...queryPlatformKyy, account: e.target.value }) }} />
-                </>
-            }
-            <Select placeholder="选择投放信息" showSearch filterOption={(input, option) =>
-                option?.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
-            } style={{ width: 150 }} allowClear value={actionKey === '1' ? queryPlatformGdt?.putResourceId : queryPlatformKyy?.putResourceId} onChange={(e) => {
-                if (actionKey === '1') {
-                    setQueryPlatformGdt({ ...queryPlatformGdt, putResourceId: e })
-                } else {
-                    setQueryPlatformKyy({ ...queryPlatformKyy, putResourceId: e })
-                }
-            }}>
-                {getResourceOfUser?.data?.map((item: { id: number, resourceName: string }) => <Select.Option value={item.id} key={item.id}>{item.resourceName}</Select.Option>)}
-            </Select>
-            <Button type="primary" onClick={() => { getList() }}>搜索</Button>
-        </Space>
-        <Tabs activeKey={actionKey} onChange={(activeKey) => { setActionKye(activeKey); setSelectAccData([]) }}>
-            <Tabs.TabPane tab="广点通" key="1" >
-                <GroupYybTabs
-                    isShowCount={false}
-                    allowClear={false}
-                    name="账号管理"
-                    tabBarExtraContent={{
-                        right: <Space>
-                            {selectAccData.length > 0 && <>
-                                <Popconfirm
-                                    title="确定删除?"
-                                    onConfirm={() => { delAccount(selectAccData?.map(item => item.id)) }}
-                                    okText="Yes"
-                                    cancelText="No"
-                                >
-                                    <Button danger icon={<DeleteOutlined />}>批量删除</Button>
-                                </Popconfirm>
-                                <Button type="primary" ghost icon={<SwapOutlined />} onClick={() => { checkGdtAccountHandle(selectAccData) }}>批量切号</Button>
-                                <Button type="primary" onClick={() => { setSelectAccData([]) }}>取消勾选</Button>
-                            </>}
-                            <Button type="primary" icon={<PlusOutlined />} onClick={() => { setAddShow(true); setData(undefined); setHandleType(actionKey === '1' ? 'addGDT' : 'addKYY') }}>新增</Button>
-                        </Space>
-                    }}
-                >
-                    <Tables
-                        columns={columns(editAccountHandle, delAccount, checkGdtAccountHandle, changeRecord)}
-                        dataSource={getGdtAccount?.data?.records}
-                        total={getGdtAccount?.data?.total}
-                        loading={getGdtAccount?.loading}
-                        pageChange={pageChange}
-                        sizeChange={pageChange}
-                        bordered
-                        current={getGdtAccount?.data?.current}
-                        pageSize={getGdtAccount?.data?.size}
-                        rowClassName='authStatus'
-                        size={'small'}
-                        scroll={{ x: 1100 }}
-                        rowSelection={{
-                            selectedRowKeys: selectAccData?.map((item: any) => item.id?.toString()),
-                            onSelect: (record: { id: number, mpName: string }, selected: boolean) => {
-                                if (selected) {
-                                    selectAccData.push({ ...record })
-                                    setSelectAccData([...selectAccData])
-                                } else {
-                                    let newSelectAccData = selectAccData.filter((item: { id: number }) => item.id !== record.id)
-                                    setSelectAccData([...newSelectAccData])
-                                }
-                            },
-                            onSelectAll: (selected: boolean, selectedRows: { id: number }[], changeRows: { id: number }[]) => {
-                                if (selected) {
-                                    let newSelectAccData = [...selectAccData]
-                                    changeRows.forEach((item: { id: number }) => {
-                                        let index = newSelectAccData.findIndex((ite: { id: number }) => ite.id === item.id)
-                                        if (index === -1) {
-                                            newSelectAccData.push({ ...item })
-                                        }
-                                    })
-                                    setSelectAccData([...newSelectAccData])
-                                } else {
-                                    let newSelectAccData = selectAccData.filter((item: { id: number }) => {
-                                        let index = changeRows.findIndex((ite: { id: number }) => ite.id === item.id)
-                                        if (index !== -1) {
-                                            return false
-                                        } else {
-                                            return true
-                                        }
-                                    })
-                                    setSelectAccData([...newSelectAccData])
-                                }
-                            }
-                        }}
-                    />
-                </GroupYybTabs>
-            </Tabs.TabPane>
-            <Tabs.TabPane tab="快应用" key="2">
-                <GroupYybTabs
-                    isShowCount={false}
-                    allowClear={false}
-                    name="账号管理"
-                    tabBarExtraContent={{
-                        right: <Space>
-                            {selectAccData.length > 0 && <>
-                                <Popconfirm
-                                    title="确定删除?"
-                                    onConfirm={() => { delAccount(selectAccData?.map(item => item.id)) }}
-                                    okText="Yes"
-                                    cancelText="No"
-                                >
-                                    <Button danger icon={<DeleteOutlined />} loading={delQuickAppAccount.loading}>批量删除</Button>
-                                </Popconfirm>
-                                <Button type="primary" ghost icon={<SwapOutlined />} onClick={() => { checkGdtAccountHandle(selectAccData) }}>批量切号</Button>
-                                <Button type="primary" onClick={() => { setSelectAccData([]) }}>取消勾选</Button>
-                            </>}
-                            <Button type="primary" icon={<PlusOutlined />} onClick={() => { setAddShow(true); setData(undefined); setHandleType(actionKey === '1' ? 'addGDT' : 'addKYY') }}>新增</Button>
-                        </Space>
-                    }}
-                >
-                    <Tables
-                        columns={columnsKyy(editAccountHandle, delAccount, checkGdtAccountHandle, changeRecord)}
-                        dataSource={getQuickAppAccount?.data?.records}
-                        total={getQuickAppAccount?.data?.total}
-                        loading={getQuickAppAccount?.loading}
-                        pageChange={pageChange}
-                        sizeChange={pageChange}
-                        bordered
-                        current={getQuickAppAccount?.data?.current}
-                        pageSize={getQuickAppAccount?.data?.size}
-                        rowClassName='authStatus'
-                        size={'small'}
-                        scroll={{ x: 1550 }}
-                        rowSelection={{
-                            selectedRowKeys: selectAccData?.map((item: any) => item.id?.toString()),
-                            onSelect: (record: { id: number, mpName: string }, selected: boolean) => {
-                                if (selected) {
-                                    selectAccData.push({ ...record })
-                                    setSelectAccData([...selectAccData])
-                                } else {
-                                    let newSelectAccData = selectAccData.filter((item: { id: number }) => item.id !== record.id)
-                                    setSelectAccData([...newSelectAccData])
-                                }
-                            },
-                            onSelectAll: (selected: boolean, selectedRows: { id: number }[], changeRows: { id: number }[]) => {
-                                if (selected) {
-                                    let newSelectAccData = [...selectAccData]
-                                    changeRows.forEach((item: { id: number }) => {
-                                        let index = newSelectAccData.findIndex((ite: { id: number }) => ite.id === item.id)
-                                        if (index === -1) {
-                                            newSelectAccData.push({ ...item })
-                                        }
-                                    })
-                                    setSelectAccData([...newSelectAccData])
-                                } else {
-                                    let newSelectAccData = selectAccData.filter((item: { id: number }) => {
-                                        let index = changeRows.findIndex((ite: { id: number }) => ite.id === item.id)
-                                        if (index !== -1) {
-                                            return false
-                                        } else {
-                                            return true
-                                        }
-                                    })
-                                    setSelectAccData([...newSelectAccData])
-                                }
-                            }
-                        }}
-                    />
-                </GroupYybTabs>
-            </Tabs.TabPane>
-        </Tabs>
-    </div>
-}
-export default Accountyyb

+ 0 - 200
src/pages/operatePage/accountyyb/tablesConfig.tsx

@@ -1,200 +0,0 @@
-import { DeleteOutlined, EditOutlined, FileSearchOutlined, SwapOutlined } from "@ant-design/icons"
-import { Button, Col, Popconfirm, Row } from "antd"
-import React from "react"
-
-const columns = (editAccount: (valud: any) => void, del: (id: number[]) => void, checkGdtAccount: (value: any[]) => void, changeRecord: (accountId: string, id: number) => void) => {
-    return [
-        {
-            title: 'GDT账号',
-            dataIndex: 'accountId',
-            key: 'accountId',
-            align: 'center',
-            width: 100,
-        },
-        {
-            title: '投放信息',
-            dataIndex: 'putResourceInfo',
-            key: 'putResourceInfo',
-            ellipsis: true,
-            // align: 'center',
-            width: 330,
-            render: (a: any) => {
-                return <span>{a?.resourceName || '<空>'}</span>
-            }
-        },
-        {
-            title: '创建时间',
-            dataIndex: 'createTime',
-            key: 'createTime',
-            align: 'center',
-            width: 100
-        },
-        {
-            title: '操作',
-            dataIndex: 'cz',
-            key: 'cz',
-            width: 210,
-            fixed: 'right',
-            render: (a: string, b: any) => (
-                <Row gutter={[5, 0]}>
-                    <Col><Button type="link" size="small" style={{ fontSize: 12 }} icon={<EditOutlined />} onClick={() => { editAccount(b) }}>编辑</Button></Col>
-                    <Col><Button type="link" size="small" style={{ fontSize: 12 }} icon={<SwapOutlined />} onClick={() => { checkGdtAccount([b]) }}>切号</Button></Col>
-                    <Col><Button type="link" size="small" style={{ fontSize: 12 }} icon={<FileSearchOutlined />} onClick={() => { changeRecord(b?.accountId, b?.id) }}>变更记录</Button></Col>
-                    <Col><Popconfirm
-                        title="确定删除?"
-                        onConfirm={() => { del([b?.id]) }}
-                        okText="Yes"
-                        cancelText="No"
-                    >
-                        <Button type="link" size="small" icon={<DeleteOutlined />} style={{ color: 'red', fontSize: 12 }}>删除</Button>
-                    </Popconfirm></Col>
-                </Row>
-            )
-        }
-    ]
-}
-const columnsKyy = (editAccount: (valud: any) => void, del: (id: number[]) => void, checkGdtAccount: (value: any[]) => void, changeRecord: (accountId: string, id: number) => void) => {
-    return [
-        {
-            title: '账号ID',
-            dataIndex: 'advertiserId',
-            key: 'advertiserId',
-            align: 'center',
-            ellipsis: true,
-            width: 110
-        },
-        {
-            title: '账号名称',
-            dataIndex: 'accountName',
-            key: 'accountName',
-            // align: 'center',
-            ellipsis: true,
-            width: 250
-        },
-        {
-            title: '总账号',
-            dataIndex: 'account',
-            key: 'account',
-            align: 'center',
-            ellipsis: true,
-            width: 130
-        },
-        {
-            title: '密码',
-            dataIndex: 'accountPassword',
-            key: 'accountPassword',
-            align: 'center',
-            width: 100
-        },
-        {
-            title: '投放信息',
-            dataIndex: 'putResourceInfo',
-            key: 'putResourceInfo',
-            align: 'center',
-            width: 140,
-            ellipsis: true,
-            render: (a: any) => {
-                return <span>{a?.resourceName || '<空>'}</span>
-            }
-        },
-        {
-            title: '创建时间',
-            dataIndex: 'createTime',
-            key: 'createTime',
-            align: 'center',
-            width: 120
-        },
-        {
-            title: '操作',
-            dataIndex: 'cz',
-            key: 'cz',
-            width: 210,
-            fixed: 'right',
-            render: (a: string, b: any) => (
-                <Row gutter={[5, 0]}>
-                    <Col><Button type="link" size="small" style={{ fontSize: 12 }} icon={<EditOutlined />} onClick={() => { editAccount(b) }}>编辑</Button></Col>
-                    <Col><Button type="link" size="small" style={{ fontSize: 12 }} icon={<SwapOutlined />} onClick={() => { checkGdtAccount([b]) }}>切号</Button></Col>
-                    <Col><Button type="link" size="small" style={{ fontSize: 12 }} icon={<FileSearchOutlined />} onClick={() => { changeRecord(b?.advertiserId, b?.id) }}>变更记录</Button></Col>
-                    <Col><Popconfirm
-                        title="确定删除?"
-                        onConfirm={() => { del([b?.id]) }}
-                        okText="Yes"
-                        cancelText="No"
-                    >
-                        <Button type="link" size="small" icon={<DeleteOutlined />} style={{ color: 'red', fontSize: 12 }}>删除</Button>
-                    </Popconfirm></Col>
-                </Row>
-            )
-        }
-    ]
-}
-
-// 变更记录
-const columnsCrGdt = (editHandle: (data: any) => void) => {
-    return [
-        {
-            title: '开始时间',
-            dataIndex: 'beginTime',
-            key: 'beginTime',
-            align: 'center',
-            width: 160,
-            fixed: 'left',
-        },
-        {
-            title: '结束时间',
-            dataIndex: 'endTime',
-            key: 'endTime',
-            align: 'center',
-            fixed: 'left',
-            width: 160
-        },
-        {
-            title: '操作人',
-            dataIndex: 'createUserInfo',
-            key: 'createUserInfo',
-            align: 'center',
-            width: 100,
-            ellipsis: true,
-            render: (a: any) => {
-                return <span>{a?.nickname || '<空>'}</span>
-            }
-        },
-        {
-            title: '资源名称',
-            dataIndex: 'resourceName',
-            key: 'resourceName',
-            width: 140,
-            ellipsis: true,
-            align: 'center',
-            render: (a: any, b: any) => {
-                return <span>{b?.putResourceInfo.resourceName || '<空>'}</span>
-            }
-        },
-        {
-            title: '资源标识',
-            dataIndex: 'resourceKey',
-            key: 'resourceKey',
-            ellipsis: true,
-            render: (a: any, b: any) => {
-                return <span>{b?.putResourceInfo.resourceKey || '<空>'}</span>
-            }
-        },
-        {
-            title: '操作',
-            dataIndex: 'cz',
-            key: 'cz',
-            width: 100,
-            render: (a: string, b: any) => (
-                <Row gutter={[10, 0]}>
-                    <Col><Button type="link" size="small" style={{ fontSize: 12 }} icon={<EditOutlined />} onClick={() => { editHandle(b) }}>编辑</Button></Col>
-                </Row>
-            )
-        }
-    ]
-}
-
-export {
-    columns,
-    columnsKyy,
-    columnsCrGdt
-}

+ 0 - 110
src/pages/operatePage/advertisements/course/index.less

@@ -1,110 +0,0 @@
-.box {
-  display: flex;
-  flex-flow: column;
-  > div > div {
-    position: relative;
-    overflow: hidden;
-    height: 879px;
-    // height: calc(100% - 150px);
-    float: left;
-    &:nth-child(1) {
-      width: 360px;
-      margin-right: 100px;
-      margin-left: 50px;
-      > div {
-        position: absolute;
-        top: 0;
-        left: 0;
-        transform: translateX(-100%);
-        transition: all 0.8s;
-      }
-    }
-    &:nth-child(2) {
-      width: calc(100% - 550px);
-    }
-    img {
-      width: 100%;
-    }
-  }
-  >p{
-    width: 100%;
-    height: 70px;
-    line-height: 70px;
-    text-align: center;
-    font-size: 25px;
-    font-weight: 500;
-  }
-}
-.copy {
-  font-size: 25px;
-  color: red;
-  overflow: hidden;
-  height: 79px;
-  position: relative;
-  font-weight: 500;
-  line-height: 79px;
-  div {
-    position: absolute;
-    top: 0;
-    left: 0;
-    transform: translateY(100%);
-    transition: all 0.8s;
-    > span:nth-child(1) {
-      margin-right: 100px;
-      margin-left: 150px;
-    }
-  }
-}
-.copy1 {
-  font-size: 25px;
-  color: red;
-  overflow: hidden;
-  height: 279px;
-  position: relative;
-  font-weight: 500;
-  // line-height: 279px;
-  div {
-    position: absolute;
-    top: 0;
-    left: 0;
-    transform: translateY(100%);
-    transition: all 0.8s;
-    > span:nth-child(1) {
-      margin-right: 100px;
-      margin-left: 150px;
-    }
-  }
-}
-.imgActive {
-  transform: translateX(0%) !important;
-}
-.ctActive {
-  transform: translateY(0%) !important;
-}
-.pActive {
-  transform: translateY(0%) !important;
-  display: flex !important;
-  justify-content: space-around;
-  > span:nth-child(1) {
-    margin-right: 100px;
-    margin-left: 150px;
-  }
-}
-.menu {
-  float: left;
-}
-.content {
-  overflow-y: auto;
-  height: 600px;
-  margin-bottom: 50px;
-  > .div1 {
-    width: 100%;
-    .img {
-      width: 100%;
-    }
-  }
-  h1 {
-    text-align: center;
-    width: 100%;
-  }
-}

+ 0 - 157
src/pages/operatePage/advertisements/course/index.tsx

@@ -1,157 +0,0 @@
-
-import { Tabs, Image, Table } from 'antd'
-import React, { useState } from 'react'
-import style from './index.less'
-import useCopy from '@/Hook/useCopy'
-import { CopyOutlined } from '@ant-design/icons'
-const { TabPane } = Tabs
-const config = [
-    {
-        name: "抽奖小程序",
-        src: 'https://zx-oss-dev.oss-cn-hangzhou.aliyuncs.com/file/1C5879FFD51244149E428486236D92F6.jpg',
-        appId: 'wx021e792baf529aff',
-        page: 'pages/index/index',
-        son: [
-            {
-                appId: 'wx021e792baf529aff',
-                page: 'pages/index/index',
-                support: '文鼎,国风,掌中云,花生'
-            },
-            {
-                appId: 'wxe1b04d1d8f6df382',
-                page: 'pages/index/index',
-                support: '阳光'
-            },
-        ]
-    },
-    {
-        name: "签到小程序",
-        src: 'https://zx-oss-dev.oss-cn-hangzhou.aliyuncs.com/file/CA97D6B2E12E45C79BA0254ADC5A67A3.jpg',
-        appId: 'wxb21c3e030b8af425',
-        page: 'pages/index/index',
-        son: [
-            {
-                appId: 'wxb21c3e030b8af425',
-                page: 'pages/index/index',
-                support: '文鼎,国风,掌中云,花生'
-            },
-            {
-                appId: 'wx162370635292eef2',
-                page: 'pages/index/index',
-                support: '阳光'
-            },
-        ]
-    },
-    {
-        name: "老歌小程序",
-        src: 'https://zx-oss-dev.oss-cn-hangzhou.aliyuncs.com/file/BF40CD089E12474D8B4C4B91E4630D04.jpg',
-        appId: '不能多绑以下三选一',
-        page: 'pages/index/index',
-        son: [
-            {
-                appId: 'wx0baf10b8fb530cd7',
-                page: 'pages/index/index',
-                support: '无平台要求'
-            },
-            {
-                appId: 'wx917707a2c7e22e4b',
-                page: 'pages/index/index',
-                support: '无平台要求'
-            },
-            {
-                appId: 'wxd5db8eb9eadd6b75',
-                page: 'pages/index/index',
-                support: '无平台要求'
-            },
-        ]
-    },
-]
-function Advertisements() {
-    const [key, setKey] = useState(config[0].name)
-    const { copy } = useCopy()
-    console.log()
-    return <div >
-        <div className={style.menu}>
-            <Tabs tabPosition='left' onChange={e => setKey(e)} activeKey={key}>
-                {
-                    config.map((c) => <TabPane tab={c.name} key={c.name} />)
-                }
-            </Tabs>
-        </div>
-        <div className={style.box}>
-            <div>
-                <div >
-                    {
-                        config.map((c) => <div key={c.name} className={key === c.name ? style.imgActive : ''}><img src={c?.src} alt={c.name} /></div>)
-                    }
-                </div>
-                <div>
-                    <h1 style={{ textAlign: 'center' }}>小程序绑定教程</h1>
-                    <div className={style.content}>
-                        <div className={style.div1}>
-                            <p>1 : 在公众号后台绑定小程序</p>
-                            <Image className={style.img} src='https://zx-oss-dev.oss-cn-hangzhou.aliyuncs.com/file/B984AF3D22DF4FA4987DE6B342CA011E.png' preview={false} />
-                            <p>2 : 在趣程管理后台, 智能互动菜单配置消息回复(立即回复, 延迟消息)</p>
-                            <Image className={style.img} src='https://zx-oss-dev.oss-cn-hangzhou.aliyuncs.com/file/B2AC3C272494453DA5E80C67C16A9469.png' preview={false} />
-                            <Image className={style.img} src='https://zx-oss-dev.oss-cn-hangzhou.aliyuncs.com/file/B86338500B0542F3B5E5D640EC10152E.png' preview={false} />
-                            <Image className={style.img} src='https://zx-oss-dev.oss-cn-hangzhou.aliyuncs.com/file/801CE69232414ACD917350996B57A542.png' preview={false} />
-                            <p>3 : 推送内容小程序卡片</p>
-                            <Image className={style.img} src="https://zx-oss-dev.oss-cn-hangzhou.aliyuncs.com/file/653AD4E66FBF4595B33CECAEE8E65998.png" preview={false} />
-                        </div>
-                    </div>
-                    <Table
-                        size='small'
-                        dataSource={config?.filter(c=>c.name === key)[0]['son']}
-                        pagination={false}
-                        columns={[
-                            {
-                                title: 'AppId',
-                                dataIndex: 'appId',
-                                key: 'appId',
-                                align: 'center',
-                                render:(a)=>{
-                                    return <strong onClick={()=>{copy(a)}} ><span style={{color:'red'}}>{a}</span></strong>
-                                }
-                            },
-                            {
-                                title: 'Path',
-                                dataIndex: 'page',
-                                key: 'page',
-                                align: 'center',
-                                render:(a)=>{
-                                    return <strong onClick={()=>{copy(a)}} ><span style={{color:'red'}}>{a}</span></strong>
-                                }
-                            },
-                            {
-                                title: '支持平台',
-                                dataIndex: 'support',
-                                key: 'support',
-                                align: 'center'
-                            },
-                        ]}
-                    />
-                    {/* <div className={style.copy}>
-                        点击复制:
-                        {
-                            config.map((c) => <div key={c.name} className={key === c.name ? style.pActive : ''}>
-                                <span onClick={() => { key !== '老歌小程序' && copy(c.appId) }}>APPID:{
-                                    c.appId
-                                }</span>
-                                <span onClick={() => { copy(c.page) }}>PATH:{c.page}</span>
-                            </div>)
-                        }
-                    </div> */}
-                </div>
-            </div>
-            {/* {key !== '老歌小程序' ? <p style={{ width: '100%', textAlign: 'center' }}>
-                支持平台:文鼎,国风,掌中云,花生
-            </p> : <p style={{ width: '60%', marginLeft: '35%', display: 'flex', justifyContent: 'space-between' }}>
-                <span onClick={() => { copy('wx33ee485d33b47d9b') }}>wx33ee485d33b47d9b</span>
-                <span onClick={() => { copy('wxd9db7d6b9856d360') }}>wxd9db7d6b9856d360</span>
-                <span onClick={() => { copy('wx71e6d12c0652428e') }}>wx71e6d12c0652428e</span>
-            </p>} */}
-        </div>
-    </div>
-}
-
-export default Advertisements

+ 0 - 15
src/pages/operatePage/advertisements/dataCensus/index.less

@@ -1,15 +0,0 @@
-.dataCensus {
-    .ant-tabs-top > .ant-tabs-nav, .ant-tabs-bottom > .ant-tabs-nav, .ant-tabs-top > div > .ant-tabs-nav, .ant-tabs-bottom > div > .ant-tabs-nav{
-        margin: 0;
-    }
-
-    .ant-table-summary .ant-table-cell.ant-table-cell-fix-left {
-        background-color: #f5e2e2;
-    }
-    .ant-table-thead tr th {
-        background-color: #f5f5f5;
-        font-weight: 600 !important;
-        padding-top: 10px !important;
-        padding-bottom: 10px !important;
-    }
-}

+ 0 - 207
src/pages/operatePage/advertisements/dataCensus/index.tsx

@@ -1,207 +0,0 @@
-import GroupWxTabs from '@/components/GroupWxTabs'
-import { columns } from './tableConfig'
-import React, { useCallback, useEffect, useRef, useState } from 'react'
-import { useModel } from 'umi'
-import { AdProfit } from '@/services/operating/adCensus'
-import { Button, Card, Col, DatePicker, Row, Select, Space, Table, Tag, Tooltip } from 'antd'
-import './index.less'
-import moment from 'moment'
-import { quanpin } from '@/utils/fullScreen'
-import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons'
-
-function DataCensus() {
-
-    const { getAdProfit, getxcxAll } = useModel('useOperating.useAdCensus')
-    const { state: userState } = useModel('useOperating.useUser')
-    const { getWxGroupAll, state, getAllOfMember } = useModel('useOperating.useWxGroupList', model => ({ getWxGroupAll: model.getDataList, ...model }))
-
-    const [xcxData, setxcxData] = useState<{ appId: string, appName: string, type: number }[]>([])  // 保存所有小程序信息
-    const [queryForm, setQueryForm] = useState<AdProfit>({ page: 1, size: 20 })
-    const [accData, setAccData] = useState<any[]>([])
-    const { isFell } = userState
-    const ref = useRef(null)
-
-    // 获取小程序列表
-    useEffect(() => {
-        getxcxAll.run().then((res: any) => {
-            setxcxData(res?.data)
-        })
-    }, [])
-
-    // 获取表格列表
-    useEffect(() => {
-        if (queryForm?.userId) {
-            let newQueryForm: any = {}
-            let { appId, startTime, endTime, userId, page, size, mpName, type } = queryForm
-            appId && (newQueryForm['appId'] = appId)
-            startTime && (newQueryForm['startTime'] = startTime)
-            endTime && (newQueryForm['endTime'] = endTime)
-            userId && (newQueryForm['userId'] = userId)
-            page && (newQueryForm['page'] = page)
-            size && (newQueryForm['size'] = size)
-            mpName && (newQueryForm['mpName'] = mpName)
-            type && (newQueryForm['type'] = type)
-            getAdProfit.run({ ...newQueryForm })
-        }
-    }, [queryForm])
-
-    // 选中人员id变动
-    useEffect(() => {
-        setQueryForm(() => ({ ...queryForm, page: 1, userId: userState?.selectdUserId }))
-    }, [userState?.selectdUserId])
-
-    /** 表格分页onChange */
-    const paginationOnChange = (page: number, pageSize?: number | undefined) => {
-        setQueryForm({ ...queryForm, page, size: pageSize || 20 })
-    }
-
-    // 开始日期不可选择日期
-    const disabledStartDate = useCallback((current: any) => {
-        if (queryForm?.endTime) {
-            return current && current > moment(queryForm?.endTime)
-        }
-    }, [queryForm?.endTime])
-    // 结束日期不可选择日期
-    const disabledEndDate = useCallback((current: any) => {
-        if (queryForm?.startTime) {
-            return current && current < moment(queryForm?.startTime)
-        }
-    }, [queryForm?.startTime])
-
-    useEffect(() => {
-        if (state?.tabsKey === '自己') {
-            let newAccData: any[] = []
-            getWxGroupAll?.data?.forEach((item: { mpAccounts: any[] }) => {
-                if (item?.mpAccounts?.length > 0) {
-                    newAccData = [...newAccData, ...item?.mpAccounts]
-                }
-            })
-            setAccData(() => newAccData)
-        } else {
-            let newAccData = getAllOfMember?.data?.find((item: any) => item?.key?.userId === Number(userState?.selectdUserId))
-            if (newAccData) {
-                setAccData(() => newAccData?.value)
-            } else {
-                setAccData(() => [])
-            }
-        }
-    }, [userState?.selectdUserId, getWxGroupAll?.data, state?.tabsKey, getAllOfMember?.data])
-
-    return <div className="dataCensus">
-        <GroupWxTabs height='calc(100vh - 180px)' allowClear={false}>
-            <Row gutter={[0, 20]} ref={ref} style={isFell ? { background: '#fff' } : {}}>
-                <Col span={24}>
-                    <Card
-                        hoverable
-                        title={"小程序广告数据"}
-                        headStyle={{ textAlign: 'center' }}
-                    >
-                        <div style={{ display: 'flex', justifyContent: 'space-between' }}>
-                            <Space wrap style={{ marginBottom: 10 }}>
-                                <Select style={{ width: 180 }} showSearch value={queryForm?.appId} onChange={(e) => { setQueryForm({ ...queryForm, appId: e, page: 1 }) }} placeholder="请选择小程序" allowClear>
-                                    {xcxData?.map((item: { appId: string, appName: string, type: number }, index: number) => <Select.Option value={item.appId} key={index}>{item.appName}</Select.Option>)}
-                                </Select>
-                                <Select style={{ width: 180 }} value={queryForm?.type} onChange={(e) => { setQueryForm({ ...queryForm, type: e, page: 1 }) }} placeholder="请选择类型" allowClear>
-                                    <Select.Option value={1} >运营</Select.Option>
-                                    <Select.Option value={2} >投手</Select.Option>
-                                </Select>
-                                <DatePicker
-                                    onChange={(e: moment.Moment | null) => { setQueryForm({ ...queryForm, startTime: e ? moment(e).format('YYYY-MM-DD') : "", page: 1 }) }}
-                                    value={queryForm?.startTime ? moment(queryForm?.startTime) : null}
-                                    placeholder="请选择开始日期"
-                                    disabledDate={disabledStartDate}
-                                />
-                                <DatePicker
-                                    onChange={(e: moment.Moment | null) => { setQueryForm({ ...queryForm, endTime: e ? moment(e).format('YYYY-MM-DD') : "", page: 1 }) }}
-                                    value={queryForm?.endTime ? moment(queryForm?.endTime) : null}
-                                    placeholder="请选择结束日期"
-                                    disabledDate={disabledEndDate}
-                                />
-                                <Select
-                                    style={{ width: 185 }}
-                                    placeholder="请选择公众号"
-                                    onChange={(value: any) => { setQueryForm({ ...queryForm, mpName: value, page: 1 }) }}
-                                    allowClear
-                                    showSearch
-                                >
-                                    {
-                                        accData?.map((list: any, eq: number) => {
-                                            return <Select.Option key={list?.id} value={list?.nickName}>
-                                                {list?.nickName}
-                                            </Select.Option>
-                                        })
-                                    })
-                                </Select>
-                                <Button type="primary" onClick={() => { getAdProfit.refresh() }}>查询</Button>
-                            </Space>
-                            <Button
-                                type='text'
-                                size='small'
-                                onClick={() => {
-                                    if (ref?.current) {
-                                        quanpin(ref?.current)
-                                    }
-                                }}>
-                                {
-                                    <Tooltip title={!isFell ? '全屏' : '退出全屏'}>{!isFell ? <FullscreenOutlined /> : <FullscreenExitOutlined />}</Tooltip>
-                                }
-                            </Button>
-                        </div>
-
-
-                        <Table
-                            size="small"
-                            loading={getAdProfit.loading}
-                            dataSource={getAdProfit?.data?.data?.bannerMpIncomeDtoList}
-                            columns={columns()}
-                            bordered
-                            scroll={{ x: 1100 }}
-                            rowKey={(record) => { return record?.id }}
-                            pagination={{
-                                current: queryForm.page,
-                                pageSize: queryForm.size,
-                                total: getAdProfit?.data?.data?.totalCount,
-                                showSizeChanger: true,
-                                pageSizeOptions: ['10', '20', '50', '70', '100'],
-                                showTotal: (total) => <Tag color="cyan">总共{total}数据</Tag>,
-                                onChange: paginationOnChange
-                            }}
-                            summary={() => {
-                                return (
-                                    <Table.Summary.Row style={{ backgroundColor: '#fafafa' }}>
-                                        <Table.Summary.Cell index={0}>
-                                            <div style={{ textAlign: 'right', fontWeight: 600, marginRight: 30, fontSize: 14 }}>合计总收入</div>
-                                        </Table.Summary.Cell>
-                                        <Table.Summary.Cell index={0} colSpan={4}>
-                                            <div></div>
-                                        </Table.Summary.Cell>
-                                        <Table.Summary.Cell index={1} >
-                                            <div style={{ fontSize: 18, color: 'rgb(0 14 183', textAlign: 'center', fontWeight: 600 }}>{getAdProfit?.data?.data?.totalPv || 0.00}</div>
-                                        </Table.Summary.Cell>
-                                        <Table.Summary.Cell index={1} >
-                                            <div style={{ fontSize: 18, color: 'rgb(0 14 183', textAlign: 'center', fontWeight: 600 }}>{getAdProfit?.data?.data?.totalNewUserCount || 0.00}</div>
-                                        </Table.Summary.Cell>
-                                        <Table.Summary.Cell index={1} >
-                                            <div style={{ fontSize: 18, color: 'rgb(0 14 183', textAlign: 'center', fontWeight: 600 }}>{getAdProfit?.data?.data?.totalOldUserCount || 0.00}</div>
-                                        </Table.Summary.Cell>
-                                        <Table.Summary.Cell index={1} >
-                                            <div style={{ fontSize: 18, color: 'rgb(0 14 183', textAlign: 'center', fontWeight: 600 }}>{getAdProfit?.data?.data?.totalUv || 0.00}</div>
-                                        </Table.Summary.Cell>
-                                        <Table.Summary.Cell index={1} >
-                                            <div style={{ fontSize: 18, color: 'rgb(0 14 183', textAlign: 'center', fontWeight: 600 }}>{getAdProfit?.data?.data?.avgArpu || 0.00}</div>
-                                        </Table.Summary.Cell>
-                                        <Table.Summary.Cell index={1} >
-                                            <div style={{ fontSize: 18, color: 'rgb(0 14 183', textAlign: 'center', fontWeight: 600 }}>{getAdProfit?.data?.data?.totalIncome || 0.00}</div>
-                                        </Table.Summary.Cell>
-                                    </Table.Summary.Row>
-                                );
-                            }}
-                        />
-                    </Card>
-                </Col>
-            </Row >
-        </GroupWxTabs>
-    </div>
-}
-
-export default React.memo(DataCensus)

+ 0 - 117
src/pages/operatePage/advertisements/dataCensus/tableConfig.tsx

@@ -1,117 +0,0 @@
-import moment from 'moment'
-import { ColumnsType } from 'antd/lib/table'
-import React from 'react'
-
-function columns() {
-    let newArr: ColumnsType<any> = [
-        {
-            title: '日期',
-            dataIndex: 'dayTime',
-            key: 'dayTime',
-            align: 'center',
-            width: 130,
-            render: (a: string)=> {
-                return a && <span>{moment(a).format('YYYY-MM-DD')}</span>
-            }
-        },
-        {
-            title: '小程序名称',
-            dataIndex: 'appName',
-            key: 'appName',
-            align: 'center',
-            width: 110,
-            // sorter:true
-        },
-        // {
-        //     title: '小程AppId',
-        //     dataIndex: 'appId',
-        //     key: 'appId',
-        //     align: 'center',
-        //     width: 110,
-        // },
-        {
-            title: '公众号名称',
-            dataIndex: 'mpName',
-            key: 'mpName',
-            align: 'center',
-            width: 110
-        },
-        // {
-        //     title: '公众号ID',
-        //     dataIndex: 'mpAppId',
-        //     key: 'mpAppId',
-        //     align: 'center',
-        //     width: 70
-        // },
-        {
-            title: '运营',
-            dataIndex: 'operateName',
-            key: 'operateName',
-            align: 'center',
-            width: 80,
-            render: (a: any) => {
-                return <span>{a? a : '--'}</span>
-            }
-        },
-        {
-            title: '投手',
-            dataIndex: 'pitcherName',
-            key: 'pitcherName',
-            align: 'center',
-            width: 80,
-            render: (a: any) => {
-                return <span>{a ? a : '--'}</span>
-            }
-        },
-        {
-            title: '今日总PV',
-            dataIndex: 'pv',
-            key: 'pv',
-            align: 'center',
-            width: 100,
-        },
-        {
-            title: '今日新UV',
-            dataIndex: 'newUserCount',
-            key: 'newUserCount',
-            align: 'center',
-            width: 100,
-        },
-        {
-            title: '今日老UV',
-            dataIndex: 'oldUserCount',
-            key: 'oldUserCount',
-            align: 'center',
-            width: 100,
-        },
-        {
-            title: '今日总UV',
-            dataIndex: 'uv',
-            key: 'uv',
-            align: 'center',
-            width: 100,
-        },
-        {
-            title: 'ARPU(元)',
-            dataIndex: 'arpu',
-            key: 'arpu',
-            align: 'center',
-            width: 120,
-            render: (a: any)=> {
-                return a && <span style={{color: a > 0.4 ? 'red' : 'rgb(15, 153, 15)'}}>{a}</span>
-            }
-        },
-        {
-            title: '单日总收入(元)',
-            dataIndex: 'incomeTotal',
-            key: 'incomeTotal',
-            align: 'center',
-            width: 140,
-            render: (a: any)=> {
-                return a && <span style={{color: a > 200 ? 'red' : 'rgb(15, 153, 15)'}}>{a}</span>
-            }
-        }
-    ]
-    return newArr
-}
-export { columns }

+ 0 - 140
src/pages/operatePage/apitest/index.tsx

@@ -1,140 +0,0 @@
-import { Button, Input, message, Radio, Select } from 'antd'
-import { request } from 'umi';
-import React, { useState } from 'react'
-import { api, dataApi } from '@/services/api'
-
-
-function Apitest() {
-    const [src, setSrc] = useState('')
-    const [type, setType] = useState('GET')
-    const [params, setParams] = useState('')
-    const [data, setData] = useState()
-    const [platform, setplatform] = useState(1)
-    const [start, setStart] = useState(0)
-    const [end, setEnd] = useState<number>(0)
-    const [arrs, setArrs] = useState<any[]>([])
-    // const [url, setUrl] = useState<number>(0)
-    const handelSrc = (e: any) => {
-        let v = e.target.value
-        setSrc(v)
-    }
-    const handelType = (e: any) => {
-        setType(e)
-    }
-    function isJSON_test(str: any) {
-        if (typeof str == 'string') {
-            try {
-                var obj = JSON.parse(str);
-                console.log('转换成功:' + obj);
-                return true;
-            } catch (e) {
-                console.log('error:' + str + '!!!' + e);
-                return false;
-            }
-        }
-    }
-    const handelParams = (e: any) => {
-        let v = e.target.value
-        setParams(v)
-    }
-    const submit = () => {
-        if (!src) {
-            message.error('请输入地址')
-            return
-        }
-        let data = null
-        if (params) {
-            if (isJSON_test(params)) {
-                data = JSON.parse(`${params}`)
-            } else {
-                message.error('不合法的JSON')
-                return
-            }
-        }
-        console.log(data)
-        request(`${platform === 1 ? api : dataApi}${src}`, {
-            method: type,
-            data,
-        }).then((res) => {
-            setData(res)
-            if (res.code === 200) {
-                message.success(`成功${res.code}${res.msg}`, 3)
-            }
-        }).catch(err => {
-            message.error(`${err}`, 3)
-            setData(err)
-        })
-    }
-    const forSubmit = () => {
-        if (start && end) {
-            let arr: any = []
-            for (let i = start; i <= end; i++) {
-                fetch(`http://api.zanxiangnet.com/system/mp/media/syncAllMedia/${i}`, {
-                    method: 'put',
-                    headers: { "Authorization": "Bearer 2f59a4df-1a6e-4650-a0cf-4fa3c9e6c309" },
-                }).then((res: any) => {
-                    if (res.data.code !== 200) {
-                        arr.push(i);
-                        setArrs([...arrs, i])
-                        console.log(res.data, i, arr);
-                    }
-                })
-            }
-        }
-
-    }
-    return <div style={{ display: 'flex', flexFlow: 'row', justifyContent: 'space-evenly' }}>
-        <div style={{ width: 600 }} >
-            <div style={{ display: 'flex', flexFlow: 'row', alignItems: 'center', marginBottom: 20 }}>
-                <label style={{ width: 70 }}>平台区分</label>
-                <Radio.Group onChange={(e: any) => setplatform(e.target.value)} value={platform}>
-                    <Radio value={1}>运营</Radio>
-                    <Radio value={2}>数据</Radio>
-                </Radio.Group>
-            </div>
-            <div style={{ display: 'flex', flexFlow: 'row', alignItems: 'center', marginBottom: 20 }}>
-                <label style={{ width: 70 }}>接口地址</label>
-                <Input
-                    style={{ width: 450 }}
-                    onChange={handelSrc}
-                    allowClear
-                    placeholder='/system/mp/list'
-                    autoComplete='on'
-                />
-            </div>
-            <div style={{ display: 'flex', flexFlow: 'row', alignItems: 'center', marginBottom: 20 }}>
-                <label style={{ width: 70 }}>接口形式</label>
-                <Select style={{ width: 100 }} defaultValue='GET' onChange={handelType}>
-                    <Select.Option value='POST'>POST</Select.Option>
-                    <Select.Option value='PUT'>PUT</Select.Option>
-                    <Select.Option value='GET'>GET</Select.Option>
-                    <Select.Option value='DELETE'>DELETE</Select.Option>
-                </Select>
-            </div>
-            <div style={{ display: 'flex', flexFlow: 'row', alignItems: 'center', marginBottom: 20 }}>
-                <label style={{ width: 70 }}>body参数</label>
-                <Input.TextArea rows={6} style={{ width: 300 }} onChange={handelParams} allowClear
-                    placeholder={`JSON===>{"key":value}`}
-                />
-            </div>
-            <div style={{ display: 'flex', flexFlow: 'row', justifyContent: 'center', marginBottom: 20 }}>
-                <Button type='primary' onClick={submit}>发送</Button>
-            </div>
-            <div style={{ display: 'flex', flexFlow: 'row', justifyContent: 'center', marginBottom: 20 }}>
-                <label style={{ width: 70 }}>结果</label>
-                <Input.TextArea value={data && JSON.stringify(data)} rows={20} />
-            </div>
-        </div>
-        <div style={{ width: 700 }}>
-            {
-                data && <div style={{ width: 700, height: '90vh', overflow: 'auto', background: '#000', color: '#fff', }}>
-                    <pre>
-                        {data && JSON.stringify(data, null, 2)}
-                    </pre>
-                </div>
-            }
-        </div>
-    </div>
-}
-
-export default Apitest

+ 0 - 1141
src/pages/operatePage/automation/create/detailsTableConfig.tsx

@@ -1,1141 +0,0 @@
-import { Badge } from "antd"
-import React from "react"
-
-let type = {
-    0: { text: '创建', color: 'cyan' },
-    1: { text: '创建中', color: 'processing' },
-    2: { text: '创建成功', color: 'success' },
-    '-1': { text: '创建链接失败', color: 'error' },
-    '-2': { text: '创建客服消息失败', color: 'error' }
-}
-let linkType = [
-    '',
-    '推广链接',
-    '自定义活动',
-    '赠币活动',
-    '常规活动链接',
-    '模板充值活动链接',
-    '模板直赠活动链接',
-    '模板消耗活动连接',
-    '送书卷活动',
-]
-let userType = ['不限', '已充值', '未充值', '未支付']
-function detailsColumns(platformName: string) {
-    let config = {
-        '花生': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div style={{ display: 'flex', flexFlow: 'column' }}>
-                        <Badge text={type[a]?.text} status={type[a]?.color} />
-                        <span>{b?.linkResult?.msg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '账号',
-                dataIndex: 'account',
-                key: 'account',
-                align: 'center',
-            },
-            {
-                title: '密码',
-                dataIndex: 'password',
-                key: 'password',
-                align: 'center',
-            },
-            {
-                title: 'VIP账号',
-                dataIndex: 'vip',
-                key: 'vip',
-                align: 'center',
-                render: (a: any) => {
-                    return a ? '是' : '否'
-                }
-            },
-            {
-                title: '公众号',
-                dataIndex: 'mpInfo',
-                key: 'mpInfo',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.nickName
-                }
-            },
-            {
-                title: '链接类型',
-                dataIndex: 'linkType',
-                key: 'linkType',
-                align: 'center',
-                render: (a: any) => {
-                    return linkType[a]
-                }
-            },
-            {
-                title: '推广书名',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.book
-                }
-            },
-            {
-                title: '推广章节',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.section
-                }
-            },
-            {
-                title: '推广任务名',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.spread_name
-                }
-            },
-            {
-                title: '推广成本',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.spread_cost
-                }
-            },
-            {
-                title: '推广内推|外推',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.spread_type
-                }
-            },
-            {
-                title: '外推下的章节',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.close_section
-                }
-            },
-            {
-                title: '活动名称',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_name
-                }
-            },
-            {
-                title: '活动标题',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_title
-                }
-            },
-            {
-                title: '活动金额',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_sum
-                }
-            },
-            {
-                title: '限购类型',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.buy_num_type
-                }
-            },
-            {
-                title: '购买次数',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.buy_num
-                }
-            },
-            {
-                title: '开始时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.start_at
-                }
-            },
-            {
-                title: '结束时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.end_at
-                }
-            },
-            {
-                title: '上下架',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.state
-                }
-            },
-            {
-                title: '显示|隐藏',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.show
-                }
-            },
-            {
-                title: '开启|关闭',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup
-                }
-            },
-            {
-                title: '弹窗位置',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_site
-                }
-            },
-            {
-                title: '模板序号',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.template
-                }
-            },
-            {
-                title: '备注',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.remark
-                }
-            },
-        ],
-        '阅文': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div style={{ display: 'flex', flexFlow: 'column' }}>
-                        <Badge text={type[a]?.text} status={type[a]?.color} />
-                        <span>{b?.linkResult?.msg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '账号',
-                dataIndex: 'account',
-                key: 'account',
-                align: 'center',
-            },
-            {
-                title: '密码',
-                dataIndex: 'password',
-                key: 'password',
-                align: 'center',
-            },
-            {
-                title: 'VIP账号',
-                dataIndex: 'vip',
-                key: 'vip',
-                align: 'center',
-                render: (a: any) => {
-                    return a ? '是' : '否'
-                }
-            },
-            {
-                title: '公众号',
-                dataIndex: 'mpInfo',
-                key: 'mpInfo',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.nickName
-                }
-            },
-            {
-                title: '链接类型',
-                dataIndex: 'linkType',
-                key: 'linkType',
-                align: 'center',
-                render: (a: any) => {
-                    return linkType[a]
-                }
-            },
-            {
-                title: '推广书名',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.book
-                }
-            },
-            {
-                title: '推广章节',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.section
-                }
-            },
-            {
-                title: '推广任务名',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.spread_name
-                }
-            },
-            {
-                title: '推广成本',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return b?.linkType == 1 ? a?.spread_cost : ''
-                }
-            },
-            {
-                title: '推广内推|外推',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.spread_type
-                }
-            },
-            {
-                title: '外推下的章节',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.close_section
-                }
-            },
-            {
-                title: '推广强关',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.pass_type
-                }
-            },
-            {
-                title: '推广底部关注引导',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.isOpenBottom ? a?.isOpenBottom === true ? '是' : '否' : ''
-                }
-            },
-            {
-                title: '活动名称',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_name
-                }
-            },
-            {
-                title: '活动推广名称',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.spread_name
-                }
-            },
-            {
-                title: '活动金额',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return b?.linkType != 1 ? a?.spread_cost : ''
-                }
-            },
-            {
-                title: '充值次数',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.recharge_times
-                }
-            },
-            {
-                title: '开始时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.start_at
-                }
-            },
-            {
-                title: '结束时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.end_at
-                }
-            },
-            {
-                title: '活动展示位',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.shaky_seat
-                }
-            },
-            {
-                title: '是否开启客服消息推送(常规活动链接必填)',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.isOpenMes === true ? '是' : ''
-                }
-            },
-            {
-                title: '是否显示活动时间(模板充值活动必填)',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.open_showtime
-                }
-            },
-        ],
-        '阳光': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div style={{ display: 'flex', flexFlow: 'column' }}>
-                        <Badge text={type[a]?.text} status={type[a]?.color} />
-                        <span>{b?.linkResult?.msg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '账号',
-                dataIndex: 'account',
-                key: 'account',
-                align: 'center',
-            },
-            {
-                title: '密码',
-                dataIndex: 'password',
-                key: 'password',
-                align: 'center',
-            },
-            {
-                title: 'VIP账号',
-                dataIndex: 'vip',
-                key: 'vip',
-                align: 'center',
-                render: (a: any) => {
-                    return a ? '是' : '否'
-                }
-            },
-            {
-                title: '公众号',
-                dataIndex: 'mpInfo',
-                key: 'mpInfo',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.nickName
-                }
-            },
-            {
-                title: '链接类型',
-                dataIndex: 'linkType',
-                key: 'linkType',
-                align: 'center',
-                render: (a: any) => {
-                    return linkType[a]
-                }
-            },
-            {
-                title: '推广书名',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.book
-                }
-            },
-            {
-                title: '推广章节',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.section
-                }
-            },
-            {
-                title: '推广任务名',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.spread_name
-                }
-            },
-            {
-                title: '推广成本',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return b?.linkType == 1 ? a?.spread_cost : ''
-                }
-            },
-            {
-                title: '推广内推|外推',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.spread_type
-                }
-            },
-            {
-                title: '外推下的章节',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.close_section
-                }
-            },
-            {
-                title: '渠道类型',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.channel_type
-                }
-            },
-            {
-                title: '活动名称',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_name
-                }
-            },
-            {
-                title: '活动标题',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_title
-                }
-            },
-            {
-                title: '活动金额',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_sum
-                }
-            },
-            {
-                title: '购买次数',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.buy_num
-                }
-            },
-            {
-                title: '开始时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.start_at
-                }
-            },
-            {
-                title: '结束时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.end_at
-                }
-            },
-            {
-                title: '上下架',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.state
-                }
-            },
-            {
-                title: '显示|隐藏',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.show
-                }
-            },
-            {
-                title: '开启|关闭',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup
-                }
-            },
-            {
-                title: '弹窗位置',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_site
-                }
-            },
-            {
-                title: '模板序号',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.template
-                }
-            },
-            {
-                title: '备注',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.remark
-                }
-            },
-            {
-                title: '接收用户',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.receiving_user
-                }
-            },
-        ],
-        '文鼎': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div style={{ display: 'flex', flexFlow: 'column' }}>
-                        <Badge text={type[a]?.text} status={type[a]?.color} />
-                        <span>{b?.linkResult?.msg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '账号',
-                dataIndex: 'account',
-                key: 'account',
-                align: 'center',
-            },
-            {
-                title: '密码',
-                dataIndex: 'password',
-                key: 'password',
-                align: 'center',
-            },
-            {
-                title: 'VIP账号',
-                dataIndex: 'vip',
-                key: 'vip',
-                align: 'center',
-                render: (a: any) => {
-                    return a ? '是' : '否'
-                }
-            },
-            {
-                title: '公众号',
-                dataIndex: 'mpInfo',
-                key: 'mpInfo',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.nickName
-                }
-            },
-            {
-                title: '链接类型',
-                dataIndex: 'linkType',
-                key: 'linkType',
-                align: 'center',
-                render: (a: any) => {
-                    return linkType[a]
-                }
-            },
-            {
-                title: '推广书名',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.book
-                }
-            },
-            {
-                title: '推广章节',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.section
-                }
-            },
-            {
-                title: '推广任务名',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.spread_name
-                }
-            },
-            {
-                title: '推广成本',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return b?.linkType == 1 ? a?.spread_cost : ''
-                }
-            },
-            {
-                title: '推广内推|外推',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.spread_type
-                }
-            },
-            {
-                title: '活动名称',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_name
-                }
-            },
-            {
-                title: '活动标题',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_title
-                }
-            },
-            {
-                title: '活动金额',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_sum
-                }
-            },
-            {
-                title: '开始时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.start_at
-                }
-            },
-            {
-                title: '结束时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.end_at
-                }
-            },
-            {
-                title: '目标用户',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.userConfig
-                }
-            },
-            {
-                title: '活动图片',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_image
-                }
-            },
-            {
-                title: '活动位置',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_site
-                }
-            },
-            {
-                title: '注册开始时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return b?.linkType == 2 ? a?.tag_create_start_at || '不限' : ''
-                }
-            },
-            {
-                title: '注册结束时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return b?.linkType == 2 ? a?.tag_create_end_at || '不限' : ''
-                }
-            },
-            {
-                title: '充值类型',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return b?.linkType == 2 ? a?.tag_pay_type || '不限' : ''
-                }
-            },
-            {
-                title: '是否是包年用户',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return b?.linkType == 2 ? a?.tag_is_vip ? a?.tag_is_vip == 1 ? '是' : '否' : '不限' : ''
-                }
-            },
-        ],
-        '掌中云': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div style={{ display: 'flex', flexFlow: 'column' }}>
-                        <Badge text={type[a]?.text} status={type[a]?.color} />
-                        <span>{b?.linkResult?.msg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '账号',
-                dataIndex: 'account',
-                key: 'account',
-                align: 'center',
-            },
-            {
-                title: '密码',
-                dataIndex: 'password',
-                key: 'password',
-                align: 'center',
-            },
-            {
-                title: 'VIP账号',
-                dataIndex: 'vip',
-                key: 'vip',
-                align: 'center',
-                render: (a: any) => {
-                    return a ? '是' : '否'
-                }
-            },
-            {
-                title: '公众号',
-                dataIndex: 'mpInfo',
-                key: 'mpInfo',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.nickName
-                }
-            },
-            {
-                title: '链接类型',
-                dataIndex: 'linkType',
-                key: 'linkType',
-                align: 'center',
-                render: (a: any) => {
-                    return linkType[a]
-                }
-            },
-            {
-                title: '推广书名',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.navel
-                }
-            },
-            {
-                title: '推广章节',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.section
-                }
-            },
-            {
-                title: '推广内推|外推',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.publish_type === 1 ? '内推' : '外推'
-                }
-            },
-            {
-                title: '备注',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.description
-                }
-            },
-
-            {
-                title: '活动名称',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_name
-                }
-            },
-            {
-                title: '开始时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.start_time
-                }
-            },
-            {
-                title: '结束时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.end_time
-                }
-            },
-            {
-                title: '弹窗开始时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_start_time
-                }
-            },
-            {
-                title: '弹窗结束时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_end_time
-                }
-            },
-            {
-                title: '活动金额',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_amount
-                }
-            },
-            {
-                title: '限购次数',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.limit_times
-                }
-            },
-            {
-                title: '促销文案',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.promotion_text
-                }
-            },
-            {
-                title: '用户属性',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.user_type && userType[a?.user_type]
-                }
-            },
-            {
-                title: '启用签到尾部推送',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.sign_push && (a?.sign_push === 0 ? '否' : '是')
-                }
-            },
-            {
-                title: '启用未支付尾部推送',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.unpaid_push && (a?.unpaid_push === 0 ? '否' : '是')
-                }
-            },
-            {
-                title: '启用弹窗海报',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_promotion && (a?.popup_promotion === 0 ? '否' : '是')
-                }
-            },
-            {
-                title: '弹窗启用档位',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_gear
-                }
-            },
-            {
-                title: '弹窗位置',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_location
-                }
-            },
-            {
-                title: '页面弹出频率',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_frequency
-                }
-            },
-            {
-                title: '赠送书券',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.book_voucher
-                }
-            },
-            {
-                title: '书券有效期',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.valid_minutes && (a?.valid_minutes === 4320 ? '3天' : '30天')
-                }
-            },
-
-        ],
-    }
-    return config[platformName]
-}
-export default detailsColumns

+ 0 - 32
src/pages/operatePage/automation/create/index.less

@@ -1,32 +0,0 @@
-.box {
-  width: 300px;
-}
-.platformText {
-  width: 800px;
-  color: #000;
-}
-.platformText_box {
-  display: flex;
-  flex-flow: column;
-  height: calc(100vh - 400px);
-  overflow-y: auto;
-  > div {
-    display: flex;
-    flex-flow: column;
-    > span {
-      display: flex;
-      color: #333;
-      > span {
-        width: calc(100% - 150px);
-      }
-      b {
-        width: 150px;
-        text-align: right;
-        color: #000;
-      }
-      strong {
-        color: red;
-      }
-    }
-  }
-}

+ 0 - 245
src/pages/operatePage/automation/create/index.tsx

@@ -1,245 +0,0 @@
-import Tables from '@/components/Tables'
-import { useAjax } from '@/Hook/useAjax'
-import { exportAutoLinkExcle, importLinkExcle, selectLinks } from '@/services/operating/link'
-import { downloadFile } from '@/utils/downloadFile'
-import { DownloadOutlined, UploadOutlined } from '@ant-design/icons'
-import { Button, Card, Drawer, message, Popover, Select, Space, Tooltip, Upload } from 'antd'
-
-import { RcCustomRequestOptions } from 'antd/lib/upload/interface'
-import React, { useCallback, useEffect, useMemo, useState } from 'react'
-import columns from './tableConfig'
-import detailsColumns from './detailsTableConfig'
-import platformText from './platformText'
-import style from './index.less'
-enum LinkType {
-    '数据',
-    '推广链接',
-    '自定义活动',
-    '赠币活动',
-    '常规活动链接',
-    '模板充值活动链接',
-    '模板直赠活动链接',
-    '模板消耗活动连接'
-}
-enum Platform {
-    '花生' = '花生',
-    '阅文' = '阅文',
-    '阳光' = '阳光',
-    '文鼎' = '文鼎',
-    '掌中云' = '掌中云',
-}
-enum PlatformName {
-    '花生推广链接' = '花生Link',
-    '花生活动链接' = '花生Active',
-    '阳光推广链接' = '阳光Link',
-    '阳光活动链接' = '阳光Active',
-    '阅文推广链接' = '阅文Link',
-    '阅文活动链接' = '阅文Active'
-}
-const name = {
-    '花生': '花生自动建链接导入模板 .xlsx',
-    '阅文': '阅文自动建链接导入模板.xlsx',
-    '阳光': '阳光自动建链接导入模板.xlsx',
-    '文鼎': '文鼎自动建链接导入模板.xlsx',
-    '掌中云': '掌中云自动建链接导入模板.xlsx'
-}
-
-function Automation() {
-    const [platformName, setPlatformName] = useState<string>('花生')
-    const [btnUploadLoding, setBtnUploadLoding] = useState<boolean>(false)//按钮loding
-    const downLoad = useAjax((params) => exportAutoLinkExcle(params), { formatResult: true })//模板下载
-    const upLoad = useAjax((params) => importLinkExcle(params), { formatResult: true })//模板下载
-    const list = useAjax((params) => selectLinks(params), { formatResult: true })//模板下载
-    const [visible, setVisible] = useState<boolean>(false)//详情弹窗
-    const [data, setData] = useState<any>([])//详情数据
-    const [bfData, setBfData] = useState<any>([])//备份详情数据用在筛选
-    //导出
-    const onExportLinkExcle = useCallback((platformName: string) => {
-        downLoad.run({ platformName }).then((res) => {
-            downloadFile(res, 'vnd.openxmlformats-officedocument.spreadsheetml.sheet', `${platformName}自动建链接导入模板.xlsx`)
-        })
-    }, [])
-    //平台数组
-    const tabList = useMemo(() => {
-        let arr: any = []
-        Object.keys(Platform).map((item) => {
-            arr.push({ key: item, tab: Platform[item] })
-        })
-        return arr
-    }, [Platform])
-    //获取列表
-    const getList = useCallback((props: { pageSize?: number, pageNum?: number, createStatus?: any }) => {
-        let { pageSize = 20, pageNum = 1, createStatus } = props
-        let obj = { platformName, pageSize, pageNum }
-        if (createStatus) {
-            obj['createStatus'] = createStatus
-        }
-        list.run(obj)
-    }, [platformName])
-    //查询
-    const pageChange = useCallback((props: any) => {
-        const { pageSize = 20, current = 1, createStatus } = props
-        getList({ pageNum: current, pageSize, createStatus })
-    }, [])
-    //查询详情状态
-    const statusChange = useCallback((value) => {
-        let newData = JSON.parse(JSON.stringify(data))
-        if (value) {
-            newData['autoLinkReocrds'] = data?.autoLinkReocrds?.filter((item: { createStatus: any }) => item.createStatus == value)
-        } else {
-            newData['autoLinkReocrds'] = data?.autoLinkReocrds
-        }
-        setBfData(newData)
-    }, [data, bfData])
-    //查看详情
-    const see = useCallback((props) => {
-        setVisible(true)
-        setData(props)
-        setBfData(props)
-        console.log(props)
-    }, [])
-    //首次或切换tab获取列表
-    useEffect(() => {
-        getList({})
-    }, [platformName])
-    console.log(platformText[platformName])
-    return <div>
-        <Card
-            style={{ width: '100%' }}
-            title={'自动化任务'}
-            tabList={tabList}
-            onTabChange={key => {
-                setPlatformName(key)//设置平台id
-                // setCreatLinkType(`${Platform[key]}Link`)
-            }}
-            size='small'
-            tabProps={{ size: 'small', type: "card" }}
-            tabBarExtraContent={
-                <Space>
-                    <Popover
-                        content={
-                            <div className={style.platformText}>
-                                {platformText[platformName]}
-                            </div>
-                        }
-                        title={<h1 style={{ textAlign: 'center' }}>{platformName}字段描述</h1>}
-                        placement='bottom'
-                    >
-                        <Button type='dashed' danger>平台导入注意项</Button>
-                    </Popover>
-                    <Select
-                        showSearch
-                        placeholder='状态查询'
-                        filterOption={(input, option) =>
-                            option?.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
-                        }
-                        style={{ width: 130 }}
-                        onChange={(value) => { value && pageChange({ createStatus: value }) }}
-                        allowClear
-                    >
-                        <Select.Option value='0'>导入excel成功</Select.Option>
-                        <Select.Option value='1'>创建中</Select.Option>
-                        <Select.Option value='2'>部分成功</Select.Option>
-                        <Select.Option value='3'>全部成功</Select.Option>
-                        <Select.Option value='-1'>创建失败</Select.Option>
-                        <Select.Option value='-2'>全部失败</Select.Option>
-                    </Select>
-                    <Button onClick={() => { getList({}) }} type='primary' loading={list?.loading}>刷新</Button>
-                    {/* <Button onClick={() => onExportLinkExcle(platformName)} type='dashed'><DownloadOutlined />下载自动化模板</Button> */}
-                    <Button type='dashed'><DownloadOutlined />
-                        <a href={`http://oss.zanxiangnet.com/zx-system/file/excel/${name[platformName]}`}>下载自动化模板</a>
-                    </Button>
-                <Upload
-                    accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
-                    action=""
-                    listType="text"
-                    onChange={() => { }}
-                    multiple={true}
-                    showUploadList={false}
-                    customRequest={(options: RcCustomRequestOptions) => {
-                        setBtnUploadLoding(true)
-                        let formData = new FormData();
-                        formData.append("file", options.file);
-                        upLoad.run({ data: formData, platformName }).then(res => {
-                            setBtnUploadLoding(false)
-                            if (res) {
-                                message.success('导入成功')
-                                list.refresh()
-                            }
-                        }).catch(() => {
-                            setBtnUploadLoding(false)
-                        })
-                    }}
-                ><Button type='primary' icon={<UploadOutlined />} loading={btnUploadLoding}>导入模板批量创建</Button></Upload>
-                </Space>
-            }
-        >
-            <Tables
-            dataSource={list?.data?.data?.records}
-            columns={columns(platformName, see)}
-            bordered
-            size='small'
-            rowClassName={(data: any) => {
-                if (data['createStatus'] === -2 || data['createStatus'] === -1) {
-                    return 'table_row_red'
-                }
-                if (data['createStatus'] === 2) {
-                    return 'table_row_yellow'
-                }
-                return ''
-            }}
-            // pageChange={pageChange}
-            // sizeChange={pageChange}
-            total={list?.data?.data?.total}
-            onChange={pageChange}
-        />
-        </Card>
-    {/* 详情弹窗 */ }
-    <Drawer
-        title={<div style={{ display: 'flex', justifyContent: 'space-between' }}>
-            <Space>
-                <span>{data?.fileName}</span>
-                <a href={data?.excelLink}>导出Excel</a>
-            </Space>
-            <Select
-                showSearch
-                placeholder='状态查询'
-                filterOption={(input, option) =>
-                    option?.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
-                }
-                style={{ width: 130 }}
-                onChange={(value) => { statusChange(value) }}
-                allowClear
-            >
-                <Select.Option value={'0'}>创建</Select.Option>
-                <Select.Option value={'1'}>创建中</Select.Option>
-                <Select.Option value={'2'}>创建成功</Select.Option>
-                <Select.Option value={'-1'}>创建链接失败</Select.Option>
-                <Select.Option value={'-2'}>创建客服消息失败</Select.Option>
-            </Select>
-        </div>}
-        placement={'top'}
-        closable={false}
-        onClose={() => { setVisible(false) }}
-        visible={visible}
-        height={500}
-    >
-        <Tables
-            dataSource={bfData?.autoLinkReocrds}
-            columns={detailsColumns(platformName)}
-            bordered
-            size='small'
-            scroll={{ x: 3000 }}
-            rowClassName={(data: any) => {
-                console.log(data['createStatus'])
-                if (data['createStatus'] === -1 || data['createStatus'] === -2) {
-                    return 'table_row_red'
-                }
-                return ''
-            }}
-        />
-    </Drawer>
-    </div >
-}
-
-export default Automation

+ 0 - 167
src/pages/operatePage/automation/create/platformText.tsx

@@ -1,167 +0,0 @@
-import { Divider } from 'antd'
-import React from 'react'
-import style from './index.less'
-const platformText = {
-    '花生': <div className={style.platformText_box}>
-        <div>
-            <span><b>账号/密码:</b><span>平台账号/密码</span></span>
-            <span><b>vip:</b><span>是否为平台vip账户(是|否)</span></span>
-            <span><b>公众号:</b><span>当前平台下需要创建链接的公众号</span></span>
-            <span><b>链接类型:</b><span>推广链接|自定义活动|赠币活动(按需要创建的链接类型选择)</span></span>
-            <span><b>书名:</b><span>推广链接下选择的书籍</span></span>
-            <span><b>章节:</b><span>选择书籍的第几章(填写整数例:1)</span></span>
-            <span><b>推广名:</b><span>推广链接的推广名称</span></span>
-            <span><b>推广成本:</b><span>推广链接的推广成本</span></span>
-            <span><b>内推|外推:</b><span>内推或者外推</span></span>
-            <span><b>外推下的关注章节:</b><span>选择外推时需要填写关注的章节(填写整数例:1)</span></span>
-            <span><b>活动标题:</b><span>创建活动时的标题</span></span>
-            <span><b>活动金额:</b><span>创建活动时的金额,赠币活动填写整数例:100书币选项填写<strong>100</strong>,自定义活动填写例:充9元多送20元选项填写<strong>9送20</strong></span></span>
-            <span><b>限购类型:</b><span>整体限购 or 每天限购</span></span>
-            <span><b>购买次数:</b><span>限购次数填写整数,不限填0</span></span>
-            <span><b>开始/结束时间:</b><span>活动时间格式 2021/04/20 00:00:00</span></span>
-            <span><b>上架/下架:</b><span>活动上下架选项</span></span>
-            <span><b>显示/隐藏:</b><span>是否在阅读页显示</span></span>
-            <span><b>开启/关闭:</b><span>弹窗状态</span></span>
-            <span><b>弹窗开启位置:</b><span>填<strong>全部</strong>为全选,或者选填<strong>首页,最近阅读,个人中心,书库</strong>可多选以逗号隔开</span></span>
-            <span><b>模板序号:</b><span>填写整数第一个填<strong>1</strong>不能填平台不存在的模板位置,从左往右数数</span></span>
-            <span><b>备注:</b><span>自定义活动和赠币活动的备注</span></span>
-            <Divider plain>客服消息字段(选填,不填只创建链接)</Divider>
-            <span><b>任务名称:</b><span>创建的任务名称</span></span>
-            <span><b>公众号列表:</b><span>本次创建的客服消息可批量为多个公众号创建,<strong>滔天文海,龙天书涯</strong>多个以,隔开</span></span>
-            <span><b>时间类型:</b><span>特定时间,每周,每日选择</span></span>
-            <span><b>发送时间:</b><span>特定时间<strong>2021/04/20 00:00:00</strong>,每周,每日<strong>17:00</strong>。按时间类型填写对应格式</span></span>
-            <span><b>客服标题:</b><span>创建的客服标题</span></span>
-            <span><b>客服描述:</b><span>创建的客服描述</span></span>
-            <span><b>缩略图编号:</b><span>在本地素材库中的对应素材编号,点击可复制过来,例<strong>IMAGE_0000001145</strong>。目前支持填写<strong>图片文件夹(随机文件夹内的图片),图片</strong>编号</span></span>
-        </div>
-    </div>,
-    '阅文': <div className={style.platformText_box}>
-        <div>
-            <span><b>账号/密码:</b><span>平台账号/密码</span></span>
-            <span><b>vip:</b><span>是否为平台vip账户(是|否)</span></span>
-            <span><b>公众号:</b><span>当前平台下需要创建链接的公众号</span></span>
-            <span><b>链接类型:</b><span>推广链接|常规活动|模板充值活动|模板赠送活动|模板消耗活动(按需要创建的链接类型选择)</span></span>
-            <span><b>书名:</b><span>推广链接下选择的书籍</span></span>
-            <span><b>章节:</b><span>选择书籍的第几章(填写整数例:1)</span></span>
-            <span><b>推广名:</b><span>推广链接的推广名称</span></span>
-            <span><b>推广成本:</b><span>推广链接的推广成本</span></span>
-            <span><b>内推|外推:</b><span>内推或者外推</span></span>
-            <span><b>外推下的关注章节:</b><span>选择外推时需要填写关注的章节(填写整数例:1)</span></span>
-            <span><b>强关设置:</b><span>默认主动关注可选项:主动关注|不设置强关</span></span>
-            <span><b>是否添加底部关注引导:</b><span>是|否</span></span>
-            <span><b>活动名称:</b><span>活动名称:</span></span>
-            <span><b>活动礼物:</b><span>创建活动时的金额:<strong>常规活动无需填写</strong>。模板赠送活动例:<strong>1,5 表示赠送档位栏选择第一个选项,名额配置为5个名额</strong>,模板充值例:<strong>18,1000 表示充值档位为18元,赠送1000书卷</strong>,模板消耗例:<strong>20,500,2 表示购买章节数量20,赠送500书卷,名额2</strong></span></span>
-            <span><b>充值次数:</b><span>限购次数填写整数</span></span>
-            <span><b>开始/结束时间:</b><span>活动时间格式 2021/04/20 00:00:00</span></span>
-            <span><b>上架/下架:</b><span>活动上下架选项</span></span>
-            <span><b>显示/隐藏:</b><span>是否在阅读页显示</span></span>
-            <span><b>开启/关闭:</b><span>弹窗状态</span></span>
-            <span><b>弹窗开启位置:</b><span>选填<strong>最近阅读,男生,女生,个人中心,分类,免费,完本</strong>可多选以逗号隔开</span></span>
-            <span><b>是否显示活动时间:</b><span>模板充值活动必填项 是|否</span></span>
-            <span><b>是否开启客服消息推送:</b><span>常规活动必填项 是|否</span></span>
-            <Divider plain>客服消息字段(选填,不填只创建链接)</Divider>
-            <span><b>任务名称:</b><span>创建的任务名称</span></span>
-            <span><b>公众号列表:</b><span>本次创建的客服消息可批量为多个公众号创建,<strong>滔天文海,龙天书涯</strong>多个以,隔开</span></span>
-            <span><b>时间类型:</b><span>特定时间,每周,每日选择</span></span>
-            <span><b>发送时间:</b><span>特定时间<strong>2021/04/20 00:00:00</strong>,每周,每日<strong>17:00</strong>。按时间类型填写对应格式</span></span>
-            <span><b>客服标题:</b><span>创建的客服标题</span></span>
-            <span><b>客服描述:</b><span>创建的客服描述</span></span>
-            <span><b>缩略图编号:</b><span>在本地素材库中的对应素材编号,点击可复制过来,例<strong>IMAGE_0000001145</strong>。目前支持填写<strong>图片文件夹(随机文件夹内的图片),图片</strong>编号</span></span>
-        </div>
-    </div>,
-    '阳光': <div className={style.platformText_box}>
-        <div>
-            <span><b>账号/密码:</b><span>平台账号/密码</span></span>
-            <span><b>vip:</b><span>是否为平台vip账户(是|否)</span></span>
-            <span><b>公众号:</b><span>当前平台下需要创建链接的公众号</span></span>
-            <span><b>链接类型:</b><span>推广链接|自定义活动|赠币活动(按需要创建的链接类型选择)</span></span>
-            <span><b>书名:</b><span>推广链接下选择的书籍</span></span>
-            <span><b>章节:</b><span>选择书籍的第几章(填写整数例:1)</span></span>
-            <span><b>推广名:</b><span>推广链接的推广名称</span></span>
-            <span><b>推广成本:</b><span>推广链接的推广成本</span></span>
-            <span><b>内推|外推:</b><span>内推或者外推</span></span>
-            <span><b>外推下的关注章节:</b><span>选择外推时需要填写关注的章节(填写整数例:1)</span></span>
-            <span><b>活动标题:</b><span>对应阳光仅前台展示,且前端活动页面标题取活动标题配置</span></span>
-            <span><b>活动名称:</b><span>对应阳光仅后台展示</span></span>
-            <span><b>活动金额:</b><span>创建活动时的金额,赠币活动填写整数例:100书币选项填写<strong>100</strong>,自定义活动填写例:充9元多送20元选项填写<strong>9送20</strong></span></span>
-            <span><b>购买次数:</b><span>限购次数填写整数</span></span>
-            <span><b>开始/结束时间:</b><span>活动时间格式 2021/04/20 00:00:00</span></span>
-            <span><b>上架/下架:</b><span>活动上下架选项</span></span>
-            <span><b>显示/隐藏:</b><span>是否在阅读页显示</span></span>
-            <span><b>开启/关闭:</b><span>弹窗状态</span></span>
-            <span><b>弹窗开启位置:</b><span>选填<strong>最近阅读,男生,女生,个人中心,分类,免费,完本</strong>可多选以逗号隔开</span></span>
-            <span><b>模板序号:</b><span>填写整数第一个填<strong>1</strong>不能填平台不存在的模板位置,从左往右数数</span></span>
-            <span><b>备注:</b><span>自定义活动和赠币活动的备注</span></span>
-            <span><b>接收用户:</b><span>全部用户|已充值用户|未充值用户(单选)</span></span>
-            <Divider plain>客服消息字段(选填,不填只创建链接)</Divider>
-            <span><b>任务名称:</b><span>创建的任务名称</span></span>
-            <span><b>公众号列表:</b><span>本次创建的客服消息可批量为多个公众号创建,<strong>滔天文海,龙天书涯</strong>多个以,隔开</span></span>
-            <span><b>时间类型:</b><span>特定时间,每周,每日选择</span></span>
-            <span><b>发送时间:</b><span>特定时间<strong>2021/04/20 00:00:00</strong>,每周,每日<strong>17:00</strong>。按时间类型填写对应格式</span></span>
-            <span><b>客服标题:</b><span>创建的客服标题</span></span>
-            <span><b>客服描述:</b><span>创建的客服描述</span></span>
-            <span><b>缩略图编号:</b><span>在本地素材库中的对应素材编号,点击可复制过来,例<strong>IMAGE_0000001145</strong>。目前支持填写<strong>图片文件夹(随机文件夹内的图片),图片</strong>编号</span></span>
-        </div>
-    </div>,
-    '文鼎': <div className={style.platformText_box}>
-        <div>
-            <span><b>账号/密码:</b><span>平台账号/密码</span></span>
-            <span><b>vip:</b><span>是否为平台vip账户(是|否)</span></span>
-            <span><b>公众号:</b><span>当前平台下需要创建链接的公众号</span></span>
-            <span><b>链接类型:</b><span>推广链接|自定义活动|赠币活动(按需要创建的链接类型选择)</span></span>
-            <h2 style={{ textAlign: 'center' }}>推广链接</h2>
-            <span><b>书名:</b><span>推广链接下选择的书籍</span></span>
-            <span><b>章节:</b><span>选择书籍的第几章(填写整数例:1)</span></span>
-            <span><b>推广名:</b><span>推广链接的推广名称</span></span>
-            <span><b>内推|外推:</b><span>内推或者外推</span></span>
-            <span><b>二维码展示:</b><span>只在外推下生效</span></span>
-            <span>
-                <b>关注类型:</b>
-                <span>强制二维码:强制二维码出现在「关注」章节,用户不关注公众号则无法继续阅读。(同时在每章节底部会默认显示常规关注二维码)。<br />
-                非强制二维码:非强制二维码出现在「关注」章节,用户可点击「跳过继续阅读」按钮继续阅读下去。(同时在每章节底部会默认显示常规关注二维码)。<br />
-                常规关注二维码:常规关注二维码出现在每个章节底部,不强制用户关注,但是用户可以选择主动关注。<br />
-                    <strong>(注:在外推并开启二维码展示有效)</strong>
-                </span>
-            </span>
-            <h2 style={{ textAlign: 'center' }}>自定义活动与赠币活动</h2>
-            <span><b>活动标题:</b><span>活动标题自定义活动有效</span></span>
-            <span><b>活动名称:</b><span>保持活动名称唯一性</span></span>
-            <span><b>活动金额:</b><span>
-                <strong>自定义活动:</strong>5-2-4(表示充值5元送2元红包,4代表每天限购1次,第三位数字表示限购次数,分别有1,2,3,4最多4个选项,除了4是每天限购一次,1,2,3就是字面意思限购次数,请参阅文鼎自定义活动!)<br />
-                <strong>赠送红包活动:</strong>50-100-5(表示赠送红包数量50个,赠送红包金额100,红包有效期5天)
-            </span>
-            </span>
-            <span><b>开始/结束时间:</b><span>活动时间格式 2021/04/20 00:00:00</span></span>
-            <span><b>活动位置:</b><span>选填,书城首页顶部|全屏充值页顶部|阅读历史页顶部 )三个选项可多选以|隔开,自定义活动有效</span></span>
-            <span><b>活动图片:</b><span>2-5,(表示第二页从左往右数第5张图,具体请查看文鼎自定义活动活动图片),自定义活动有效</span></span>
-            <span><b>目标用户:</b><span>自定义活动有效</span></span>
-            <span><b>充值类型:</b><span>自定义活动有效并且目标用户为标签用户,不填默认不限</span></span>
-            <span><b>是否包年用户:</b><span>自定义活动有效并且目标用户为标签用户,不填默认不限</span></span>
-            <span><b>注册时间:</b><span>自定义活动有效并且目标用户为标签用户,不填默认不限</span></span>
-            <Divider plain>客服消息字段(选填,不填只创建链接)</Divider>
-            <span><b>任务名称:</b><span>创建的任务名称</span></span>
-            <span><b>公众号列表:</b><span>本次创建的客服消息可批量为多个公众号创建,<strong>滔天文海,龙天书涯</strong>多个以,隔开</span></span>
-            <span><b>时间类型:</b><span>特定时间,每周,每日选择</span></span>
-            <span><b>发送时间:</b><span>特定时间<strong>2021/04/20 00:00:00</strong>,每周,每日<strong>17:00</strong>。按时间类型填写对应格式</span></span>
-            <span><b>客服标题:</b><span>创建的客服标题</span></span>
-            <span><b>客服描述:</b><span>创建的客服描述</span></span>
-            <span><b>缩略图编号:</b><span>在本地素材库中的对应素材编号,点击可复制过来,例<strong>IMAGE_0000001145</strong>。目前支持填写<strong>图片文件夹(随机文件夹内的图片),图片</strong>编号</span></span>
-        </div>,
-    </div>,
-    '掌中云': <div className={style.platformText_box}>
-        <div>
-            <span><b>API_Key:</b><span>在掌中云VIP页面点击接口密钥管理获取</span></span>
-            <span><b>API_Secret:</b><span>在掌中云VIP页面点击接口密钥管理获取</span></span>
-            <Divider plain>客服消息字段(选填,不填只创建链接)</Divider>
-            <span><b>任务名称:</b><span>创建的任务名称</span></span>
-            <span><b>公众号列表:</b><span>本次创建的客服消息可批量为多个公众号创建,<strong>滔天文海,龙天书涯</strong>多个以,隔开</span></span>
-            <span><b>时间类型:</b><span>特定时间,每周,每日选择</span></span>
-            <span><b>发送时间:</b><span>特定时间<strong>2021/04/20 00:00:00</strong>,每周,每日<strong>17:00</strong>。按时间类型填写对应格式</span></span>
-            <span><b>客服标题:</b><span>创建的客服标题</span></span>
-            <span><b>客服描述:</b><span>创建的客服描述</span></span>
-            <span><b>缩略图编号:</b><span>在本地素材库中的对应素材编号,点击可复制过来,例<strong>IMAGE_0000001145</strong>。目前支持填写<strong>图片文件夹(随机文件夹内的图片),图片</strong>编号</span></span>
-        </div>,
-</div>
-}
-
-export default platformText

+ 0 - 87
src/pages/operatePage/automation/create/tableConfig.tsx

@@ -1,87 +0,0 @@
-import { Badge } from "antd"
-import React from "react"
-
-let type = {
-    0: { text: '导入excel成功', color: 'cyan' },
-    1: { text: '创建中', color: 'processing' },
-    2: { text: '部分成功', color: 'warning' },
-    3: { text: '全部成功', color: 'success' },
-    '-1': { text: '创建失败', color: 'error' },
-    '-2': { text: '全部失败', color: 'error' },
-}
-function columns(platformName: string, see: (props:any) => void) {
-    return [
-        // {
-        //     title: 'ID',
-        //     dataIndex: 'id',
-        //     key: 'id',
-        //     align: 'center',
-        // },
-        {
-            title: '创建人',
-            dataIndex: 'createUser',
-            key: 'createUser',
-            align: 'center',
-            render: (a: any) => {
-                return a?.nickName
-            }
-        },
-        {
-            title: '创建时间',
-            dataIndex: 'autoLinkReocrds',
-            key: 'autoLinkReocrds',
-            align: 'center',
-            render: (a: any) => {
-                return a[0]?.createTime
-            }
-        },
-        {
-            title: '导入的文件名',
-            dataIndex: 'fileName',
-            key: 'fileName',
-            align: 'center',
-        },
-        {
-            title: '创建状态',
-            dataIndex: 'createStatus',
-            key: 'createStatus',
-            align: 'center',
-            render: (a: any) => {
-                return <><Badge text={type[a]?.text} status={type[a]?.color} /></>
-            }
-        },
-        {
-            title: '导入的记录总数',
-            dataIndex: 'recordCount',
-            key: 'recordCount',
-            align: 'center',
-        },
-        {
-            title: '链接创建成功数',
-            dataIndex: 'successCount',
-            key: 'successCount',
-            align: 'center',
-            render: (a: any, b: any) => {
-                return <span style={b?.recordCount !== a ? { color: 'red' } : {}}>{a}</span>
-            }
-        },
-        {
-            title: '操作',
-            dataIndex: 'cz',
-            key: 'cz',
-            align: 'center',
-            render: (a:any,data:any) => {
-                return <>
-                    <a onClick={()=>{see(data)}}>查看详情</a>
-                </>
-            }
-        }
-        // {
-        //     title: '请求ID',
-        //     dataIndex: 'requestId',
-        //     key: 'requestId',
-        //     align: 'center',
-        // },
-    ]
-}
-export default columns

+ 0 - 20
src/pages/operatePage/automation/links/index.less

@@ -1,20 +0,0 @@
-.from{
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin-bottom: 20px;
-    >span:nth-child(1){
-        width: 100px;
-        text-align: right;
-    }
-    >span:nth-child(2){
-        width: 300px;
-    }
-    >div{
-
-    }
-}
-.flex{
-    display: flex;
-    flex-flow: column;
-}

+ 0 - 396
src/pages/operatePage/automation/links/index.tsx

@@ -1,396 +0,0 @@
-import React, { useCallback, useEffect, useMemo, useState } from 'react'
-import GroupWxTabs from '@/components/GroupWxTabs/wx'
-import { useModel } from 'umi'
-import { Button, Card, Input, message, Radio, Select, Space, Tabs } from 'antd'
-import { useAjax } from '@/Hook/useAjax'
-import { autoLink, creatNormalLink, normalLink } from '@/services/operating/link'
-import Tables from '@/components/Tables'
-import columns from './tableConfig'
-import Modal from 'antd/lib/modal/Modal'
-import style from './index.less'
-let linkArr = ["免费(自动)", "分类(自动)", "排行榜(自动)", "继续阅读", "联系客服", "分站首页", "小说搜索", "阅读历史", "个人中心", "充值", "签到", "排行榜(男生)", "排行榜(女生)", "排行榜(出版)", "分类(男生)", "分类(女生)", "分类(出版)", "免费(男生)", "免费(女生)", "免费(出版)"]
-const platforms = [
-    {
-        platformName: '花生',
-        list: [
-            { name: '花生常用链接', link_type: -1 },
-            { name: '花生平台活动', link_type: -2 },
-            { name: '花生推广链接', link_type: 1 },
-            { name: '花生自定义活动', link_type: 2 },
-            { name: '花生赠币活动', link_type: 3 }
-        ]
-    },
-    {
-        platformName: '阅文',
-        list: [
-            { name: '阅文常用链接', link_type: -1 },
-            { name: '阅文推广链接', link_type: 1 },
-            { name: '阅文常规活动链接', link_type: 4 },
-            { name: '阅文模板充值活动链接', link_type: 5 },
-            { name: '阅文模模板直赠活动链接', link_type: 6 },
-            { name: '阅文模板消耗活动连接', link_type: 7 },
-        ]
-    },
-    {
-        platformName: '阳光',
-        list: [
-            { name: '阳光常用链接', link_type: -1 },
-            { name: '阳光累计充值活动', link_type: -3 },
-            { name: '阳光推广链接', link_type: 1 },
-            { name: '阳光自定义活动', link_type: 2 },
-            { name: '阳光赠币活动', link_type: 3 },
-        ]
-    },
-    {
-        platformName: '文鼎',
-        list: [
-            { name: '文鼎常用链接', link_type: -1 },
-            { name: '文鼎平台活动', link_type: -2 },
-            { name: '文鼎推广链接', link_type: 1 },
-            { name: '文鼎自定义活动', link_type: 2 },
-            { name: '文鼎赠币活动', link_type: 3 },
-        ]
-    },
-    {
-        platformName: '掌中云',
-        list: [
-            { name: '掌中云常用链接', link_type: -1 },
-            { name: '掌中云平台活动', link_type: -2 },
-            { name: '掌中云推广链接', link_type: 1 },
-            { name: '掌中云自定义活动', link_type: 2 },
-            { name: '掌中云送书卷活动', link_type: 8 },
-        ]
-    },
-]
-let pageTypeIds = [
-    '',
-    '个人中心',
-    '免费专区',
-    '阅读记录',
-    '充值页面',
-    '继续阅读',
-    '签到送礼',
-    'VIP充值',
-    '书城首页',
-    '榜单',
-    '书库(男频)',
-    '书库(女频)',
-    '书币抽奖'
-]
-function Links() {
-    const { actionWX } = useModel('useOperating.useWxGroupList', model => ({ actionWX: model.state.actionWX }))
-    const [platformName, setPlatformName] = useState<string>('花生')//平台名称
-    const [data, setData] = useState<any>()//数据
-    const [activeKey, setActiveKey] = useState<string>('花生常用链接_-1')//选中的平台类型
-    const [user, setUser] = useState<string>('')//平台账号
-    const [password, setPassword] = useState<string>('')//平台密码
-    const [pupshow, setPupShow] = useState<boolean>(false)//平台弹窗
-    const [vip, setVip] = useState<number>(1)
-    const getAutoLink = useAjax((props) => autoLink(props))//获取推广连接
-    const getNormalLink = useAjax((props) => normalLink(props))//获取常用链接
-    const postNormalLink = useAjax((props) => creatNormalLink(props))//
-    const [activityTitle, setActivity_title] = useState<string>('')//链接名称
-    const [activityName, setActivity_name] = useState<string>('')//活动名称
-    const [spreadType, setSpread_type] = useState<string>('')//链接类型
-    // const [creatLinkType, setCreatLinkType] = useState<string>('花生Link')
-    const [apiKey, setApiKey] = useState<string>('')//apikey
-    const [apiSecret, setApiSecret] = useState<string>('')//apiSecret
-    const [remark, setRemark] = useState<string>('')//备注
-    const [pageTypeId, setPageTypeId] = useState<number>(1)//入口
-
-
-    let list = useMemo(() => {
-        let arr: any[] = []
-        platforms.forEach((item) => {
-            if (item.platformName === platformName) {
-                arr = item.list
-            }
-        })
-        return arr
-    }, [platformName])
-    useEffect(() => {
-        setActiveKey(`${platformName}常用链接_-1`)//切换平台默认选中平台常用链接
-    }, [platformName])
-    useEffect(() => {
-        setActivity_name('')
-        setActivity_title('')
-    }, [activeKey])
-    //切换链接类型获取对应数据
-    useEffect(() => {
-        pageChange()
-    }, [activeKey, platformName, actionWX])
-    //翻页
-    const pageChange = useCallback((pageNum?: number, pageSize?: number) => {
-        let linkType = Number(activeKey.split('_')[1])
-        let ajax = linkType > 0 ? getAutoLink : getNormalLink
-        // getNormalLink.run()
-        setData(null)
-        ajax.run({ pageSize: pageSize || 20, pageNum: pageNum || 1, platformName, linkType: Math?.abs(linkType), mpId: actionWX?.id }).then((res) => {
-            if (res?.records && Array.isArray(res?.records) && res?.records.length > 0) {
-                setData(res)
-            }
-        })
-    }, [activeKey, platformName, actionWX])
-    const PuphandleOk = useCallback(() => {
-        if (platformName === '掌中云' && activeKey.includes('掌中云常用链接_-1')) {
-            let linkType = Math.abs(Number(activeKey.split('_')[1]))
-            let obj: any = {
-                account:apiKey,
-                password:apiSecret,
-                apiKey,
-                apiSecret,
-                mpId: actionWX?.id,
-                linkType,
-                vip: !!vip,
-                platformName,
-                publicName:actionWX?.nickName,
-                spreadType,
-                pageTypeId,
-                remark
-            }
-            postNormalLink.run(obj).then((res) => {
-                console.log(res)
-            })
-            setPupShow(false)
-        } else if (password && user) {
-            let linkType = Math.abs(Number(activeKey.split('_')[1]))
-            let obj: any = {
-                account: user,
-                linkType,
-                mpId: actionWX?.id,
-                password,
-                platformName,
-                vip: !!vip
-            }
-            if (platformName === '文鼎') {
-                obj = {
-                    ...obj,
-                    activityTitle,
-                    activityName,
-                    spreadType
-                }
-            }
-            postNormalLink.run(obj).then((res) => {
-                console.log(res)
-            })
-            setPupShow(false)
-        } else {
-            message.warning('请填写账号密码')
-        }
-    }, [password, user, activeKey, platformName, vip, actionWX, activityTitle, activityName, spreadType, apiKey, apiSecret, remark, pageTypeId])
-    let tabData = data?.records[0]?.links || data?.records || []
-    return <div>
-        <GroupWxTabs>
-            <Card
-                style={{ width: '100%' }}
-                title={actionWX?.nickName}
-                // extra={<a href="#">More</a>}
-                tabList={platforms.map((item) => {
-                    return { key: item.platformName, tab: item.platformName }
-                })}
-                size='small'
-                tabProps={{ size: 'small', type: "card" }}
-                activeTabKey={platformName}
-                onTabChange={(key: string) => {
-                    setPlatformName(key)
-                }}
-            >
-                <Tabs
-                    onChange={(activeKey: string) => { setActiveKey(activeKey) }}
-                    activeKey={activeKey}
-                    tabBarExtraContent={
-                        <Space>
-                            {Number(activeKey.split('_')[1]) < 0 ? <Button type='primary' onClick={() => { setPupShow(true) }}>{Math.abs(Number(activeKey.split('_')[1])) === 1 ? '获取常用链接' : '获取平台活动'}</Button> : null}
-                            {/* {Number(activeKey.split('_')[1]) < 0 ? <Button type='primary' >更新列表</Button> : null} */}
-                        </Space>
-                    }
-                >
-                    {
-                        list.map((item: { name: string, link_type: number }, index: number) => {
-                            return <Tabs.TabPane tab={item.name} key={item.name + '_' + item.link_type}>
-                                <Tables
-                                    columns={columns({ name: activeKey.split('_')[0], isOk: !!data?.records[0]?.links })}
-                                    dataSource={tabData.map((item: any, index: number) => { return { id: index + 1, ...item } })}
-                                    total={data?.total}
-                                    pageChange={pageChange}
-                                    sizeChange={pageChange}
-                                    size="small"
-                                    bordered
-                                    loading={false}
-                                    rowClassName={(data: any) => {
-                                        if (data['createStatus'] === -2 || data['createStatus'] === -1) {
-                                            return 'table_row_red'
-                                        }
-                                        return ''
-                                    }}
-                                    scroll={{ x: 2000 }}
-                                />
-                            </Tabs.TabPane>
-                        })
-                    }
-                </Tabs>
-                <Modal
-                    visible={pupshow}
-                    title='平台信息'
-                    onOk={PuphandleOk}
-                    onCancel={() => { setPupShow(false) }}
-                >
-                    {(!activeKey.includes('掌中云常用链接_-1')) && <><div className={style.from}>
-                        <span>账号:</span>
-                        <Input
-                            placeholder='平台账号'
-                            style={{ width: 300 }}
-                            allowClear
-                            onChange={(event: React.ChangeEvent<HTMLInputElement>) => { setUser(event.target.value) }}
-                        />
-                    </div>
-                        <div className={style.from}>
-                            <span>密码:</span>
-                            <Input
-                                placeholder='平台密码'
-                                style={{ width: 300 }}
-                                allowClear
-                                onChange={(event: React.ChangeEvent<HTMLInputElement>) => { setPassword(event.target.value) }}
-                            />
-                        </div>
-                        <div className={style.from}>
-                            <div >
-                                <span>VIP:</span>
-                                <Radio.Group onChange={(e) => { setVip(e.target.value) }} value={vip}>
-                                    <Radio value={1}>是</Radio>
-                                    <Radio value={0}>否</Radio>
-                                </Radio.Group>
-                            </div>
-                        </div></>}
-                    {
-                        platformName === '文鼎' && <>
-                            {
-                                Math.abs(Number(activeKey.split('_')[1])) === 2 && <>
-                                    <div className={style.from}>
-                                        <span>链接名称:</span>
-                                        <Input
-                                            placeholder='链接名称'
-                                            style={{ width: 300 }}
-                                            allowClear
-                                            value={activityTitle}
-                                            onChange={(event: React.ChangeEvent<HTMLInputElement>) => { setActivity_title(event.target.value) }}
-                                        />
-                                    </div>
-                                    <div className={style.from}>
-                                        <span>活动名称:</span>
-                                        <Input
-                                            placeholder='请填写平台存在的活动名称,名称一致'
-                                            style={{ width: 300 }}
-                                            allowClear
-                                            value={activityName}
-                                            onChange={(event: React.ChangeEvent<HTMLInputElement>) => { setActivity_name(event.target.value) }}
-                                        />
-                                    </div>
-                                    <div className={style.from}>
-                                        <span>链接类型:</span>
-                                        <Select style={{ width: 300 }} value={spreadType} onChange={(value: string) => { setSpread_type(value) }}>
-                                            <Select.Option value={'外推'}>外推</Select.Option>
-                                            <Select.Option value={'内推'}>内推</Select.Option>
-                                        </Select>
-                                    </div>
-                                </>
-                            }
-                            {
-                                Math.abs(Number(activeKey.split('_')[1])) === 1 && <>
-                                    <div className={style.from}>
-                                        <span>链接名称:</span>
-                                        <Select style={{ width: 300 }} value={activityName} onChange={(value: string) => { setActivity_name(value) }}>
-                                            {
-                                                linkArr?.map((name: string) => {
-                                                    return <Select.Option value={name} key={name}>{name}</Select.Option>
-                                                })
-                                            }
-                                        </Select>
-                                    </div>
-                                    <div className={style.from}>
-                                        <span>活动名称:</span>
-                                        <Input
-                                            placeholder='活动名称'
-                                            style={{ width: 300 }}
-                                            allowClear
-                                            value={activityTitle}
-                                            onChange={(event: React.ChangeEvent<HTMLInputElement>) => { setActivity_title(event.target.value) }}
-                                        />
-                                    </div>
-                                    <div className={style.from}>
-                                        <span>链接类型:</span>
-                                        <Select style={{ width: 300 }} value={spreadType} onChange={(value: string) => { setSpread_type(value) }}>
-                                            <Select.Option value={'外推'}>外推</Select.Option>
-                                            <Select.Option value={'内推'}>内推</Select.Option>
-                                        </Select>
-                                    </div>
-                                </>
-                            }
-                        </>
-                    }
-                    {
-                        (platformName === '掌中云' && activeKey.includes('掌中云常用链接_-1')) && <>
-                            <div className={style.from}>
-                                <span>apiKey:</span>
-                                <Input
-                                    placeholder='apiKey'
-                                    style={{ width: 300 }}
-                                    allowClear
-                                    onChange={(event: React.ChangeEvent<HTMLInputElement>) => { setApiKey(event.target.value) }}
-                                />
-                            </div>
-                            <div className={style.from}>
-                                <span>apiSecret:</span>
-                                <Input
-                                    placeholder='apiSecret'
-                                    style={{ width: 300 }}
-                                    allowClear
-                                    onChange={(event: React.ChangeEvent<HTMLInputElement>) => { setApiSecret(event.target.value) }}
-                                />
-                            </div>
-                            <div className={style.from}>
-                                <span>入口:</span>
-                                <Select style={{ width: 300 }} value={pageTypeId} onChange={(value: any) => { setPageTypeId(value) }}>
-                                    {
-                                        pageTypeIds?.map((name: string, index: number) => {
-                                            if (index !== 0) {
-                                                return <Select.Option value={index}>{name}</Select.Option>
-                                            }
-                                            return null
-                                        })
-                                    }
-                                </Select>
-                            </div>
-                            <div className={style.from}>
-                                <span>链接类型:</span>
-                                <Select style={{ width: 300 }} value={spreadType} onChange={(value: string) => { setSpread_type(value) }}>
-                                    <Select.Option value={'外推'}>外推</Select.Option>
-                                    <Select.Option value={'内推'}>内推</Select.Option>
-                                </Select>
-                            </div>
-                            <div className={style.from}>
-                                <span>备注:</span>
-                                <Input.TextArea
-                                    placeholder='备注'
-                                    allowClear
-                                    onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => { setRemark(e.target.value) }}
-                                />
-                            </div>
-                            <div className={style.from}>
-                                <div >
-                                    <span>VIP:</span>
-                                    <Radio.Group onChange={(e) => { setVip(e.target.value) }} value={vip}>
-                                        <Radio value={1}>是</Radio>
-                                        <Radio value={0}>否</Radio>
-                                    </Radio.Group>
-                                </div>
-                            </div>
-
-                        </>
-                    }
-                </Modal>
-            </Card>
-        </GroupWxTabs>
-    </div >
-}
-export default Links

+ 0 - 2277
src/pages/operatePage/automation/links/tableConfig.tsx

@@ -1,2277 +0,0 @@
-import useCopy from "@/Hook/useCopy"
-import { CopyOutlined } from "@ant-design/icons"
-import React from "react"
-import style from './index.less'
-enum State {
-    '创建' = 0,
-    '创建中' = 1,
-    '创建成功' = 2,
-    '创建失败' = -1,
-    '创建客服消息失败' = -2
-}
-enum Statept {
-    '创建' = 0,
-    '创建中' = 1,
-    '创建成功' = 2,
-    '创建失败' = -1,
-    '创建失败(系统问题)' = -2
-}
-let pageTypeIds = [
-    '',
-    '个人中心',
-    '免费专区',
-    '阅读记录',
-    '充值页面',
-    '继续阅读',
-    '签到送礼',
-    'VIP充值',
-    '书城首页',
-    '榜单',
-    '书库(男频)',
-    '书库(女频)',
-    '书币抽奖'
-]
-let userType = ['不限', '已充值', '未充值', '未支付']
-/**
- * 
- * @param props isOk 是否拿到数据
- */
-function columns(props: { name: string, isOk: boolean }) {
-    const { copy } = useCopy()
-    const { name, isOk } = props
-    let arrCy = isOk ? [
-        {
-            title: '页面',
-            dataIndex: 'name',
-            key: 'name',
-            align: 'center'
-        },
-        {
-            title: '链接',
-            dataIndex: 'link',
-            key: 'link',
-            align: 'center',
-            render: (a: string) => {
-                return <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-            }
-        },
-    ] : [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{Statept[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '创建时间',
-                dataIndex: 'createTime',
-                key: 'createTime',
-                align: 'center'
-            }
-        ]
-    let arr: any = {
-        '阅文常用链接': arrCy,
-        '阅文推广链接': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '创建时间',
-                dataIndex: 'createTime',
-                key: 'createTime',
-                align: 'center'
-            },
-            {
-                title: '渠道名称',
-                dataIndex: 'spread_name',
-                key: 'spread_name',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.spread_name}</span>
-                    </div>
-                }
-            },
-            {
-                title: '作品',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.book}第{b?.linkContext?.section}章</span>
-                        <span>关注章节{b?.linkContext?.close_section}</span>
-                        <span>{b?.link}{b?.link && <CopyOutlined onClick={() => { copy(b?.link) }} style={{ color: '#1890ff' }} />}</span>
-                    </div>
-                }
-            },
-            // {
-            //     title: 'PV',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: 'UV',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '新增关注',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '充值金额/元',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '充值笔数',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '收益(充值/成本)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-        ],
-        '阅文常规活动链接': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '创建时间',
-                dataIndex: 'createTime',
-                key: 'createTime',
-                align: 'center'
-            },
-            {
-                title: '渠道名称',
-                dataIndex: 'spread_name',
-                key: 'spread_name',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.spread_name}</span>
-                    </div>
-                }
-            },
-            {
-                title: '作品',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.book}第{b?.linkContext?.section}章</span>
-                        <span>关注章节{b?.linkContext?.close_section}</span>
-                        <span>{b?.link}{b?.link && <CopyOutlined onClick={() => { copy(b?.link) }} style={{ color: '#1890ff' }} />}</span>
-                    </div>
-                }
-            },
-            // {
-            //     title: 'PV',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: 'UV',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '新增关注',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '充值金额/元',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '充值笔数',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '收益(充值/成本)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-        ],
-        '阅文模板充值活动链接': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '创建时间',
-                dataIndex: 'createTime',
-                key: 'createTime',
-                align: 'center'
-            },
-            {
-                title: '渠道名称',
-                dataIndex: 'spread_name',
-                key: 'spread_name',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.spread_name}</span>
-                    </div>
-                }
-            },
-            {
-                title: '作品',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.book}第{b?.linkContext?.section}章</span>
-                        <span>关注章节{b?.linkContext?.close_section}</span>
-                        <span>{b?.link}{b?.link && <CopyOutlined onClick={() => { copy(b?.link) }} style={{ color: '#1890ff' }} />}</span>
-                    </div>
-                }
-            },
-            // {
-            //     title: 'PV',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: 'UV',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '新增关注',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '充值金额/元',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '充值笔数',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '收益(充值/成本)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-        ],
-        '阅文模模板直赠活动链接': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '创建时间',
-                dataIndex: 'createTime',
-                key: 'createTime',
-                align: 'center'
-            },
-            {
-                title: '渠道名称',
-                dataIndex: 'spread_name',
-                key: 'spread_name',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.spread_name}</span>
-                    </div>
-                }
-            },
-            {
-                title: '作品',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.book}第{b?.linkContext?.section}章</span>
-                        <span>关注章节{b?.linkContext?.close_section}</span>
-                        <span>{b?.link}{b?.link && <CopyOutlined onClick={() => { copy(b?.link) }} style={{ color: '#1890ff' }} />}</span>
-                    </div>
-                }
-            },
-            // {
-            //     title: 'PV',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: 'UV',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '新增关注',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '充值金额/元',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '充值笔数',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '收益(充值/成本)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-        ],
-        '阅文模板消耗活动连接': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '创建时间',
-                dataIndex: 'createTime',
-                key: 'createTime',
-                align: 'center'
-            },
-            {
-                title: '渠道名称',
-                dataIndex: 'spread_name',
-                key: 'spread_name',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.spread_name}</span>
-                    </div>
-                }
-            },
-            {
-                title: '作品',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.book}第{b?.linkContext?.section}章</span>
-                        <span>关注章节{b?.linkContext?.close_section}</span>
-                        <span>{b?.link}{b?.link && <CopyOutlined onClick={() => { copy(b?.link) }} style={{ color: '#1890ff' }} />}</span>
-                    </div>
-                }
-            },
-            // {
-            //     title: 'PV',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: 'UV',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '新增关注',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '充值金额/元',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '充值笔数',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-            // {
-            //     title: '收益(充值/成本)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: () => {
-            //         return <span></span>
-            //     }
-            // },
-        ],
-        '花生常用链接': arrCy,
-        '花生推广链接': [
-            {
-                title: 'ID',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '创建时间',
-                dataIndex: 'createTime',
-                key: 'createTime',
-                align: 'center'
-            },
-            {
-                title: '标题/链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.spread_name}</span>
-                        <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-                    </div>
-                }
-            },
-            {
-                title: '入口',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.book}</span>
-                        <span>第{b?.linkContext?.section}章</span>
-                        <span>关注章节:第{b?.linkContext?.spread_cost}章</span>
-                    </div>
-                }
-            },
-            // {
-            //     title: '点击数',
-            //     dataIndex: 'views',
-            //     key: 'views',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span>{b?.linkContext?.views}人</span>
-            //             <span>{b?.linkContext?.users}次</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '关注数/关注率',
-            //     dataIndex: 'subscribes',
-            //     key: 'subscribes',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span>{b?.linkContext?.subscribes}</span>
-            //             <span>{b?.linkContext?.subscribes_rate}%</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '充值金额/充值笔数',
-            //     dataIndex: 'charge_data',
-            //     key: 'charge_data',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span>¥{b?.linkContext?.charge_data?.charge_amount}</span>
-            //             <span>{b?.linkContext?.charge_data?.charge_count}笔</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '充值人数/充值比例',
-            //     dataIndex: 'charge_data',
-            //     key: 'charge_data',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span>{b?.linkContext?.charge_data?.charge_users}人</span>
-            //             <span>{(b?.linkContext?.charge_data?.charge_users / b?.linkContext?.subscribes * 100)?.toFixed(2)}%</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '复充金额/复充笔数',
-            //     dataIndex: 'charge_data',
-            //     key: 'charge_data',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span>¥{b?.linkContext?.charge_data?.recharge_amount}</span>
-            //             <span>{b?.linkContext?.charge_data?.recharge_count}笔</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '复充人数/复充比例',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span>¥{b?.linkContext?.charge_data?.recharge_users}</span>
-            //             <span>{(b?.linkContext?.charge_data?.recharge_count / b?.linkContext?.charge_data?.charge_users * 100)?.toFixed(2)}%</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '回本率',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center'
-            // },
-            // {
-            //     title: '成本',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center'
-            // },
-        ],
-        '花生平台活动': isOk ? [
-            {
-                title: '活动名称',
-                dataIndex: 'name',
-                key: 'name',
-                align: 'center'
-            },
-            {
-                title: '活动时间',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.start_at}-{b?.end_at}</span>
-                    </div>
-
-                }
-            },
-            {
-                title: '充值金额',
-                dataIndex: 'intro',
-                key: 'intro',
-                align: 'center'
-            },
-            {
-                title: '活动链接',
-                dataIndex: 'url',
-                key: 'url',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.url_intro}</span>
-                        <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-                    </div>
-                }
-            },
-            {
-                title: '总充值(含当日)',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div className={style.flex}>
-                        <span>¥{b?.amounts}</span>
-                        <span>({b?.orders || 0}单)</span>
-                    </div>
-                }
-            },
-        ] : [
-                {
-                    title: '创建状态',
-                    dataIndex: 'createStatus',
-                    key: 'createStatus',
-                    align: 'center',
-                    render: (a: number, b: any) => {
-                        return <div className={style.flex}>
-                            <span>{Statept[a]}</span>
-                            <span>{b?.resultMsg}</span>
-                        </div>
-                    }
-                },
-                {
-                    title: '创建时间',
-                    dataIndex: 'createTime',
-                    key: 'createTime',
-                    align: 'center'
-                }
-            ],
-        '花生自定义活动': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '活动标题',
-                dataIndex: 'activity_title',
-                key: 'activity_title',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.activity_title}</span>
-                        <span>活动时间:{b?.linkContext?.start_at}-{b?.linkContext?.end_at}</span>
-                    </div>
-
-                }
-            },
-            {
-                title: '备注',
-                dataIndex: 'remark',
-                key: 'remark',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.remark
-                }
-            },
-            {
-                title: '活动链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string) => {
-                    return <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-                }
-            },
-            {
-                title: '限购次数',
-                dataIndex: 'buy_num',
-                key: 'buy_num',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.buy_num
-                }
-            },
-            // {
-            //     title: '充值',
-            //     dataIndex: 'activity_sum',
-            //     key: 'activity_sum',
-            //     align: 'center',
-            //     render: (a: string, b: any) => {
-            //         return b?.linkContext?.activity_sum
-            //     }
-            // },
-            // {
-            //     title: '活动状态',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center'
-            // },
-            {
-                title: '上下架状态',
-                dataIndex: 'state',
-                key: 'state',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.state
-                }
-            },
-            {
-                title: '弹窗状态',
-                dataIndex: 'popup',
-                key: 'popup',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.popup
-                }
-            },
-            {
-                title: '是否在阅读页显示',
-                dataIndex: 'show',
-                key: 'show',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.show
-                }
-            },
-            {
-                title: '弹窗位置',
-                dataIndex: 'popup_site',
-                key: 'popup_site',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.popup_site
-                }
-            },
-        ],
-        '花生赠币活动': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '活动标题',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.activity_title}</span>
-                        <span>活动时间:{b?.linkContext?.start_at}-{b?.linkContext?.end_at}</span>
-                    </div>
-
-                }
-            },
-            {
-                title: '备注',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.remark
-                }
-            },
-            {
-                title: '活动链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string) => {
-                    return <span>{a}{a && <CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} />}</span>
-                }
-            },
-            // {
-            //     title: '领取人数',
-            //     dataIndex: 'orders',
-            //     key: 'orders',
-            //     align: 'center'
-            // },
-            // {
-            //     title: '活动状态',
-            //     dataIndex: 'act_status',
-            //     key: 'act_status',
-            //     align: 'center'
-            // },
-            {
-                title: '上下架状态',
-                dataIndex: 'state',
-                key: 'state',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.state
-                }
-            },
-            {
-                title: '弹窗状态',
-                dataIndex: 'popup',
-                key: 'popup',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.popup
-                }
-            },
-            {
-                title: '是否在阅读页显示',
-                dataIndex: 'show',
-                key: 'show',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.show
-                }
-            },
-            {
-                title: '弹窗位置',
-                dataIndex: 'popup_site',
-                key: 'popup_site',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.popup_site
-                }
-            },
-        ],
-        '阳光常用链接': arrCy,
-        '阳光推广链接': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '推广链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string) => {
-                    return <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-                }
-            },
-            {
-                title: '入口页面',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.book}</span>
-                        <span>第{b?.linkContext?.section}章</span>
-                        <span>关注章节:{b?.linkContext?.close_section}</span>
-                    </div>
-
-                }
-
-            },
-            {
-                title: '派单渠道',
-                dataIndex: 'spread_name',
-                key: 'spread_name',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.spread_name}</span>
-                    </div>
-
-                }
-            },
-            // {
-            //     title: '总阅读人数(今日)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: string, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span></span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '总关注人数(今日)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: string, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span></span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '总净关人数(今日)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: string, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span></span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '总充值金额(今日)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: string, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span></span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '充值笔数/充值比例',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: string, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span></span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '推广成本',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: string, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span>{b?.linkContext?.spread_cost}</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '利润',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: string, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span></span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '状态',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: string, b: any) => {
-            //         return <div className={style.flex}>
-            //             <span></span>
-            //         </div>
-            //     }
-            // },
-        ],
-        '阳光平台活动': [
-            {
-                title: '活动标题',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '活动名称/活动页面',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '点击人数(总/今)',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '下单人数(总/今)',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '下单次数(总/今)',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '充值成功人数(总/今)',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '充值成功次数(总/今)',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '充值金额(总/今)',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-        ],
-        '阳光自定义活动': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '活动标题',
-                dataIndex: 'activity_title',
-                key: 'activity_title',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div>
-                        <span>{b?.linkContext?.activity_title}</span>
-                        <span>活动时间:{b?.linkContext?.start_at}--{b?.linkContext?.end_at}</span>
-                    </div>
-                }
-            },
-            {
-                title: '活动名称/活动页面',
-                dataIndex: 'activity_name',
-                key: 'activity_name',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div>
-                        <span>{b?.linkContext?.activity_name}</span>
-                        <span>{b?.link}{b?.link && <CopyOutlined onClick={() => { copy(b?.link) }} style={{ color: '#1890ff' }} />}</span>
-                    </div>
-                }
-            },
-            {
-                title: '充值档位',
-                dataIndex: 'activity_sum',
-                key: 'activity_sum',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return b?.linkContext?.activity_sum
-                }
-            },
-            // {
-            //     title: '点击人数(总/今)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.clickFre}</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '下单人数(总/今)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.fulfilNumPeo}</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '下单次数(总/今)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.fulfilFre}</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '充值成功人数(总/今)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.rechargeSucFre}</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '充值成功次数(总/今)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.rechargeSucPeo}</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '充值金额(总/今)',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.rechargeMoney}</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '活动状态',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.act_status}</span>
-            //         </div>
-            //     }
-            // },
-            {
-                title: '启用状态',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div>
-                        <span>{b?.linkContext?.show}</span>
-                    </div>
-                }
-            },
-            {
-                title: '弹窗状态',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div>
-                        <span>{b?.linkContext?.popup}</span>
-                    </div>
-                }
-            },
-            {
-                title: '弹窗位置',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div>
-                        <span>{b?.linkContext?.popup_site}</span>
-                    </div>
-                }
-            },
-        ],
-        '阳光赠币活动': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '活动标题',
-                dataIndex: 'activity_title',
-                key: 'activity_title',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div>
-                        <span>{b?.linkContext?.activity_title}</span>
-                        <span>活动时间:{b?.linkContext?.start_at}--{b?.linkContext?.end_at}</span>
-                    </div>
-                }
-            },
-            {
-                title: '活动名称/活动页面',
-                dataIndex: 'activity_name',
-                key: 'activity_name',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div>
-                        <span>{b?.linkContext?.activity_name}</span>
-                        <span>{b?.link}  {b?.link && <CopyOutlined onClick={() => { copy(b?.link) }} style={{ color: '#1890ff' }} />}</span>
-                    </div>
-                }
-            },
-            {
-                title: '充值档位',
-                dataIndex: 'activity_sum',
-                key: 'activity_sum',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return b?.linkContext?.activity_sum
-                }
-            },
-            // {
-            //     title: '点击人数(总/今)',
-            //     dataIndex: 'clickFre',
-            //     key: 'clickFre',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.clickFre}</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '完成人数(总/今)',
-            //     dataIndex: 'fulfilNumPeo',
-            //     key: 'fulfilNumPeo',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.fulfilNumPeo}</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '完成次数(总/今)',
-            //     dataIndex: 'fulfilFre',
-            //     key: 'fulfilFre',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.fulfilFre}</span>
-            //         </div>
-            //     }
-            // },
-            // {
-            //     title: '活动状态',
-            //     dataIndex: 'id',
-            //     key: 'id',
-            //     align: 'center',
-            //     render: (a: any, b: any) => {
-            //         return <div>
-            //             <span>{b?.linkContext?.act_status}</span>
-            //         </div>
-            //     }
-            // },
-            {
-                title: '启用状态',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div>
-                        <span>{b?.linkContext?.show}</span>
-                    </div>
-                }
-            },
-            {
-                title: '弹窗状态',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div>
-                        <span>{b?.linkContext?.popup}</span>
-                    </div>
-                }
-            },
-            {
-                title: '弹窗位置',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div>
-                        <span>{b?.linkContext?.popup_site}</span>
-                    </div>
-                }
-            },
-        ],
-        '阳光累计充值活动': isOk ? [
-            {
-                title: '活动名称',
-                dataIndex: 'activity_name',
-                key: 'activity_name',
-                align: 'center'
-            },
-            {
-                title: '第一阶段目标(单位元)',
-                dataIndex: 'first_stage_target',
-                key: 'first_stage_target',
-                align: 'center'
-            },
-            {
-                title: '第一阶段奖励(单位书币)',
-                dataIndex: 'first_stage_reward',
-                key: 'first_stage_reward',
-                align: 'center'
-            },
-            {
-                title: '第二阶段目标(单位元)',
-                dataIndex: 'second_stage_target',
-                key: 'second_stage_target',
-                align: 'center'
-            },
-            {
-                title: '第二阶段奖励(单位书币)',
-                dataIndex: 'second_stage_reward',
-                key: 'idsecond_stage_reward',
-                align: 'center'
-            },
-            {
-                title: '第三阶段目标(单位元)',
-                dataIndex: 'third_stage_target',
-                key: 'third_stage_target',
-                align: 'center'
-            },
-            {
-                title: '第三阶段奖励(单位书币)',
-                dataIndex: 'third_stage_reward',
-                key: 'third_stage_reward',
-                align: 'center'
-            },
-            {
-                title: '状态',
-                dataIndex: 'state',
-                key: 'state',
-                align: 'center'
-            },
-            {
-                title: '活动开始时间',
-                dataIndex: 'start_time',
-                key: 'start_time',
-                align: 'center'
-            },
-            {
-                title: '活动结束时间',
-                dataIndex: 'end_time',
-                key: 'end_time',
-                align: 'center'
-            },
-        ] : [
-                {
-                    title: '创建状态',
-                    dataIndex: 'createStatus',
-                    key: 'createStatus',
-                    align: 'center',
-                    render: (a: number, b: any) => {
-                        return <div className={style.flex}>
-                            <span>{Statept[a]}</span>
-                            <span>{b?.resultMsg}</span>
-                        </div>
-                    }
-                },
-                {
-                    title: '创建时间',
-                    dataIndex: 'createTime',
-                    key: 'createTime',
-                    align: 'center'
-                }
-            ],
-        '文鼎常用链接': isOk ? [
-            {
-                title: '链接标题',
-                dataIndex: 'name',
-                key: 'name',
-                align: 'center'
-            },
-            {
-                title: '链接名称',
-                dataIndex: 'activity_name',
-                key: 'activity_name',
-                align: 'center'
-            },
-            {
-                title: '链接类型',
-                dataIndex: 'spread_type',
-                key: 'spread_type',
-                align: 'center'
-            },
-            {
-                title: '链接地址',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string) => {
-                    return <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-                }
-            },
-        ] : [
-                {
-                    title: '创建状态',
-                    dataIndex: 'createStatus',
-                    key: 'createStatus',
-                    align: 'center',
-                    render: (a: number, b: any) => {
-                        return <div className={style.flex}>
-                            <span>{Statept[a]}</span>
-                            <span>{b?.resultMsg}</span>
-                        </div>
-                    }
-                },
-                {
-                    title: '创建时间',
-                    dataIndex: 'createTime',
-                    key: 'createTime',
-                    align: 'center'
-                }
-            ],
-        '文鼎平台活动': isOk ? [
-            {
-                title: '链接标题',
-                dataIndex: 'name',
-                key: 'name',
-                align: 'center'
-            },
-            {
-                title: '链接名称',
-                dataIndex: 'activity_name',
-                key: 'activity_name',
-                align: 'center'
-            },
-            {
-                title: '链接类型',
-                dataIndex: 'spread_type',
-                key: 'spread_type',
-                align: 'center'
-            },
-            {
-                title: '链接地址',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string) => {
-                    return <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-                }
-            },
-        ] : [
-                {
-                    title: '创建状态',
-                    dataIndex: 'createStatus',
-                    key: 'createStatus',
-                    align: 'center',
-                    render: (a: number, b: any) => {
-                        return <div className={style.flex}>
-                            <span>{Statept[a]}</span>
-                            <span>{b?.resultMsg}</span>
-                        </div>
-                    }
-                },
-                {
-                    title: '创建时间',
-                    dataIndex: 'createTime',
-                    key: 'createTime',
-                    align: 'center'
-                }
-            ],
-        '文鼎自定义活动': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '活动标题',
-                dataIndex: 'activity_title',
-                key: 'activity_title',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.activity_title}</span>
-                        <span>活动时间:{b?.linkContext?.start_at}-{b?.linkContext?.end_at}</span>
-                    </div>
-
-                }
-            },
-            {
-                title: '活动名称',
-                dataIndex: 'activity_name',
-                key: 'activity_name',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.activity_name}</span>
-                    </div>
-
-                }
-            },
-            {
-                title: '活动链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string) => {
-                    return a ? <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span> : '空'
-                }
-            },
-            {
-                title: '活动金额',
-                dataIndex: 'activity_sum',
-                key: 'activity_sum',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.activity_sum
-                }
-            },
-            {
-                title: '活动位置',
-                dataIndex: 'activity_site',
-                key: 'activity_site',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.activity_site
-                }
-            },
-            {
-                title: '活动图片',
-                dataIndex: 'activity_image',
-                key: 'activity_image',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.activity_image
-                }
-            },
-            {
-                title: '目标用户',
-                dataIndex: 'userConfig',
-                key: 'userConfig',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.userConfig
-                }
-            },
-            {
-                title: '注册开始/结束时间',
-                dataIndex: 'tag_create_end_at',
-                key: 'tag_create_end_at',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.tag_create_start_at ? b?.linkContext?.tag_create_start_at + '~' + b?.linkContext?.tag_create_end_at : '不限'
-                }
-            },
-            {
-                title: '是否是包年用户',
-                dataIndex: 'tag_is_vip',
-                key: 'tag_is_vip',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.tag_is_vip ? b?.linkContext?.tag_is_vip === '1' ? '是' : '否' : '不限'
-                }
-            },
-            {
-                title: '充值类型',
-                dataIndex: 'tag_pay_type',
-                key: 'tag_pay_type',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return b?.linkContext?.tag_pay_type ? b?.linkContext?.tag_pay_type : '不限'
-                }
-            },
-        ],
-        '文鼎推广链接': [
-            {
-                title: 'ID',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '创建时间',
-                dataIndex: 'createTime',
-                key: 'createTime',
-                align: 'center'
-            },
-            {
-                title: '标题/链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.spread_name}</span>
-                        {a ? <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span> : '空'}
-                    </div>
-                }
-            },
-            {
-                title: '入口',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.book}</span>
-                        <span>第{b?.linkContext?.section}章</span>
-                    </div>
-                }
-            },
-            {
-                title: '二维码展示',
-                dataIndex: 'qecode_show',
-                key: 'qecode_show',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.qecode_show}</span>
-                    </div>
-                }
-            },
-            {
-                title: '关注类型',
-                dataIndex: 'follow_type',
-                key: 'follow_type',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.follow_type}</span>
-                    </div>
-                }
-            },
-        ],
-        '文鼎赠币活动': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '活动名称/时间',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.activity_name}</span>
-                        <span>活动时间:{b?.linkContext?.start_at}-{b?.linkContext?.end_at}</span>
-                    </div>
-
-                }
-            },
-            {
-                title: '活动金额',
-                dataIndex: 'activity_sum',
-                key: 'activity_sum',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <span>{b?.linkContext?.activity_sum}</span>
-                }
-            },
-            {
-                title: '活动链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string) => {
-                    return <span>{a}{a && <CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} />}</span>
-                }
-            },
-
-        ],
-        '掌中云常用链接': isOk ? [
-            {
-                title: '入口',
-                dataIndex: 'pageTypeId',
-                key: 'pageTypeId',
-                align: 'center',
-                render: (a: any) => {
-                    return <span>{a && pageTypeIds[a]}</span>
-                }
-            },
-            {
-                title: '类型',
-                dataIndex: 'spreadType',
-                key: 'spreadType',
-                align: 'center'
-            },
-            {
-                title: '备注',
-                dataIndex: 'remark',
-                key: 'remark',
-                align: 'center'
-            },
-            {
-                title: '链接地址',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string) => {
-                    return <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-                }
-            },
-        ] : [
-                {
-                    title: '创建状态',
-                    dataIndex: 'createStatus',
-                    key: 'createStatus',
-                    align: 'center',
-                    render: (a: number, b: any) => {
-                        return <div className={style.flex}>
-                            <span>{Statept[a]}</span>
-                            <span>{b?.resultMsg}</span>
-                        </div>
-                    }
-                },
-                {
-                    title: '创建时间',
-                    dataIndex: 'createTime',
-                    key: 'createTime',
-                    align: 'center'
-                }
-            ],
-        '掌中云平台活动': isOk ? [
-            {
-                title: '活动名称',
-                dataIndex: 'name',
-                key: 'name',
-                align: 'center'
-            },
-            {
-                title: '活动时间',
-                dataIndex: 'time',
-                key: 'time',
-                align: 'center'
-            },
-            {
-                title: '充值金额',
-                dataIndex: 'sum',
-                key: 'sum',
-                align: 'center'
-            },
-            {
-                title: '活动链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string, b: any) => {
-                    return <div>
-                        <div>{b?.linkText}</div>
-                        <div><span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span></div>
-                    </div>
-                }
-            },
-            {
-                title: '今日充值',
-                dataIndex: 'today_sum',
-                key: 'today_sum',
-                align: 'center'
-            },
-            {
-                title: '今日订单',
-                dataIndex: 'today_order',
-                key: 'today_order',
-                align: 'center'
-            },
-            {
-                title: '历史充值 (不含当日)',
-                dataIndex: 'old_sum',
-                key: 'old_sum',
-                align: 'center'
-            },
-            {
-                title: '历史订单 (不含当日)',
-                dataIndex: 'old_order',
-                key: 'old_order',
-                align: 'center'
-            },
-        ] : [
-                {
-                    title: '创建状态',
-                    dataIndex: 'createStatus',
-                    key: 'createStatus',
-                    align: 'center',
-                    render: (a: number, b: any) => {
-                        return <div className={style.flex}>
-                            <span>{Statept[a]}</span>
-                            <span>{b?.resultMsg}</span>
-                        </div>
-                    }
-                },
-                {
-                    title: '创建时间',
-                    dataIndex: 'createTime',
-                    key: 'createTime',
-                    align: 'center'
-                }
-            ],
-        '掌中云推广链接': [
-            {
-                title: 'ID',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '创建时间',
-                dataIndex: 'createTime',
-                key: 'createTime',
-                align: 'center'
-            },
-            {
-                title: '标题/链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.spread_name}</span>
-                        <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-                    </div>
-                }
-            },
-            {
-                title: '入口',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.book}</span>
-                        <span>{b?.linkContext?.section}</span>
-                        {/* <span>关注章节:{b?.linkContext?.spread_cost}</span> */}
-                    </div>
-                }
-            },
-            {
-                title: '备注',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center',
-                render: (a: any, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{b?.linkContext?.description}</span>
-                    </div>
-                }
-            }
-        ],
-        '掌中云自定义活动': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                width: 100,
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '活动链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string) => {
-                    return <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-                }
-            },
-            {
-                title: '推广内推|外推',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.publish_type === 1 ? '内推' : '外推'
-                }
-            },
-            {
-                title: '活动名称',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_name
-                }
-            },
-            {
-                title: '开始时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.start_time
-                }
-            },
-            {
-                title: '结束时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.end_time
-                }
-            },
-            {
-                title: '弹窗开始时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_start_time
-                }
-            },
-            {
-                title: '弹窗结束时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_end_time
-                }
-            },
-            {
-                title: '活动金额',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_amount
-                }
-            },
-            {
-                title: '限购次数',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.limit_times
-                }
-            },
-            {
-                title: '促销文案',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.promotion_text
-                }
-            },
-            {
-                title: '用户属性',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.user_type && userType[a?.user_type]
-                }
-            },
-            {
-                title: '启用签到尾部推送',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.sign_push && (a?.sign_push === 0 ? '否' : '是')
-                }
-            },
-            {
-                title: '启用未支付尾部推送',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.unpaid_push && (a?.unpaid_push === 0 ? '否' : '是')
-                }
-            },
-            {
-                title: '启用弹窗海报',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_promotion && (a?.popup_promotion === 0 ? '否' : '是')
-                }
-            },
-            {
-                title: '弹窗启用档位',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_gear
-                }
-            },
-            {
-                title: '弹窗位置',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_location
-                }
-            },
-            {
-                title: '页面弹出频率',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.popup_frequency
-                }
-            }
-        ],
-        '掌中云送书卷活动': [
-            {
-                title: '创建状态',
-                dataIndex: 'createStatus',
-                key: 'createStatus',
-                align: 'center',
-                width: 100,
-                render: (a: number, b: any) => {
-                    return <div className={style.flex}>
-                        <span>{State[a]}</span>
-                        <span>{b?.resultMsg}</span>
-                    </div>
-                }
-            },
-            {
-                title: '活动链接',
-                dataIndex: 'link',
-                key: 'link',
-                align: 'center',
-                render: (a: string) => {
-                    return <span>{a}<CopyOutlined onClick={() => { copy(a) }} style={{ color: '#1890ff' }} /></span>
-                }
-            },
-            {
-                title: '活动名称',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.activity_name
-                }
-            },
-            {
-                title: '开始时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.start_time
-                }
-            },
-            {
-                title: '结束时间',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.end_time
-                }
-            },
-            {
-                title: '赠送书券',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.book_voucher
-                }
-            },
-            {
-                title: '书券有效期',
-                dataIndex: 'linkContext',
-                key: 'linkContext',
-                align: 'center',
-                render: (a: any) => {
-                    return a?.valid_minutes && (a?.valid_minutes === 4320 ? '3天' : '30天')
-                }
-            },
-        ],
-    }
-    return arr[name]
-}
-export default columns

+ 0 - 110
src/pages/operatePage/books/book/formConfig.tsx

@@ -1,110 +0,0 @@
-import { FormConfig } from '@/components/Formitem/type'
-let formConfig = (platform: any[], bookify: any[], access: any): FormConfig[] => {
-    let arr:any = [
-        {
-            label: '书名',
-            tag: 'input',
-            name: 'bookName',
-            change: true,
-            required: true,
-        },
-        {
-            label: '作者',
-            tag: 'input',
-            name: 'author',
-            change: true,
-            required: false,
-        },
-        {
-            label: '主角',
-            tag: 'input',
-            name: 'protagonist',
-            change: true,
-            required: false,
-        },
-        {
-            label: '平台',
-            tag: 'select',
-            name: 'platformId',
-            children: platform,
-            change: true,
-            required: true,
-        },
-        {
-            label: '状态',
-            tag: 'input',
-            name: 'status',
-            change: true,
-            defaultValue: "排期",
-            required: true,
-        },
-        {
-            label: '分类',
-            tag: 'select',
-            name: 'typeId',
-            children: bookify,
-            change: true,
-            required: false,
-        },
-        {
-            label: '频道',
-            tag: 'select',
-            name: 'channel',
-            children: [{ value: '男频', text: '男频' }, { value: '女频', text: '女频' },],
-            change: true,
-            required: false,
-        },
-        {
-            label: '来源',
-            tag: 'input',
-            name: 'source',
-            change: true,
-            required: false,
-        },
-        {
-            label: '字数(万字)',
-            tag: 'inputNumber',
-            name: 'wordCount',
-            change: true,
-            required: false,
-        },
-        // {
-        //     label: '卡点',
-        //     tag: 'inputNumber',
-        //     name: 'nodePrice',
-        //     change: true,
-        //     required: false
-        // },
-        // {
-        //     label: '倍率',
-        //     tag: 'inputNumber',
-        //     name: 'ratio',
-        //     change: true,
-        //     required: false
-        // },
-        {
-            label: '备注',
-            tag: 'TextArea',
-            name: 'remark',
-            change: true,
-            width: 400,
-            placeholder: '请输入不少于十个字的备注',
-            required: false,
-            rows: 2,
-            Rule: { min: 10, type: 'string' }
-        },
-    ]
-    return access['修改小说'] ? arr : [{
-        label: '备注',
-        tag: 'TextArea',
-        name: 'remark',
-        change: true,
-        width: 400,
-        placeholder: '请输入不少于十个字的备注',
-        required: false,
-        rows: 4,
-        Rule: { min: 10, type: 'string' }
-    }]
-}
-
-export default formConfig

+ 0 - 58
src/pages/operatePage/books/book/formConfigRoi.tsx

@@ -1,58 +0,0 @@
-import { FormConfig } from '@/components/Formitem/type'
-let formConfig = (bookify: any): FormConfig[] => [
-    {
-        label: '书名',
-        tag: 'select',
-        name: 'bookId',
-        children: bookify,
-        change: true,
-        required: true,
-        disabled: true
-    },
-    {
-        label: '卡点(首日ROI)',
-        tag: 'inputNumber',
-        name: 'nodePrice',
-        change: true,
-        required: true,
-        formatter: value => `${value}%`,
-        parser: value => value.replace('%', ''),
-        tagProps: {min: 1.00, max: 99.99, },
-        Rule: {pattern: /[0-9]+/}
-    },
-    // {
-    //     label: '倍率',
-    //     tag: 'inputNumber',
-    //     name: 'ratio',
-    //     change: true,
-    //     required: true,
-    //     tagProps: {min: 2, max: 40},
-    //     Rule: {pattern: /[0-9]+/}
-    // },
-    {
-        label: '投放渠道',
-        tag: 'select',
-        name: 'type',
-        children: [{text: "mp", value: "mp"}, {text: "gdt", value: "gdt"}, {text: "企业微信", value: "corp"}, {text: "快应用", value: "BYTEDANCE"}],
-        change: true,
-        required: true
-    },
-    {
-        label: '生效时间',
-        tag: 'DatePicker',
-        name: 'effectDay',
-        width: 250,
-        change: true,
-        required: false
-    },
-    {
-        label: '到期时间',
-        tag: 'DatePicker',
-        name: 'overDay',
-        change: true,
-        required: false,
-        defaultValue: ""
-    }
-]
-
-export default formConfig

+ 0 - 54
src/pages/operatePage/books/book/headerConfig.tsx

@@ -1,54 +0,0 @@
-import { PlusOutlined } from "@ant-design/icons"
-import React from "react"
-import { FormConfig } from '@/components/Formitem/type'
-
-let config = (fnc: () => void, seek: (bookName: string) => void, seekType: (typeId: string) => void, seekPlatform: (platformId: string) => void, platform: any[], access: any, bookify: any[], handleTypeId: (id: number) => void): FormConfig[] => {
-    let arr: any = [
-        {
-            label: '书名',
-            tag: 'inputSearch',
-            name: 'bookName',
-            children: [{ value: '1', text: '全部分组' }],
-            change: true,
-            width: 200,
-            callback: seek
-        },
-        {
-            label: '状态',
-            tag: 'inputSearch',
-            name: 'status',
-            change: true,
-            width: 200,
-            callback: seekType
-        },
-        {
-            label: '平台',
-            tag: 'select',
-            name: 'platformId',
-            children: platform,
-            change: true,
-            width: 200,
-            callback: seekPlatform
-        },
-        {
-            label: '分类',
-            tag: 'select',
-            name: 'typeId',
-            children: bookify,
-            change: true,
-            width: 200,
-            callback: handleTypeId
-        },
-    ]
-    return access['新增小说'] ? [...arr, {
-        label: '添加书籍',
-        icon: <PlusOutlined />,
-        tag: 'button',
-        htmlType: 'button',
-        btnType: 'primary',
-        name: 'zx',
-        callback: fnc,
-    }] : arr
-}
-
-export default config

+ 0 - 423
src/pages/operatePage/books/book/index.tsx

@@ -1,423 +0,0 @@
-import React, { useCallback, useEffect, useState } from 'react'
-import Tables from '@/components/Tables'
-import HeaderForm from '@/components/Formitem'
-import { Card, Modal, message, Button, Space, Upload, Drawer } from 'antd'
-import columns from './tableConfig'
-import columnsRoi from './tableConfigRoi'
-import config from './headerConfig'
-import formConfig from './formConfig'
-import formConfigRoi from './formConfigRoi'
-import { addWorks, deleteWorks, editWorks, editbookParams, getBookList, allBook, setConfigTypeApi, getBooktypeList, setChannelApi, importExcle, downLoadTem, exportExcle, bookRatioList, getBookAll, addRatio, deleteRatio } from '@/services/operating/book'
-import { useAjax } from '@/Hook/useAjax'
-import { DownloadOutlined, FormOutlined, UploadOutlined } from '@ant-design/icons'
-import { RcCustomRequestOptions } from 'antd/lib/upload/interface'
-import { useAccess } from 'umi'
-
-const Book: React.FC = () => {
-    const [queryFrom, setQueryFrom] = useState<{ bookName?: string, status?: string, platformId?: string, typeId?: number | string, pageNum: number, pageSize: number }>({ pageNum: 1, pageSize: 20 })
-    const [visible, setVisible] = useState(false)//弹窗
-    const [visibleRoi, setVisibleRoi] = useState(false)// 新增or修改ROI弹窗
-    const [roiVisible, setRoiVisible] = useState(false)//书籍卡点roi
-    const [title, setTitle] = useState<string>('')//model标题
-    const [platform, setPlatform] = useState<any[]>([])//平台信息
-    const [bookify, setBookify] = useState<any[]>([])//分类信息
-    const [book, setBook] = useState<any[]>([])//所有书
-    const [defaultProps, setDefaultProps] = useState<editbookParams | {}>({})//默认值
-    const [defaultRoiProps, setDefaultRoiProps] = useState<{ bookId: number, nodePrice: number, effectDay: string, overDay: string, type: string } | {}>({
-        bookId: undefined,
-        nodePrice: undefined,
-        effectDay: undefined,
-        overDay: undefined,
-        type: undefined
-    })//默认值
-    const [submit, setSubmit] = useState<() => Promise<any>>()//存放formsubmit
-    const callack = useCallback((fnc: () => Promise<any>) => { setSubmit(fnc) }, [])//form回调映射submit
-    const [btnLoding, setBtnLoding] = useState<boolean>(false)//按钮loding
-    const [btnRoiLoding, setBtnRoiLoding] = useState<boolean>(false)//按钮loding
-    const [btnUploadLoding, setBtnUploadLoding] = useState<boolean>(false)//按钮loding
-    const addWorksUse = useAjax((params: any) => addWorks(params))//添加请求
-    const delData = useAjax((id: number) => deleteWorks(id))//删除请求
-    const delDataRoi = useAjax((id: number) => deleteRatio(id))//删除请求
-    const editData = useAjax((params: any) => editWorks(params))//编辑请求
-    const getBookData = useAjax((params: { bookName?: string, status?: string, platformId?: string, pageNum: number, pageSize: number }) => getBookList(params))//搜索列表
-    const allBookUse = useAjax(() => allBook())//添加请求
-    const getBookify = useAjax(() => getBooktypeList())//搜索列表
-    const setChannel = useAjax((params: { bookId: number, channel: string | null }) => setChannelApi(params))//搜索列表
-    const setConfigType = useAjax((params: { bookId: number, typeId: number | null }) => setConfigTypeApi(params))//搜索列表
-    const excleImport = useAjax((data: FormDataEntryValue) => importExcle(data), { msgNmae: "导入" })//搜索列表
-    const excleExport = useAjax((data: any) => exportExcle(data), { formatResult: true })//导出
-    const temDownLoad = useAjax(() => downLoadTem(), { formatResult: true })//模板下载
-    const getBookRatioList = useAjax((params: { bookId?: number, pageNum: number, pageSize: number }) => bookRatioList(params))//ROI列表
-    const [roiQueryFrom, setRoiQueryFrom] = useState<{ bookId?: number, pageNum: number, pageSize: number }>({ bookId: undefined, pageNum: 1, pageSize: 20 }) // ROI列表参数
-    const [ratioData, setRatioData] = useState<any[]>([])//ROI数据
-    const [ratio, setRatio] = useState<any>({})//ROI第一条数据数据
-    const allBookData = useAjax(() => getBookAll())//添加请求
-    const addRatioData = useAjax((params: { bookId: number, nodePrice: number, effectDay: string, overDay: string, type: string }) => addRatio(params))//添加请求
-    const access = useAccess()
-    /**显示 */
-    let showModal = useCallback(() => {
-        setTitle('添加')//设置标题
-        setVisible(true)//开启弹窗
-    }, [])
-    /**隐藏 */
-    let hideModal = useCallback(() => {
-        setDefaultProps({})//清空默认值
-        setTitle('')//清空标题
-        setVisible(false)//关闭弹窗
-    }, [])
-    /**ROI修改or新增显示 */
-    let showRoiModal = useCallback(() => {
-        setVisibleRoi(true)//开启弹窗
-    }, [])
-    /**ROI修改or新增隐藏 */
-    let hideRoiModal = useCallback(() => {
-        setDefaultRoiProps({
-            bookId: undefined,
-            nodePrice: undefined,
-            // ratio: undefined,
-            effectDay: undefined,
-            overDay: undefined,
-            type: undefined
-        })//清空默认值
-        setVisibleRoi(false)//关闭弹窗
-    }, [])
-    /**ROI显示 */
-    let showDrawer = useCallback((bookId: number) => {
-        setRatioData([])
-        setRoiQueryFrom({ ...roiQueryFrom, bookId })
-        setDefaultRoiProps({ ...defaultRoiProps, bookId: bookId })
-        setRoiVisible(true)//开启弹窗
-    }, [])
-    /**ROI隐藏 */
-    let hideDrawer = useCallback(() => {
-        setRoiVisible(false)
-    }, [])
-    /** 时间格式化 */
-    let formatDate = (cellValue: any) => {
-        if (cellValue == null || cellValue == "") return "";
-        var date = new Date(cellValue)
-        var year = date.getFullYear()
-        var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
-        var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
-        var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
-        var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
-        var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
-        return year + '' + month + '' + day + '' + hours + '' + minutes + '' + seconds
-    }
-    let downloadFile = (data: any, type: any, fileName: string) => {
-        let blob = new Blob([data], { type: `application/${type};charset=utf-8` });
-        let downloadElement = document.createElement('a');
-        let href = window.URL.createObjectURL(blob);
-        downloadElement.href = href;
-        downloadElement.download = fileName;
-        document.body.appendChild(downloadElement);
-        downloadElement.click();
-        document.body.removeChild(downloadElement);
-        window.URL.revokeObjectURL(href);
-    }
-    /** 导出 */
-    let excleExportHandle = useCallback(() => {
-        exportExcle(queryFrom).then(res=>{
-            downloadFile(res, 'octet-stream', formatDate(new Date()) + ".xlsx")
-        })
-    }, [queryFrom])
-    /** 模板下载 */
-    let downloadtem = useCallback(async () => {
-        downLoadTem().then(res=>{
-            downloadFile(res, 'octet-stream', formatDate(new Date()) + ".xlsx")
-        })
-    }, [])
-    /**头部搜索 */
-    let headerSeek = useCallback((bookName: string) => {
-        if (bookName) {
-            setQueryFrom({ ...queryFrom, bookName, pageNum: 1 })
-        } else {
-            setQueryFrom({ ...queryFrom, bookName: "", pageNum: 1 })
-        }
-    }, [queryFrom])
-    let headerSeekType = useCallback((status: string) => {
-        if (status) { // status
-            setQueryFrom({ ...queryFrom, status, pageNum: 1 })
-        } else {
-            let data = { ...queryFrom }
-            delete data.status
-            setQueryFrom({ ...queryFrom, pageNum: 1 })
-        }
-    }, [queryFrom])
-    let headerPlatform = useCallback((platformId: string) => {
-        if (platformId) {
-            setQueryFrom({ ...queryFrom, platformId, pageNum: 1 })
-        } else {
-            setQueryFrom({ ...queryFrom, platformId: "", pageNum: 1 })
-        }
-    }, [queryFrom])
-    let handleTypeId = useCallback((id: number) => {
-        setQueryFrom({ ...queryFrom, typeId: id ? id : "", pageNum: 1 })
-    }, [queryFrom])
-    /**新增请求 */
-    let handleOk = useCallback(() => {
-        (submit as () => Promise<any>)().then(res => {
-            if (res) {
-                setBtnLoding(true);
-                let id = (defaultProps as editbookParams).id
-                if (id) {
-                    let def = (defaultProps as editbookParams)
-                    let query = {
-                        id,
-                        platformId: def?.platformId,
-                        status: def?.status,
-                        author: def?.author ? def?.author : "",
-                        bookName: def?.bookName ? def.bookName : "",
-                        protagonist: def.protagonist ? def.protagonist : "",
-                        typeId: def.typeId ? def.typeId : "",
-                        channel: def.channel ? def.channel : "",
-                        wordCount: def.wordCount ? def.wordCount : "",
-                        source: def.source ? def.source : "",
-                        nodePrice: def.nodePrice ? def.nodePrice : "",
-                        ratio: def.ratio ? def.ratio : "",
-                        remark: def.remark ? def.remark : ""
-                    }
-                    editData.run({ ...query, ...res }).then(r => {
-                        setBtnLoding(false)
-                        getBookData.run(queryFrom)
-                        hideModal()
-                        message.success('编辑成功', 2)
-                    })
-                } else {
-                    addWorksUse.run(res).then(res => {
-                        setBtnLoding(false)
-                        getBookData.run(queryFrom)
-                        hideModal()
-                        message.success('添加成功', 2)
-                    })
-                }
-            }
-
-        })
-    }, [submit])
-
-    let handleRoiOk = useCallback(() => {
-        (submit as () => Promise<any>)().then(res => {
-            if (res) {
-                let { nodePrice } = res
-                setBtnRoiLoding(true)
-                addRatioData.run({ ...res, nodePrice: nodePrice }).then(res => {
-                    setBtnRoiLoding(false)
-                    getBookData.run(queryFrom)
-                    setRoiQueryFrom({ ...roiQueryFrom, pageNum: 1, pageSize: 20 })
-                    hideRoiModal()
-                    message.success('添加编辑成功', 2)
-                })
-            }
-        })
-    }, [submit])
-
-    /**编辑 */
-    let edit = useCallback((props: { id: number, platformName: string, remark: string }) => {
-        setDefaultProps(props)
-        setTitle('编辑')
-        setVisible(true)
-    }, [title, defaultProps, visible])
-    /** roi编辑/修改 */
-    let editRoi = useCallback(() => {
-        if (Object.keys(ratio).length > 0) {
-            let { nodePrice } = ratio
-            setDefaultRoiProps({ ...ratio, nodePrice: nodePrice ? Number(nodePrice) : undefined })
-        } else {
-            setDefaultRoiProps({ ...defaultRoiProps, effectDay: new Date })
-        }
-        showRoiModal()
-    }, [defaultRoiProps, ratio])
-    /**删除 */
-    let delRoi = useCallback((id: number) => {
-        delDataRoi.run(id).then(res => {
-            if (res) {
-                getBookData.run(queryFrom)
-                setRoiQueryFrom({ ...roiQueryFrom, pageNum: 1, pageSize: 20 })
-                message.success('删除成功', 2)
-            }
-        })
-    }, [roiQueryFrom])
-    /**删除 */
-    let del = useCallback((id: number) => {
-        delData.run(id).then(res => {
-            if (res) {
-                getBookData.run(queryFrom)
-                message.success('删除成功', 2)
-            }
-        })
-    }, [])
-
-    /**分页 */
-    let pageChange = useCallback((page: string | number, pageSize?: string | number) => {
-        let query = { pageNum: page as number, pageSize: pageSize as number }
-        setQueryFrom({ ...queryFrom, ...query })
-        // getBookData.run({ ...queryFrom, ...query })
-    }, [queryFrom])
-    /**ROI分页 */
-    let pageRoiChange = useCallback((page: string | number, pageSize?: string | number) => {
-        let query = { pageNum: page as string, pageSize: pageSize as string }
-        getBookRatioList.run({ ...roiQueryFrom, ...query }).then(res => {
-            let records = res?.records.map((item: any, index: number) => {
-                if (page == 1 && index === 0) {
-                    setRatio(item)
-                    item.index = "ok"
-                } else {
-                    item.index = "no"
-                }
-                return item
-            })
-            setRatioData(records)
-        })
-    }, [ratio, ratioData])
-    //副作用执行
-    useEffect(() => {
-        allBookUse.run().then(res => {
-            res = res?.map((item: any) => {
-                item.value = item.id + ""
-                item.text = item.platformName
-                return item
-            })
-            setPlatform(res)
-        })
-        getBookify.run().then(res => {
-            res = res?.map((item: any) => {
-                item.value = item.id + ""
-                item.text = item.name
-                return item
-            })
-            setBookify(res)
-        })
-        allBookData.run().then(res => {
-            res = res?.map((item: any) => {
-                item.value = item.id
-                item.text = item.bookName
-                return item
-            })
-            setBook(res)
-        })
-    }, [])
-    useEffect(() => {
-        if ('bookId' in roiQueryFrom && roiQueryFrom?.bookId) {
-            getBookRatioList.run(roiQueryFrom).then(res => {
-                setRatio({})
-                let { pageNum } = roiQueryFrom
-                let records = res?.records.map((item: any, index: number) => {
-                    if (pageNum === 1 && index === 0) {
-                        setRatio(item)
-                        item.index = "ok"
-                    } else {
-                        item.index = "no"
-                    }
-                    return item
-                })
-                setRatioData(records)
-            })
-        }
-    }, [roiQueryFrom])
-    useEffect(() => {
-        getBookData.run(queryFrom)
-    }, [queryFrom])
-
-
-    const setData = (bookId: number, value: any, type: '1' | "2") => {
-        if (type === '1') {
-            setChannel.run({ bookId, channel: value }).then(res => {
-                getBookData.refresh()
-            })
-        } else {
-            setConfigType.run({ bookId, typeId: value }).then(res => {
-                getBookData.refresh()
-            })
-        }
-    }
-
-    return <Card>
-        <HeaderForm formConfig={config(showModal, headerSeek, headerSeekType, headerPlatform, platform, access, bookify, handleTypeId)} flow='row' />
-        <Space style={{ marginBottom: "10px" }}>
-            <Button type='primary' onClick={downloadtem}>模板下载</Button>
-            {access['小说导入'] && <Upload
-                accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
-                action=""
-                listType="text"
-                onChange={() => { }}
-                multiple={true}
-                showUploadList={false}
-                customRequest={(options: RcCustomRequestOptions) => {
-                    setBtnUploadLoding(true)
-                    let formData = new FormData();
-                    formData.append("file", options.file);
-                    excleImport.run(formData).then(res => {
-                        getBookData.run(queryFrom)
-                        setBtnUploadLoding(false)
-                    }).catch(() => {
-                        setBtnUploadLoding(false)
-                    })
-                }}
-            ><Button type='primary' icon={<UploadOutlined />} loading={btnUploadLoding} >导入</Button></Upload>}
-            <Button type='primary' onClick={excleExportHandle}><DownloadOutlined />导出</Button>
-        </Space>
-
-        <Tables
-            columns={columns(edit, del, showDrawer, access, setData, bookify)}
-            dataSource={getBookData?.data?.records}
-            total={getBookData?.data?.total}
-            pageChange={pageChange}
-            sizeChange={pageChange}
-            size="small"
-            bordered
-            loading={getBookData?.loading}
-        />
-        <Modal
-            title={`${title}书籍`}
-            visible={visible}
-            okText="确认"
-            cancelText="取消"
-            onCancel={hideModal}
-            onOk={handleOk}
-            confirmLoading={btnLoding}
-            destroyOnClose={true}
-            width={550}
-        >
-            <HeaderForm formConfig={formConfig(platform, bookify, access)} flow='row' getFormSubmit={callack} defaultProps={defaultProps} labelCol={{ span: 24 }} ew />
-        </Modal>
-        <Drawer
-            title="书籍卡点管理"
-            placement="right"
-            closable={false}
-            onClose={hideDrawer}
-            visible={roiVisible}
-            width={700}
-        >
-            <div>
-                <Button type='primary' onClick={editRoi} style={{ marginBottom: '10px' }}><FormOutlined />新增/编辑</Button>
-                <Tables
-                    columns={columnsRoi(delRoi)}
-                    dataSource={ratioData}
-                    total={getBookRatioList?.data?.total}
-                    pageChange={pageRoiChange}
-                    sizeChange={pageRoiChange}
-                    size="small"
-                    bordered
-                    loading={getBookRatioList?.loading}
-                />
-            </div>
-        </Drawer>
-
-        <Modal
-            title="新增/编辑书籍卡点"
-            visible={visibleRoi}
-            okText="确认"
-            cancelText="取消"
-            onCancel={hideRoiModal}
-            onOk={handleRoiOk}
-            confirmLoading={btnRoiLoding}
-            destroyOnClose={true}
-            width={350}
-        >
-            <HeaderForm formConfig={formConfigRoi(book)} flow='row' getFormSubmit={callack} defaultProps={defaultRoiProps} labelCol={{ span: 24 }} ew />
-        </Modal>
-    </Card>
-}
-
-export default Book

+ 0 - 47
src/pages/operatePage/books/book/table.less

@@ -1,47 +0,0 @@
-.ant-table-thead {
-  .table_warning {
-    color: #fa8c16 !important;
-    background-color: #fff !important;
-  }
-  .table_success {
-    color: #52c41a !important;
-    background-color: #fff !important;
-  }
-  .table_processing {
-    color: #409EFF !important;
-    // background-color: #fff !important;
-  }
-  .table_error {
-    color: #f5222d !important;
-    background-color: #fff !important;
-  }
-}
-.singleBackColor {
-  background: #fbfff6;
-}
-.doubleBackColor {
-  background-color: #f2f2ff;
-}
-.file {
-  position: relative;
-  cursor: pointer;
-  > input {
-    opacity: 0;
-    position: absolute;
-    display: block;
-    top: 0;
-    left: 0;
-    cursor: pointer;
-    right: 0;
-    bottom: 0;
-    width: 100%;
-    font-size: 0;
-    > span {
-      display: none;
-    }
-  }
-}
-.deleteLine{
-  // text-decoration: line-through;
-  // color: rgb(153, 153, 153);
-}

+ 0 - 184
src/pages/operatePage/books/book/tableConfig.tsx

@@ -1,184 +0,0 @@
-import React from "react"
-import { Row, Col, Popconfirm, Badge, Select } from "antd"
-import { DeleteOutlined, FormOutlined } from "@ant-design/icons"
-let columns = (edit: (value: any) => void, del: (id: number) => void, showDrawer: (bookId: number) => void, access: any, setData: (bookId: number, value: any, type: '1' | "2") => void, bookify: any[]) => [
-    {
-        title: '书名',
-        dataIndex: 'bookName',
-        key: 'bookName',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{ fontSize: "12px" }}>{a}</span>
-        }
-    },
-    {
-        title: '作者',
-        dataIndex: 'author',
-        key: 'author',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{ fontSize: "12px" }}>{a || "<空>"}</span>
-        }
-    },
-    {
-        title: '主角',
-        dataIndex: 'protagonist',
-        key: 'protagonist',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{ fontSize: "12px" }}>{a}</span>
-        }
-    },
-    {
-        title: '平台',
-        dataIndex: 'platformInfo',
-        key: 'platformInfo',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <>
-                {
-                    a?.platformName && <span style={{ fontSize: "12px" }}>{a.platformName}</span>
-                }
-            </>
-        }
-    },
-
-
-    {
-        title: '频道',
-        dataIndex: 'channel',
-        key: 'channel',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <Select value={a} style={{ width: 90 }} onChange={(e) => { setData(b?.id, e ? e : null, '1') }} size="small" allowClear placeholder="选择频道">
-                <Select.Option value="男频">男频</Select.Option>
-                <Select.Option value="女频">女频</Select.Option>
-                <Select.Option value="男女通投">男女通投</Select.Option>
-            </Select>
-        }
-    },
-    {
-        title: '分类',
-        dataIndex: 'bookTypeInfo',
-        key: 'bookTypeInfo',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <Select value={a?.id} style={{ width: 100 }} onChange={(e) => { setData(b?.id, e ? e : null, '2') }} size="small" allowClear placeholder="选择分类">
-                {bookify?.map((item: any) => <Select.Option value={item?.id} key={item?.id}>{item?.text}</Select.Option>)}
-            </Select>
-        }
-    },
-    {
-        title: '来源',
-        dataIndex: 'source',
-        key: 'source',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{ fontSize: "12px" }}>{a}</span>
-        }
-    },
-    {
-        title: '字数(万字)',
-        dataIndex: 'wordCount',
-        key: 'wordCount',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <>
-                {
-                    a && <span style={{ fontSize: "12px" }}>{a}万字</span>
-                }
-            </>
-        }
-    },
-    {
-        title: '当前卡点(首日ROI)',
-        dataIndex: 'ratios',
-        key: 'ratios',
-        align: 'center',
-        width: 150,
-        render: (a: any, b: any) => {
-            return <>
-                {
-                    a?.length > 0 && <span style={{ fontSize: "12px" }}>{Number(a[0].nodePrice) + "%"}</span>
-                }
-            </>
-        }
-    },
-    {
-        title: '当前倍率',
-        dataIndex: 'ratios',
-        key: 'ratios',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <>
-                {
-                    a?.length > 0 && <span style={{ fontSize: "12px" }}>{a[0].ratio}</span>
-                }
-            </>
-        }
-    },
-    {
-        title: '当前投放渠道',
-        dataIndex: 'ratios',
-        key: 'ratios',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <>
-                {
-                    a?.length > 0 && <span style={{ fontSize: "12px" }}>{a[0].type === 'corp' ? '企业微信' : a[0].type === 'BYTEDANCE' ? '快应用' : a[0].type}</span>
-                }
-            </>
-        }
-    },
-    {
-        title: '状态',
-        dataIndex: 'status',
-        key: 'status',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{ fontSize: "12px" }}>
-                {
-                    a == '排期' ? <span><Badge color="pink" />排期</span> : a == '测书' ? <span><Badge status="processing" />测书</span> : a == '等数据' ? <span><Badge status="warning" />等数据</span> : a == '投手独家中' ? <span><Badge color="lime" />投手独家中</span> : a == '公司独家中' ? <span><Badge color="volcano" />公司独家中</span> : a == '弃书' ? <span><Badge status="error" />弃书</span> : <span><Badge status="success" />开放可投</span>
-                }
-            </span>
-        }
-    },
-    {
-        title: '备注',
-        dataIndex: 'remark',
-        key: 'remark',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{ fontSize: "12px" }}>{a}</span>
-        }
-    },
-    {
-        title: '操作',
-        dataIndex: 'cz',
-        key: 'cz',
-        align: 'center',
-        width: 200,
-        render: (a: string, b: any) => (
-            <Row justify='center' gutter={[10, 0]}>
-                {
-                    access['书籍卡点'] && <Col><a onClick={() => showDrawer(b.id)} style={{ fontSize: "12px" }}><FormOutlined /> 书籍卡点</a></Col>
-                }
-                <Col><a onClick={() => edit(b)} style={{ fontSize: "12px" }}><FormOutlined /> 编辑</a></Col>
-                {
-                    access['删除书籍'] && <Col>
-                        <Popconfirm
-                            title={`是否要删除?`}
-                            onConfirm={() => del(b.id)}
-                            okText="是"
-                            cancelText="否"
-                        >
-                            <a style={{ color: "red", fontSize: "12px" }}><DeleteOutlined /> 删除</a>
-                        </Popconfirm>
-                    </Col>
-                }
-            </Row>
-        )
-    }
-]
-
-export default columns

+ 0 - 86
src/pages/operatePage/books/book/tableConfigRoi.tsx

@@ -1,86 +0,0 @@
-import { DeleteOutlined } from "@ant-design/icons"
-import { Col, Popconfirm, Row } from "antd"
-import React from "react"
-import style from "./table.less"
-let columns = (del: (id: number) => void) => [
-    {
-        title: '书名',
-        dataIndex: 'bookInfo',
-        key: 'bookInfo',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <>
-                {
-                    a?.bookName && <span style={{fontSize: "12px"}} className={b?.index !== "ok" ? style.deleteLine : ""}>{a.bookName}</span>
-                }
-            </>
-        }
-    },
-    {
-        title: '卡点(首日ROI)',
-        dataIndex: 'nodePrice',
-        key: 'nodePrice',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{fontSize: "12px"}} className={b?.index !== "ok" ? style.deleteLine : ""}>{Number(a) + "%"}</span>
-        }
-    },
-    {
-        title: '倍率',
-        dataIndex: 'ratio',
-        key: 'ratio',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{fontSize: "12px"}} className={b?.index !== "ok" ? style.deleteLine : ""}>{a}</span>
-        }
-    },
-    {
-        title: '投放渠道',
-        dataIndex: 'type',
-        key: 'type',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{fontSize: "12px"}} className={b?.index !== "ok" ? style.deleteLine : ""}>{a === 'corp' ? '企业微信' : a === 'BYTEDANCE' ? '快应用' : a}</span>
-        }
-    },
-    {
-        title: '生效时间',
-        dataIndex: 'effectDay',
-        key: 'effectDay',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{fontSize: "12px"}} className={b?.index !== "ok" ? style.deleteLine : ""}>{a}</span>
-        }
-    },
-    {
-        title: '结束时间',
-        dataIndex: 'overDay',
-        key: 'overDay',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <span style={{fontSize: "12px"}} className={b?.index !== "ok" ? style.deleteLine : ""}>{a}</span>
-        }
-    },
-    {
-        title: '操作',
-        dataIndex: 'cz',
-        key: 'cz',
-        align: 'center',
-        render: (a: string, b: any) => (
-            <Row justify='center' gutter={[10, 0]}>
-                <Col>
-                    <Popconfirm
-                        title={`是否要删除?`}
-                        onConfirm={() => del(b.id)}
-                        okText="是"
-                        cancelText="否"
-                    >
-                        <a style={{color: "red", fontSize: "12px"}}><DeleteOutlined /> 删除</a>
-                    </Popconfirm>
-                </Col>
-            </Row>
-        )
-    }
-]
-
-export default columns

+ 0 - 44
src/pages/operatePage/books/bookcity/formConfig.tsx

@@ -1,44 +0,0 @@
-import { FormConfig } from '@/components/Formitem/type'
-let formConfig: FormConfig[] = [
-    {
-        label: '平台名称',
-        tag: 'input',
-        name: 'platformName',
-        change: true,
-        required: true
-    },
-    {
-        label: '平台联系人',
-        tag: 'input',
-        name: 'contactName',
-        change: true,
-        required: false
-    },
-    {
-        label: '平台联系人手机号',
-        tag: 'input',
-        name: 'contactPhone',
-        change: true,
-        required: false
-    },
-    {
-        label: '访问网址',
-        tag: 'input',
-        name: 'link',
-        change: true,
-        required: false
-    },
-    {
-        label: '备注',
-        tag: 'TextArea',
-        name: 'remark',
-        change: true,
-        width: 200,
-        placeholder: '请输入不少于十个字的备注',
-        required: false,
-        rows: 5,
-        Rule: { min: 10, type: 'string' }
-    },
-]
-
-export default formConfig

+ 0 - 26
src/pages/operatePage/books/bookcity/headerConfig.tsx

@@ -1,26 +0,0 @@
-import { PlusOutlined } from "@ant-design/icons"
-import React from "react"
-import { FormConfig } from '@/components/Formitem/type'
-
-let config = (fnc: () => void, seek: (platformName: string) => void): FormConfig[] => [
-    {
-        label: '平台名称',
-        tag: 'inputSearch',
-        name: 'reboot_id',
-        children: [{ value: '1', text: '全部分组' }],
-        change: true,
-        width: 200,
-        callback: seek
-    },
-    {
-        label: '添加',
-        icon: <PlusOutlined />,
-        tag: 'button',
-        htmlType: 'button',
-        btnType: 'primary',
-        name: 'zx',
-        callback: fnc
-    }
-]
-
-export default config

+ 0 - 39
src/pages/operatePage/books/bookcity/index.tsx

@@ -1,39 +0,0 @@
-import React, { useEffect, useState } from 'react'
-import Tables from '@/components/Tables'
-import { Card } from 'antd'
-import columns from './tableConfig'
-import Periods from './periods'
-import { seekBook } from '@/services/operating/book'
-import { useRequest } from 'umi'
-
-const Books: React.FC = () => {
-    const [periodsShow, setPeriodsShow] = useState<boolean>(false)  // 期数弹窗控制
-    const [periodData, setPeriodData] = useState<any>()
-    const seekData = useRequest(() => seekBook(), { manual: true, cacheKey: 'seekData', debounceInterval: 500 })//搜索列表
-
-    //副作用执行
-    useEffect(() => {
-        seekData.run()
-    }, [])
-
-    // 期数弹窗打开
-    const handlePeriods = (e: any) => {
-        setPeriodData(e)
-        setPeriodsShow(true)
-    }
-
-    return <Card>
-        <Tables
-            columns={columns(handlePeriods)}
-            dataSource={seekData?.data}
-            total={seekData?.data?.length || 0}
-            size="small"
-            loading={seekData?.loading}
-            bordered
-        />
-        {/* 期数弹窗 */}
-        {periodsShow && <Periods show={periodsShow} onClose={()=>{setPeriodsShow(false)}} data={periodData}/>}
-    </Card>
-}
-
-export default Books

+ 0 - 176
src/pages/operatePage/books/bookcity/periods.tsx

@@ -1,176 +0,0 @@
-import React, { useCallback, useEffect, useState } from "react";
-import { Modal, message, Space, Input, Select } from 'antd'
-import { getPeriodListApi, PeriodList, getPeriodAll, editVipBookApi, delVipBookApi } from '@/services/operating/book'
-import { useRequest } from "umi";
-import columns from './periodsTableConfig'
-import Tables from "@/components/Tables";
-import HeaderForm from '@/components/Formitem'
-import vipFormConfig from './vipFormConfig'
-
-interface Props {
-    data: any,
-    show?: boolean,
-    onClose?: () => void
-}
-
-function Periods(props: Props) {
-    let { data, show = false, onClose } = props
-    const getPeriodList = useRequest((params: any) => getPeriodListApi(params), { manual: true })//vip平台新增
-    const getPeriodAllReq = useRequest(() => getPeriodAll(), { manual: true })//获取期数
-    const editVipBook = useRequest((params: any) => editVipBookApi(params), { manual: true })//vip平台编辑
-    const delVipBook = useRequest((platformId: number) => delVipBookApi(platformId), { manual: true })//vip平台删除
-
-    const [paramsList, setParamsList] = useState<PeriodList>({ platformId: 0, pageNum: 1, pageSize: 20 }) // 列表参数
-    const [title, setTitle] = useState<string>("") // 弹窗名称
-    const [viptitle, setVipTitle] = useState<string>('添加')//model标题
-    const [vipVisible, setVipVisible] = useState(false)//弹窗
-    const [sectData, setSectData] = useState<any[]>([])
-    const [defaultVipProps, setDefaultVipProps] = useState<{
-        platformId: string,
-        periodId: string,
-        account: string,
-        password: string,
-        principalName: string,
-        bankName: string,
-        bankAccount: string,
-        link: string,
-        formulaDivided: string,
-        remark: string,
-        accountId: string
-    } | {}>({})//vip默认值
-    const [vipSubmit, setVipSubmit] = useState<() => Promise<any>>()//存放vipformsubmit
-    const [btnVipLoding, setBtnVipLoding] = useState<boolean>(false)//vip按钮loding
-    const vipCallack = useCallback((fnc: () => Promise<any>) => { setVipSubmit(fnc) }, [])//vipform回调映射submit
-
-    useEffect(() => {
-        setParamsList({ ...paramsList, platformId: data?.id })
-        setTitle(data.platformName)
-        getPeriodAllReq.run().then(res => {
-            let da = res?.map((item: any) => {
-                item.text = item.period
-                item.value = item.id + ""
-                return item
-            })
-            setSectData(da)
-        })
-    }, [data])
-
-    // 获取数据
-    useEffect(() => {
-        if (paramsList?.platformId !== 0) {
-            getPeriodList.run(paramsList)
-        }
-    }, [paramsList])
-
-    /**分页 */
-    let pageChange = useCallback((page: string | number, pageSize?: string | number) => {
-        setParamsList({ ...paramsList, pageNum: page as number, pageSize: pageSize as number })
-    }, [paramsList])
-
-    /**vip隐藏 */
-    let hideVipModal = useCallback(() => {
-        setDefaultVipProps({})//清空默认值
-        setVipTitle('')
-        setVipVisible(false)//关闭弹窗
-    }, [])
-
-    /** vip弹窗确定 */
-    let handleVipOk = useCallback(() => {
-        (vipSubmit as () => Promise<any>)().then(res => {
-            if (res) {
-                setBtnVipLoding(true);
-                let accountId = (defaultVipProps as {
-                    platformId: string,
-                    periodId: string,
-                    account: string,
-                    password: string,
-                    principalName: string,
-                    bankName: string,
-                    bankAccount: string,
-                    link: string,
-                    formulaDivided: string,
-                    remark: string,
-                    accountId: string
-                }).accountId
-                if (accountId) {
-                    res.platformId = data?.id
-                    editVipBook.run({ ...res, accountId: accountId }).then(r => {
-                        setBtnVipLoding(false)
-                        getPeriodList.refresh()
-                        hideVipModal()
-                        message.success('编辑成功', 2)
-                    })
-                }
-            }
-
-        })
-    }, [vipSubmit, data, btnVipLoding, getPeriodList])
-    /** vip编辑 */
-    let vipEdit = useCallback((props: any) => {
-        let { id } = props
-        setDefaultVipProps({ ...props, accountId: id })
-        setVipTitle('编辑')
-        setVipVisible(true)
-    }, [])
-    /** vip删除 */
-    let vipDel = useCallback((id: number) => {
-        delVipBook.run(id).then(res => {
-            getPeriodList.refresh()
-            message.success('删除成功', 2)
-        })
-    }, [getPeriodList])
-    return <>
-        <Modal
-            title={title}
-            visible={show}
-            okText={<></>}
-            cancelText="取消"
-            onCancel={() => { onClose && onClose() }}
-            destroyOnClose={true}
-            width={1214}
-        >
-            <Space wrap style={{ marginBottom: 10 }}>
-                <Input.Search allowClear placeholder="请输入账号搜索" onSearch={(e) => { setParamsList({ ...paramsList, account: e }) }} style={{ width: 180 }} />
-                <Input.Search allowClear placeholder="请输入开户名搜索" onSearch={(e) => { setParamsList({ ...paramsList, principalName: e }) }} style={{ width: 180 }} />
-                <Select allowClear style={{ width: 180 }} showSearch filterOption={(input, option: any) =>
-                    option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
-                } onChange={(e: number) => { setParamsList({ ...paramsList, periodId: e }) }} placeholder="请选择期数">
-                    {sectData?.map((item: { text: string, value: string }) => <Select.Option key={item.value} value={item.value}>{item.text}</Select.Option>)}
-                </Select>
-                <Select allowClear style={{ width: 120 }} onChange={(e: number) => { setParamsList({ ...paramsList, status: e }) }} placeholder="状态">
-                    <Select.Option value={0}>信息待完善</Select.Option>
-                    <Select.Option value={1}>拉取中</Select.Option>
-                </Select>
-            </Space>
-            <Tables
-                columns={columns(vipEdit, vipDel)}
-                bordered
-                dataSource={getPeriodList?.data?.records}
-                className="components-table-demo-nested"
-                size="small"
-                pagination={false}
-                loading={getPeriodList?.loading}
-                total={getPeriodList?.data?.total}
-                pageChange={pageChange}
-                sizeChange={pageChange}
-                scroll={{ x: 1150, y: 500 }}
-            />
-        </Modal>
-
-        <Modal
-            title={`${viptitle}VIP平台`}
-            visible={vipVisible}
-            okText="确认"
-            cancelText="取消"
-            onCancel={hideVipModal}
-            onOk={handleVipOk}
-            confirmLoading={btnVipLoding}
-            destroyOnClose={true}
-            width={640}
-        >
-            <HeaderForm formConfig={vipFormConfig(sectData)} flow='row' getFormSubmit={vipCallack} defaultProps={defaultVipProps} labelCol={{ span: 24 }} ew />
-        </Modal>
-    </>
-}
-
-export default React.memo(Periods)

+ 0 - 152
src/pages/operatePage/books/bookcity/periodsTableConfig.tsx

@@ -1,152 +0,0 @@
-import { Col, Popconfirm, Row, Tooltip } from "antd";
-import React from "react";
-import { DeleteOutlined, FormOutlined } from '@ant-design/icons';
-
-let columns = (edit: (value: any) => void, del: (id: number) => void): any => [
-    {
-        title: '账号',
-        dataIndex: 'account',
-        key: 'account',
-        align: 'left',
-        ellipsis: {
-            showTitle: false,
-        },
-        fixed: 'left',
-        width: 120,
-        render: (a: any, b: any) => (
-            <Tooltip placement="topLeft" title={a}>
-                {a}
-            </Tooltip>
-        ),
-    },
-    {
-        title: '密码',
-        dataIndex: 'password',
-        key: 'password',
-        align: 'center',
-        width: 100,
-    },
-    {
-        title: '期数',
-        dataIndex: 'periodInfo',
-        key: 'periodInfo',
-        align: 'center',
-        width: 100,
-        render: (a: any, b: any) => {
-            return <>
-                {
-                    b?.periodInfo ? <>
-                        <div>{b?.periodInfo?.period}</div>
-                    </> : <span style={{ color: 'red', fontSize: 12 }}>未配置</span>
-                }
-            </>
-        }
-    },
-    {
-        title: '开户名称',
-        dataIndex: 'principalName',
-        key: 'principalName',
-        align: 'center',
-        ellipsis: {
-            showTitle: false,
-        },
-        width: 140,
-        render: (a: any, b: any) => (
-            <Tooltip placement="topLeft" title={a}>
-                {a}
-            </Tooltip>
-        ),
-    },
-    {
-        title: '开户行',
-        dataIndex: 'bankName',
-        key: 'bankName',
-        align: 'center',
-        ellipsis: {
-            showTitle: false,
-        },
-        width: 100,
-        render: (a: any, b: any) => (
-            <Tooltip placement="topLeft" title={a}>
-                {a}
-            </Tooltip>
-        ),
-    },
-    {
-        title: '银行账号',
-        dataIndex: 'bankAccount',
-        key: 'bankAccount',
-        align: 'center',
-        ellipsis: {
-            showTitle: false,
-        },
-        width: 140,
-        render: (a: any, b: any) => (
-            <Tooltip placement="topLeft" title={a}>
-                {a}
-            </Tooltip>
-        ),
-    },
-    {
-        title: '分成',
-        dataIndex: 'formulaDivided',
-        key: 'formulaDivided',
-        width: 60,
-        align: 'center',
-    },
-    {
-        title: '平台网址',
-        dataIndex: 'link',
-        key: 'link',
-        width: 180,
-        align: 'center',
-        ellipsis: {
-            showTitle: false,
-        },
-        render: (a: any, b: any) => (
-            <Tooltip placement="topLeft" title={a}>
-                {a}
-            </Tooltip>
-        ),
-    },
-    {
-        title: '备注',
-        dataIndex: 'remark',
-        key: 'remark',
-        align: 'center',
-        width: 180,
-        ellipsis: {
-            showTitle: false,
-        },
-        render: (a: any, b: any) => (
-            <Tooltip placement="topLeft" title={a}>
-                {a}
-            </Tooltip>
-        ),
-    },
-    {
-        title: '操作',
-        dataIndex: 'cz',
-        key: 'cz',
-        align: 'center',
-        width: 200,
-        fixed: 'right',
-        render: (a: string, b: { id: number, platformName: string, remark: string }) => (
-            <Row justify='center' gutter={[10, 0]}>
-                <Col><a onClick={() => edit(b)} style={{fontSize: "12px"}}><FormOutlined /> 编辑</a></Col>
-                <Col>
-                    <Popconfirm
-                        title={`是否要删除?`}
-                        onConfirm={() => del(b.id)}
-                        okText="是"
-                        cancelText="否"
-                    >
-                        <a style={{color: "red", fontSize: "12px"}}><DeleteOutlined /> 删除</a>
-                    </Popconfirm>
-                </Col>
-            </Row>
-        )
-    }
-];
-
-export default columns

+ 0 - 24
src/pages/operatePage/books/bookcity/table.less

@@ -1,24 +0,0 @@
-.ant-table-thead {
-  .table_warning {
-    color: #fa8c16 !important;
-    background-color: #fff !important;
-  }
-  .table_success {
-    color: #52c41a !important;
-    background-color: #fff !important;
-  }
-  .table_processing {
-    color: #409EFF !important;
-    // background-color: #fff !important;
-  }
-  .table_error {
-    color: #f5222d !important;
-    background-color: #fff !important;
-  }
-}
-.singleBackColor {
-  background: #fbfff6;
-}
-.doubleBackColor {
-  background-color: #f2f2ff;
-}

+ 0 - 83
src/pages/operatePage/books/bookcity/tableConfig.tsx

@@ -1,83 +0,0 @@
-import React from "react"
-import { Row, Col } from "antd"
-import { EyeOutlined } from "@ant-design/icons"
-let columns = (handlePeriods: (value: any) => void) => [
-    {
-        title: '平台名称',
-        dataIndex: 'platformName',
-        key: 'platformName',
-        align: 'center',
-        width: 200,
-        render: (a: any, b: any) => {
-            return <span style={{fontSize: "12px"}}>{a}</span>
-        }
-    },
-    {
-        title: '平台联系人姓名',
-        dataIndex: 'contactName',
-        key: 'contactName',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <>
-                {
-                    b?.contactName && <>
-                        <div style={{fontSize: "12px"}}>{b?.contactName}</div>
-                    </>
-                }
-            </>
-        }
-    },
-    {
-        title: '平台联系人手机号',
-        dataIndex: 'contactPhone',
-        key: 'contactPhone',
-        align: 'center',
-        render: (a: any, b: any) => {
-            return <>
-                {
-                    b?.contactPhone && <>
-                        <div style={{fontSize: "12px"}}>{b?.contactPhone}</div>
-                    </>
-                }
-            </>
-        }
-    },
-    {
-        title: '访问网址',
-        dataIndex: 'vipLink',
-        key: 'vipLink',
-        align: 'left',
-        render: (a: any, b: any) => {
-            return <>
-                {
-                    b?.vipLink && <>
-                        <div style={{fontSize: "12px"}}>{b?.vipLink}</div>
-                    </>
-                }
-            </>
-        }
-    },
-    {
-        title: '平台备注',
-        dataIndex: 'remark',
-        key: 'remark',
-        align: 'left',
-        render: (a: any, b: any) => {
-            return <span style={{fontSize: "12px"}}>{a}</span>
-        }
-    },
-    {
-        title: '操作',
-        dataIndex: 'cz',
-        key: 'cz',
-        align: 'center',
-        width: 100,
-        render: (a: string, b: { id: string, platformName: string, remark: string }) => (
-            <Row justify='center' gutter={[10, 0]}>
-                <Col><a onClick={() => handlePeriods(b)} style={{fontSize: "12px"}}><EyeOutlined /> 查看vip账号</a></Col>
-            </Row>
-        )
-    }
-]
-
-export default columns

+ 0 - 78
src/pages/operatePage/books/bookcity/vipFormConfig.tsx

@@ -1,78 +0,0 @@
-import { FormConfig } from '@/components/Formitem/type'
-let formConfig = (selectData: any) : FormConfig[]  => [
-    {
-        label: '期数',
-        tag: 'select',
-        name: 'periodId',
-        change: true,
-        required: true,
-        children: selectData
-    },
-    {
-        label: 'VIP账号',
-        tag: 'input',
-        name: 'account',
-        change: true,
-        required: true
-    },
-    {
-        label: '密码',
-        tag: 'input',
-        name: 'password',
-        change: true
-    },
-    {
-        label: '开户名称',
-        tag: 'input',
-        name: 'principalName',
-        change: true,
-        required: false
-    },
-    {
-        label: '开户行',
-        tag: 'input',
-        name: 'bankName',
-        change: true,
-        required: false
-    },
-    {
-        label: '银行账号',
-        tag: 'input',
-        name: 'bankAccount',
-        change: true,
-        required: false
-    },
-    {
-        label: '分成',
-        tag: 'input',
-        name: 'formulaDivided',
-        change: true,
-        required: false
-    },
-    {
-        label: '网址',
-        tag: 'input',
-        name: 'link',
-        change: true,
-        required: false
-    },
-    {
-        label: '开户时间',
-        tag: 'DatePicker',
-        name: 'registerDay',
-        change: true,
-        required: false
-    },
-    {
-        label: '备注',
-        tag: 'TextArea',
-        name: 'remark',
-        change: true,
-        placeholder: '请输入不少于十个字的备注',
-        required: false,
-        rows: 2,
-        Rule: { min: 5, type: 'string' }
-    },
-]
-
-export default formConfig

+ 0 - 12
src/pages/operatePage/books/bookify/formConfig.tsx

@@ -1,12 +0,0 @@
-import { FormConfig } from '@/components/Formitem/type'
-let formConfig = (): FormConfig[] => [
-    {
-        label: '名称',
-        tag: 'input',
-        name: 'name',
-        change: true,
-        required: true
-    }
-]
-
-export default formConfig

+ 0 - 17
src/pages/operatePage/books/bookify/headerConfig.tsx

@@ -1,17 +0,0 @@
-import { PlusOutlined } from "@ant-design/icons"
-import React from "react"
-import { FormConfig } from '@/components/Formitem/type'
-
-let config = (fnc: () => void): FormConfig[] => [
-    {
-        label: '添加',
-        icon: <PlusOutlined />,
-        tag: 'button',
-        htmlType: 'button',
-        btnType: 'primary',
-        name: 'zx',
-        callback: fnc
-    }
-]
-
-export default config

+ 0 - 111
src/pages/operatePage/books/bookify/index.tsx

@@ -1,111 +0,0 @@
-import React, { useCallback, useEffect, useState } from 'react'
-import Tables from '@/components/Tables'
-import HeaderForm from '@/components/Formitem'
-import { Card, Modal, message } from 'antd'
-import columns from './tableConfig'
-import config from './headerConfig'
-import formConfig from './formConfig'
-import { addBooktype, deleteBooktype, editBooktype, getBooktypeList } from '@/services/operating/book'
-import { useAjax } from '@/Hook/useAjax'
-
-/**
- * 分类管理
- */
-const BookIfy: React.FC = () => {
-    const [visible, setVisible] = useState(false)//弹窗
-    const [title, setTitle] = useState<string>('')//model标题
-    const [defaultProps, setDefaultProps] = useState< {id: number, name: string} | {}>({})//默认值
-    const [submit, setSubmit] = useState<() => Promise<any>>()//存放formsubmit
-    const callack = useCallback((fnc: () => Promise<any>) => { setSubmit(fnc) }, [])//form回调映射submit
-    const [btnLoding, setBtnLoding] = useState<boolean>(false)//按钮loding
-    const addType = useAjax((params: {name: string}) => addBooktype(params))//添加请求
-    const delData = useAjax((id: number) => deleteBooktype(id))//删除请求
-    const editData = useAjax((params: {id: number, name: string}) => editBooktype(params))//编辑请求
-    const getBookify = useAjax(() => getBooktypeList())//搜索列表
-
-    /**显示 */
-    let showModal = useCallback(() => {
-        setTitle('添加')//设置标题
-        setVisible(true)//开启弹窗
-    }, [])
-    /**隐藏 */
-    let hideModal = useCallback(() => {
-        setDefaultProps({})//清空默认值
-        setTitle('')//清空标题
-        setVisible(false)//关闭弹窗
-    }, [])
-    
-    /**新增请求 */
-    let handleOk = useCallback(() => {
-        (submit as () => Promise<any>)().then(res => {
-            if (res) {
-                setBtnLoding(true);
-                let id = (defaultProps as {id: number, name: string}).id
-                if (id) {
-                    editData.run({...res, id}).then(r => {
-                        setBtnLoding(false)
-                        getBookify.run()
-                        hideModal()
-                        message.success('编辑成功', 2)
-                    })
-                } else {
-                    addType.run(res).then(res => {
-                        setBtnLoding(false)
-                        getBookify.run()
-                        hideModal()
-                        message.success('添加成功', 2)
-                    })
-                }
-            }
-
-        })
-    }, [submit, btnLoding])
-    
-    
-    /**编辑 */
-    let edit = useCallback((props: { id: number, name: string }) => {
-        setDefaultProps(props)
-        setTitle('编辑')
-        setVisible(true)
-    }, [])
-    
-    /**删除 */
-    let del = useCallback((id: number) => {
-        delData.run(id).then(res => {
-            if(res){
-                getBookify.run()
-                message.success('删除成功', 2)
-            }
-        })
-    }, [])
-    
-    useEffect(() => {
-        getBookify.run()
-    }, [])
-    return <Card>
-        <HeaderForm formConfig={config(showModal)} flow='row' />
-        <Tables
-            columns={columns(edit, del)}
-            dataSource={getBookify?.data}
-            pagination={false}
-            size="small"
-            loading={getBookify?.loading}
-        />
-        <Modal
-            title={`${title}分类`}
-            visible={visible}
-            okText="确认"
-            cancelText="取消"
-            onCancel={hideModal}
-            onOk={handleOk}
-            confirmLoading={btnLoding}
-            destroyOnClose={true}
-            width={450}
-        >
-            <HeaderForm formConfig={formConfig()} flow='row' getFormSubmit={callack} defaultProps={defaultProps} labelCol={{span:24}} ew/>
-        </Modal>
-
-    </Card>
-}
-
-export default BookIfy

+ 0 - 24
src/pages/operatePage/books/bookify/table.less

@@ -1,24 +0,0 @@
-.ant-table-thead {
-  .table_warning {
-    color: #fa8c16 !important;
-    background-color: #fff !important;
-  }
-  .table_success {
-    color: #52c41a !important;
-    background-color: #fff !important;
-  }
-  .table_processing {
-    color: #409EFF !important;
-    // background-color: #fff !important;
-  }
-  .table_error {
-    color: #f5222d !important;
-    background-color: #fff !important;
-  }
-}
-.singleBackColor {
-  background: #fbfff6;
-}
-.doubleBackColor {
-  background-color: #f2f2ff;
-}

+ 0 - 41
src/pages/operatePage/books/bookify/tableConfig.tsx

@@ -1,41 +0,0 @@
-import React from "react"
-import { Row, Col, Popconfirm } from "antd"
-import { DeleteOutlined, FormOutlined } from "@ant-design/icons"
-let columns = (edit: (value: { id: number, name: string, }) => void, del: (id: number) => void) => [
-    {
-        title: 'ID',
-        dataIndex: 'id',
-        key: 'id',
-        align: 'center'
-    },
-    {
-        title: '名称',
-        dataIndex: 'name',
-        key: 'name',
-        align: 'center'
-    },
-    {
-        title: '操作',
-        dataIndex: 'cz',
-        key: 'cz',
-        align: 'center',
-        width: 200,
-        render: (a: string, b: { id: number, name: string }) => (
-            <Row justify='center' gutter={[10, 0]}>
-                <Col><a onClick={() => edit(b)} style={{fontSize: "12px"}}><FormOutlined /> 编辑</a></Col>
-                <Col>
-                    <Popconfirm
-                        title={`是否要删除?`}
-                        onConfirm={() => del(b.id)}
-                        okText="是"
-                        cancelText="否"
-                    >
-                        <a style={{color: "red", fontSize: "12px"}}><DeleteOutlined /> 删除</a>
-                    </Popconfirm>
-                </Col>
-            </Row>
-        )
-    }
-]
-
-export default columns

+ 0 - 10
src/pages/operatePage/examine/components/look/index.less

@@ -1,10 +0,0 @@
-.wx {
-  border: 1px solid #efefef;
-  padding:3px 5px;
-  cursor: pointer;
-}
-.action {
-  border: 1px solid #1890ff;
-  padding:3px 5px;
-  cursor: pointer;
-}

+ 0 - 23
src/pages/operatePage/examine/components/look/index.tsx

@@ -1,23 +0,0 @@
-import { Button } from 'antd'
-import { SizeType } from 'antd/lib/config-provider/SizeContext'
-import React, {useState } from 'react'
-import LockUP from './lockUP'
-type Props = {
-    type: 'Advanced' | 'Aservice' | 'Atemplate' | 'Interact', //Advanced=群发,Aservice=客服,Atemplate=模板,Interact=立即/延迟
-    isExamine?: boolean,//是否是审查
-    strategyId: any,//任务ID
-    id: number | any[],//公众号ID
-    size?: SizeType,
-    wxs?: any[],//公众号列表
-    buttonType?: "link" | "text" | "ghost" | "default" | "primary" | "dashed" | undefined
-}
-function Look(props: Props) {
-    let { size = 'small', buttonType = 'default', } = props
-    const [ylVisible, setYlVisible] = useState<boolean>(false)//预览弹窗
-    return <>
-        <Button onClick={() => { setYlVisible(true) }} size={size} type={buttonType}>预览</Button>
-        {ylVisible && <LockUP {...props} setYlVisible={setYlVisible} ylVisible/>}
-    </>
-}
-
-export default Look

+ 0 - 145
src/pages/operatePage/examine/components/look/lockUP.tsx

@@ -1,145 +0,0 @@
-import { Button, message, Modal, Select, Space, Tag } from 'antd'
-import { SizeType } from 'antd/lib/config-provider/SizeContext'
-import React, { useCallback, useEffect, useMemo, useState } from 'react'
-import { useModel } from 'umi'
-import style from './index.less'
-type Props = {
-    type: 'Advanced' | 'Aservice' | 'Atemplate' | 'Interact', //Advanced=群发,Aservice=客服,Atemplate=模板,Interact=立即/延迟
-    isExamine?: boolean,//是否是审查
-    strategyId: any,//任务ID
-    id: number | any[],//公众号ID
-    size?: SizeType,
-    wxs?: any[],//公众号列表
-    buttonType?: "link" | "text" | "ghost" | "default" | "primary" | "dashed" | undefined,
-    setYlVisible: (v: any) => void,
-    ylVisible: boolean
-}
-function Page(props: Props) {
-    let { id, type, strategyId, isExamine = false, wxs, setYlVisible, ylVisible } = props
-    const [value, setValue] = useState<string>('')//微信号名称
-    const { searchFans } = useModel('useOperating.useFans', model => ({ searchFans: model.searchFans }))
-    const {
-        lookAdvanced,//群发
-        lookAservice,//客服
-        lookAtemplate,//模板
-        lookInteract,//立即/延迟
-        state
-    } = useModel('useOperating.useExamine')
-    const actionWX = useModel('useOperating.useWxGroupList', model => model.state.actionWX)//普通预览默认选中ID使用
-    const [names, setNames] = useState<{ id: number, nickname: string, headimgurl: string }[]>([])
-    const [mpId, setMpId] = useState<number>(Number(isExamine ? id && Array.isArray(id) ? id[0] : id || state.mpId : actionWX.id))
-    /**按不同模块返回对应模块的预览接口*/
-    let ajax = useMemo(() => {
-        switch (type) {
-            case 'Advanced':
-                return lookAdvanced
-            case 'Aservice':
-                return lookAservice
-            case 'Atemplate':
-                return lookAtemplate
-            case 'Interact':
-                return lookInteract
-        }
-    }, [type])
-    /**存放昵称 */
-    const PreviewChange = useCallback((value: string, option: any) => {
-        setValue(value)
-        if (value) {
-            let arr = value.split('_')
-            localStorage.setItem('fans', JSON.stringify({ id: arr[1], nickname: arr[0] }))
-        }
-
-    }, [])
-    /**查询*/
-    const onSearch = useCallback((val: string) => {
-        if (val) {
-            searchFans.run({ mpId, nickname: val })
-        }
-    }, [mpId])
-    useEffect(() => {
-        let data = searchFans.data
-        if (data?.length > 0) {
-            setNames(data?.map((item: any) => { return { id: item?.id, nickname: item?.nickname, headimgurl: item?.headimgurl } }))
-            data.forEach((item: any) => {
-                if (item.nickname === value?.split('_')[0]) {
-                    setValue(item.nickname + '_' + item.id)
-                }
-            })
-        }else{
-            setNames([])
-        }
-    }, [searchFans.data])
-    /**预览数据 */
-    const handlePreview = useCallback(() => {
-        if (!value) {
-            message.error('请输入预览粉丝昵称')
-            return
-        }
-        let fansId = value?.split('_')[1]
-        ajax.run({ strategyId, fansId, mpId }).then(res => {
-            if (res) {
-                message.success('预览成功!')
-                setYlVisible(false)
-            }
-        })
-    }, [strategyId, ajax, value, mpId])
-    /**清空昵称 */
-    useEffect(() => {
-        let fans = localStorage.getItem('fans') ? JSON.parse(localStorage.getItem('fans') as string) : ''
-        if (fans && mpId) {
-            searchFans.run({ mpId, nickname: fans?.nickname })
-        }
-    }, [mpId, ylVisible])
-    console.log(wxs)
-    return <>
-        <Modal
-            width={500}
-            visible={ylVisible}
-            title="发送手机预览"
-            onCancel={() => setYlVisible(false)}
-            okText='发送预览'
-            destroyOnClose
-            footer={<Space>
-                <Button onClick={() => setYlVisible(false)}>取消</Button>
-                <Button type='primary' onClick={handlePreview} loading={false}>发送预览</Button>
-            </Space>}
-        >
-            {//type === 'Aservice' &&
-                 <>
-                    <Space style={{ flexFlow: 'row wrap' }}>
-                        {
-                            wxs?.map((i) => {
-                                return <div key={i.id} className={i.id === mpId ? style.action : style.wx} onClick={() => {
-                                    setMpId(Number(i.id))
-                                }}>
-                                    <img src={i.headImg} style={{ width: 20, marginRight: 5 }} />
-                                    <span>{i.nickName}</span>
-                                </div>
-                            })
-                        }
-                    </Space>
-                </>
-            }
-            <Select
-                showSearch
-                style={{ margin: '10px 0', width: '100%' }}
-                placeholder="请输入微信号名称自动模糊搜索匹配"
-                optionFilterProp="children"
-                onChange={PreviewChange}
-                onSearch={onSearch}
-                allowClear={true}
-            >
-                {
-                    names?.map((item: { id: number, nickname: string, headimgurl: string }) => {
-                        return <Select.Option key={item.id} value={item.nickname + '_' + item.id}>
-                            <img src={item?.headimgurl} alt="" style={{ width: 20 }} />&nbsp;{item?.nickname}
-                        </Select.Option>
-                    })
-                }
-            </Select>
-            <Tag color='warning'>预览功能仅用于公众号查看文章效果,不适用于公众传播,预览链接会在短期内失效</Tag>
-        </Modal>
-    </>
-}
-
-export default Page

+ 0 - 97
src/pages/operatePage/examine/components/review/index.tsx

@@ -1,97 +0,0 @@
-import { Button, Input, Modal, Space, message } from 'antd'
-import React, { useCallback, useMemo, useState } from 'react'
-import { useModel } from 'umi'
-type Props = {
-    type: 'Advanced' | 'Aservice' | 'Atemplate' | 'Interact', //Advanced=群发,Aservice=客服,Atemplate=模板,Interact=立即/延迟
-    strategyId: any,//任务ID
-    defaultValue?: { checkStatus: number, checkRemark: string }
-}
-function Review(props: Props) {
-    const { type, strategyId, defaultValue } = props
-    const {
-        putReviewAdvanced,//群发
-        advancedList,
-        putReviewAservice,//客服
-        aserviceList,
-        putReviewAtemplate,//模板
-        atemplateList,
-        putReviewInteract,//立即/延迟
-        interactList,
-    } = useModel('useOperating.useExamine')
-    const [state, setState] = useState({ checkStatus: defaultValue?.checkStatus || 100, checkRemark: defaultValue?.checkRemark || '', })
-    const [visible, setVisible] = useState(false)
-    /**按不同模块返回对应模块的审查接口*/
-    let ajax = useMemo(() => {
-        switch (type) {
-            case 'Advanced':
-                return putReviewAdvanced
-            case 'Aservice':
-                return putReviewAservice
-            case 'Atemplate':
-                return putReviewAtemplate
-            case 'Interact':
-                return putReviewInteract
-        }
-    }, [type])
-    /**刷新对应列表*/ 
-    let get = useMemo(()=>{
-        switch (type) {
-            case 'Advanced':
-                return advancedList
-            case 'Aservice':
-                return aserviceList
-            case 'Atemplate':
-                return atemplateList
-            case 'Interact':
-                return interactList
-        }
-    },[type])
-    /**显示隐藏审核弹窗*/
-    const showChange = useCallback(() => {
-        setVisible(!visible)
-    }, [visible])
-    /**发送审核*/
-    const submit = useCallback((checkStatus: number) => {
-        let param = {...state, checkStatus}
-        if (param.checkStatus === -1 && !param.checkRemark) {
-            message.warning('请填写描述!!')
-            return
-        }
-        if (param.checkStatus === 100) {
-            param = { ...param, checkRemark: '' }
-        }
-        ajax.run({ strategyId, ...param }).then(res => {
-            if (res) {
-                setVisible(false)
-                get.refresh()
-            }
-        })
-    }, [state, ajax, get,strategyId])
-    /***/
-    return <>
-        {/* <Button onClick={() => { setVisible(true) }} size='small' loading={ajax?.loading}>审核</Button> */}
-        
-        <Space>
-            <Button onClick={() => { submit(100) }} size='small' loading={ajax?.loading} type="primary">审核通过</Button>
-            <Button onClick={() => { setVisible(true) }} size='small' loading={ajax?.loading} danger>审核失败</Button>
-        </Space>
-        <Modal
-            visible={visible}
-            onOk={()=>{submit(-1)}}
-            onCancel={showChange}
-            title={'审查'}
-        >
-            <div>
-                <Space style={{ display: 'flex', alignItems: 'start' }}>
-                    <label style={{ letterSpacing: 2 }}>审查描述:</label>
-                    <Input.TextArea
-                        style={{ width: 350 }}
-                        onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) => { setState({ ...state, checkRemark: event.target.value }) }}
-                        value={state.checkRemark}
-                    />
-                </Space>
-            </div>
-        </Modal>
-    </>
-}
-export default Review

+ 0 - 65
src/pages/operatePage/examine/components/userList/index.less

@@ -1,65 +0,0 @@
-.box {
-  width: 100%;
-  display: flex;
-  flex-flow: column nowrap;
-}
-.top {
-  width: 100%;
-  display: flex;
-  flex-flow: row;
-  background-color: #fff;
-  padding:15px;
-  // margin-bottom: 15px;
-  border-bottom: 1px solid #efefef;
-  >div{
-    margin-right: 20px;
-  }
-  .select {
-    width: 180px;
-    display: flex;
-  }
-  .selectAll{
-    width: 240px;
-    display: flex;
-  }
-}
-.content {
-  width: 100%;
-  display: flex;
-  flex-flow: row nowrap;
-  .list {
-    width: 180px;
-    height: calc(100vh - 170px);
-    display: flex;
-    flex-flow: column nowrap;
-    background-color: #fff;
-    opacity: 1;
-    transition: all .1s;
-    padding-top: 10px;
-    border-right: 1px solid #efefef;
-    img {
-      width: 25px;
-    }
-  }
-  .listHide{
-    width: 0px;
-    height: calc(100vh - 170px);
-    display: flex;
-    flex-flow: column nowrap;
-    background-color: #fff;
-    transition: all .1s;
-    opacity: 0;
-    img {
-      width: 25px;
-    }
-  }
-  .table {
-    flex-grow: 1;
-    flex-shrink: 2;
-  }
-}
-.action {
-  background-color: rgb(230, 247, 255);
-  color: #1890ff;
-  border-right: 3px solid #1890ff;
-}

+ 0 - 131
src/pages/operatePage/examine/components/userList/index.tsx

@@ -1,131 +0,0 @@
-import React, { useCallback, useEffect, useState } from 'react'
-import { useVirtualList } from 'ahooks'
-import { useModel } from 'umi'
-import style from './index.less'
-import { Button, Select, Space, Tooltip } from 'antd'
-import { SwapOutlined } from '@ant-design/icons'
-import { SelectValue } from 'antd/es/select'
-
-interface Props {
-    /**table内容区*/
-    children?: JSX.Element,
-    /**顶部搜索条件*/
-    header?: JSX.Element,
-    /**是否支持不选择公众号返回全部公众号数据 默认true 支持*/
-    userAll?: boolean
-}
-function UesrList(props: Props) {
-    let { userAll = true } = props
-    const { dispatch, state } = useModel('useOperating.useExamine')
-    const { userList } = state
-    const [listShow, setListShow] = useState<boolean>(true)
-    /**当前选中*/
-    const [action, setAction] = useState<number>(userAll ? -1 : 0)
-    /**虚拟列表*/
-    let { list, containerProps, wrapperProps, scrollTo } = useVirtualList(userList as any[], {
-        overscan: 10,
-        itemHeight: 35,
-    });
-    /**左侧列表缩进事件*/
-    const listChange = useCallback(() => {
-        setListShow(!listShow)
-    }, [listShow])
-    /**选中公众号*/
-    const actionChange = useCallback((mpId: any) => {
-        dispatch({ type: 'set', params: { mpId } })
-    }, [])
-    /**初始选中公众号*/
-    useEffect(() => {
-        if (!userAll && Array.isArray(userList) && userList?.length > 0) {
-            dispatch({ type: 'set', params: { mpId: userList[0].id } })
-        }
-    }, [userAll])
-    console.log('userAll----->', userAll)
-    return <div className={style.box}>
-        {/* 顶部 */}
-        <div className={style.top}>
-            <div className={style.selectAll }>
-            {/* <div className={userAll ? style.selectAll : style.select}> */}
-                {
-                    userAll ? <Tooltip title='显示全部公众号数据(数字代表全部的公众号个数)' ><Button onClick={() => {
-                        setAction(-1)//设置选中关于css展示
-                        actionChange('')//设置选中的公众号ID
-                    }}>ALL<strong style={{color:'red'}}>({userList?.length})</strong></Button></Tooltip>: <Tooltip title='数字代表全部的公众号个数' ><Button><strong style={{color:'red'}}>({userList?.length})</strong></Button></Tooltip>
-                }
-                <Select
-                    showSearch
-                    placeholder="公众号筛选"
-                    optionFilterProp="children"
-                    onSelect={(v, o) => {
-                        scrollTo(Number(v))//跳转到指定位置
-                        setAction(Number(v))//设置选中关于css展示
-                        actionChange(o?.id)//设置选中的公众号ID
-                    }}
-                    onChange={(value: SelectValue) => {
-                        if (value === undefined) {
-                            actionChange('')//清空
-                            setAction(Number(-1))//清空选中
-                        }
-                    }}
-                    value={action === -1 ? undefined : action}
-                    allowClear={userAll}
-                    style={{ width: '100%' }}
-                    options={userList?.map((item, index) => ({
-                        value: index,
-                        label: <Space>
-                            <img src={item?.headImg} style={{ width: 20 }} />
-                            <span>{item?.nickName}</span>
-                        </Space>,
-                        id: item.id,
-                        title: item?.nickName
-                    }))}
-                    filterOption={(input: string, option: any) => {
-                        let str = JSON.stringify(option.title)
-                        return str.toLowerCase().indexOf(input.toLowerCase()) >= 0
-                    }
-                    }
-                />
-                {/* 左侧列表展开开关 */}
-                <Tooltip title='显示/隐藏公众号列表' ><Button onClick={listChange}><SwapOutlined /></Button></Tooltip>
-            </div>
-            {props?.header}
-        </div>
-        {/* 内容 */}
-        <div className={style.content}>
-            {/* 左侧列表 */}
-            <div {...containerProps} style={{ overflow: 'auto' }} className={listShow ? style.list : style.listHide}>
-                <div {...wrapperProps}>
-                    {list?.map((ele) => (
-                        <div
-                            style={{
-                                height: 35,
-                                display: 'flex',
-                                alignItems: 'center',
-                                marginBottom: 0,
-                                paddingLeft: 30,
-                                cursor: 'pointer',
-                            }}
-                            onClick={() => {
-                                setAction(ele.index)//设置选中关于css展示
-                                actionChange(ele?.data?.id)//设置选中的公众号ID
-                            }}
-                            className={action == ele.index ? style.action : null}
-                            key={ele.index}
-                        >
-                            <Space>
-                                {ele?.data?.headImg && <img src={ele?.data?.headImg} />}
-                                <span>{ele?.data?.nickName}</span>
-                            </Space>
-                        </div>
-                    ))}
-                </div>
-            </div>
-            {/* 右侧 */}
-            <div className={style.table}>
-                {props.children}
-            </div>
-        </div>
-    </div>
-}
-
-export default UesrList

+ 0 - 217
src/pages/operatePage/examine/examineAdvanced/index.tsx

@@ -1,217 +0,0 @@
-import { Drawer, Input, Select, Space } from "antd"
-import { SelectValue } from "antd/es/select"
-import React, { useCallback, useEffect, useReducer, useState } from "react"
-import { useModel } from "umi"
-import UesrList from "../components/userList"
-import Tables from '@/components/Tables'
-import { columns } from './tableConfig'
-import WxDetailsBox from "@/components/WxDetailsBox"
-import { expandedRowRender } from "./sonTableConfig"
-import AddModal from "../../news/advanced/components/addModal"
-const { Option } = Select
-interface Params {
-    checkStatus?: 0 | 100 | -1 | null | any,//审查状态
-    executionStatus?: any,//执行状态
-    name?: string,//任务名称
-    pageSize?: number,//每页展示条数
-    pageNum?: number//页数
-}
-type State = {
-    visible: boolean,//弹窗开启与否
-    defaultData: any,//编辑填数据
-    theEditer: any,//当前查看数据栏
-    del: boolean,//删除开启
-    drawerVis: boolean,//日志弹窗
-    logsData: any[],//日志数据
-}
-export type Action = {
-    type: 'show' | 'setDefaultData' | 'theEditer' | 'del' | 'drawerVis' | 'logsData',
-    params?: any
-}
-function reducer(state: State, action: Action) {
-    let { type, params } = action
-    let { defaultData } = state
-    switch (type) {
-        case 'show':
-            return { ...state, visible: !state.visible }
-        case 'setDefaultData':
-            if (params?.defaultData) {
-                return { ...state, defaultData: { ...defaultData, ...params.defaultData } }
-            }
-            return { ...state, defaultData: params.defaultData }
-        case 'theEditer':
-            return { ...state, theEditer: params.theEditer }
-        case 'del':
-            return { ...state, del: params.del }
-        case 'drawerVis':
-            return { ...state, drawerVis: params.drawerVis }
-        case 'logsData':
-            return { ...state, logsData: params.logsData }
-        default:
-            return state;
-    }
-}
-function Page() {
-    /**============================================================变量============================================================*/
-    const [bState, dispatch] = useReducer(reducer, { visible: false, defaultData: null, theEditer: null, del: false, drawerVis: false, logsData: [] })
-    const { logsData, drawerVis, visible, defaultData } = bState
-    const [params, setParams] = useState<Params>({ checkStatus: 0, name: '', executionStatus: 0, pageSize: 20, pageNum: 1 })
-    const { state, advancedList } = useModel('useOperating.useExamine')
-    const { addDispath, show, catlog, getDetail } = useModel('useOperating.useNews', model => ({
-        addDispath: model.dispatch,
-        show: model.state.visible,
-        catlog: model.catlog,
-        getDetail: model.getDetail,
-    }))
-    const { getWXInfo } = useModel('useOperating.useMaterialContent', model => ({ getWXInfo: model.getWXInfo }))
-    /**============================================================事件============================================================*/
-    /**任务名称操作*/
-    const taskChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
-        let value = event.target.value
-        setParams({ ...params, name: value })
-    }, [params])
-    /**审查状态操作*/
-    const eStatusChange = useCallback((value: SelectValue) => {
-        setParams({ ...params, checkStatus: value })
-    }, [params])
-    /**执行状态操作*/
-    const pStatusChange = useCallback((value: SelectValue) => {
-        setParams({ ...params, executionStatus: value })
-    }, [params])
-    /**搜索值改变重新请求列表*/
-    useEffect(() => {
-        advancedList.run({ ...params, mpId: state.mpId })
-    }, [params, state.mpId])
-    //高级群发分页
-    const pageSize = useCallback((page: number, pageSize?: number) => {
-        // setParams({ ...params, pageNum: page, pageSize })
-        advancedList.run({ ...params, mpId: state.mpId, pageNum: page, pageSize })
-    }, [params, state.mpId])
-    // 执行日志打开
-    const journalHandle = useCallback((strategyId: number) => {
-        dispatch({ type: 'drawerVis', params: { drawerVis: true } })
-        catlog.run(strategyId).then((data) => {
-            dispatch({ type: 'logsData', params: { logsData: data } })
-        })
-    }, [])
-    //编辑详情打开时查询详情信息插入数据
-    const showModal = useCallback((data: any, type: number) => {
-        getDetail.run(data.id).then((res) => {
-            let { mediaInfo, msgType, mediaId, triggerType, weekDay } = res
-            let newtriggerType = triggerType === 3 ? 4 : triggerType === 2 && weekDay ? 3 : triggerType
-            if (data.msgType === 'text') {
-                let theEdit = { textContent: mediaInfo?.textContent?.replace(/href/ig, '_href').split('<br/>'), msgType }
-                dispatch({ type: 'setDefaultData', params: { defaultData: { ...res, theEdit, triggerType: newtriggerType } } })
-                switch (type) {
-                    case 1:
-                        dispatch({ type: 'show' })
-                        break;
-                    default:
-                        addDispath({ type: 'show' })
-                        break;
-                }
-            } else {
-                let { name, url, title, videoTitle, videoDescription } = mediaInfo
-                let theEdit = {
-                    url: url,
-                    title: name || title,
-                    msgType,
-                    mediaId,
-                    content: mediaInfo,//NEWS使用
-                }
-                if (msgType === 'mpvideo') {
-                    theEdit['title'] = videoTitle
-                    theEdit['videoTitle'] = videoTitle
-                    theEdit['videoDescription'] = videoDescription
-                }
-                if (msgType === 'mpnews' || msgType === 'image') {
-                    dispatch({ type: 'setDefaultData', params: { defaultData: { ...res, theEdit, triggerType: newtriggerType } } })
-                    switch (type) {
-                        case 1:
-                            dispatch({ type: 'show' })
-                            break;
-                        default:
-                            addDispath({ type: 'show' })
-                            break;
-                    }
-                } else {
-                    dispatch({ type: 'setDefaultData', params: { defaultData: { ...res, theEdit, triggerType: newtriggerType } } })
-                    switch (type) {
-                        case 1:
-                            dispatch({ type: 'show' })
-                            break;
-                        default:
-                            addDispath({ type: 'show' })
-                            break;
-                    }
-                }
-            }
-        })
-    }, [dispatch, addDispath])
-     /**============================================================JSX============================================================*/
-    return <UesrList
-        //顶部搜索条件
-        header={
-            <Space>
-                <Select onChange={eStatusChange} style={{ width: 180 }} value={params.checkStatus} placeholder='审查状态' allowClear>
-                    <Select.Option value={0} >待审查</Select.Option>
-                    <Select.Option value={100}>审查成功</Select.Option>
-                    <Select.Option value={-1}>审查有问题</Select.Option>
-                </Select>
-                <Select onChange={pStatusChange} style={{ width: 180 }} value={params.executionStatus} placeholder='执行状态' allowClear >
-                    <Option value={0}>创建未执行</Option>
-                    <Option value={1}>执行中</Option>
-                    <Option value={2}>已完成</Option>
-                    <Option value={-1}>已停止</Option>
-                </Select>
-                <Input onChange={taskChange} style={{ width: 180 }} placeholder='任务名称搜索' allowClear />
-            </Space>
-        }
-    >
-        <div>
-            {/* table */}
-            <Tables
-                dataSource={advancedList?.data?.records || []}
-                columns={columns({ show: showModal, getWXInfo, journalHandle, })}
-                total={advancedList?.data?.total}
-                current={advancedList?.data?.current}
-                pageChange={pageSize}
-                sizeChange={pageSize}
-                size={'small'}
-            />
-            {/* 详情 */}
-            <Drawer
-                title="内容详情"
-                placement="right"
-                width={400}
-                closable={false}
-                onClose={() => {
-                    dispatch({ type: 'show' })
-                    dispatch({ type: 'del', params: { del: false } })
-                    dispatch({ type: 'setDefaultData', params: { defaultData: null } })
-                }}
-                visible={visible}
-                destroyOnClose
-            >
-                <WxDetailsBox data={{ ...defaultData?.theEdit, mpStrategyDeletes: defaultData?.mpStrategyDeletes, id: defaultData?.id }} del={false} newsDispatch={dispatch} />
-            </Drawer>
-            {/* 执行日志 */}
-            <Drawer
-                title="执行日志"
-                placement='top'
-                onClose={() => dispatch({ type: 'drawerVis', params: { drawerVis: false } })}
-                visible={drawerVis}
-                height='450'
-            >
-                <Tables
-                    dataSource={logsData}
-                    columns={expandedRowRender()}
-                    size='small'
-                />
-            </Drawer>
-            {/* 编辑 */}
-            {show && <AddModal defaultData={defaultData} AdvancedDispatch={dispatch} isReview={true} />}
-        </div>
-    </UesrList>
-}
-export default Page

+ 0 - 58
src/pages/operatePage/examine/examineAdvanced/sonTableConfig.tsx

@@ -1,58 +0,0 @@
-import { Badge, Button, Popconfirm } from 'antd';
-import React from 'react'
-import './table.less'
-export const expandedRowRender = () => {
-    let status = { '-2': 'error', '-1': 'error', '0': 'success', '1': 'processing' }
-    let texts = { '-2': '删除', '-1': '失败', '0': '发送中', '1': '成功' }
-    let columns: any = [
-        {
-            title: '消息状态',
-            dataIndex: 'executionStatus',
-            key: 'executionStatus',
-            align: 'center',
-            render: (a: number, b: { failMsg: string }) => {
-                return <div style={{ display: 'flex', flexFlow: 'column' }}>
-                    <Badge status={status[a]} text={texts[a]} />
-                    {(a === -1) && <span>描述:{b.failMsg}</span>}
-                </div >
-            }
-        },
-        {
-            title: '执行时间',
-            dataIndex: 'createTime',
-            key: 'createTime',
-            align: 'center',
-            render: (a: string) => {
-                return <div>{a}</div>
-            }
-        },
-        {
-            title: '预期送达人数',
-            dataIndex: 'totalCount',
-            key: 'totalCount',
-            align: 'center',
-            render: (a: string) => {
-                return <span>{a}</span>
-            }
-        },
-        {
-            title: '发送成功人数',
-            dataIndex: 'sendCount',
-            key: 'sendCount',
-            align: 'center',
-            render: (a: string) => {
-                return <span>{a}</span>
-            }
-        },
-        {
-            title: '发送失败人数',
-            dataIndex: 'errCount',
-            key: 'errCount',
-            align: 'center',
-            render: (a: string) => {
-                return <span>{a}</span>
-            }
-        },
-    ];
-    return columns
-};

+ 0 - 18
src/pages/operatePage/examine/examineAdvanced/table.less

@@ -1,18 +0,0 @@
-.ant-table-thead {
-  .table_warning {
-    color: #fa8c16 !important;
-    background-color: #fff !important;
-  }
-  .table_success {
-    color: #52c41a !important;
-    background-color: #fff !important;
-  }
-  .table_processing {
-    color: #1890ff !important;
-    background-color: #fff !important;
-  }
-  .table_error {
-    color: #f5222d !important;
-    background-color: #fff !important;
-  }
-}

+ 0 - 180
src/pages/operatePage/examine/examineAdvanced/tableConfig.tsx

@@ -1,180 +0,0 @@
-import { Badge, Button, Space, Tag, Tooltip } from 'antd'
-import React from 'react'
-
-import { newsTypeStrColor } from '@/utils/dictionary'
-import { bgColor } from '@/utils/color'
-import Review from '../components/review'
-import Look from '../components/look'
-type Props = {
-    getWXInfo: any,
-    show: any,
-    journalHandle: (id: number) => void,
-}
-let sex = ['未知', '男', '女']
-export const columns = (props: Props) => {
-    const { getWXInfo, show, journalHandle } = props
-
-    return [
-        {
-            title: '任务标题',
-            dataIndex: 'name',
-            key: 'name',
-            align: 'center',
-        },
-        {
-            title: '公众号',
-            dataIndex: 'appName',
-            key: 'appName',
-            align: 'center',
-            render: (a: string, b: { mpInfo: any }) => {
-                return <span><img src={b?.mpInfo?.headImg || localStorage.bookImg} style={{ width: 25 }} /> <span style={{ marginLeft: 10 }}>{b?.mpInfo?.nickName}</span></span>
-            }
-        },
-        {
-            title: '消息类型',
-            dataIndex: 'msgType',
-            key: 'msgType',
-            align: 'center',
-            render: (a: string) => {
-                return <Tag color={newsTypeStrColor[a]?.color}>{newsTypeStrColor[a]?.text}</Tag>
-            }
-        },
-        {
-            title: '创建时间',
-            dataIndex: 'createTime',
-            key: 'createTime',
-            align: 'center',
-            render: (a: any, b: any) => {
-                return b?.createTime ? b?.createTime : ''
-            }
-        },
-        {
-            title: '发送方式',
-            dataIndex: 'triggerType',
-            key: 'triggerType',
-            align: 'center',
-            render: (a: number, b: { time: string, sendTime: string, weekDay: number, fansFilterSex: number, resDelayHours: number, resDelayMinutes: number, resDelaySecond: number }) => {
-                let type = ['立即发送', '特定时间']
-                let weekType = ['', '周一', '周二', '周三', '周四', '周五', '周六', '周日']
-                let msg = ''
-                let sj = ''
-                let time = b?.resDelayHours || b?.resDelayMinutes || b?.resDelaySecond
-                if (type[a]) {
-                    msg = type[a]
-                    if (a === 1) {
-                        sj = b?.sendTime
-                    }
-                } else {
-                    if (b?.weekDay) {
-                        msg = '每周'
-                        sj = weekType[b?.weekDay] + b?.time
-                    } else {
-                        msg = '每日'
-                        sj = b?.time
-                    }
-                }
-
-                return <div style={{ display: 'flex', flexFlow: 'column ' }}>
-                    {
-                        a === 3 ? <>
-                            <span>关注延迟指定时间</span>
-                            <span>{time ? `${b?.resDelayHours ? b?.resDelayHours + '小时' : ''} ${b?.resDelayMinutes ? b?.resDelayMinutes + '分' : ''}${b?.resDelaySecond}秒` : '立即发送'}</span>
-                        </> : <>
-                            <span>{msg}</span>
-                            {sj && <span>{sj}</span>}
-                        </>
-                    }
-                </div>
-
-            }
-        },
-        {
-            title: '发送对象',
-            dataIndex: 'toAll',
-            key: 'toAll',
-            align: 'center',
-            render: (a: boolean, b: { fansFilterTags: any, sex: number, tagType: number }) => {
-                if (a) {
-                    return '全部粉丝'
-                } else {
-                    return <div style={{ display: 'flex', flexFlow: 'column ' }}>
-                        <span>性别:{b?.sex !== null ? sex[b?.sex] : '全部'}</span>
-                        <span>
-                            {
-                                b?.tagType === 0 ? '类型:并集' : b?.tagType === 1 ? '类型:交集' : b?.tagType === 2 ? '类型:取反' : ''
-                            }
-                        </span>
-                        {
-                            b?.fansFilterTags?.length > 0 && <span>
-                                标签:{
-                                    b?.fansFilterTags?.map((item: any, index: number) => {
-                                        return <Tag key={item.id} color={item?.id ? bgColor[item?.id] : ''} style={{ marginBottom: 8 }}>{item.name}</Tag>
-                                    })
-                                }
-                            </span>
-                        }
-                    </div>
-
-                }
-
-            }
-        },
-        {
-            title: '运行状态',
-            dataIndex: 'executionStatus',
-            key: 'executionStatus',
-            align: 'center',
-            render: (a: number, b: any) => {
-                return <span>
-                    {b.executionStatus === 0 ? <Badge status="warning" text='创建未执行' /> : b.executionStatus === 1 ? <Badge status="processing" text='执行中' /> : b.executionStatus === 2 ? <Badge status="success" text='任务完成' /> : b.executionStatus === -1 ? <Badge status="error" text='任务终止' /> : <Badge status="error" text='执行失败' />}
-                </span>
-            }
-        },
-        {
-            title: '审核状态',
-            dataIndex: 'checkStatus',
-            key: 'checkStatus',
-            align: 'center',
-            render: (a: number, b: any) => {
-                return <span>
-                    {b.checkStatus === 0 ? <Badge status="warning" text='待审查' /> : b.checkStatus === 100 ? <Badge status="success" text='通过' /> : <Tooltip title={`未通过原因:${b?.checkRemark ? b?.checkRemark : ''}`}>
-                        <Badge status="error" text="未通过" />
-                    </Tooltip>}
-                </span>
-            }
-        },
-        {
-            title: '操作',
-            key: 'action',
-            dataIndex: 'action',
-            align: 'center',
-            render: (a: any, data: any) => {
-                return <div onClick={(e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
-                    e.preventDefault()
-                    e.stopPropagation()
-                }}>
-                    <Space>
-                        <Button onClick={() => {
-                            journalHandle(data.id)
-                        }} size='small'>执行日志</Button>
-                        {//只有在未发送是出现
-                            <Button onClick={() => {
-                                show(data, 0)
-                            }} size='small' loading={getWXInfo?.loading}>查看</Button>
-                        }
-                        {//只有在非图文或者图文已发送状态下
-                            < Button onClick={() => {
-                                show(data, 1)
-                            }} size='small' loading={getWXInfo?.loading}>详情</Button>
-                        }
-                        {/* 预览 */}
-                        <Look type='Advanced' strategyId={data.id} id={data.mpId} isExamine={true} wxs={[data?.mpInfo]}/>
-                        {/* 审查 */}
-                        <Review type='Advanced' strategyId={data.id} defaultValue={{ checkStatus: data.checkStatus, checkRemark: data.checkRemark }} />
-                    </Space>
-                </div >
-            }
-        }
-    ]
-}
-

+ 0 - 63
src/pages/operatePage/examine/examineAservice/daysTableConfig.tsx

@@ -1,63 +0,0 @@
-import { QuestionCircleOutlined } from "@ant-design/icons"
-import { Tooltip } from "antd"
-import React from "react"
-
-export const daysColumns = () => {
-    return [
-        {
-            title: '日志ID',
-            dataIndex: 'id',
-            key: 'id',
-            align: 'center'
-        },
-        {
-            title: '公众号',
-            dataIndex: 'mpInfo',
-            key: 'mpInfo',
-            align: 'center',
-            width: 200,
-            render: (a: number[], b: any) => {
-                return <div style={{ display: 'flex', alignItems: 'center' }}>
-                    <img src={b?.mpInfo?.headImg || localStorage.bookImg} style={{width: '25px', height: '25px', marginRight: '10px'}}/>
-                    <span>{b?.mpInfo?.nickName}</span>
-                </div>
-
-            }
-        },
-        {
-            title: '客服消息任务ID',
-            dataIndex: 'kefuMsgStrategyId',
-            key: 'kefuMsgStrategyId',
-            align: 'center'
-        },
-        {
-            title: '公众号ID',
-            dataIndex: 'mpId',
-            key: 'mpId',
-            align: 'center'
-        },
-        {
-            title: <span>预计发送人数<Tooltip title="发送时间 48小时内互动过(关注、点击菜单、发消息)的粉丝">
-            <QuestionCircleOutlined style={{ color: 'red', marginLeft: 2, }} />
-        </Tooltip></span>,
-            dataIndex: 'estimateSendCount',
-            key: 'estimateSendCount',
-            align: 'center'
-        },
-        {
-            title: <span>实际发送人数<Tooltip title="实际收到了消息的人数">
-            <QuestionCircleOutlined style={{ color: 'red', marginLeft: 2, }} />
-        </Tooltip></span>,
-            dataIndex: 'actualSendCount',
-            key: 'actualSendCount',
-            align: 'center'
-        },
-        {
-            title: '任务执行时间',
-            dataIndex: 'createTime',
-            key: 'createTime',
-            align: 'center'
-        }
-    ]
-}
-

+ 0 - 224
src/pages/operatePage/examine/examineAservice/index.tsx

@@ -1,224 +0,0 @@
-import { Button, Drawer, Input, Row, Select, Space } from "antd"
-import { SelectValue } from "antd/es/select"
-import React, { useCallback, useEffect, useReducer, useState } from "react"
-import { useModel } from "umi"
-import UesrList from "../components/userList"
-import Tables from '@/components/Tables'
-import { columns } from './tableConfig'
-import { daysColumns } from "./daysTableConfig"
-import { SearchOutlined } from "@ant-design/icons"
-import AddModal from "../../news/aservice/components/addModal"
-const { Option } = Select
-interface Params {
-    checkStatus?: 0 | 100 | -1 | null | any,//审查状态
-    status?: any,//执行状态
-    taskName?: string,//任务名称
-    pageSize?: number,//每页展示条数
-    pageNum?: number//页数
-}
-type State = {
-    defaultData: any,//编辑填数据
-    theEditer: any,//当前查看数据栏
-}
-export type Action = {
-    type: 'setDefaultData' | 'theEditer' | 'logsData',
-    params?: any
-}
-function reducer(state: State, action: Action) {
-    let { type, params } = action
-    let { defaultData } = state
-    switch (type) {
-        case 'setDefaultData':
-            if (params?.defaultData) {
-                return { ...state, defaultData: { ...defaultData, ...params.defaultData } }
-            }
-            return { ...state, defaultData: params.defaultData }
-        case 'theEditer':
-            return { ...state, theEditer: params.theEditer }
-        case 'logsData':
-            return { ...state, logsData: params.logsData }
-        default:
-            return state;
-    }
-}
-function Page() {
-    /**============================================================变量============================================================*/
-    const [bState, dispatch] = useReducer(reducer, { defaultData: null, theEditer: null})
-    const { defaultData } = bState
-    const [params, setParams] = useState<Params>({ checkStatus: 0, taskName: '', status: 1, pageSize: 20, pageNum: 1 })
-    const [drawerVis, setDrawerVis] = useState<boolean>(false)
-    const [daysId, setDaysId] = useState<number>(0)
-    const [daysMps, setDaysMps] = useState<any[]>([])
-    const [select, setSelect] = useState<string>()
-    const { state, aserviceList } = useModel('useOperating.useExamine')
-    const { addDispath, show, daysMsg, detailKefuMsgStrategy } = useModel('useOperating.useAservice', model => ({
-        addDispath: model.dispatch,
-        show: model.state.visible,
-        daysMsg: model.daysKefuMsgStrategy,
-        detailKefuMsgStrategy: model.detailKefuMsgStrategy,
-    }))
-    const { getWXInfo } = useModel('useOperating.useMaterialContent', model => ({ getWXInfo: model.getWXInfo }))
-    const { filterWxs } = useModel('useOperating.useWxGroupList', model => ({ filterWxs: model.state.filterWxs }))
-    const { userId } = useModel('useOperating.useUser', model => ({ userId: model.state.selectdUserId }))
-    /**============================================================事件============================================================*/
-    /**任务名称操作*/
-    const taskChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
-        let value = event.target.value
-        setParams({ ...params, taskName: value })
-    }, [params])
-    /**审查状态操作*/
-    const eStatusChange = useCallback((value: SelectValue) => {
-        setParams({ ...params, checkStatus: value !== undefined ? Number(value) : '' })
-    }, [params])
-    /**执行状态操作*/
-    const pStatusChange = useCallback((value: SelectValue) => {
-        setParams({ ...params, status: value !== undefined ? Number(value) : '' })
-    }, [params])
-    /**搜索值改变重新请求列表*/
-    useEffect(() => {
-        aserviceList.run({ ...params, mpId: state.mpId })
-    }, [params, state.mpId])
-    //分页
-    const pageSize = useCallback((page: number, pageSize?: number) => {
-        // setParams({ ...params, pageNum: page, pageSize })
-        aserviceList.run({ ...params, mpId: state.mpId, pageNum: page, pageSize })
-    }, [params, state.mpId])
-    //日志选择框
-    const selectChange = useCallback((value: string, option: any) => {
-        setSelect(value)
-    }, [daysMps])
-    //日志分页
-    const daysPageSize = useCallback((page: number, pageSize?: number) => {
-        daysMsg.run({ strategyId: daysId, pageNum: page, pageSize: pageSize, belongUserId: userId })
-    }, [daysId, userId])
-    // 日志查询指定公众号
-    const searchJournal = useCallback(() => {
-        let query: { strategyId: number, pageNum: number, pageSize: number, belongUserId: number, mpId?: string } = { strategyId: daysId, pageNum: 1, pageSize: 20, mpId: select, belongUserId: userId }
-        if (!select) {
-            query = { strategyId: daysId, pageNum: 1, pageSize: 20, belongUserId: userId }
-        }
-        daysMsg.run(query)
-    }, [select, daysId, userId])
-    // 执行日志打开
-    const journalHandle = useCallback((strategyId: number, mpIds: number[]) => {
-        let arr: any = []
-        filterWxs.forEach((wx: any) => {
-            if (mpIds.some((id) => id === wx.id)) {
-                arr.push(wx)
-            }
-        })
-        setDaysMps(arr)
-        setDaysId(strategyId)
-        setDrawerVis(true)
-        daysMsg.run({ strategyId, pageNum: 1, pageSize: 20, belongUserId: userId })
-    }, [userId])
-    //编辑详情打开时查询详情信息插入数据
-    //编辑详情打开时查询详情信息插入数据
-    const showModal = useCallback((data: any, isCopy?: boolean) => {
-        let { id, islook } = data
-        detailKefuMsgStrategy.run({ strategyId: id, belongUserId: userId }).then((res: any) => {
-            if (res) {
-                let data = JSON.parse(JSON.stringify(res))
-                let mpIds: any[] = filterWxs.filter((wx: { id: number }) => {
-                    if (data.mpIds.some((id: number) => id === wx.id)) {
-                        return wx
-                    }
-                    return null
-                })
-                if (data?.weekDay) {
-                    data.triggerType = 3
-                }
-                data.mpIds = mpIds
-                data.fans = data.fansAll ? 1 : 0
-                let { msgContents } = data
-                let newMsgContents = msgContents ? JSON.parse(JSON.stringify(msgContents)) : []
-                data['msgContents'] = newMsgContents?.map((item: { textContent: any, msgType: string, newsList: any[], platformMediaInfo: any }) => {
-                    if (item.msgType === 'news') {
-                        let reg = new RegExp(' ', "g") // 
-                        let newsList = item?.newsList?.map((nl: { newsTitle: string }) => {
-                            return { ...nl, newsTitle: nl?.newsTitle.replace(reg, '&nbsp;') }
-                        })
-                        item['newsList'] = newsList
-                    }
-                    if (item.msgType === 'miniprogrampage') {
-                        item['imageUrl'] = item?.platformMediaInfo?.url
-                    }
-                    return item
-                })
-                data['islook'] = !!islook
-                addDispath({ type: 'initData', params: { ...data, id: isCopy ? 0 : data.id, visible: true } })
-                dispatch({ type: 'setDefaultData', params: { defaultData: { ...data, id: isCopy ? 0 : data.id } } })
-            }
-        })
-    }, [dispatch, addDispath, filterWxs, userId])
-
-    /**============================================================JSX============================================================*/
-    return <UesrList
-        //顶部搜索条件
-        header={
-            <Space>
-                <Select onChange={eStatusChange} style={{ width: 180 }} value={params.checkStatus} placeholder='审查状态' allowClear>
-                    <Select.Option value={0} >待审查</Select.Option>
-                    <Select.Option value={100}>审查成功</Select.Option>
-                    <Select.Option value={-1}>审查有问题</Select.Option>
-                </Select>
-                <Select onChange={pStatusChange} style={{ width: 180 }} value={params.status} placeholder='执行状态' allowClear >
-                    <Option value={0}>未执行</Option>
-                    <Option value={1}>执行中</Option>
-                    <Option value={2}>任务完成</Option>
-                    <Option value={3}>任务终止</Option>
-                </Select>
-                <Input onChange={taskChange} style={{ width: 180 }} placeholder='任务名称搜索' allowClear />
-            </Space>
-        }
-    >
-        <div>
-            {/* table */}
-            <Tables
-                dataSource={aserviceList?.data?.records || []}
-                columns={columns({ show: showModal, getWXInfo, journalHandle, filterWxs })}
-                total={aserviceList?.data?.total}
-                current={aserviceList?.data?.current}
-                pageChange={pageSize}
-                sizeChange={pageSize}
-                size={'small'}
-            />
-            {/* 执行日志 */}
-            <Drawer
-                title="执行日志"
-                placement='top'
-                onClose={() => setDrawerVis(false)}
-                visible={drawerVis}
-                height='450'
-            >
-                <Space direction="vertical">
-                    <Row>
-                        <Select style={{ width: '200px' }} value={select} onChange={selectChange} showArrow allowClear={true}>
-                            {
-                                daysMps.map((option: any) => {
-                                    return <Option key={option.id} value={option.id}>{option?.nickName}</Option>
-                                })
-                            }
-                        </Select>
-                        <Button icon={<SearchOutlined />} onClick={searchJournal}>搜索</Button>
-                    </Row>
-                    {
-                        <Tables
-                            dataSource={daysMsg?.data?.records || []}
-                            columns={daysColumns()} scroll={{ y: 180 }}
-                            total={daysMsg?.data?.total}
-                            current={daysMsg?.data?.current}
-                            pageChange={daysPageSize}
-                            sizeChange={daysPageSize}
-                            loading={daysMsg?.loading}
-                        />
-                    }
-
-                </Space>
-            </Drawer>
-            {/* 编辑 */}
-            {show && <AddModal defaultData={defaultData} AdvancedDispatch={dispatch} isReview={true}/>}
-        </div>
-    </UesrList>
-}
-export default Page

+ 0 - 18
src/pages/operatePage/examine/examineAservice/table.less

@@ -1,18 +0,0 @@
-.ant-table-thead {
-  .table_warning {
-    color: #fa8c16 !important;
-    background-color: #fff !important;
-  }
-  .table_success {
-    color: #52c41a !important;
-    background-color: #fff !important;
-  }
-  .table_processing {
-    color: #1890ff !important;
-    background-color: #fff !important;
-  }
-  .table_error {
-    color: #f5222d !important;
-    background-color: #fff !important;
-  }
-}

+ 0 - 172
src/pages/operatePage/examine/examineAservice/tableConfig.tsx

@@ -1,172 +0,0 @@
-import { Badge, Button, Space, Tag, Tooltip } from 'antd'
-import React from 'react'
-import { bgColor } from '@/utils/color'
-import Review from '../components/review'
-import Look from '../components/look'
-
-let sex = ['未知', '男', '女']
-
-type Props = {
-    journalHandle: (id: number, mpIds: number[]) => void,
-    filterWxs: any[],
-    show: any,
-    getWXInfo: any
-}
-
-export const columns = (props: Props) => {
-    const { journalHandle, filterWxs, show, getWXInfo, } = props
-    return [
-        {
-            title: '消息名称',
-            dataIndex: 'taskName',
-            key: 'taskName',
-            align: 'center',
-        },
-        {
-            title: '创建人',
-            dataIndex: 'createUser',
-            key: 'createUser',
-            align: 'center',
-            render: (a: any) => {
-                return a.nickName
-            }
-        },
-        {
-            title: '公众号',
-            dataIndex: 'mpInfoList',
-            key: 'mpInfoList',
-            align: 'center',
-            render: (a: any[], b: { headImg: string }) => {
-                return <div style={{ display: 'flex', flexFlow: 'column' }}>
-                    {
-                        a?.map((wx: { headImg: string, nickName: string, id: number }, index: number) => {
-                            if (index < 5) {
-                                return <span key={wx.id}><img src={wx?.headImg || localStorage.bookImg} style={{ width: 25, marginBottom: 8 }} /> <span style={{ marginLeft: 10 }}>{wx.nickName}</span></span>
-                            }
-                            return null
-                        })
-                    }
-                    {
-                        a.length > 5 && <span>...共{a.length}个公众号</span>
-                    }
-                </div>
-            }
-        },
-        {
-            title: '发送方式',
-            dataIndex: 'triggerType',
-            key: 'triggerType',
-            align: 'center',
-            render: (a: number, b: { time: string, sendTime: string, weekDay: number, fansFilterSex: number }) => {
-                let type = ['立即发送', '特定时间']
-                let weekType = ['', '周一', '周二', '周三', '周四', '周五', '周六', '周日']
-                let msg = ''
-                let sj = ''
-                if (type[a]) {
-                    msg = type[a]
-                    if (a === 1) {
-                        sj = b?.sendTime
-                    }
-                } else {
-                    if (b?.weekDay) {
-                        msg = '每周'
-                        sj = weekType[b?.weekDay] + b?.time
-                    } else {
-                        msg = '每日'
-                        sj = b?.time
-                    }
-                }
-
-                return <div style={{ display: 'flex', flexFlow: 'column ' }}>
-                    <span>{msg}</span>
-                    {sj && <span>{sj}</span>}
-                </div>
-
-            }
-        },
-        {
-            title: '发送对象',
-            dataIndex: 'fansAll',
-            key: 'fansAll',
-            align: 'center',
-            render: (a: string, b: { time: string, sendTime: string, weekDay: number, fansFilterSex: number, fansFilterTags: any[], fansFilterTagType: number }) => {
-                if (a) {
-                    return '全部粉丝'
-                } else {
-                    return <div style={{ display: 'flex', flexFlow: 'column ' }}>
-                        <span>性别:{b?.fansFilterSex !== null ? sex[b?.fansFilterSex] : '全部'}</span>
-                        {/* <span>类型:{fansTagType[b?.tagType]}</span> */}
-                        <div>
-                            {
-                                b?.fansFilterTagType === 0 ? '类型:并集' : b?.fansFilterTagType === 1 ? '类型:交集' : b?.fansFilterTagType === 2 ? '类型:取反' : ''
-                            }
-                        </div>
-                        {
-                            b?.fansFilterTags?.length > 0 && <div>
-                                标签:{
-                                    b?.fansFilterTags?.map((item: any, index: number) => {
-                                        return <Tag key={item.id} color={item?.id ? bgColor[item?.id] : ''} style={{ marginBottom: 8 }}>{item.name}</Tag>
-                                    })
-                                }
-                            </div>
-                        }
-
-
-                    </div>
-
-                }
-            }
-        },
-        {
-            title: '运行状态',
-            dataIndex: 'executionStatus',
-            key: 'executionStatus',
-            align: 'center',
-            render: (a: number, b: any) => {
-                return <span>
-                    {b.executionStatus === 0 ? <Badge status="error" text='执行失败请点击强制启动' /> : b.executionStatus === 1 ? <Badge status="processing" text='执行中' /> : b.executionStatus === 2 ? <Badge status="success" text='任务完成' /> : <Badge status="error" text='任务终止' />}
-                </span>
-            }
-        },
-        {
-            title: '审核状态',
-            dataIndex: 'checkStatus',
-            key: 'checkStatus',
-            align: 'center',
-            render: (a: number, b: any) => {
-                return <span>
-                    {b.checkStatus === 0 ? <Badge status="warning" text='待审查' /> : b.checkStatus === 100 ? <Badge status="success" text='通过' /> : <Tooltip title={`未通过原因:${b?.checkRemark ? b?.checkRemark : ''}`}>
-                        <Badge status="error" text="未通过" />
-                    </Tooltip>}
-                </span>
-            }
-        },
-        {
-            title: '操作',
-            key: 'action',
-            dataIndex: 'action',
-            align: 'center',
-            render: (a: any, data: any) => {
-                return <div onClick={(e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
-                    e.preventDefault()
-                    e.stopPropagation()
-                }}>
-                    <Space>
-                        <Button onClick={() => {
-                            journalHandle(data.id, data.mpIds)
-                        }} size='small'>执行日志</Button>
-                        {//只有在未发送是出现
-                            < Button onClick={() => {
-                                show(data)
-                            }} size='small' loading={getWXInfo?.loading}>查看</Button>
-                        }
-                        {/* 预览 */}
-                        <Look type='Aservice' strategyId={data.id} id={data.mpIds} isExamine={true} wxs={data.mpInfoList}/>
-                        {/* 审查 */}
-                        <Review type='Aservice' strategyId={data.id} defaultValue={{ checkStatus: data.checkStatus, checkRemark: data.checkRemark }} />
-                    </Space>
-                </div >
-            }
-        }
-    ]
-}

+ 0 - 136
src/pages/operatePage/examine/examineAtemplate/index.tsx

@@ -1,136 +0,0 @@
-import { Drawer, Input, Select, Space } from "antd"
-import { SelectValue } from "antd/es/select"
-import React, { useCallback, useEffect, useState } from "react"
-import { useModel } from "umi"
-import UesrList from "../components/userList"
-import Tables from '@/components/Tables'
-import { columns } from './tableConfig'
-import WxDetailsBox from "@/components/WxDetailsBox"
-import { daysColumns } from "./sonTableConfig"
-import AddModal from "../../news/atemplate/components/addModal"
-const { Option } = Select
-interface Params {
-    checkStatus?: 0 | 1 | 2 | -1 | null | any,//审查状态
-    executionStatus?: any,//执行状态
-    taskName?: string,//任务名称
-    pageSize?: number,//每页展示条数
-    pageNum?: number//页数
-}
-function Page() {
-    /**============================================================变量============================================================*/
-    const [params, setParams] = useState<Params>({ checkStatus: 0, taskName: '', executionStatus: 1, pageSize: 20, pageNum: 1 })
-    const { state, atemplateList } = useModel('useOperating.useExamine')
-    const [daysMsg, setDaysMsg] = useState<any[]>([])  // 日志
-    const [temVisible, setTemVisible] = useState<boolean>(false)   // 新增模板消息弹窗
-    const [temData, setTemData] = useState<{ title: string, dataTem: string }>({ title: "", dataTem: "" }) // 保存查看数据
-    const [addVisible, setAddVisible] = useState<boolean>(false)   // 详情弹窗控制
-    const [detailsData, setDetailsData] = useState<any>({})  // 保存详情数据
-    const [drawerVis, setDrawerVis] = useState<boolean>(false) // 执行日志弹窗控制
-    const { getWXInfo } = useModel('useOperating.useMaterialContent', model => ({ getWXInfo: model.getWXInfo }))
-    /**============================================================事件============================================================*/
-    /**任务名称操作*/
-    const taskChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
-        let value = event.target.value
-        setParams({ ...params, taskName: value })
-    }, [params])
-    /**审查状态操作*/
-    const eStatusChange = useCallback((value: SelectValue) => {
-        setParams({ ...params, checkStatus: value !== undefined ? Number(value) : '' })
-    }, [params])
-    /**执行状态操作*/
-    const pStatusChange = useCallback((value: SelectValue) => {
-        setParams({ ...params, executionStatus: value !== undefined ? Number(value) : '' })
-    }, [params])
-    /**搜索值改变重新请求列表*/
-    useEffect(() => {
-        atemplateList.run({ ...params, mpId: state.mpId })
-    }, [params, state.mpId])
-    //高级群发分页
-    const pageSize = useCallback((page: number, pageSize?: number) => {
-        // setParams({ ...params, pageNum: page, pageSize })
-        atemplateList.run({ ...params, mpId: state.mpId, pageNum: page, pageSize })
-    }, [params, state.mpId])
-    // 执行日志打开
-    const journalHandle = useCallback((value: any) => {
-        setDrawerVis(true)
-        setDaysMsg(value?.executionLogs)
-    }, [daysMsg, drawerVis])
-    //编辑详情打开时查询详情信息插入数据
-    const seeHandle = useCallback((tem: string, contentFields: any[], title: string) => {
-        let newDataTem: string = tem
-        contentFields.forEach((item: any) => {
-            let reg = new RegExp("{{" + item.field + ".DATA}}", "ig")
-            if (item) {
-                newDataTem = newDataTem.replace(reg, `<span style="color:${item?.color ? item?.color : '#000'}">${item.value}</span>`)
-            }
-        });
-        setTemData({ title, dataTem: newDataTem })
-        setTemVisible(true)
-    }, [temData])
-    /** 详情 */
-    const show = useCallback((data: any) => {
-        setDetailsData(data)
-        setAddVisible(true)
-    }, [addVisible, detailsData])
-    /**============================================================JSX============================================================*/
-    return <UesrList
-        //顶部搜索条件
-        header={
-            <Space>
-                <Select onChange={eStatusChange} style={{ width: 180 }} value={params.checkStatus} placeholder='审查状态' allowClear>
-                    <Select.Option value={0} >待审查</Select.Option>
-                    <Select.Option value={100}>审查成功</Select.Option>
-                    <Select.Option value={-1}>审查有问题</Select.Option>
-                </Select>
-                <Select onChange={pStatusChange} style={{ width: 180 }} value={params.executionStatus} placeholder='执行状态' allowClear>
-                    <Option value={0}>创建未执行</Option>
-                    <Option value={1}>执行中</Option>
-                    <Option value={2}>任务完成</Option>
-                    <Option value={-1}>任务终止</Option>
-                </Select>
-                <Input onChange={taskChange} style={{ width: 180 }} placeholder='模板消息名称搜索' allowClear />
-            </Space>
-        }
-    >
-        <div>
-            {/* table */}
-            <Tables
-                dataSource={atemplateList?.data?.records || []}
-                columns={columns({ seeHandle, show, getWXInfo, journalHandle, })}
-                total={atemplateList?.data?.total}
-                current={atemplateList?.data?.current}
-                pageChange={pageSize}
-                sizeChange={pageSize}
-                size={'small'}
-            />
-
-            <Drawer
-                title="查看模板消息内容"
-                placement='right'
-                onClose={() => setTemVisible(false)}
-                visible={temVisible}
-                width='380'
-            >
-                <WxDetailsBox data={{ msgType: 'tem', data: temData }}></WxDetailsBox>
-            </Drawer>
-
-            {/* 执行日志 */}
-            <Drawer
-                title="执行日志"
-                placement='top'
-                onClose={() => { setDrawerVis(false) }}
-                visible={drawerVis}
-                height='450'
-            >
-                <Tables
-                    dataSource={daysMsg}
-                    columns={daysColumns()}
-                    size='small'
-                />
-            </Drawer>
-            {/* 编辑 */}
-            {addVisible && <AddModal defaultData={detailsData} visible={addVisible} onHide={() => { setAddVisible(false); setDetailsData({}) }} isModify={false}></AddModal>}
-        </div>
-    </UesrList>
-}
-export default Page

+ 0 - 53
src/pages/operatePage/examine/examineAtemplate/sonTableConfig.tsx

@@ -1,53 +0,0 @@
-
-export const daysColumns: any = () => {
-    return [
-        {
-            title: '日志ID',
-            dataIndex: 'id',
-            key: 'id',
-            align: 'center'
-        },
-        {
-            title: '公众号ID',
-            dataIndex: 'mpId',
-            key: 'mpId',
-            align: 'center'
-        },
-        {
-            title: '策略ID',
-            dataIndex: 'strategyId',
-            key: 'strategyId',
-            align: 'center'
-        },
-        {
-            title: '预计发送人数',
-            dataIndex: 'estimateSendCount',
-            key: 'estimateSendCount',
-            align: 'center'
-        },
-        {
-            title: '实际发送人数',
-            dataIndex: 'actualSendCount',
-            key: 'actualSendCount',
-            align: 'center'
-        },
-        {
-            title: '成功收到的人数',
-            dataIndex: 'sendSuccessCount',
-            key: 'sendSuccessCount',
-            align: 'center'
-        },
-        {
-            title: '收到失败的人数',
-            dataIndex: 'sendFailedCount',
-            key: 'sendFailedCount',
-            align: 'center'
-        },
-        {
-            title: '任务执行时间',
-            dataIndex: 'createTime',
-            key: 'createTime',
-            align: 'center'
-        }
-    ]
-}

+ 0 - 18
src/pages/operatePage/examine/examineAtemplate/table.less

@@ -1,18 +0,0 @@
-.ant-table-thead {
-  .table_warning {
-    color: #fa8c16 !important;
-    background-color: #fff !important;
-  }
-  .table_success {
-    color: #52c41a !important;
-    background-color: #fff !important;
-  }
-  .table_processing {
-    color: #1890ff !important;
-    background-color: #fff !important;
-  }
-  .table_error {
-    color: #f5222d !important;
-    background-color: #fff !important;
-  }
-}

+ 0 - 167
src/pages/operatePage/examine/examineAtemplate/tableConfig.tsx

@@ -1,167 +0,0 @@
-import { Badge, Button, Space, Tag, Tooltip } from 'antd'
-import React from 'react'
-
-import { bgColor } from '@/utils/color'
-import Review from '../components/review'
-import Look from '../components/look'
-type Props = {
-    getWXInfo: any,
-    show: (data: any) => void,
-    seeHandle: (tem: string, contentFields: any[], title: string) => void,
-    journalHandle: (value: any) => void,
-}
-let sex = ['未知', '男', '女']
-export const columns = (props: Props) => {
-    const { getWXInfo, seeHandle, show, journalHandle } = props
-
-    return [
-        {
-            title: '模板消息名称',
-            dataIndex: 'taskName',
-            key: 'taskName',
-            align: 'center',
-            width: 200,
-        },
-        {
-            title: '模板名称',
-            dataIndex: 'templateMsgInfo',
-            key: 'templateMsgInfo',
-            align: 'center',
-            width: 220,
-            render: (a: any, b: any) => {
-                return <span>{a?.title}</span>
-            }
-        },
-        {
-            title: '发送对象',
-            dataIndex: 'fansAll',
-            key: 'fansAll',
-            align: 'center',
-            width: 220,
-            render: (a: string, b: { time: string, sendTime: string, weekDay: number, fansFilterSex: number, fansFilterTags: any[], fansFilterTagType: number }) => {
-                if (a) {
-                    return '全部粉丝'
-                } else {
-                    return <div style={{ display: 'flex', flexFlow: 'column ' }}>
-                        <span>性别:{b?.fansFilterSex !== null ? sex[b?.fansFilterSex] : '全部'}</span>
-                        {/* <span>类型:{fansTagType[b?.tagType]}</span> */}
-                        <div>
-                            {
-                                b?.fansFilterTagType === 0 ? '类型:并集' : b?.fansFilterTagType === 1 ? '类型:交集' : b?.fansFilterTagType === 2 ? '类型:取反' : ''
-                            }
-                        </div>
-                        {
-                            b?.fansFilterTags?.length > 0 && <div>
-                                标签:{
-                                    b?.fansFilterTags?.map((item: any, index: number) => {
-                                        return <Tag key={item.id} color={item?.id ? bgColor[item?.id] : ''} style={{ marginBottom: 8 }}>{item.name}</Tag>
-                                    })
-                                }
-                            </div>
-                        }
-
-
-                    </div>
-
-                }
-            }
-        },
-        {
-            title: '发送方式',
-            dataIndex: 'triggerType',
-            key: 'triggerType',
-            align: 'center',
-            width: 250,
-            render: (a: number, b: any) => {
-                let type = ['立即发送', '特定时间']
-                let msg = ''
-                let sj = ''
-                let time = b?.resDelayHours || b?.resDelayMinutes || b?.resDelaySecond
-                if (type[a]) {
-                    msg = type[a]
-                    if (a === 1) {
-                        sj = b?.sendTime
-                    }
-                }
-
-                return <div style={{ display: 'flex', flexFlow: 'column ' }}>
-                    {
-                        a === 3 ? <>
-                            <span>关注延迟指定时间</span>
-                            <span>{time ? `${b?.resDelayHours ? b?.resDelayHours + '小时' : ''} ${b?.resDelayMinutes ? b?.resDelayMinutes + '分' : ''}${b?.resDelaySecond}秒` : '立即发送'}</span>
-                        </> : <>
-                                <span>{msg}</span>
-                                {sj && <span>{sj}</span>}
-                            </>
-                    }
-                </div>
-
-            }
-        },
-        {
-            title: '运行状态',
-            dataIndex: 'executionStatus',
-            key: 'executionStatus',
-            align: 'center',
-            width: 100,
-            render: (a: number, b: any) => {
-                return <span>
-                    {b.executionStatus === 0 ? <Badge status="warning" text='创建未执行' /> : b.executionStatus === 1 ? <Badge status="processing" text='执行中' /> : b.executionStatus === 2 ? <Badge status="success" text='任务完成' /> : <Badge status="error" text='任务终止' />}
-                </span>
-            }
-        },
-        {
-            title: '启动状态',
-            dataIndex: 'enabled',
-            key: 'enabled',
-            align: 'center',
-            width: 100,
-            render: (a: any, b: any) => {
-                return <span>{a ? <Tag color="#87d068">启动</Tag> : <Tag color="#f50">暂停</Tag>}</span>
-            }
-        },
-        {
-            title: '审核状态',
-            dataIndex: 'checkStatus',
-            key: 'checkStatus',
-            align: 'center',
-            width: 120,
-            render: (a: number, b: any) => {
-                return <span>
-                    {b.checkStatus === 0 ? <Badge status="warning" text='待审查' /> : b.checkStatus === 100 ? <Badge status="success" text='通过' /> : <Tooltip title={`未通过原因:${b?.checkRemark ? b?.checkRemark : ''}`}>
-                        <Badge status="error" text="未通过" />
-                    </Tooltip>}
-                </span>
-            }
-        },
-        {
-            title: '操作',
-            key: 'action',
-            dataIndex: 'action',
-            align: 'center',
-            render: (a: any, data: any) => {
-                return <div onClick={(e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
-                    e.preventDefault()
-                    e.stopPropagation()
-                }}>
-                    <Space>
-                        <Button onClick={() => {
-                            journalHandle(data)
-                        }} size='small'>执行日志</Button>
-                        <Button onClick={() => {
-                            seeHandle(data?.templateMsgInfo?.template?.content, data?.contentFields, data?.templateMsgInfo?.title)
-                        }} size='small' loading={getWXInfo?.loading}>查看</Button>
-                        < Button onClick={() => {
-                            show(data)
-                        }} size='small' loading={getWXInfo?.loading}>详情</Button>
-                        {/* 预览 */}
-                        <Look type='Atemplate' strategyId={data.id} id={data.mpId} isExamine={true} wxs={[data?.mpInfo]}/>
-                        {/* 审查 */}
-                        <Review type='Atemplate' strategyId={data.id} defaultValue={{ checkStatus: data.checkStatus, checkRemark: data.checkRemark }} />
-                    </Space>
-                </div >
-            }
-        }
-    ]
-}
-

+ 0 - 113
src/pages/operatePage/examine/examineInteract/index.tsx

@@ -1,113 +0,0 @@
-import { Select, Space } from "antd"
-import { SelectValue } from "antd/es/select"
-import React, { useCallback, useEffect, useState } from "react"
-import { useModel } from "umi"
-import UesrList from "../components/userList"
-import Tables from '@/components/Tables'
-import { columns } from './tableConfig'
-import PushModal from "../../interact/components/pushModal"
-const { Option } = Select
-interface Params {
-    checkStatus?: 0 | 1 | 2 | -1 | null | any,//审查状态
-    eventType?: any,//执行状态
-    pageSize?: number,//每页展示条数
-    pageNum?: number//页数
-}
-function Page() {
-    /**============================================================变量============================================================*/
-    const [params, setParams] = useState<Params>({ checkStatus: 0, eventType: '', pageSize: 20, pageNum: 1 })
-    const { state, interactList } = useModel('useOperating.useExamine')
-    const { getWXInfo } = useModel('useOperating.useMaterialContent', model => ({ getWXInfo: model.getWXInfo }))
-    const { searchDetail } = useModel('useOperating.useInteract')
-    const { initData } = useModel('useOperating.useInteract')
-    const [data, setData] = useState<any>(null)//footer编辑数据
-    const [visible, setVisible] = useState<boolean>(false)
-    /**============================================================事件============================================================*/
-    /**审查状态操作*/
-    const eStatusChange = useCallback((value: SelectValue) => {
-        setParams({ ...params, checkStatus: value !== undefined ? Number(value) : '' })
-    }, [params])
-    /**执行状态操作*/
-    const pStatusChange = useCallback((value: SelectValue) => {
-        setParams({ ...params, eventType: value !== undefined ? Number(value) : '' })
-    }, [params])
-    /**搜索值改变重新请求列表*/
-    useEffect(() => {
-        interactList.run({ ...params, mpId: state.mpId })
-    }, [params, state.mpId])
-    //高级群发分页
-    const pageSize = useCallback((page: number, pageSize?: number) => {
-        // setParams({ ...params, pageNum: page, pageSize })
-        interactList.run({ ...params, mpId: state.mpId, pageNum: page, pageSize })
-    }, [params, state.mpId])
-    /** 详情 */
-    const show = useCallback((id: number) => {
-        let web = { video: 3, news: 5, music: 2, image: 1, text: 4, miniprogrampage: 6, voice: 2 }
-        searchDetail.run({ strategyId: id }).then(res => {
-            let msgContents: any[] = []
-            /**编辑将数据处理存入model */
-            res?.msgContents?.forEach((item: any, index: number) => {
-                if (item.webType === 4) {
-                    msgContents.push({ ...item, textContent: item.textContent.replace(/href/ig, '_href').split('<br    />'), indexId: index + 1, webType: 4 })
-                } else {
-                    let reg = new RegExp(' ', "g")
-                    let data = item?.newsList?.map((item: { newsTitle: string }) => {
-                        return { ...item, newsTitle: item?.newsTitle.replace(reg, '&nbsp;') }
-                    })
-                    if (item.webType === 6) {
-                        msgContents.push({ ...item, newsList: data, indexId: index + 1, webType: web[item.msgType], imageUrl: item?.platformMediaInfo?.url })
-                    } else {
-                        msgContents.push({ ...item, newsList: data, indexId: index + 1, webType: web[item.msgType] })
-                    }
-                }
-            })
-            let data = { ...res, msgContents }
-            if (data?.id) {//假如存在证明编辑把数据存放给footer组件用
-                setData(data)
-                initData({ data: { ...data, delId: [] } })
-            }
-            if (visible) {
-                initData({ data: { msgContents: [], textKey: '', resDelayTime: 0, strategyDesc: '', msgStrategy: 0, eventType: 0, delId: [], id: '' } })
-                setData(null)
-            }
-            localStorage.setItem('collapsed', visible ? '0' : '1')
-            setVisible(!visible)
-        })
-    }, [visible])
-    /**============================================================JSX============================================================*/
-    return <UesrList
-        //顶部搜索条件
-        header={
-            <Space>
-                <Select onChange={eStatusChange} style={{ width: 180 }} value={params.checkStatus} placeholder='审查状态' allowClear>
-                    <Select.Option value={0} >待审查</Select.Option>
-                    <Select.Option value={100}>审查成功</Select.Option>
-                    <Select.Option value={-1}>审查有问题</Select.Option>
-                </Select>
-                <Select onChange={pStatusChange} style={{ width: 180 }} placeholder='执行状态' allowClear>
-                    <Option value="0">关注公众号</Option>
-                    <Option value="1">扫码</Option>
-                    <Option value="10">消息回复</Option>
-                    <Option value="11">关键字</Option>
-                    <Option value="20">菜单点击</Option>
-                </Select>
-            </Space>
-        }
-    >
-        <div>
-            {/* table */}
-            <Tables
-                dataSource={interactList?.data?.records || []}
-                columns={columns({ show, getWXInfo })}
-                total={interactList?.data?.total}
-                current={interactList?.data?.current}
-                loading={interactList?.loading}
-                pageChange={pageSize}
-                sizeChange={pageSize}
-                size={'small'}
-            />
-            {visible && <PushModal visible={visible} onClose={() => { setVisible(false); localStorage.setItem('collapsed', visible ? '0' : '1') }} data={data} type={1} isModify={false} />}
-        </div>
-    </UesrList>
-}
-export default Page

+ 0 - 53
src/pages/operatePage/examine/examineInteract/sonTableConfig.tsx

@@ -1,53 +0,0 @@
-
-export const daysColumns: any = () => {
-    return [
-        {
-            title: '日志ID',
-            dataIndex: 'id',
-            key: 'id',
-            align: 'center'
-        },
-        {
-            title: '公众号ID',
-            dataIndex: 'mpId',
-            key: 'mpId',
-            align: 'center'
-        },
-        {
-            title: '策略ID',
-            dataIndex: 'strategyId',
-            key: 'strategyId',
-            align: 'center'
-        },
-        {
-            title: '预计发送人数',
-            dataIndex: 'estimateSendCount',
-            key: 'estimateSendCount',
-            align: 'center'
-        },
-        {
-            title: '实际发送人数',
-            dataIndex: 'actualSendCount',
-            key: 'actualSendCount',
-            align: 'center'
-        },
-        {
-            title: '成功收到的人数',
-            dataIndex: 'sendSuccessCount',
-            key: 'sendSuccessCount',
-            align: 'center'
-        },
-        {
-            title: '收到失败的人数',
-            dataIndex: 'sendFailedCount',
-            key: 'sendFailedCount',
-            align: 'center'
-        },
-        {
-            title: '任务执行时间',
-            dataIndex: 'createTime',
-            key: 'createTime',
-            align: 'center'
-        }
-    ]
-}

+ 0 - 18
src/pages/operatePage/examine/examineInteract/table.less

@@ -1,18 +0,0 @@
-.ant-table-thead {
-  .table_warning {
-    color: #fa8c16 !important;
-    background-color: #fff !important;
-  }
-  .table_success {
-    color: #52c41a !important;
-    background-color: #fff !important;
-  }
-  .table_processing {
-    color: #1890ff !important;
-    background-color: #fff !important;
-  }
-  .table_error {
-    color: #f5222d !important;
-    background-color: #fff !important;
-  }
-}

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels