Pārlūkot izejas kodu

新增三防平台

xbx 1 gadu atpakaļ
vecāks
revīzija
b8a3c33ec3

+ 1 - 1
.env.development

@@ -1 +1 @@
-VITE_API_BASE_URL= 'http://121.41.197.37:8096/api'
+VITE_API_BASE_URL= 'http://121.41.197.37:8098/api'

+ 1 - 1
config/vite.config.dev.ts

@@ -8,7 +8,7 @@ export default mergeConfig(
     server: {
       proxy: {
         '/api': {
-          target: 'http://121.41.197.37:8096/api',
+          target: 'http://121.41.197.37:8098/api',
           changeOrigin: true,
           rewrite: (path) => path.replace(/^\/api/, ''),
         },

+ 1 - 1
config/vite.config.prod.ts

@@ -7,7 +7,7 @@ import configImageminPlugin from './plugin/imagemin';
 
 export default mergeConfig(
   {
-    base:'https://cdn-douyin.ycsd.cn/manage/',
+    base:'https://cdn-douyin.ycsd.cn/cp-manage/',
     mode: 'production',
     plugins: [
       configCompressPlugin('gzip'),

+ 2 - 0
package.json

@@ -31,6 +31,7 @@
   },
   "dependencies": {
     "@arco-design/web-vue": "^2.44.7",
+    "@types/qs": "^6.9.7",
     "@vueuse/core": "^9.3.0",
     "arco-design-pro-vue": "^2.7.2",
     "axios": "^0.24.0",
@@ -40,6 +41,7 @@
     "mitt": "^3.0.0",
     "nprogress": "^0.2.0",
     "pinia": "^2.0.23",
+    "qs": "^6.11.2",
     "query-string": "^8.0.3",
     "sortablejs": "^1.15.0",
     "vue": "^3.2.40",

+ 114 - 51
pnpm-lock.yaml

@@ -13,6 +13,9 @@ dependencies:
   '@arco-design/web-vue':
     specifier: ^2.44.7
     version: 2.45.0(vue@3.2.47)
+  '@types/qs':
+    specifier: ^6.9.7
+    version: registry.npmmirror.com/@types/qs@6.9.7
   '@vueuse/core':
     specifier: ^9.3.0
     version: 9.13.0(vue@3.2.47)
@@ -40,6 +43,9 @@ dependencies:
   pinia:
     specifier: ^2.0.23
     version: 2.0.34(typescript@4.9.5)(vue@3.2.47)
+  qs:
+    specifier: ^6.11.2
+    version: registry.npmmirror.com/qs@6.11.2
   query-string:
     specifier: ^8.0.3
     version: 8.1.0
@@ -1560,7 +1566,7 @@ packages:
   /array-buffer-byte-length@1.0.0:
     resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       is-array-buffer: 3.0.2
     dev: true
 
@@ -1835,8 +1841,8 @@ packages:
   /call-bind@1.0.2:
     resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==}
     dependencies:
-      function-bind: 1.1.1
-      get-intrinsic: 1.2.0
+      function-bind: registry.npmmirror.com/function-bind@1.1.1
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
     dev: true
 
   /call-me-maybe@1.0.2:
@@ -2458,7 +2464,7 @@ packages:
     dependencies:
       file-type: 3.9.0
       get-stream: 2.3.1
-      pify: 2.3.0
+      pify: registry.npmmirror.com/pify@2.3.0
       yauzl: 2.10.0
     dev: true
 
@@ -2716,18 +2722,18 @@ packages:
     dependencies:
       array-buffer-byte-length: 1.0.0
       available-typed-arrays: 1.0.5
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       es-set-tostringtag: 2.0.1
       es-to-primitive: 1.2.1
       function.prototype.name: 1.1.5
-      get-intrinsic: 1.2.0
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
       get-symbol-description: 1.0.0
       globalthis: 1.0.3
       gopd: 1.0.1
-      has: 1.0.3
+      has: registry.npmmirror.com/has@1.0.3
       has-property-descriptors: 1.0.0
       has-proto: 1.0.1
-      has-symbols: 1.0.3
+      has-symbols: registry.npmmirror.com/has-symbols@1.0.3
       internal-slot: 1.0.5
       is-array-buffer: 3.0.2
       is-callable: 1.2.7
@@ -2737,7 +2743,7 @@ packages:
       is-string: 1.0.7
       is-typed-array: 1.1.10
       is-weakref: 1.0.2
-      object-inspect: 1.12.3
+      object-inspect: registry.npmmirror.com/object-inspect@1.12.3
       object-keys: 1.1.1
       object.assign: 4.1.4
       regexp.prototype.flags: 1.4.3
@@ -2754,15 +2760,15 @@ packages:
     resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==}
     engines: {node: '>= 0.4'}
     dependencies:
-      get-intrinsic: 1.2.0
-      has: 1.0.3
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
+      has: registry.npmmirror.com/has@1.0.3
       has-tostringtag: 1.0.0
     dev: true
 
   /es-shim-unscopables@1.0.0:
     resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==}
     dependencies:
-      has: 1.0.3
+      has: registry.npmmirror.com/has@1.0.3
     dev: true
 
   /es-to-primitive@1.2.1:
@@ -3541,7 +3547,7 @@ packages:
     resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==}
     engines: {node: '>= 0.4'}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       define-properties: 1.2.0
       es-abstract: 1.21.2
       functions-have-names: 1.2.3
@@ -3564,9 +3570,9 @@ packages:
   /get-intrinsic@1.2.0:
     resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==}
     dependencies:
-      function-bind: 1.1.1
-      has: 1.0.3
-      has-symbols: 1.0.3
+      function-bind: registry.npmmirror.com/function-bind@1.1.1
+      has: registry.npmmirror.com/has@1.0.3
+      has-symbols: registry.npmmirror.com/has-symbols@1.0.3
     dev: true
 
   /get-proxy@2.1.0:
@@ -3622,8 +3628,8 @@ packages:
     resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==}
     engines: {node: '>= 0.4'}
     dependencies:
-      call-bind: 1.0.2
-      get-intrinsic: 1.2.0
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
     dev: true
 
   /get-tsconfig@4.5.0:
@@ -3813,7 +3819,7 @@ packages:
   /gopd@1.0.1:
     resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
     dependencies:
-      get-intrinsic: 1.2.0
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
     dev: true
 
   /got@7.1.0:
@@ -3875,7 +3881,7 @@ packages:
   /has-property-descriptors@1.0.0:
     resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==}
     dependencies:
-      get-intrinsic: 1.2.0
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
     dev: true
 
   /has-proto@1.0.1:
@@ -3902,7 +3908,7 @@ packages:
     resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==}
     engines: {node: '>= 0.4'}
     dependencies:
-      has-symbols: 1.0.3
+      has-symbols: registry.npmmirror.com/has-symbols@1.0.3
     dev: true
 
   /has-value@0.3.1:
@@ -4180,9 +4186,9 @@ packages:
     resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==}
     engines: {node: '>= 0.4'}
     dependencies:
-      get-intrinsic: 1.2.0
-      has: 1.0.3
-      side-channel: 1.0.4
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
+      has: registry.npmmirror.com/has@1.0.3
+      side-channel: registry.npmmirror.com/side-channel@1.0.4
     dev: true
 
   /is-accessor-descriptor@0.1.6:
@@ -4218,8 +4224,8 @@ packages:
   /is-array-buffer@3.0.2:
     resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==}
     dependencies:
-      call-bind: 1.0.2
-      get-intrinsic: 1.2.0
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
       is-typed-array: 1.1.10
     dev: true
 
@@ -4248,7 +4254,7 @@ packages:
     resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==}
     engines: {node: '>= 0.4'}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       has-tostringtag: 1.0.0
     dev: true
 
@@ -4467,7 +4473,7 @@ packages:
     resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==}
     engines: {node: '>= 0.4'}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       has-tostringtag: 1.0.0
     dev: true
 
@@ -4484,7 +4490,7 @@ packages:
   /is-shared-array-buffer@1.0.2:
     resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
     dev: true
 
   /is-stream@1.1.0:
@@ -4525,7 +4531,7 @@ packages:
     resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==}
     engines: {node: '>= 0.4'}
     dependencies:
-      has-symbols: 1.0.3
+      has-symbols: registry.npmmirror.com/has-symbols@1.0.3
     dev: true
 
   /is-text-path@1.0.1:
@@ -4540,7 +4546,7 @@ packages:
     engines: {node: '>= 0.4'}
     dependencies:
       available-typed-arrays: 1.0.5
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       for-each: 0.3.3
       gopd: 1.0.1
       has-tostringtag: 1.0.0
@@ -4553,7 +4559,7 @@ packages:
   /is-weakref@1.0.2:
     resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
     dev: true
 
   /is-what@3.14.1:
@@ -6214,7 +6220,7 @@ packages:
     resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==}
     engines: {node: '>= 0.4'}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       define-properties: 1.2.0
       functions-have-names: 1.2.3
     dev: true
@@ -6438,8 +6444,8 @@ packages:
   /safe-regex-test@1.0.0:
     resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==}
     dependencies:
-      call-bind: 1.0.2
-      get-intrinsic: 1.2.0
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
       is-regex: 1.1.4
     dev: true
 
@@ -6532,14 +6538,6 @@ packages:
     engines: {node: '>=8'}
     dev: true
 
-  /side-channel@1.0.4:
-    resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==}
-    dependencies:
-      call-bind: 1.0.2
-      get-intrinsic: 1.2.0
-      object-inspect: 1.12.3
-    dev: true
-
   /signal-exit@3.0.7:
     resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
     dev: true
@@ -6794,7 +6792,7 @@ packages:
     resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==}
     engines: {node: '>= 0.4'}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       define-properties: 1.2.0
       es-abstract: 1.21.2
     dev: true
@@ -6802,7 +6800,7 @@ packages:
   /string.prototype.trimend@1.0.6:
     resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       define-properties: 1.2.0
       es-abstract: 1.21.2
     dev: true
@@ -6810,7 +6808,7 @@ packages:
   /string.prototype.trimstart@1.0.6:
     resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       define-properties: 1.2.0
       es-abstract: 1.21.2
     dev: true
@@ -7462,7 +7460,7 @@ packages:
   /typed-array-length@1.0.4:
     resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       for-each: 0.3.3
       is-typed-array: 1.1.10
     dev: true
@@ -7475,9 +7473,9 @@ packages:
   /unbox-primitive@1.0.2:
     resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
     dependencies:
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       has-bigints: 1.0.2
-      has-symbols: 1.0.3
+      has-symbols: registry.npmmirror.com/has-symbols@1.0.3
       which-boxed-primitive: 1.0.2
     dev: true
 
@@ -7925,7 +7923,7 @@ packages:
     engines: {node: '>= 0.4'}
     dependencies:
       available-typed-arrays: 1.0.5
-      call-bind: 1.0.2
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
       for-each: 0.3.3
       gopd: 1.0.1
       has-tostringtag: 1.0.0
@@ -8460,6 +8458,12 @@ packages:
     version: 18.15.11
     dev: true
 
+  registry.npmmirror.com/@types/qs@6.9.7:
+    resolution: {integrity: sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/qs/-/qs-6.9.7.tgz}
+    name: '@types/qs'
+    version: 6.9.7
+    dev: false
+
   registry.npmmirror.com/@types/responselike@1.0.0:
     resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/responselike/-/responselike-1.0.0.tgz}
     name: '@types/responselike'
@@ -8690,6 +8694,14 @@ packages:
       responselike: registry.npmmirror.com/responselike@1.0.2
     dev: true
 
+  registry.npmmirror.com/call-bind@1.0.2:
+    resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz}
+    name: call-bind
+    version: 1.0.2
+    dependencies:
+      function-bind: registry.npmmirror.com/function-bind@1.1.1
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
+
   registry.npmmirror.com/caniuse-lite@1.0.30001477:
     resolution: {integrity: sha512-lZim4iUHhGcy5p+Ri/G7m84hJwncj+Kz7S5aD4hoQfslKZJgt0tHc/hafVbqHC5bbhHb+mrW2JOUHkI5KH7toQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001477.tgz}
     name: caniuse-lite
@@ -9638,6 +9650,11 @@ packages:
     dev: true
     optional: true
 
+  registry.npmmirror.com/function-bind@1.1.1:
+    resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz}
+    name: function-bind
+    version: 1.1.1
+
   registry.npmmirror.com/gensync@1.0.0-beta.2:
     resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz}
     name: gensync
@@ -9645,6 +9662,15 @@ packages:
     engines: {node: '>=6.9.0'}
     dev: true
 
+  registry.npmmirror.com/get-intrinsic@1.2.0:
+    resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz}
+    name: get-intrinsic
+    version: 1.2.0
+    dependencies:
+      function-bind: registry.npmmirror.com/function-bind@1.1.1
+      has: registry.npmmirror.com/has@1.0.3
+      has-symbols: registry.npmmirror.com/has-symbols@1.0.3
+
   registry.npmmirror.com/get-proxy@2.1.0:
     resolution: {integrity: sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/get-proxy/-/get-proxy-2.1.0.tgz}
     name: get-proxy
@@ -9741,6 +9767,12 @@ packages:
     version: 1.4.2
     dev: true
 
+  registry.npmmirror.com/has-symbols@1.0.3:
+    resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz}
+    name: has-symbols
+    version: 1.0.3
+    engines: {node: '>= 0.4'}
+
   registry.npmmirror.com/has-to-string-tag-x@1.4.1:
     resolution: {integrity: sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz}
     name: has-to-string-tag-x
@@ -9749,6 +9781,14 @@ packages:
       has-symbol-support-x: registry.npmmirror.com/has-symbol-support-x@1.4.2
     dev: true
 
+  registry.npmmirror.com/has@1.0.3:
+    resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/has/-/has-1.0.3.tgz}
+    name: has
+    version: 1.0.3
+    engines: {node: '>= 0.4.0'}
+    dependencies:
+      function-bind: registry.npmmirror.com/function-bind@1.1.1
+
   registry.npmmirror.com/http-cache-semantics@3.8.1:
     resolution: {integrity: sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz}
     name: http-cache-semantics
@@ -9983,7 +10023,7 @@ packages:
     version: 1.3.0
     engines: {node: '>=4'}
     dependencies:
-      pify: 3.0.0
+      pify: registry.npmmirror.com/pify@3.0.0
     dev: true
 
   registry.npmmirror.com/make-dir@2.1.0:
@@ -10160,6 +10200,11 @@ packages:
     engines: {node: '>=0.10.0'}
     dev: true
 
+  registry.npmmirror.com/object-inspect@1.12.3:
+    resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/object-inspect/-/object-inspect-1.12.3.tgz}
+    name: object-inspect
+    version: 1.12.3
+
   registry.npmmirror.com/once@1.4.0:
     resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/once/-/once-1.4.0.tgz}
     name: once
@@ -10321,6 +10366,15 @@ packages:
       once: registry.npmmirror.com/once@1.4.0
     dev: true
 
+  registry.npmmirror.com/qs@6.11.2:
+    resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qs/-/qs-6.11.2.tgz}
+    name: qs
+    version: 6.11.2
+    engines: {node: '>=0.6'}
+    dependencies:
+      side-channel: registry.npmmirror.com/side-channel@1.0.4
+    dev: false
+
   registry.npmmirror.com/query-string@5.1.1:
     resolution: {integrity: sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/query-string/-/query-string-5.1.1.tgz}
     name: query-string
@@ -10442,6 +10496,15 @@ packages:
     engines: {node: '>=0.10.0'}
     dev: true
 
+  registry.npmmirror.com/side-channel@1.0.4:
+    resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/side-channel/-/side-channel-1.0.4.tgz}
+    name: side-channel
+    version: 1.0.4
+    dependencies:
+      call-bind: registry.npmmirror.com/call-bind@1.0.2
+      get-intrinsic: registry.npmmirror.com/get-intrinsic@1.2.0
+      object-inspect: registry.npmmirror.com/object-inspect@1.12.3
+
   registry.npmmirror.com/signal-exit@3.0.7:
     resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz}
     name: signal-exit

+ 1 - 54
src/api/booklist.ts

@@ -1,62 +1,9 @@
 import axios from 'axios';
 import { AxiosPromise } from 'axios';
-//分类列表
-export function getCategoryListApi() {
-  return axios.get<any>('/category/list');
-}
+
 //书籍列表
 export function getBookListApi(params: any) {
   return axios.get<any>('/book/list', { params });
 }
-//书籍详情
-export function getBookInfoApi(params: any) {
-  return axios.get<any>('/book/info', { params });
-}
-//章节列表
-export function getChapterListApi(params: any) {
-  return axios.get<any>('/chapter/list', { params });
-}
 
-//章节详情
-export function getChapterInfoApi(params: any) {
-  return axios.get<any>('/chapter/info', { params });
-}
-
-//书籍上下架
-export function setBookShelfStatusApi(params: any) {
-  return axios.get<any>('/setBookShelfStatus', { params });
-}
 
-//设置vip书籍
-export function setBookVipFreeApi(params: any) {
-  return axios.get<any>('/setBookVipFree', { params });
-}
-//编辑书籍
-export function editBookApi(data: any) {
-  return axios.post<any>('/book/edit', data);
-}
-//创建副本
-export function createCopyApi(data: any) {
-  return axios.post<any>('/createCopy', data);
-}
-//编辑书籍
-export function replaceRoleApi(data: any) {
-  return axios.post<any>('/replaceRole', data);
-}
-//上传图片
-export const onFileUpload = (type: string, file: File): AxiosPromise<any> => {
-  const formData = new FormData();
-  formData.append('file', file);
-  return axios.post('/api/uploadBookCover', formData);
-};
-
-//设置起始收费章节
-export function setVipSeqApi(params: any) {
-  return axios.get<any>('/setVipSeq', { params });
-} //设置起始收费章节
-export function setFeedAdvertiseSeqApi(params: any) {
-  return axios.get<any>('/setFeedAdvertiseSeq', { params });
-} //设置起始收费章节
-export function setFollowSeqApi(params: any) {
-  return axios.get<any>('/setFollowSeq', { params });
-}

+ 0 - 22
src/api/dashboard.ts

@@ -1,22 +0,0 @@
-import axios from 'axios';
-import type { TableData } from '@arco-design/web-vue/es/table/interface';
-
-export interface ContentDataRecord {
-  x: string;
-  y: number;
-}
-
-export function queryContentData() {
-  return axios.get<ContentDataRecord[]>('/api/content-data');
-}
-
-export interface PopularRecord {
-  key: number;
-  clickNumber: string;
-  title: string;
-  increases: number;
-}
-
-export function queryPopularList(params: { type: string }) {
-  return axios.get<TableData[]>('/api/popular/list', { params });
-}

+ 0 - 27
src/api/financial.ts

@@ -1,27 +0,0 @@
-import axios from 'axios';
-
-interface Withdraw {
-  uid?: string;
-  withdraw_type?: string;
-  status?: string;
-  page: number | string;
-}
-
-//提现列表
-export function getWithdrawListApi(params: Withdraw) {
-  return axios.get<any>('/withdraw/list', { params });
-}
-
-//提现处理
-export function handleWithdrawApi(params: {
-  id: string;
-  action:
-    | 'confirm'
-    | 'reject'
-    | 'manual_payment_success'
-    | 'manual_payment_fail'
-    | 'repayment';
-  remark?: string;
-}) {
-  return axios.get<any>('/withdraw/handle', { params });
-}

+ 12 - 0
src/api/settle.ts

@@ -0,0 +1,12 @@
+import axios from 'axios';
+import { AxiosPromise } from 'axios';
+
+//获取汇总数据
+export function getSettleTotalApi(params: any) {
+  return axios.get<any>('/settlement/monthStats', { params });
+}
+
+//获取分日数据
+export function getSettleDailyApi(params: any) {
+  return axios.get<any>('/settlement/bookDailyStats', { params });
+}

+ 4 - 2
src/locale/zh-CN/menu.ts

@@ -1,8 +1,10 @@
 export default {
   'menu.dashboard': '工作台',
   'menu.home': '首页',
-  'menu.financial': '财务管理',
-  'menu.financial.remit': '提现管理',
+  'menu.financial': '结算管理',
+  'menu.financial.remit': '结算管理',
+  'menu.financial.daily': '分日书籍数据',
+  'menu.financial.total': '汇总数据',
   'menu.bookmanagement': '书库管理',
   'menu.bookmanagement.booklist': '书籍列表',
   'menu.user': '个人中心',

+ 2 - 1
src/router/constants.ts

@@ -14,5 +14,6 @@ export const DEFAULT_ROUTE_NAME = 'booklist';
 export const DEFAULT_ROUTE = {
   title: 'menu.bookmanagement.booklist',
   name: DEFAULT_ROUTE_NAME,
-  fullPath: '/bookmanagement/booklist',
+  // fullPath: '/bookmanagement/booklist',
+  fullPath: '/settle/remit/total',
 };

+ 1 - 1
src/router/index.ts

@@ -13,7 +13,7 @@ const router = createRouter({
   routes: [
     {
       path: '/',
-      redirect: '/financial/remit',
+      redirect: '/bookmanagement/booklist',
     },
     {
       path: '/login',

+ 6 - 4
src/router/routes/modules/bookmanagement.ts

@@ -7,10 +7,11 @@ const HOME: AppRouteRecordRaw = {
   component: DEFAULT_LAYOUT,
   meta: {
     locale: 'menu.bookmanagement',
-    requiresAuth: true,
+    requiresAuth: false,
+    hideInMenu: true,
     icon: 'icon-stamp',
     order: 0,
-    roles: ['content'],
+    roles: ['*'],
   },
   children: [
     {
@@ -19,8 +20,9 @@ const HOME: AppRouteRecordRaw = {
       component: () => import('@/views/bookmanagement/booklist/index.vue'),
       meta: {
         locale: 'menu.bookmanagement.booklist',
-        requiresAuth: true,
-        roles: ['content'],
+        requiresAuth: false,
+        hideInMenu: true,
+        roles: ['*'],
       },
     },
   ],

+ 34 - 8
src/router/routes/modules/financial.ts

@@ -2,28 +2,54 @@ import { DEFAULT_LAYOUT } from '../base';
 import { AppRouteRecordRaw } from '../types';
 
 const HOME: AppRouteRecordRaw = {
-  path: '/financial',
-  name: 'Financial',
+  path: '/settle',
+  name: 'Settle',
   component: DEFAULT_LAYOUT,
   meta: {
     locale: 'menu.financial',
-    requiresAuth: true,
+    requiresAuth: false,
     icon: 'icon-stamp',
     order: 1,
-    roles: ['finance'],
-  
-
+    roles: ['*'],
   },
   children: [
     {
       path: 'remit',
       name: 'Remit',
+      redirect: '/settle/remit/total',
       component: () => import('@/views/financial/remit/index.vue'),
       meta: {
         locale: 'menu.financial.remit',
-        requiresAuth: true,
-        roles: ['finance'],
+        requiresAuth: false,
+        roles: ['*'],
+        hideInMenu: false,
+        activeMenu: 'Remit',
       },
+      children: [
+        {
+          path: 'daily',
+          name: 'DataDaily',
+          component: () => import('@/views/financial/remit/daily.vue'),
+          meta: {
+            locale: 'menu.financial.daily',
+            requiresAuth: false,
+            roles: ['*'],
+            hideInMenu: true,
+            activeMenu: 'Remit',
+          },
+        },
+        {
+          path: 'total',
+          name: 'DataTotal',
+          component: () => import('@/views/financial/remit/total.vue'),
+          meta: {
+            locale: 'menu.financial.total',
+            requiresAuth: false,
+            roles: ['*'],
+            hideInMenu: true,
+          },
+        },
+      ],
     },
   ],
 };

+ 0 - 1
src/store/modules/user/index.ts

@@ -40,7 +40,6 @@ const useUserStore = defineStore('user', {
       return this.nickname || localStorage.getItem('nickname') || '';
     },
     getRole(): string {
-      console.log(createLocalStorage().get(ROLES_KEY))
       return this.role || createLocalStorage().get(ROLES_KEY) || '';
     },
   },

+ 69 - 0
src/utils/date.ts

@@ -0,0 +1,69 @@
+import dayjs from 'dayjs';
+
+//常用的时间添加方案 ranger
+export const datePickerRanger = [
+  {
+    label: '今日',
+    value: () => [dayjs(), dayjs()],
+  },
+  {
+    label: '昨日',
+    value: () => [dayjs().subtract(1, 'd'), dayjs().subtract(1, 'd')],
+  },
+  {
+    label: '近7日',
+    value: () => [dayjs().subtract(7, 'd'), dayjs()],
+  },
+  {
+    label: '本周',
+    value: () => [dayjs().startOf('week'), dayjs()],
+  },
+  {
+    label: '本月',
+    value: () => [dayjs().startOf('month'), dayjs()],
+  },
+  {
+    label: '上月',
+    value: () => [
+      dayjs().subtract(1, 'month').startOf('month'),
+      dayjs().subtract(1, 'month').endOf('month'),
+    ],
+  },
+];
+
+export const formatDate = (date: any, format: string = 'YYYY-MM-DD') => {
+  if (!date || date.length <= 0) return date;
+  let newArr = date.map((r) => {
+    if (r) r = dayjs(r).format(format);
+    return r;
+  });
+  return newArr.join(',');
+};
+
+/**
+ * 日期picker range可自定义添加
+ * @methods add("本周", [dayjs(), dayjs()])
+ * @methods pick(["昨日", "上月"])
+ */
+/* class RangePicker {
+  private config: Record<string, any[]>;
+
+  constructor() {
+    this.config = [];
+  }
+
+  add(text: string, range: any) {
+    //this.config[text] = range;
+    this.config.push({
+      label: text,
+      value: range,
+    });
+    return this;
+  }
+
+  pick(ranger: string[]) {
+    range.forEach((r: string) => {
+      
+    });
+  }
+} */

+ 0 - 94
src/views/bookmanagement/booklist/replcceRole.vue

@@ -1,94 +0,0 @@
-<template>
-  <a-modal
-    v-model:visible="_visible"
-    title="替换主角名称"
-    :on-before-ok="handleBeforeOk"
-  >
-    <div>
-      若有多个主角名需要替换请优先替换名字长的主角名;替换后,后续章节主角名也会被替换成修改后的主角名
-    </div>
-    <a-form :model="form">
-      <a-form-item field="origin_role" label="原主角名">
-        <a-input v-model="formData.origin_role" placeholder="请输入" />
-      </a-form-item>
-      <a-form-item field="new_role" label="现主角名">
-        <a-input v-model="formData.new_role" placeholder="请输入" />
-      </a-form-item>
-    </a-form>
-    <template #footer>
-      <a-button type="primary" @click="handleBeforeOk">确认</a-button>
-      <a-button @click="emit('update:visiable', false)">取消</a-button>
-    </template>
-  </a-modal>
-</template>
-<script lang="ts" setup>
-  import { ref, PropType, computed, watch } from 'vue';
-  import { Message } from '@arco-design/web-vue';
-  import { replaceRoleApi } from '@/api/booklist';
-  const emit = defineEmits(['update:visiable', 'reload']);
-  const visible = ref<boolean>(false);
-  const form = ref<any>({});
-
-  const props = defineProps({
-    visiable: {
-      type: Boolean,
-      default: false,
-    },
-    bid: {
-      type: String,
-      default: '',
-    },
-    roles: {
-      type: String,
-      default: '',
-    },
-  });
-  const bid = ref('');
-  const formData = ref<any>({
-    origin_role: '',
-    new_role: '',
-  });
-  bid.value = props.bid;
-  formData.value.origin_role = props.roles;
-  //监听书籍的bid
-  watch(
-    () => props.roles,
-    () => {
-      formData.value.origin_role = props.roles;
-    }
-  );
-  //监听书籍的原主角
-  watch(
-    () => props.bid,
-    () => {
-      bid.value = props.bid;
-    }
-  );
-  //弹窗
-  const _visible = computed({
-    get: () => props.visiable,
-    set: (value) => emit('update:visiable', value),
-  });
-
-  const handleBeforeOk = async () => {
-    if (!formData.value.origin_role) {
-      Message.info('请输入原角色名');
-      return;
-    }
-    if (!formData.value.new_role) {
-      Message.info('请输入新角色名');
-      return;
-    }
-
-    try {
-      await replaceRoleApi({
-        bid: bid.value,
-        ...formData.value,
-      });
-      Message.success('替换角色成功!');
-      emit('update:visiable', false);
-      emit('reload');
-    } catch (e) {}
-  };
-</script>
-<style lang="less" scoped></style>

+ 157 - 0
src/views/financial/remit/daily.vue

@@ -0,0 +1,157 @@
+<template>
+  <a-row>
+    <a-col :flex="1">
+      <a-form
+        :model="formModel"
+        :label-col-props="{ span: 6 }"
+        :wrapper-col-props="{ span: 18 }"
+        label-align="left"
+      >
+        <a-row :gutter="16">
+          <a-col :span="10">
+            <a-form-item field="day_range" label="日期">
+              <a-range-picker
+                v-model="formModel.day_range"
+                :shortcuts="datePickerRanger"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="10">
+            <a-form-item field="book_name" label="书籍名称">
+              <a-input
+                v-model="formModel.book_name"
+                placeholder="请输入书籍名称"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </a-col>
+    <a-divider style="height: 32px; margin-right: 15px" direction="vertical" />
+    <a-col :flex="'180px'" style="text-align: right">
+      <a-space :size="18">
+        <a-button type="primary" @click="search">
+          <template #icon>
+            <icon-search />
+          </template>
+          查询
+        </a-button>
+        <a-button @click="reset">
+          <template #icon>
+            <icon-refresh />
+          </template>
+          重置
+        </a-button>
+      </a-space>
+    </a-col>
+  </a-row>
+  <a-divider style="margin-top: 0" />
+  <a-col :span="24" class="flex justify-end items-center mb-4">
+    <a-button @click="exportData">
+      <template #icon>
+        <icon-download />
+      </template>
+      导出
+    </a-button>
+  </a-col>
+  <a-table
+    row-key="bid"
+    :loading="loading"
+    :pagination="tablePageOptions"
+    :columns="cloneColumns"
+    :data="renderData"
+    :bordered="false"
+    @page-change="onPageChange"
+  >
+  </a-table>
+</template>
+<script lang="ts" setup>
+  import { useRouter, useRoute } from 'vue-router';
+  import { computed, ref, reactive, watch, nextTick } from 'vue';
+  import useLoading from '@/hooks/loading';
+  import usePagination from '@/hooks/pagination';
+  import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
+  import tableColumns from './table';
+  import { Message } from '@arco-design/web-vue';
+  import { getSettleDailyApi } from '@/api/settle';
+  import { datePickerRanger, formatDate } from '@/utils/date';
+  const { loading, setLoading } = useLoading(true);
+  const { meta, tablePageOptions } = usePagination();
+  import { getToken } from '@/utils/auth';
+  import qs from 'qs';
+  const router = useRouter();
+  const { query } = useRoute();
+  import dayjs from 'dayjs';
+
+  const token = getToken();
+
+  loading.value = false;
+
+  const getDefaultDate = () => {
+    if (!query?.month) return [];
+    //第一天一定是01 例如 2023-08-01
+    let startDate = query!.month + '-01';
+    let lastDate = dayjs(startDate).endOf('month').format('YYYY-MM-DD');
+    return [startDate, lastDate];
+  };
+  getDefaultDate();
+  const generateFormModel = () => {
+    return {
+      day_range: getDefaultDate(),
+      book_name: '',
+    };
+  };
+
+  const formModel = ref(generateFormModel());
+  const cloneColumns = ref<TableColumnData[]>(tableColumns.dailyTable);
+
+  //列表数据
+  const renderData = ref([]);
+  //获取列表数据
+  const getDailyList = async (page = 1) => {
+    let { data } = await getSettleDailyApi({
+      page,
+      ...formModel.value,
+      day_range: formatDate(formModel.value.day_range),
+    });
+    meta.value = data.meta;
+
+    data.list.map((item: any) => {});
+    renderData.value = data.list;
+  };
+  getDailyList(1);
+
+  // 查询事件
+  const search = () => {
+    getDailyList(1);
+  };
+
+  // 重置事件
+  const reset = () => {
+    formModel.value = generateFormModel();
+  };
+
+  //导出
+  const exportData = () => {
+    const data = {
+      ...formModel.value,
+      day_range: formatDate(formModel.value.day_range),
+      export: 1,
+      d_token: `${token}`,
+    };
+    const url = `${
+      import.meta.env.VITE_API_BASE_URL
+    }/settlement/bookDailyStats?${qs.stringify(data)}`;
+    window.open(url);
+  };
+
+  // 切换页码
+  const onPageChange = (page: number) => {
+    getDailyList(page);
+  };
+
+  //刷新列表
+  const reloadList = () => {
+    getDailyList(meta.value.page);
+  };
+</script>

+ 18 - 317
src/views/financial/remit/index.vue

@@ -1,327 +1,28 @@
 <template>
   <div class="container">
     <Breadcrumb :items="['menu.financial', 'menu.financial.remit']" />
-    <a-card class="general-card" title="提现管理">
-      <a-row>
-        <a-col :flex="1">
-          <a-form
-            :model="formModel"
-            :label-col-props="{ span: 6 }"
-            :wrapper-col-props="{ span: 18 }"
-            label-align="left"
-          >
-            <a-row :gutter="16">
-              <a-col :span="8">
-                <a-form-item field="uid" label="用户uid">
-                  <a-input
-                    v-model="formModel.uid"
-                    placeholder="请输入用户uid"
-                  />
-                </a-form-item>
-              </a-col>
-              <a-col :span="8">
-                <a-form-item field="payment_type" label="打款方式">
-                  <a-select
-                    v-model="formModel.payment_type"
-                    placeholder="请选择打款方式"
-                  >
-                    <a-option value="">不限</a-option>
-                    <a-option value="manual">手工打款</a-option>
-                    <a-option value="system">自动打款</a-option>
-                  </a-select>
-                </a-form-item>
-              </a-col>
-              <a-col :span="8">
-                <a-form-item field="status" label="状态">
-                  <a-select v-model="formModel.status" placeholder="请选择状态">
-                    <a-option value="">全部</a-option>
-                    <a-option value="待审核">待审核</a-option>
-                    <a-option value="待打款">待打款</a-option>
-                    <a-option value="已驳回">已驳回</a-option>
-                    <a-option value="打款成功">打款成功</a-option>
-                    <a-option value="打款失败">打款失败</a-option>
-                  </a-select>
-                </a-form-item>
-              </a-col>
-            </a-row>
-          </a-form>
-        </a-col>
-        <a-divider
-          style="height: 32px; margin-right: 15px"
-          direction="vertical"
-        />
-        <a-col :flex="'180px'" style="text-align: right">
-          <a-space :size="18">
-            <a-button type="primary" @click="search">
-              <template #icon>
-                <icon-search />
-              </template>
-              查询
-            </a-button>
-            <a-button @click="reset">
-              <template #icon>
-                <icon-refresh />
-              </template>
-              重置
-            </a-button>
-          </a-space>
-        </a-col>
-      </a-row>
-      <a-divider style="margin-top: 0" />
-      <a-table
-        row-key="id"
-        :loading="loading"
-        :pagination="tablePageOptions"
-        :columns="cloneColumns"
-        :data="renderData"
-        :bordered="false"
-        @page-change="onPageChange"
-      >
-        <template #nickname="{ record }">
-          <a-space direction="vertical" :size="6">
-            <a-typography-text> 昵称:{{ record.nickname }} </a-typography-text>
-            <a-typography-text disabled>
-              uid: {{ record.uid }}
-            </a-typography-text>
-          </a-space>
-        </template>
-
-        <template #info="{ record }">
-          <a-space direction="vertical" :size="6">
-            <a-typography-text>
-              姓名: {{ record.alipay_username }}
-            </a-typography-text>
-            <a-typography-text>
-              账号: {{ record.alipay_account }}
-            </a-typography-text>
-          </a-space>
-        </template>
-        <template #payment_type="{ record }">
-          <a-tag v-if="record.payment_type == 'manual'" color="orangered"
-            >手动打款</a-tag
-          >
-          <a-tag v-else-if="record.payment_type == 'system'" color="arcoblue"
-            >自动打款</a-tag
-          >
-          <span v-else>--</span>
-        </template>
-        <template #status="{ record }">
-          <span v-if="record.status == '已驳回'" class="circle refund"></span>
-          <span
-            v-else-if="record.status == '已打款'"
-            class="circle pass"
-          ></span>
-          <span v-else class="circle"></span>
-          {{ record.status }}
-        </template>
-        <template #operate="{ record }">
-          <a-space v-if="record.status === '待审核'">
-            <a-button type="text" size="mini" @click="handlePassBtn(record.id)"
-              >通过</a-button
-            >
-
-            <a-button
-              type="text"
-              size="mini"
-              @click="handleRejectBtn(record.id)"
-              >拒绝</a-button
-            >
-          </a-space>
-
-          <a-space v-if="record.status === '打款失败' && record.payment_type=='system'">
-            <a-button
-              type="text"
-              size="mini"
-              @click="handleRePassBtn(record.id)"
-              >重新打款</a-button
-            >
-            <a-button type="text" size="mini" @click="handleTryBtn(record)"
-              >手动打款</a-button
-            >
-          </a-space>
-        </template>
-      </a-table>
+    <a-card class="general-card" title="结算管理">
+      <a-tabs :active-key="currentKey" @change="changeTabs">
+        <a-tab-pane key="DataTotal" title="汇总数据"> </a-tab-pane>
+        <a-tab-pane key="DataDaily" title="分日书籍数据"> </a-tab-pane>
+      </a-tabs>
+      <router-view> </router-view>
     </a-card>
-    <!--第一次驳回弹窗-->
-    <a-modal
-      v-model:visible="visible"
-      title="提现审核"
-      @cancel="visible = false"
-      ok-text="确认驳回"
-      @before-ok="handleBeforeOk"
-    >
-      <a-form :model="form1">
-        <a-form-item field="reson" label="驳回原因">
-          <a-textarea v-model="form1.reson" placeholder="请输入驳回原因" />
-        </a-form-item>
-      </a-form>
-    </a-modal>
-
-    <a-modal
-      v-model:visible="visible1"
-      title="打款失败"
-      @before-close="visible1 = false"
-      @before-ok="handleBeforeOk1"
-    >
-      <a-form :model="form2">
-        <a-form-item field="reson" label="失败原因">
-          <a-textarea v-model="form2.reson" placeholder="请输入失败原因" />
-        </a-form-item>
-      </a-form>
-    </a-modal>
-
-    <a-modal v-model:visible="visible2" title="打款信息">
-      <template #footer>
-        <a-button @click="visible1 = true"> 打款失败 </a-button>
-        <a-button type="primary" @click="handleBeforeOk2"> 打款成功 </a-button>
-      </template>
-      <a-descriptions
-        :column="1"
-        :data="curData"
-        title="打款信息"
-        layout="inline-horizontal"
-      />
-    </a-modal>
   </div>
 </template>
 
 <script lang="ts" setup>
   import { computed, ref, reactive, watch, nextTick } from 'vue';
-  import useLoading from '@/hooks/loading';
-  import usePagination from '@/hooks/pagination';
-  import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
-  import tableColumns from './table';
-  import { Message } from '@arco-design/web-vue';
-  import { getWithdrawListApi, handleWithdrawApi } from '@/api/financial';
-  const { loading, setLoading } = useLoading(true);
-  const { meta, tablePageOptions } = usePagination();
-
-  loading.value = false;
-  const generateFormModel = () => {
-    return {
-      uid: '',
-      payment_type: '',
-      status: '',
-    };
-  };
-
-  const formModel = ref(generateFormModel());
-  const cloneColumns = ref<TableColumnData[]>(tableColumns.remitTable);
-  const curId = ref<string>('');
-  const visible = ref(false);
-  const visible1 = ref(false);
-  const visible2 = ref(false);
-  const curData = ref<any[]>([]);
-
-  const form1 = ref<any>({
-    reson: '',
-  });
-  const form2 = ref<any>({
-    reson: '',
-  });
-
-  const renderData = ref([]);
-  // 查询事件
-  const search = () => {
-    getWithdrawList(1);
-  };
-
-  // 重置事件
-  const reset = () => {
-    formModel.value = generateFormModel();
-  };
-
-  // 切换页吗
-  const onPageChange = (page: number) => {
-    getWithdrawList(page);
-  };
-
-  //获取列表数据
-  const getWithdrawList = async (page = 1) => {
-    let { data } = await getWithdrawListApi({
-      page,
-      ...formModel.value,
-    });
-    meta.value = data.meta;
-    renderData.value = data.list;
-  };
-
-  getWithdrawList(1);
-
-  //通过申请
-  const handlePassBtn = async (id: string) => {
-    try {
-      await handleWithdrawApi({ id, action: 'confirm' });
-      Message.success('操作成功!');
-      getWithdrawList(meta.value.current ?? 1);
-    } catch (e) {}
-  };
-
-  //重新打款
-  const handleRePassBtn = async (id: string) => {
-    try {
-      await handleWithdrawApi({ id, action: 'repayment' });
-      Message.success('操作成功!');
-      getWithdrawList(meta.value.current ?? 1);
-    } catch (e) {}
-  };
-
-  //拒绝申请
-  const handleRejectBtn = (id: string) => {
-    visible.value = true;
-    curId.value = id;
-  };
-
-  //我来拒绝了
-  const handleBeforeOk = async () => {
-    try {
-      await handleWithdrawApi({
-        id: curId.value,
-        action: 'reject',
-        remark: form1.value.reson,
-      });
-      Message.success('操作成功!');
-      getWithdrawList(meta.value.current ?? 1);
-    } catch (e) {}
-  };
-
-  const handleTryBtn = async (data: any) => {
-    let arr = [];
-    arr.push({
-      label: '提现信息',
-      value: `${data.alipay_username},${data.alipay_account}`,
-    });
-    arr.push({
-      label: '提现金额',
-      value: data.amount,
-    });
-    curData.value = arr;
-    curId.value = data.id;
-    visible2.value = true;
-  };
-
-  const handleBeforeOk1 = async () => {
-    try {
-      await handleWithdrawApi({
-        id: curId.value,
-        action: 'manual_payment_fail',
-        remark: form2.value.reson,
-      });
-      Message.success('操作成功!');
-      getWithdrawList(meta.value.current ?? 1);
-    } catch (e) {}
-  };
-
-  const handleBeforeOk2 = async () => {
-    try {
-      await handleWithdrawApi({
-        id: curId.value,
-        action: 'manual_payment_success',
-      });
-      Message.success('操作成功!');
-      getWithdrawList(meta.value.current ?? 1);
-    } catch (e) {}
-  };
-
-  //
+  import { useRouter } from 'vue-router';
+  const router = useRouter();
+  const currentKey = ref('DataTotal');
+  currentKey.value = router.currentRoute.value!.name as string;
+
+  console.log(router.currentRoute.value);
+
+  const changeTabs = (e:any) =>{
+    router.push({
+      name:e
+    })
+  }
 </script>

+ 24 - 36
src/views/financial/remit/table.ts

@@ -1,59 +1,47 @@
-const remitTable = [
+const totalTable = [
   {
-    title: '用户昵称',
-    dataIndex: 'nickname',
-    slotName: 'nickname',
+    title: '月份',
+    dataIndex: 'month',
+    slotName: 'month',
     width: 200,
   },
   {
-    title: '提现金额(元)',
-    dataIndex: 'amount',
-    width: 150,
-  },
-  {
-    title: '提现信息',
-    dataIndex: 'info',
-    slotName: 'info',
-    width: 250,
-  },
-  {
-    title: '打款方式',
-    dataIndex: 'payment_type',
-    slotName: 'payment_type',
+    title: '结算金额(元)',
+    dataIndex: 'yesterday_last_amount',
+    slotName: 'yesterday_last_amount',
     width: 200,
   },
   {
-    title: '状态',
-    dataIndex: 'status',
-    slotName: 'status',
-    width: 150,
-  },
-  {
-    title: '备注',
-    dataIndex: 'remark',
-    slotName: 'remark',
+    title: '操作',
+    dataIndex: 'operate',
+    slotName: 'operate',
     width: 200,
   },
+];
+
+const dailyTable = [
   {
-    title: '申请时间',
-    dataIndex: 'apply_time',
+    title: '日期',
+    dataIndex: 'calculate_date',
+    slotName: 'calculate_date',
     width: 200,
   },
   {
-    title: '处理时间',
-    dataIndex: 'handle_time',
-    width: 200,
+    title: '书籍名称',
+    dataIndex: 'book_name',
+    slotName: 'book_name',
   },
   {
-    title: '操作',
-    dataIndex: 'operate',
-    slotName: 'operate',
+    title: '结算金额(元)',
+    dataIndex: 'yesterday_last_amount',
+    slotName: 'yesterday_last_amount',
     width: 200,
   },
 ];
 
 const tableColumns = {
-  remitTable,
+  totalTable,
+  dailyTable
 };
 
 export default tableColumns;

+ 146 - 0
src/views/financial/remit/total.vue

@@ -0,0 +1,146 @@
+<template>
+  <a-row>
+    <a-col :flex="1">
+      <a-form
+        :model="formModel"
+        :label-col-props="{ span: 6 }"
+        :wrapper-col-props="{ span: 18 }"
+        label-align="left"
+      >
+        <a-row :gutter="16">
+          <a-col :span="10">
+            <a-form-item field="book_name" label="月份">
+              <a-range-picker
+                mode="month"
+                v-model="formModel.month_range"
+                style="width: 254px; marginbottom: 20px"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </a-col>
+    <a-divider style="height: 32px; margin-right: 15px" direction="vertical" />
+    <a-col :flex="'180px'" style="text-align: right">
+      <a-space :size="18">
+        <a-button type="primary" @click="search">
+          <template #icon>
+            <icon-search />
+          </template>
+          查询
+        </a-button>
+        <a-button @click="reset">
+          <template #icon>
+            <icon-refresh />
+          </template>
+          重置
+        </a-button>
+      </a-space>
+    </a-col>
+  </a-row>
+  <a-divider style="margin-top: 0" />
+  <a-col :span="24" class="flex justify-end items-center mb-4">
+    <a-button @click="exportData">
+      <template #icon>
+        <icon-download />
+      </template>
+      导出
+    </a-button>
+  </a-col>
+  <a-table
+    row-key="bid"
+    :loading="loading"
+    :pagination="tablePageOptions"
+    :columns="cloneColumns"
+    :data="renderData"
+    :bordered="false"
+    @page-change="onPageChange"
+  >
+    <template #operate="{ record }">
+      <a style="cursor: pointer; color: blue" @click="gotoDetail(record.month)"
+        >结算数据</a
+      >
+    </template>
+  </a-table>
+</template>
+<script lang="ts" setup>
+  import { useRouter, useRoute } from 'vue-router';
+  import { computed, ref, reactive, watch, nextTick } from 'vue';
+  import useLoading from '@/hooks/loading';
+  import usePagination from '@/hooks/pagination';
+  import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
+  import tableColumns from './table';
+  import { Message } from '@arco-design/web-vue';
+  import { getSettleTotalApi } from '@/api/settle';
+  const { loading, setLoading } = useLoading(true);
+  const { meta, tablePageOptions } = usePagination();
+  import { getToken } from '@/utils/auth';
+  import qs from 'qs';
+  const router = useRouter();
+  const token = getToken();
+
+  loading.value = false;
+  const generateFormModel = () => {
+    return {
+      month_range: [],
+    };
+  };
+
+  const formModel = ref(generateFormModel());
+  const cloneColumns = ref<TableColumnData[]>(tableColumns.totalTable);
+
+  //列表数据
+  const renderData = ref([]);
+  //获取列表数据
+  const getTotalList = async (page = 1) => {
+    console.log(formModel.value.month_range.join(','));
+    let { data } = await getSettleTotalApi({
+      page,
+      ...formModel.value,
+      month_range: formModel.value.month_range.join(','),
+    });
+    meta.value = data.meta;
+
+    data.list.map((item: any) => {});
+    renderData.value = data.list;
+  };
+  getTotalList(1);
+
+  // 查询事件
+  const search = () => {
+    getTotalList(1);
+  };
+
+  // 重置事件
+  const reset = () => {
+    formModel.value = generateFormModel();
+  };
+
+  //导出
+  const exportData = () => {
+    const data = {
+      ...formModel.value,
+      month_range: formModel.value.month_range.join(','),
+      export: 1,
+      d_token: `${token}`,
+    };
+    const url = `${
+      import.meta.env.VITE_API_BASE_URL
+    }//settlement/monthStats?${qs.stringify(data)}`;
+    window.open(url);
+  };
+
+  // 切换页码
+  const onPageChange = (page: number) => {
+    getTotalList(page);
+  };
+
+  //前往书籍详情页
+  const gotoDetail = (val: String) => {
+    router.push(`/settle/remit/daily?month=${val}`);
+  };
+  //刷新列表
+  const reloadList = () => {
+    getTotalList(meta.value.page);
+  };
+</script>

+ 1 - 0
src/views/login/index.vue

@@ -73,6 +73,7 @@
   // responsive
   @media (max-width: @screen-lg) {
     .container {
+     
       .banner {
         width: 25%;
       }