Commit 8e6cac78 authored by 水落(YangLei)'s avatar 水落(YangLei)

feat: 优化代码,去掉无用的依赖

parent f069dc81
......@@ -24,7 +24,6 @@
"core-js": "^3.6.5",
"crypto-js": "^4.0.0",
"date-fns": "^2.14.0",
"enquire.js": "^2.1.6",
"highlight.js": "^10.2.1",
"lodash": "^4.17.21",
"mockjs": "^1.1.0",
......@@ -41,12 +40,12 @@
},
"devDependencies": {
"@ant-design/colors": "^4.0.1",
"@babel/eslint-parser": "^7.14.7",
"@vue/cli-plugin-babel": "^4.4.0",
"@vue/cli-plugin-eslint": "^4.4.0",
"@vue/cli-service": "^4.4.0",
"@vuepress/plugin-back-to-top": "^1.5.2",
"autoprefixer": "^9.8.6",
"babel-eslint": "^10.1.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"babel-polyfill": "^6.26.0",
"compression-webpack-plugin": "^2.0.0",
......@@ -74,7 +73,7 @@
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
"parser": "@babel/eslint-parser"
},
"rules": {
"no-unused-vars": "off"
......
......@@ -3,6 +3,7 @@ lockfileVersion: 5.3
specifiers:
'@ant-design/colors': ^4.0.1
'@antv/data-set': ^0.11.4
'@babel/eslint-parser': ^7.14.7
'@tailwindcss/postcss7-compat': ^2.2.2
'@vue/cli-plugin-babel': ^4.4.0
'@vue/cli-plugin-eslint': ^4.4.0
......@@ -12,7 +13,6 @@ specifiers:
ant-design-vue: 1.7.2
autoprefixer: ^9.8.6
axios: ^0.21.1
babel-eslint: ^10.1.0
babel-plugin-transform-remove-console: ^6.9.4
babel-polyfill: ^6.26.0
clipboard: ^2.0.6
......@@ -21,7 +21,6 @@ specifiers:
crypto-js: ^4.0.0
date-fns: ^2.14.0
deepmerge: ^4.2.2
enquire.js: ^2.1.6
eslint: ^6.7.2
eslint-plugin-prettier: 3.3.1
eslint-plugin-vue: ^6.2.2
......@@ -58,7 +57,6 @@ dependencies:
core-js: registry.nlark.com/core-js/3.15.2
crypto-js: 4.0.0
date-fns: registry.nlark.com/date-fns/2.22.1
enquire.js: 2.1.6
highlight.js: registry.nlark.com/highlight.js/10.7.3
lodash: 4.17.21
mockjs: 1.1.0
......@@ -75,12 +73,12 @@ dependencies:
devDependencies:
'@ant-design/colors': 4.0.5
'@babel/eslint-parser': registry.nlark.com/@babel/eslint-parser/7.14.7_eslint@6.8.0
'@vue/cli-plugin-babel': registry.nlark.com/@vue/cli-plugin-babel/4.5.13_ff590b0de5aca690f3f4042d35869c4a
'@vue/cli-plugin-eslint': registry.nlark.com/@vue/cli-plugin-eslint/4.5.13_a58cf9e4d577795b8c257bee96d49483
'@vue/cli-service': registry.nlark.com/@vue/cli-service/4.5.13_43a63c64ecf2cf12e419e283ff9485e4
'@vuepress/plugin-back-to-top': registry.nlark.com/@vuepress/plugin-back-to-top/1.8.2
autoprefixer: registry.nlark.com/autoprefixer/9.8.6
babel-eslint: 10.1.0_eslint@6.8.0
babel-plugin-transform-remove-console: 6.9.4
babel-polyfill: 6.26.0
compression-webpack-plugin: registry.nlark.com/compression-webpack-plugin/2.0.0
......@@ -275,12 +273,6 @@ packages:
esutils: 2.0.3
dev: true
/@fullhuman/postcss-purgecss/3.1.3:
resolution: {integrity: sha1-R697h8m/s95LyUo4+HW5KP/98zk=, tarball: '@fullhuman/postcss-purgecss/download/@fullhuman/postcss-purgecss-3.1.3.tgz'}
dependencies:
purgecss: 3.1.3
dev: false
/@hapi/address/2.1.4:
resolution: {integrity: sha1-XWftQ/P9QaadS5/3tW58DR0KgeU=, tarball: '@hapi/address/download/@hapi/address-2.1.4.tgz'}
deprecated: Moved to 'npm install @sideway/address'
......@@ -739,24 +731,6 @@ packages:
follow-redirects: registry.nlark.com/follow-redirects/1.14.1
dev: false
/babel-eslint/10.1.0_eslint@6.8.0:
resolution: {integrity: sha1-aWjlaKkQt4+zd5zdi2rC9HmUMjI=, tarball: babel-eslint/download/babel-eslint-10.1.0.tgz}
engines: {node: '>=6'}
deprecated: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
peerDependencies:
eslint: '>= 4.12.1'
dependencies:
'@babel/code-frame': registry.nlark.com/@babel/code-frame/7.14.5
'@babel/parser': registry.nlark.com/@babel/parser/7.14.7
'@babel/traverse': registry.nlark.com/@babel/traverse/7.14.7
'@babel/types': registry.nlark.com/@babel/types/7.14.5
eslint: registry.nlark.com/eslint/6.8.0
eslint-visitor-keys: registry.nlark.com/eslint-visitor-keys/1.3.0
resolve: 1.20.0
transitivePeerDependencies:
- supports-color
dev: true
/babel-helper-vue-jsx-merge-props/2.0.3:
resolution: {integrity: sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY=, tarball: babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz}
dev: false
......@@ -1631,10 +1605,6 @@ packages:
source-map: 0.6.1
dev: true
/css-unit-converter/1.1.2:
resolution: {integrity: sha1-THf1oZVObb/2BpXsshTjJwQ2qyE=, tarball: css-unit-converter/download/css-unit-converter-1.1.2.tgz}
dev: false
/css/2.2.4:
resolution: {integrity: sha1-xkZ1XHOXHyu6amAeLPL9cbEpiSk=, tarball: css/download/css-2.2.4.tgz}
dependencies:
......@@ -2662,7 +2632,7 @@ packages:
dev: true
/graceful-fs/4.2.6:
resolution: {integrity: sha1-/wQLKwhTsjw9MQJ1I3BvGIXXa+4=, tarball: graceful-fs/download/graceful-fs-4.2.6.tgz?cache=0&sync_timestamp=1612917647930&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgraceful-fs%2Fdownload%2Fgraceful-fs-4.2.6.tgz}
resolution: {integrity: sha1-/wQLKwhTsjw9MQJ1I3BvGIXXa+4=, tarball: graceful-fs/download/graceful-fs-4.2.6.tgz}
/gzip-size/5.1.1:
resolution: {integrity: sha1-y5vuaS+HwGErIyhAqHOQTkwTUnQ=, tarball: gzip-size/download/gzip-size-5.1.1.tgz}
......@@ -2700,11 +2670,11 @@ packages:
resolution: {integrity: sha1-ZP5qywIGc+O3jbA1pa9pqp0HsRM=, tarball: has-bigints/download/has-bigints-1.0.1.tgz}
/has-flag/3.0.0:
resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=, tarball: has-flag/download/has-flag-3.0.0.tgz}
resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=, tarball: has-flag/download/has-flag-3.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-flag%2Fdownload%2Fhas-flag-3.0.0.tgz}
engines: {node: '>=4'}
/has-flag/4.0.0:
resolution: {integrity: sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=, tarball: has-flag/download/has-flag-4.0.0.tgz}
resolution: {integrity: sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=, tarball: has-flag/download/has-flag-4.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz}
engines: {node: '>=8'}
/has-symbols/1.0.2:
......@@ -2977,7 +2947,7 @@ packages:
dev: true
/import-cwd/3.0.0:
resolution: {integrity: sha1-IIRVR3GAFRJuqbNna3WS+4vUz5I=, tarball: import-cwd/download/import-cwd-3.0.0.tgz?cache=0&sync_timestamp=1604330955639&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-cwd%2Fdownload%2Fimport-cwd-3.0.0.tgz}
resolution: {integrity: sha1-IIRVR3GAFRJuqbNna3WS+4vUz5I=, tarball: import-cwd/download/import-cwd-3.0.0.tgz}
engines: {node: '>=8'}
dependencies:
import-from: registry.nlark.com/import-from/3.0.0
......@@ -3689,10 +3659,6 @@ packages:
resolution: {integrity: sha1-JMS/zWsvuji/0FlNsRedjptlZWE=, tarball: lodash.toarray/download/lodash.toarray-4.4.0.tgz}
dev: false
/lodash.topath/4.5.2:
resolution: {integrity: sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=, tarball: lodash.topath/download/lodash.topath-4.5.2.tgz}
dev: false
/lodash.transform/4.6.0:
resolution: {integrity: sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A=, tarball: lodash.transform/download/lodash.transform-4.6.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash.transform%2Fdownload%2Flodash.transform-4.6.0.tgz}
dev: true
......@@ -3871,7 +3837,7 @@ packages:
dev: true
/micromatch/4.0.4:
resolution: {integrity: sha1-iW1Rnf6dsl/OlM63pQCRm/iB6/k=, tarball: micromatch/download/micromatch-4.0.4.tgz}
resolution: {integrity: sha1-iW1Rnf6dsl/OlM63pQCRm/iB6/k=, tarball: micromatch/download/micromatch-4.0.4.tgz?cache=0&sync_timestamp=1618054885525&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmicromatch%2Fdownload%2Fmicromatch-4.0.4.tgz}
engines: {node: '>=8.6'}
dependencies:
braces: 3.0.2
......@@ -4689,13 +4655,6 @@ packages:
postcss: registry.nlark.com/postcss/7.0.36
dev: true
/postcss-nested/4.2.3:
resolution: {integrity: sha1-xvJVsKcgVJd20iDQDEtwzSRBNvY=, tarball: postcss-nested/download/postcss-nested-4.2.3.tgz}
dependencies:
postcss: registry.nlark.com/postcss/7.0.36
postcss-selector-parser: registry.nlark.com/postcss-selector-parser/6.0.6
dev: false
/postcss-value-parser/3.3.1:
resolution: {integrity: sha1-n/giVH4okyE88cMO+lGsX9G6goE=, tarball: postcss-value-parser/download/postcss-value-parser-3.3.1.tgz}
......@@ -4855,11 +4814,6 @@ packages:
resolution: {integrity: sha1-SSkii7xyTfrEPg77BYyve2z7YkM=, tarball: queue-microtask/download/queue-microtask-1.2.3.tgz}
dev: false
/quick-lru/5.1.1:
resolution: {integrity: sha1-NmST5rPkKjpoheLpnRj4D7eoyTI=, tarball: quick-lru/download/quick-lru-5.1.1.tgz}
engines: {node: '>=10'}
dev: false
/raf/3.4.1:
resolution: {integrity: sha1-B0LpmkplUvRF1z4+4DKK8P8e3jk=, tarball: raf/download/raf-3.4.1.tgz}
dependencies:
......@@ -4945,7 +4899,7 @@ packages:
dev: true
/readdirp/3.6.0:
resolution: {integrity: sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc=, tarball: readdirp/download/readdirp-3.6.0.tgz?cache=0&sync_timestamp=1615717524915&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-3.6.0.tgz}
resolution: {integrity: sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc=, tarball: readdirp/download/readdirp-3.6.0.tgz}
engines: {node: '>=8.10.0'}
dependencies:
picomatch: registry.nlark.com/picomatch/2.3.0
......@@ -4953,7 +4907,7 @@ packages:
/reduce-css-calc/2.1.8:
resolution: {integrity: sha1-fvh2GijWFJgNwMmC93LJP3qZ3gM=, tarball: reduce-css-calc/download/reduce-css-calc-2.1.8.tgz}
dependencies:
css-unit-converter: 1.1.2
css-unit-converter: registry.nlark.com/css-unit-converter/1.1.2
postcss-value-parser: 3.3.1
dev: false
......@@ -5285,7 +5239,7 @@ packages:
dev: true
/semver/6.3.0:
resolution: {integrity: sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=, tarball: semver/download/semver-6.3.0.tgz}
resolution: {integrity: sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=, tarball: semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1616464871150&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz}
hasBin: true
dev: true
......@@ -6705,6 +6659,22 @@ packages:
- supports-color
dev: true
registry.nlark.com/@babel/eslint-parser/7.14.7_eslint@6.8.0:
resolution: {integrity: sha1-kb5ZpPfdYNAqPvdy0VaXZGVZa9o=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@babel/eslint-parser/download/@babel/eslint-parser-7.14.7.tgz}
id: registry.nlark.com/@babel/eslint-parser/7.14.7
name: '@babel/eslint-parser'
version: 7.14.7
engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0}
peerDependencies:
'@babel/core': '>=7.11.0'
eslint: '>=7.5.0'
dependencies:
eslint: registry.nlark.com/eslint/6.8.0
eslint-scope: 5.1.1
eslint-visitor-keys: registry.nlark.com/eslint-visitor-keys/2.1.0
semver: 6.3.0
dev: true
registry.nlark.com/@babel/generator/7.14.5:
resolution: {integrity: sha1-hI17nwMcrKnQzQrwGwY/Im9S14U=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@babel/generator/download/@babel/generator-7.14.5.tgz}
name: '@babel/generator'
......@@ -7935,6 +7905,14 @@ packages:
to-fast-properties: 2.0.0
dev: true
registry.nlark.com/@fullhuman/postcss-purgecss/3.1.3:
resolution: {integrity: sha1-R697h8m/s95LyUo4+HW5KP/98zk=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@fullhuman/postcss-purgecss/download/@fullhuman/postcss-purgecss-3.1.3.tgz}
name: '@fullhuman/postcss-purgecss'
version: 3.1.3
dependencies:
purgecss: 3.1.3
dev: false
registry.nlark.com/@hapi/hoek/8.5.1:
resolution: {integrity: sha1-/elgZMpEbeyMVajC8TCVewcMbgY=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@hapi/hoek/download/@hapi/hoek-8.5.1.tgz}
name: '@hapi/hoek'
......@@ -7969,14 +7947,14 @@ packages:
dev: true
registry.nlark.com/@nodelib/fs.stat/2.0.5:
resolution: {integrity: sha1-W9Jir5Tp0lvR5xsF3u1Eh2oiLos=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@nodelib/fs.stat/download/@nodelib/fs.stat-2.0.5.tgz}
resolution: {integrity: sha1-W9Jir5Tp0lvR5xsF3u1Eh2oiLos=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@nodelib/fs.stat/download/@nodelib/fs.stat-2.0.5.tgz?cache=0&sync_timestamp=1622793808360&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.stat%2Fdownload%2F%40nodelib%2Ffs.stat-2.0.5.tgz}
name: '@nodelib/fs.stat'
version: 2.0.5
engines: {node: '>= 8'}
dev: false
registry.nlark.com/@nodelib/fs.walk/1.2.8:
resolution: {integrity: sha1-6Vc36LtnRt3t9pxVaVNJTxlv5po=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@nodelib/fs.walk/download/@nodelib/fs.walk-1.2.8.tgz}
resolution: {integrity: sha1-6Vc36LtnRt3t9pxVaVNJTxlv5po=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@nodelib/fs.walk/download/@nodelib/fs.walk-1.2.8.tgz?cache=0&sync_timestamp=1625770194804&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.walk%2Fdownload%2F%40nodelib%2Ffs.walk-1.2.8.tgz}
name: '@nodelib/fs.walk'
version: 1.2.8
engines: {node: '>= 8'}
......@@ -8008,7 +7986,7 @@ packages:
engines: {node: '>=12.13.0'}
hasBin: true
dependencies:
'@fullhuman/postcss-purgecss': 3.1.3
'@fullhuman/postcss-purgecss': registry.nlark.com/@fullhuman/postcss-purgecss/3.1.3
arg: 5.0.0
autoprefixer: registry.nlark.com/autoprefixer/9.8.6
bytes: 3.1.0
......@@ -8025,7 +8003,7 @@ packages:
html-tags: 3.1.0
is-glob: 4.0.1
lodash: 4.17.21
lodash.topath: 4.5.2
lodash.topath: registry.nlark.com/lodash.topath/4.5.2
modern-normalize: registry.nlark.com/modern-normalize/1.1.0
node-emoji: 1.10.0
normalize-path: 3.0.0
......@@ -8034,11 +8012,11 @@ packages:
postcss-functions: 3.0.0
postcss-js: 2.0.3
postcss-load-config: registry.nlark.com/postcss-load-config/3.1.0
postcss-nested: 4.2.3
postcss-nested: registry.nlark.com/postcss-nested/4.2.3
postcss-selector-parser: registry.nlark.com/postcss-selector-parser/6.0.6
postcss-value-parser: 4.1.0
pretty-hrtime: 1.0.3
quick-lru: 5.1.1
quick-lru: registry.nlark.com/quick-lru/5.1.1
reduce-css-calc: 2.1.8
resolve: 1.20.0
tmp: 0.2.1
......@@ -8164,7 +8142,7 @@ packages:
dev: true
registry.nlark.com/@types/parse-json/4.0.0:
resolution: {integrity: sha1-L4u0QUNNFjs1+4/9zNcTiSf/uMA=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@types/parse-json/download/@types/parse-json-4.0.0.tgz}
resolution: {integrity: sha1-L4u0QUNNFjs1+4/9zNcTiSf/uMA=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@types/parse-json/download/@types/parse-json-4.0.0.tgz?cache=0&sync_timestamp=1621242399300&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fparse-json%2Fdownload%2F%40types%2Fparse-json-4.0.0.tgz}
name: '@types/parse-json'
version: 4.0.0
dev: false
......@@ -8901,7 +8879,7 @@ packages:
color-convert: 1.9.3
registry.nlark.com/ansi-styles/4.3.0:
resolution: {integrity: sha1-7dgDYornHATIWuegkG7a00tkiTc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz}
resolution: {integrity: sha1-7dgDYornHATIWuegkG7a00tkiTc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz}
name: ansi-styles
version: 4.3.0
engines: {node: '>=8'}
......@@ -9166,7 +9144,7 @@ packages:
dev: true
registry.nlark.com/chalk/4.1.1:
resolution: {integrity: sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995518928&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz}
resolution: {integrity: sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz}
name: chalk
version: 4.1.1
engines: {node: '>=10'}
......@@ -9196,7 +9174,7 @@ packages:
dev: true
registry.nlark.com/chokidar/3.5.2:
resolution: {integrity: sha1-26OXb8rbAW9m/TZQIdkWANAcHnU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/chokidar/download/chokidar-3.5.2.tgz}
resolution: {integrity: sha1-26OXb8rbAW9m/TZQIdkWANAcHnU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/chokidar/download/chokidar-3.5.2.tgz?cache=0&sync_timestamp=1623763736136&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchokidar%2Fdownload%2Fchokidar-3.5.2.tgz}
name: chokidar
version: 3.5.2
engines: {node: '>= 8.10.0'}
......@@ -9256,7 +9234,7 @@ packages:
version: 2.20.3
registry.nlark.com/commander/6.2.1:
resolution: {integrity: sha1-B5LraC37wyWZm7K4T93duhEKxzw=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/commander/download/commander-6.2.1.tgz}
resolution: {integrity: sha1-B5LraC37wyWZm7K4T93duhEKxzw=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/commander/download/commander-6.2.1.tgz?cache=0&sync_timestamp=1624613741385&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcommander%2Fdownload%2Fcommander-6.2.1.tgz}
name: commander
version: 6.2.1
engines: {node: '>= 6'}
......@@ -9426,6 +9404,12 @@ packages:
nth-check: 2.0.0
dev: true
registry.nlark.com/css-unit-converter/1.1.2:
resolution: {integrity: sha1-THf1oZVObb/2BpXsshTjJwQ2qyE=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/css-unit-converter/download/css-unit-converter-1.1.2.tgz}
name: css-unit-converter
version: 1.1.2
dev: false
registry.nlark.com/css-what/3.4.2:
resolution: {integrity: sha1-6nAm/LAXd+295SEk4h8yfnrpUOQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/css-what/download/css-what-3.4.2.tgz}
name: css-what
......@@ -9889,6 +9873,13 @@ packages:
engines: {node: '>=4'}
dev: true
registry.nlark.com/eslint-visitor-keys/2.1.0:
resolution: {integrity: sha1-9lMoJZMFknOSyTjtROsKXJsr0wM=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/eslint-visitor-keys/download/eslint-visitor-keys-2.1.0.tgz}
name: eslint-visitor-keys
version: 2.1.0
engines: {node: '>=10'}
dev: true
registry.nlark.com/eslint/6.8.0:
resolution: {integrity: sha1-YiYtZylzn5J1cjgkMC+yJ8jJP/s=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/eslint/download/eslint-6.8.0.tgz}
name: eslint
......@@ -10087,7 +10078,7 @@ packages:
dev: true
registry.nlark.com/fs-extra/10.0.0:
resolution: {integrity: sha1-n/YbZV3eU/s0qC34S7IUzoAuF8E=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fs-extra/download/fs-extra-10.0.0.tgz?cache=0&sync_timestamp=1620119003427&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffs-extra%2Fdownload%2Ffs-extra-10.0.0.tgz}
resolution: {integrity: sha1-n/YbZV3eU/s0qC34S7IUzoAuF8E=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fs-extra/download/fs-extra-10.0.0.tgz}
name: fs-extra
version: 10.0.0
engines: {node: '>=12'}
......@@ -10335,7 +10326,7 @@ packages:
dev: true
registry.nlark.com/import-from/3.0.0:
resolution: {integrity: sha1-BVz+w4zVon2AV8pRN219O/CJGWY=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/import-from/download/import-from-3.0.0.tgz?cache=0&sync_timestamp=1622536168109&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fimport-from%2Fdownload%2Fimport-from-3.0.0.tgz}
resolution: {integrity: sha1-BVz+w4zVon2AV8pRN219O/CJGWY=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/import-from/download/import-from-3.0.0.tgz}
name: import-from
version: 3.0.0
engines: {node: '>=8'}
......@@ -10516,6 +10507,12 @@ packages:
version: 1.0.0
dev: true
registry.nlark.com/lodash.topath/4.5.2:
resolution: {integrity: sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/lodash.topath/download/lodash.topath-4.5.2.tgz}
name: lodash.topath
version: 4.5.2
dev: false
registry.nlark.com/markdown-it-anchor/5.3.0_markdown-it@8.4.2:
resolution: {integrity: sha1-1Ums1khWqOzRvqWDZe84Xv+6x0Q=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/markdown-it-anchor/download/markdown-it-anchor-5.3.0.tgz}
id: registry.nlark.com/markdown-it-anchor/5.3.0
......@@ -10699,7 +10696,7 @@ packages:
dev: true
registry.nlark.com/object-hash/2.2.0:
resolution: {integrity: sha1-WtUYWB7vxEO9djRyuP8unCwNVKU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/object-hash/download/object-hash-2.2.0.tgz}
resolution: {integrity: sha1-WtUYWB7vxEO9djRyuP8unCwNVKU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/object-hash/download/object-hash-2.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fobject-hash%2Fdownload%2Fobject-hash-2.2.0.tgz}
name: object-hash
version: 2.2.0
engines: {node: '>= 6'}
......@@ -10970,6 +10967,15 @@ packages:
postcss-selector-parser: registry.nlark.com/postcss-selector-parser/3.1.2
dev: true
registry.nlark.com/postcss-nested/4.2.3:
resolution: {integrity: sha1-xvJVsKcgVJd20iDQDEtwzSRBNvY=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/postcss-nested/download/postcss-nested-4.2.3.tgz}
name: postcss-nested
version: 4.2.3
dependencies:
postcss: registry.nlark.com/postcss/7.0.36
postcss-selector-parser: registry.nlark.com/postcss-selector-parser/6.0.6
dev: false
registry.nlark.com/postcss-normalize-charset/4.0.1:
resolution: {integrity: sha1-izWt067oOhNrBHHg1ZvlilAoXdQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/postcss-normalize-charset/download/postcss-normalize-charset-4.0.1.tgz}
name: postcss-normalize-charset
......@@ -11250,6 +11256,13 @@ packages:
deprecated: The
dev: true
registry.nlark.com/quick-lru/5.1.1:
resolution: {integrity: sha1-NmST5rPkKjpoheLpnRj4D7eoyTI=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/quick-lru/download/quick-lru-5.1.1.tgz}
name: quick-lru
version: 5.1.1
engines: {node: '>=10'}
dev: false
registry.nlark.com/reduce/1.0.2:
resolution: {integrity: sha1-DNaArT/+CwYOV6XGi9/ONxaNNhs=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/reduce/download/reduce-1.0.2.tgz}
name: reduce
......
......@@ -5,9 +5,9 @@
</template>
<script>
import { enquireScreen } from './utils/commonUtil';
import { mapState, mapMutations } from 'vuex';
import { mapState } from 'vuex';
import { changeThemeColor } from '@/utils/themeUtil';
import langUtils from '@/utils/langUtils';
export default {
name: 'App',
......@@ -18,15 +18,10 @@ export default {
},
created() {
this.setHtmlTitle();
this.setLanguage(this.lang);
enquireScreen(isMobile => this.setDevice(isMobile));
this.setLanguage();
},
watch: {
lang(val) {
this.setLanguage(val);
this.setHtmlTitle();
},
$route() {
this.setHtmlTitle();
},
......@@ -44,12 +39,11 @@ export default {
},
computed: {
//setting = mapStore.name
...mapState('settingModule', ['layout', 'theme', 'lang']),
...mapState('settingModule', ['layout', 'theme']),
},
methods: {
...mapMutations('settingModule', ['setDevice']),
setLanguage(lang) {
setLanguage() {
const lang = langUtils.get();
this.$i18n.locale = lang;
switch (lang) {
case 'zh_CN':
......
import { postReq, putReq } from '@/utils';
import { getReq, postReq, putReq } from '@/utils';
export function addTaskApi(data) {
return postReq('/api/v1/schedules', data);
......@@ -7,3 +7,7 @@ export function addTaskApi(data) {
export function updateTaskApi(data) {
return putReq('/api/v1/schedules', data);
}
export function getRangerInspectionTaskDetailApi(id) {
return getReq(`/ranger/inspection/api/v1/jobs/tasks/${id}`);
}
<template>
<a-layout-sider
:theme="sideTheme"
:class="['side-menu', 'beauty-scroll', isMobile ? null : 'shadow']"
:class="['side-menu', 'beauty-scroll']"
width="256px"
:collapsible="collapsible"
v-model="collapsed"
......@@ -49,15 +49,12 @@ export default {
sideTheme() {
return this.theme == 'light' ? this.theme : 'dark';
},
...mapState('settingModule', ['isMobile', 'systemName']),
...mapState('settingModule', ['systemName']),
},
};
</script>
<style lang="less" scoped>
.shadow {
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
}
.side-menu {
min-height: 100vh;
overflow-y: auto;
......
<template>
<a-layout-header :class="[headerTheme, 'admin-header']">
<div :class="['admin-header-wide', layout, pageWidth]">
<router-link
v-if="isMobile || layout === 'head'"
to="/"
:class="['logo', isMobile ? null : 'pc', headerTheme]"
>
<router-link v-if="layout === 'head'" to="/" :class="['logo', 'pc', headerTheme]">
<img width="32" src="@/assets/img/logo.png" />
<h1 v-if="!isMobile">{{ systemName }}</h1>
<h1>{{ systemName }}</h1>
</router-link>
<a-icon
......@@ -16,11 +12,7 @@
:type="collapsed ? 'menu-unfold' : 'menu-fold'"
@click="toggleCollapse"
/>
<div
v-if="layout !== 'side' && !isMobile"
class="admin-header-menu"
:style="`width: ${menuWidth};`"
>
<div v-if="layout !== 'side'" class="admin-header-menu" :style="`width: ${menuWidth};`">
<i-menu
class="head-menu"
:theme="headerTheme"
......@@ -53,9 +45,9 @@ export default {
return {};
},
computed: {
...mapState('settingModule', ['theme', 'isMobile', 'layout', 'systemName', 'pageWidth']),
...mapState('settingModule', ['theme', 'layout', 'systemName', 'pageWidth']),
headerTheme() {
if (this.layout == 'side' && this.theme.mode == 'dark' && !this.isMobile) {
if (this.layout == 'side' && this.theme.mode == 'dark') {
return 'light';
}
return this.theme.mode;
......@@ -67,7 +59,7 @@ export default {
return `calc(${headWidth} - ${extraWidth})`;
},
showToggleCollapse() {
if (this.layout !== 'head' && this.isMobile === false) {
if (this.layout !== 'head') {
return true;
} else {
return false;
......
<template>
<a-layout :class="['admin-layout', 'beauty-scroll']">
<drawer v-if="isMobile" v-model="drawerOpen">
<side-menu
:theme="theme.mode"
:menuData="menuData"
:collapsed="false"
:collapsible="false"
@menuSelect="onMenuSelect"
/>
</drawer>
<side-menu
:class="[fixedSideBar ? 'fixed-side' : '']"
:theme="theme.mode"
v-else-if="layout === 'side' || layout === 'mix'"
v-if="layout === 'side' || layout === 'mix'"
:menuData="sideMenuData"
:collapsed="collapsed"
:collapsible="true"
/>
<div
v-if="fixedSideBar && !isMobile"
v-if="fixedSideBar"
:style="`width: ${sideMenuWidth}; min-width: ${sideMenuWidth};max-width: ${sideMenuWidth};`"
class="virtual-side"
/>
......@@ -73,7 +63,6 @@ export default {
minHeight: window.innerHeight - 64 - 122,
collapsed: false,
showSetting: false,
drawerOpen: false,
menuData: [],
firstMenu: [],
subMenu: [],
......@@ -86,18 +75,12 @@ export default {
};
},
watch: {
isMobile(val) {
if (!val) {
this.drawerOpen = false;
}
},
layout(layout) {
this.updateSildeMenu(layout);
},
},
computed: {
...mapState('settingModule', [
'isMobile',
'theme',
'layout',
'footerLinks',
......@@ -120,9 +103,7 @@ export default {
},
headerStyle() {
let width =
this.fixedHeader && this.layout !== 'head' && !this.isMobile
? `calc(100% - ${this.sideMenuWidth})`
: '100%';
this.fixedHeader && this.layout !== 'head' ? `calc(100% - ${this.sideMenuWidth})` : '100%';
let position = this.fixedHeader ? 'fixed' : 'static';
return `width: ${width}; position: ${position};`;
},
......@@ -147,11 +128,11 @@ export default {
updateSildeMenu(layout) {
if (layout === 'mix') {
const { path } = this.$route;
let currentMenu = this.menuList.find(i => i.menuUrl === path);
let currentMenu = this.menuList.find((i) => i.menuUrl === path);
let parentMenuId = currentMenu.parentMenuId;
while (parentMenuId !== 0) {
currentMenu = this.menuList.find(i => i.menuId === parentMenuId);
currentMenu = this.menuList.find((i) => i.menuId === parentMenuId);
parentMenuId = currentMenu.parentMenuId;
}
this.subMenu = currentMenu.children || [];
......@@ -161,7 +142,7 @@ export default {
menuSelect(obj) {
// 拿到 菜单id
const menuId = obj.key;
const currentMenu = this.menuList.find(i => i.menuId === menuId);
const currentMenu = this.menuList.find((i) => i.menuId === menuId);
if (currentMenu.menuType === 'MENU') {
this.subMenu = [];
......@@ -177,7 +158,7 @@ export default {
const menuData = convertListToTree(menuList || [], false, true);
this.menuData = menuData;
this.menuList = menuList;
this.firstMenu = JSON.parse(JSON.stringify(menuData)).map(i => {
this.firstMenu = JSON.parse(JSON.stringify(menuData)).map((i) => {
delete i.children;
return i;
});
......
......@@ -12,7 +12,6 @@ const customTitles = (customTitlesStr && JSON.parse(customTitlesStr)) || [];
export default {
namespaced: true,
state: {
isMobile: false,
animates: globalConfig.animates.preset,
palettes: globalConfig.palettes,
pageMinHeight: 0,
......@@ -36,7 +35,7 @@ export default {
if (menuData.length > 0 && !menuData[0].fullPath) {
formatFullPath(menuData);
}
return menuData.map(item => {
return menuData.map((item) => {
const menuItem = { ...item };
delete menuItem.children;
return menuItem;
......@@ -44,9 +43,6 @@ export default {
},
},
mutations: {
setDevice(state, isMobile) {
state.isMobile = isMobile;
},
setTheme(state, theme) {
state.theme = theme;
},
......@@ -92,7 +88,7 @@ export default {
},
setCustomTitle(state, { path, title }) {
if (title) {
const obj = state.customTitles.find(item => item.path === path);
const obj = state.customTitles.find((item) => item.path === path);
if (obj) {
obj.title = title;
} else {
......
<template>
<page-layout :desc="desc" :linkList="linkList">
<div v-if="this.extraImage && !isMobile" slot="extra" :class="$style.extraImg">
<div v-if="extraImage" slot="extra" :class="$style.extraImg">
<img :src="extraImage" />
</div>
<router-view ref="page" />
......@@ -20,7 +20,7 @@ export default {
};
},
computed: {
...mapState('settingModule', ['isMobile', 'multiPage']),
...mapState('settingModule', ['multiPage']),
desc() {
return this.page?.desc;
},
......
<template>
<Wraper :hidden="hidden" noFooter>
<Table :url="tableUrl" rowKey="taskId" noPadding :buttons="buttons" :scroll="scroll" :width="600">
<Table
:url="tableUrl"
rowKey="taskId"
noPadding
:buttons="buttons"
:scroll="scroll"
:width="600"
ref="table"
>
<template #search="{ query }">
<MoreItem label="开始时间">
<a-date-picker
......@@ -99,6 +107,10 @@
</MoreItem>
</template>
<template #drawer="drawer">
<ViewDetailCom v-bind="drawer" />
</template>
<a-table-column title="巡检项目" data-index="taskName" />
<a-table-column title="参考值" data-index="referenceValue" width="150px" />
<a-table-column title="采集数据" data-index="value" width="150px" />
......@@ -109,6 +121,7 @@
</Table>
</Wraper>
</template>
<script>
import Table from '@/components/table/table.vue';
import Wraper from '@/components/table/wraper.vue';
......@@ -116,10 +129,12 @@ import UrlSelect from '@/components/MySelect/url_select.vue';
import SearchSelect from '@/components/MySelect/search_select.vue';
import langUtils from '@/utils/langUtils';
import MoreItem from '@/components/table/more_item.vue';
import ViewDetailCom from './view_detail.vue';
export default {
props: { hidden: Function, row: Object },
components: { Table, Wraper, SearchSelect, UrlSelect, MoreItem },
components: { Table, Wraper, SearchSelect, UrlSelect, MoreItem, ViewDetailCom },
data() {
return {
scroll: { x: 1200 },
......@@ -152,6 +167,7 @@ export default {
methods: {
viewDetail(row) {
console.log(row);
this.$refs.table.show({ row, title: '备注 & 附件' });
},
},
};
......
<template>
<Wraper noFooter :hidden="hidden">
<span>备注:</span>
<div style="min-height: 100px" class="tw-font-medium tw-mt-2">{{ detailData.inspectionRemark }}</div>
<a-tabs>
<!-- Todo -->
<a-tab-pane key="1" tab="图片"></a-tab-pane>
<a-tab-pane key="2" tab="视频"></a-tab-pane>
</a-tabs>
</Wraper>
</template>
<script>
import Wraper from '@/components/table/wraper.vue';
import { getRangerInspectionTaskDetailApi } from '@/api';
export default {
props: { hidden: Function, row: Object },
components: { Wraper },
data() {
return {
detailData: {},
};
},
async mounted() {
this.detailData = await getRangerInspectionTaskDetailApi(this.row.taskId);
console.log(this.detailData);
},
};
</script>
//enquire.js 纯 JavaScript 实现的 CSS 媒体查询库
import enquireJs from "enquire.js";
export function isDef(v) {
return v !== undefined && v !== null;
}
......@@ -18,19 +15,7 @@ export function remove(arr, item) {
}
export function isRegExp(v) {
return _toString.call(v) === "[object RegExp]";
}
export function enquireScreen(call) {
const handler = {
match: function() {
call && call(true);
},
unmatch: function() {
call && call(false);
},
};
enquireJs.register("only screen and (max-width: 767.99px)", handler);
return _toString.call(v) === '[object RegExp]';
}
const _toString = Object.prototype.toString;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment