From 17bc017c5abbd2c87813d6c6f9d587ddf9d57da7 Mon Sep 17 00:00:00 2001 From: HalseySpicy <848130454@qq.com> Date: Fri, 15 Sep 2023 15:15:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20update=20and=20optimize?= =?UTF-8?q?=20project=20content?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- .env.development | 4 + .env.production | 4 + .env.test | 4 + .eslintrc.cjs | 4 +- .vscode/settings.json | 4 + README.md | 20 +- index.html | 2 +- package.json | 56 +- pnpm-lock.yaml | 5181 ++++++++--------- src/api/index.ts | 9 +- src/api/modules/login.ts | 8 +- src/assets/iconfont/iconfont.scss | 6 +- src/assets/iconfont/iconfont.ttf | Bin 5088 -> 5420 bytes src/assets/json/authMenuList.json | 38 +- src/assets/mock/Easy-Mock-API.zip | Bin 78983 -> 78383 bytes src/components/ECharts/config/index.ts | 72 + src/components/ECharts/index.vue | 98 + src/components/Grid/index.vue | 2 +- .../Loading/fullScreen.ts} | 0 src/components/ProTable/index.vue | 237 +- src/components/ProTable/interface/index.ts | 22 +- src/components/SearchForm/index.vue | 11 +- src/components/SelectFilter/index.vue | 8 +- src/components/SelectIcon/index.vue | 4 +- src/components/TreeFilter/index.vue | 8 +- src/components/Upload/Img.vue | 7 +- src/components/Upload/Imgs.vue | 7 +- src/components/WangEditor/index.vue | 11 +- src/config/index.ts | 2 +- src/directives/modules/copy.ts | 13 +- src/hooks/useEcharts.ts | 27 - src/hooks/useTable.ts | 7 +- src/hooks/useTheme.ts | 2 +- src/layouts/components/Header/ToolBarLeft.vue | 2 +- src/layouts/components/Main/index.vue | 6 +- src/layouts/components/Menu/SubMenu.vue | 6 - .../components/Tabs/components/MoreButton.vue | 8 +- src/layouts/components/Tabs/index.vue | 39 +- src/routers/index.ts | 11 +- .../helper/persist.ts} | 0 src/stores/interface/index.ts | 1 + src/stores/modules/global.ts | 4 +- src/stores/modules/tabs.ts | 29 +- src/stores/modules/user.ts | 2 +- src/styles/common.scss | 4 +- src/styles/element.scss | 11 +- src/typings/global.d.ts | 10 +- src/typings/utils.d.ts | 17 + src/utils/{serviceDict.ts => dict.ts} | 4 +- src/utils/echarts/index.ts | 53 - src/utils/index.ts | 16 +- src/views/assembly/guide/index.vue | 154 +- src/views/assembly/tabs/index.vue | 16 +- .../dataVisualize/components/curve.vue | 251 +- .../dataVisualize/components/pie.vue | 228 +- src/views/dashboard/dataVisualize/index.vue | 24 +- .../dataScreen/components/AgeRatioChart.vue | 216 +- .../dataScreen/components/AnnualUseChart.vue | 316 +- .../dataScreen/components/HotPlateChart.vue | 354 +- .../components/MaleFemaleRatioChart.vue | 205 +- .../dataScreen/components/OverNext30Chart.vue | 327 +- .../components/PlatformSourceChart.vue | 551 +- .../components/RealTimeAccessChart.vue | 325 +- .../dataScreen/components/chinaMapChart.vue | 309 +- src/views/dataScreen/index.scss | 15 +- src/views/dataScreen/index.vue | 290 +- src/views/echarts/columnChart/index.vue | 237 +- src/views/echarts/lineChart/index.vue | 210 +- src/views/echarts/nestedChart/index.vue | 173 +- src/views/echarts/pieChart/index.vue | 117 +- src/views/echarts/radarChart/index.vue | 95 +- src/views/echarts/waterChart/index.vue | 513 +- .../embedded => link/bing}/index.scss | 0 .../embedded => link/bing}/index.vue | 2 +- .../link/{geekerDocs => docs}/index.scss | 0 src/views/link/{geekerDocs => docs}/index.vue | 2 +- src/views/login/components/LoginForm.vue | 4 +- src/views/proTable/complexProTable/index.vue | 19 +- src/views/proTable/components/UserDrawer.vue | 6 +- src/views/proTable/treeProTable/index.vue | 23 +- src/views/proTable/useProTable/detail.vue | 2 +- src/views/proTable/useProTable/index.vue | 45 +- src/views/proTable/useSelectFilter/index.vue | 80 +- src/views/proTable/useTreeFilter/detail.vue | 2 +- src/views/proTable/useTreeFilter/index.vue | 23 +- src/views/system/menuMange/index.vue | 3 +- vite.config.ts | 1 + 88 files changed, 5300 insertions(+), 5941 deletions(-) create mode 100644 src/components/ECharts/config/index.ts create mode 100644 src/components/ECharts/index.vue rename src/{config/serviceLoading.ts => components/Loading/fullScreen.ts} (100%) delete mode 100644 src/hooks/useEcharts.ts rename src/{config/piniaPersist.ts => stores/helper/persist.ts} (100%) create mode 100644 src/typings/utils.d.ts rename src/utils/{serviceDict.ts => dict.ts} (68%) delete mode 100644 src/utils/echarts/index.ts rename src/views/{dashboard/embedded => link/bing}/index.scss (100%) rename src/views/{dashboard/embedded => link/bing}/index.vue (80%) rename src/views/link/{geekerDocs => docs}/index.scss (100%) rename src/views/link/{geekerDocs => docs}/index.vue (83%) diff --git a/.env b/.env index 8978fe4c..926332c2 100644 --- a/.env +++ b/.env @@ -8,4 +8,4 @@ VITE_PORT = 8848 VITE_OPEN = true # 打包后是否生成包分析文件 -VITE_REPORT = true +VITE_REPORT = false diff --git a/.env.development b/.env.development index ddb9385a..6a08604e 100644 --- a/.env.development +++ b/.env.development @@ -4,6 +4,10 @@ VITE_USER_NODE_ENV = development # 公共基础路径 VITE_PUBLIC_PATH = / +# 路由模式 +# Optional: hash | history +VITE_ROUTER_MODE = hash + # 打包时是否删除 console VITE_DROP_CONSOLE = true diff --git a/.env.production b/.env.production index 49a244df..31233073 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,10 @@ VITE_USER_NODE_ENV = production # 公共基础路径 VITE_PUBLIC_PATH = / +# 路由模式 +# Optional: hash | history +VITE_ROUTER_MODE = hash + # 是否启用 gzip 或 brotli 压缩打包,如果需要多个压缩规则,可以使用 “,” 分隔 # Optional: gzip | brotli | none VITE_BUILD_COMPRESS = none diff --git a/.env.test b/.env.test index 3cd3924c..17dbebda 100644 --- a/.env.test +++ b/.env.test @@ -4,6 +4,10 @@ VITE_USER_NODE_ENV = test # 公共基础路径 VITE_PUBLIC_PATH = / +# 路由模式 +# Optional: hash | history +VITE_ROUTER_MODE = hash + # 是否启用 gzip 或 brotli 压缩打包,如果需要多个压缩规则,可以使用 “,” 分隔 # Optional: gzip | brotli | none VITE_BUILD_COMPRESS = none diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 90ee1eb1..644cf14d 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -35,6 +35,7 @@ module.exports = { // typeScript (https://typescript-eslint.io/rules) "@typescript-eslint/no-unused-vars": "error", // 禁止定义未使用的变量 + "@typescript-eslint/no-empty-function": "error", // 禁止空函数 "@typescript-eslint/prefer-ts-expect-error": "error", // 禁止使用 @ts-ignore "@typescript-eslint/ban-ts-comment": "error", // 禁止 @ts- 使用注释或要求在指令后进行描述 "@typescript-eslint/no-inferrable-types": "off", // 可以轻松推断的显式类型可能会增加不必要的冗长 @@ -42,11 +43,10 @@ module.exports = { "@typescript-eslint/no-explicit-any": "off", // 禁止使用 any 类型 "@typescript-eslint/ban-types": "off", // 禁止使用特定类型 "@typescript-eslint/no-var-requires": "off", // 允许使用 require() 函数导入模块 - "@typescript-eslint/no-empty-function": "off", // 禁止空函数 "@typescript-eslint/no-non-null-assertion": "off", // 不允许使用后缀运算符的非空断言(!) // vue (https://eslint.vuejs.org/rules) - "vue/script-setup-uses-vars": "error", // 防止 diff --git a/src/components/Grid/index.vue b/src/components/Grid/index.vue index 39e95f38..38200f43 100644 --- a/src/components/Grid/index.vue +++ b/src/components/Grid/index.vue @@ -130,7 +130,7 @@ const findIndex = () => { } }; -// 断点变化时 执行 findIndex +// 断点变化时执行 findIndex watch( () => breakPoint.value, () => { diff --git a/src/config/serviceLoading.ts b/src/components/Loading/fullScreen.ts similarity index 100% rename from src/config/serviceLoading.ts rename to src/components/Loading/fullScreen.ts diff --git a/src/components/ProTable/index.vue b/src/components/ProTable/index.vue index 19ab760a..680e416c 100644 --- a/src/components/ProTable/index.vue +++ b/src/components/ProTable/index.vue @@ -1,29 +1,33 @@