From 0b81001ce70c9c9399dd03013d83d3f6c44aad35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Wed, 30 Sep 2026 17:39:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor(wel):=20=E9=87=8D=E6=9E=84=E6=AC=A2?= =?UTF-8?q?=E8=BF=8E=E9=A1=B5=E4=B8=BA=E6=A8=A1=E5=9D=97=E5=8C=96=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将欢迎页整体结构拆分为多个功能区组件,提高代码可维护性 - 移除原有欢迎横幅、指标卡、图表区、下方区及快捷入口的静态实现 - 引入并注册 SectionKpi、SectionStructure、SectionBusiness 等八个子组件 - 删除冗余样式,更新整体背景和布局样式 - 精简模板内容,仅保留子组件渲染及页脚版权信息 - 移除无用的响应式数据、计算属性及方法 - 包含依赖包 echarts 的新增,支持后续图表功能开发 --- .workbuddy/memory/2026-09-30.md | 11 + package.json | 1 + pnpm-lock.yaml | 119 +-- pnpm-workspace.yaml | 5 + src/views/wel/chart-options.js | 300 +++++++ src/views/wel/components/rank-panel.vue | 46 + src/views/wel/components/section-business.vue | 164 ++++ src/views/wel/components/section-finance.vue | 68 ++ src/views/wel/components/section-fleet.vue | 75 ++ src/views/wel/components/section-kpi.vue | 183 ++++ src/views/wel/components/section-project.vue | 70 ++ .../wel/components/section-structure.vue | 114 +++ src/views/wel/components/section-summary.vue | 67 ++ src/views/wel/components/section-vehicle.vue | 76 ++ src/views/wel/components/wel-chart.vue | 57 ++ src/views/wel/components/wel-filters.vue | 49 ++ src/views/wel/dashboard.scss | 96 +++ src/views/wel/index.vue | 802 +----------------- 18 files changed, 1479 insertions(+), 824 deletions(-) create mode 100644 .workbuddy/memory/2026-09-30.md create mode 100644 src/views/wel/chart-options.js create mode 100644 src/views/wel/components/rank-panel.vue create mode 100644 src/views/wel/components/section-business.vue create mode 100644 src/views/wel/components/section-finance.vue create mode 100644 src/views/wel/components/section-fleet.vue create mode 100644 src/views/wel/components/section-kpi.vue create mode 100644 src/views/wel/components/section-project.vue create mode 100644 src/views/wel/components/section-structure.vue create mode 100644 src/views/wel/components/section-summary.vue create mode 100644 src/views/wel/components/section-vehicle.vue create mode 100644 src/views/wel/components/wel-chart.vue create mode 100644 src/views/wel/components/wel-filters.vue create mode 100644 src/views/wel/dashboard.scss diff --git a/.workbuddy/memory/2026-09-30.md b/.workbuddy/memory/2026-09-30.md new file mode 100644 index 0000000..511a694 --- /dev/null +++ b/.workbuddy/memory/2026-09-30.md @@ -0,0 +1,11 @@ +# 2026-09-30 + +## /wel/index 首页重构为运营数据看板(按蓝湖效果图) +- 新增依赖:echarts ^6.1.0(corepack pnpm add echarts)。 +- 重构 `src/views/wel/index.vue`:改为「核心经营指标 / 运输结构 / 业务单元情况 / 项目情况 / 财务情况 / 车队与线路 / 车务管理 / 底部占比与趋势」8 大板块 + 版权页脚,删除原欢迎横幅/快捷入口。 +- 新增文件: + - `src/views/wel/chart-options.js`:排行条形/盈亏双向/环形/分组柱/面积折线/堆叠柱 6 类 option 生成器(fmt 千分位、红涨绿跌 rich label)。 + - `src/views/wel/dashboard.scss`:看板公共样式,各组件 scoped `@import '../dashboard.scss'`(子目录注意路径)。 + - `src/views/wel/components/`:wel-chart.vue(ECharts 封装:ResizeObserver + activated resize + dispose)、wel-filters.vue(统计时间/条件筛选 mock)、rank-panel.vue(排行/盈亏通用面板)、section-kpi / section-structure / section-business / section-project / section-finance / section-fleet / section-vehicle / section-summary.vue。 +- 数据全部为 Mock,组件内已注释标注对接点;蓝湖红字标注的指标口径未定,待后端统计接口(估 12~18 个)确定后替换。 +- 自检:dev server(2889) 下所有新文件及 `?vue&type=style&...&lang.scss` 均 200;`/node_modules/.vite/deps/echarts.js` 200。vite build 因 facelogin.vue 沙箱中断不可用,未跑。 diff --git a/package.json b/package.json index c1cc588..f1ead31 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "crypto-js": "^4.1.1", "dayjs": "^1.10.6", "disable-devtool": "^0.3.8", + "echarts": "^6.1.0", "element-plus": "^2.14.2", "exceljs": "^4.4.0", "highlight.js": "^11.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70fe1c0..6f83bac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,9 +5,7 @@ settings: excludeLinksFromLockfile: false patchedDependencies: - '@smallwei/avue': - hash: 5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db - path: patches/@smallwei__avue.patch + '@smallwei/avue': 5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db importers: @@ -33,16 +31,16 @@ importers: version: 1.7.0 '@smallwei/avue': specifier: ~3.9.2 - version: 3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34))(element-plus@2.14.2(vue@3.5.34))(vue@3.5.34) + version: 3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34))(debug@4.4.3(supports-color@7.2.0))(element-plus@2.14.2(vue@3.5.34))(vue@3.5.34) animate.css: specifier: ^4.1.1 version: 4.1.1 avue-plugin-ueditor: specifier: ^1.0.4 - version: 1.0.4(axios@1.16.0)(vue@3.5.34) + version: 1.0.4(axios@1.16.0(debug@4.4.3(supports-color@7.2.0)))(vue@3.5.34) axios: specifier: ^1.13.5 - version: 1.16.0 + version: 1.16.0(debug@4.4.3(supports-color@7.2.0)) codemirror: specifier: ^5.65.21 version: 5.65.21 @@ -55,6 +53,9 @@ importers: disable-devtool: specifier: ^0.3.8 version: 0.3.9 + echarts: + specifier: ^6.1.0 + version: 6.1.0 element-plus: specifier: ^2.14.2 version: 2.14.2(vue@3.5.34) @@ -63,13 +64,13 @@ importers: version: 4.4.0 highlight.js: specifier: ^11.9.0 - version: 11.11.1 + version: 11.12.0 js-base64: specifier: ^3.7.4 - version: 3.7.8 + version: 3.9.4 js-cookie: specifier: ^3.0.0 - version: 3.0.5 + version: 3.0.8 js-md5: specifier: ^0.7.3 version: 0.7.3 @@ -127,7 +128,7 @@ importers: version: 5.4.21(sass@1.99.0)(terser@5.46.2) vite-plugin-compression: specifier: ^0.5.1 - version: 0.5.1(vite@5.4.21(sass@1.99.0)(terser@5.46.2)) + version: 0.5.1(supports-color@7.2.0)(vite@5.4.21(sass@1.99.0)(terser@5.46.2)) vite-plugin-vue-setup-extend: specifier: ^0.4.0 version: 0.4.0(vite@5.4.21(sass@1.99.0)(terser@5.46.2)) @@ -1208,6 +1209,7 @@ packages: crypto-js@4.2.0: resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} + deprecated: Active development of CryptoJS has been discontinued. This library is no longer maintained. csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} @@ -1453,8 +1455,8 @@ packages: heic2any@0.0.4: resolution: {integrity: sha512-3lLnZiDELfabVH87htnRolZ2iehX9zwpRyGNz22GKXIu0fznlblf0/ftppXKNqS26dqFSeqfIBhAmAj/uSp0cA==} - highlight.js@11.11.1: - resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==} + highlight.js@11.12.0: + resolution: {integrity: sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg==} engines: {node: '>=12.0.0'} hls.js@1.6.16: @@ -1532,12 +1534,11 @@ packages: isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - js-base64@3.7.8: - resolution: {integrity: sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow==} + js-base64@3.9.4: + resolution: {integrity: sha512-PtOMXpEGuP0RRiRXsjzHzl44dMHxSu2CPvAhinupR1tBa88me+1DPqsobl7eupn5UukjLkln1ZnAOAOXOrYG0Q==} - js-cookie@3.0.5: - resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} - engines: {node: '>=14'} + js-cookie@3.0.8: + resolution: {integrity: sha512-yeJd4aNAdYZQjaon2bpD/Gb0B/omw7HQOsynXXcOiWVCacbBcPlgn8S/d1X6blFSaHao7ozqtW7NZW19xpCtIw==} js-md5@0.7.3: resolution: {integrity: sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==} @@ -2653,10 +2654,10 @@ snapshots: countup.js: 2.10.0 signature_pad: 5.1.3 - '@smallwei/avue@3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34))(element-plus@2.14.2(vue@3.5.34))(vue@3.5.34)': + '@smallwei/avue@3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34))(debug@4.4.3(supports-color@7.2.0))(element-plus@2.14.2(vue@3.5.34))(vue@3.5.34)': dependencies: '@element-plus/icons-vue': 2.3.2(vue@3.5.34) - axios: 0.21.4 + axios: 0.21.4(debug@4.4.3(supports-color@7.2.0)) countup.js: 1.9.3 dayjs: 1.11.20 element-plus: 2.14.2(vue@3.5.34) @@ -2792,25 +2793,25 @@ snapshots: dependencies: vue: 3.5.34 - '@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)': + '@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)': dependencies: - '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3) + '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) dom7: 3.0.0 is-url: 1.2.4 lodash.throttle: 4.1.1 - nanoid: 3.3.12 - slate: 0.72.8 + nanoid: 5.1.11 + slate: 0.123.0 snabbdom: 3.6.3 - '@wangeditor-next/code-highlight@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)': + '@wangeditor-next/code-highlight@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)': dependencies: - '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3) + '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) dom7: 4.0.6 prismjs: 1.30.0 slate: 0.123.0 snabbdom: 3.6.3 - '@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)': + '@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)': dependencies: '@types/event-emitter': 0.3.5 '@uppy/core': 2.3.4 @@ -2826,9 +2827,9 @@ snapshots: lodash.foreach: 4.5.0 lodash.throttle: 4.1.1 lodash.toarray: 4.4.0 - nanoid: 3.3.12 + nanoid: 5.1.11 scroll-into-view-if-needed: 3.1.0 - slate: 0.72.8 + slate: 0.123.0 slate-history: 0.115.0(slate@0.123.0) snabbdom: 3.6.3 @@ -2836,13 +2837,13 @@ snapshots: dependencies: '@uppy/core': 2.3.4 '@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4) - '@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3) - '@wangeditor-next/code-highlight': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3) - '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3) - '@wangeditor-next/list-module': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3) - '@wangeditor-next/table-module': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) - '@wangeditor-next/upload-image-module': 2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.123.0)(snabbdom@3.6.3) - '@wangeditor-next/video-module': 2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) + '@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) + '@wangeditor-next/code-highlight': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3) + '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) + '@wangeditor-next/list-module': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3) + '@wangeditor-next/table-module': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) + '@wangeditor-next/upload-image-module': 2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.123.0)(snabbdom@3.6.3) + '@wangeditor-next/video-module': 2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) dom7: 4.0.6 is-hotkey: 0.2.0 lodash.camelcase: 4.3.0 @@ -2855,16 +2856,16 @@ snapshots: slate: 0.123.0 snabbdom: 3.6.3 - '@wangeditor-next/list-module@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)': + '@wangeditor-next/list-module@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)': dependencies: - '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3) + '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) dom7: 4.0.6 slate: 0.123.0 snabbdom: 3.6.3 - '@wangeditor-next/table-module@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)': + '@wangeditor-next/table-module@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)': dependencies: - '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3) + '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) dom7: 4.0.6 lodash.debounce: 4.0.8 lodash.throttle: 4.1.1 @@ -2872,22 +2873,22 @@ snapshots: slate: 0.123.0 snabbdom: 3.6.3 - '@wangeditor-next/upload-image-module@2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.123.0)(snabbdom@3.6.3)': + '@wangeditor-next/upload-image-module@2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.123.0)(snabbdom@3.6.3)': dependencies: '@uppy/core': 2.3.4 '@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4) - '@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3) - '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3) + '@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) + '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) dom7: 4.0.6 lodash.foreach: 4.5.0 slate: 0.123.0 snabbdom: 3.6.3 - '@wangeditor-next/video-module@2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)': + '@wangeditor-next/video-module@2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)': dependencies: '@uppy/core': 2.3.4 '@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4) - '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3) + '@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3) dom7: 4.0.6 nanoid: 5.1.11 slate: 0.123.0 @@ -3064,22 +3065,22 @@ snapshots: asynckit@0.4.0: {} - avue-plugin-ueditor@1.0.4(axios@1.16.0)(vue@3.5.34): + avue-plugin-ueditor@1.0.4(axios@1.16.0(debug@4.4.3(supports-color@7.2.0)))(vue@3.5.34): dependencies: '@wangeditor/editor': 5.1.23 '@wangeditor/editor-for-vue': 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.34) - axios: 1.16.0 + axios: 1.16.0(debug@4.4.3(supports-color@7.2.0)) vue: 3.5.34 - axios@0.21.4: + axios@0.21.4(debug@4.4.3(supports-color@7.2.0)): dependencies: - follow-redirects: 1.16.0 + follow-redirects: 1.16.0(debug@4.4.3(supports-color@7.2.0)) transitivePeerDependencies: - debug - axios@1.16.0: + axios@1.16.0(debug@4.4.3(supports-color@7.2.0)): dependencies: - follow-redirects: 1.16.0 + follow-redirects: 1.16.0(debug@4.4.3(supports-color@7.2.0)) form-data: 4.0.5 proxy-from-env: 2.1.0 transitivePeerDependencies: @@ -3247,9 +3248,11 @@ snapshots: dayjs@1.11.20: {} - debug@4.4.3: + debug@4.4.3(supports-color@7.2.0): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 7.2.0 delayed-stream@1.0.0: {} @@ -3457,7 +3460,9 @@ snapshots: dependencies: to-regex-range: 5.0.1 - follow-redirects@1.16.0: {} + follow-redirects@1.16.0(debug@4.4.3(supports-color@7.2.0)): + optionalDependencies: + debug: 4.4.3(supports-color@7.2.0) form-data@4.0.5: dependencies: @@ -3546,7 +3551,7 @@ snapshots: heic2any@0.0.4: {} - highlight.js@11.11.1: {} + highlight.js@11.12.0: {} hls.js@1.6.16: {} @@ -3605,9 +3610,9 @@ snapshots: isarray@1.0.0: {} - js-base64@3.7.8: {} + js-base64@3.9.4: {} - js-cookie@3.0.5: {} + js-cookie@3.0.8: {} js-md5@0.7.3: {} @@ -4152,10 +4157,10 @@ snapshots: uuid@8.3.2: {} - vite-plugin-compression@0.5.1(vite@5.4.21(sass@1.99.0)(terser@5.46.2)): + vite-plugin-compression@0.5.1(supports-color@7.2.0)(vite@5.4.21(sass@1.99.0)(terser@5.46.2)): dependencies: chalk: 4.1.2 - debug: 4.4.3 + debug: 4.4.3(supports-color@7.2.0) fs-extra: 10.1.0 vite: 5.4.21(sass@1.99.0)(terser@5.46.2) transitivePeerDependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 55a745c..58e4eca 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,10 @@ packages: - '.' +allowBuilds: + '@parcel/watcher': set this to true or false + es5-ext: set this to true or false + esbuild: set this to true or false + patchedDependencies: '@smallwei/avue': patches/@smallwei__avue.patch diff --git a/src/views/wel/chart-options.js b/src/views/wel/chart-options.js new file mode 100644 index 0000000..4d0353e --- /dev/null +++ b/src/views/wel/chart-options.js @@ -0,0 +1,300 @@ +/** + * 首页看板 ECharts 通用配置生成器 + * 所有数据均为 Mock,对接后端统计接口后由各板块组件传入真实数据 + */ + +/* 横向渐变色(排行条形图) */ +function hGrad(color, from = 0.9, to = 0.55) { + return { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { offset: 0, color: color }, + { offset: 1, color: hexFade(color, to) }, + ], + }; +} + +/* 十六进制颜色加透明度 */ +function hexFade(hex, alpha) { + const h = hex.replace('#', ''); + const r = parseInt(h.slice(0, 2), 16); + const g = parseInt(h.slice(2, 4), 16); + const b = parseInt(h.slice(4, 6), 16); + return `rgba(${r}, ${g}, ${b}, ${alpha})`; +} + +/* 千分位 */ +export function fmt(n) { + if (n === null || n === undefined || n === '') return '-'; + const num = Number(n); + if (Number.isNaN(num)) return n; + return num.toLocaleString('zh-CN', { maximumFractionDigits: 2 }); +} + +/** + * 排行条形图(左名称 + 中条形 + 右数值/涨跌) + * items: [{ name, value, change? }] change 为百分比涨跌(number,可空) + */ +export function rankOption(items, { color = '#4a90e2', unit = '', nameWidth = 100 } = {}) { + const sorted = [...items].sort((a, b) => a.value - b.value); + const hasChange = sorted.some(i => typeof i.change === 'number'); + const rich = { + v: { color: '#303133', fontWeight: 600, fontSize: 12, align: 'right' }, + u: { color: '#909399', fontSize: 11, align: 'right' }, + up: { color: '#f04747', fontSize: 11, align: 'right' }, + down: { color: '#2ba471', fontSize: 11, align: 'right' }, + }; + return { + grid: { left: 4, right: hasChange ? 96 : 58, top: 6, bottom: 6, containLabel: true }, + tooltip: { + trigger: 'axis', + axisPointer: { type: 'shadow' }, + formatter: p => { + const d = p[0].data; + let s = `${p[0].name}${d.value}${unit}`; + if (typeof d.change === 'number') { + s += `(环比 ${d.change >= 0 ? '+' : ''}${d.change}%)`; + } + return s; + }, + }, + xAxis: { type: 'value', show: false }, + yAxis: { + type: 'category', + data: sorted.map(i => i.name), + axisTick: { show: false }, + axisLine: { show: false }, + axisLabel: { color: '#606266', fontSize: 12, width: nameWidth, overflow: 'truncate' }, + }, + series: [ + { + type: 'bar', + barWidth: 10, + showBackground: true, + backgroundStyle: { color: '#f0f2f5', borderRadius: [0, 5, 5, 0] }, + itemStyle: { color: hGrad(color), borderRadius: [0, 5, 5, 0] }, + label: { + show: true, + position: 'right', + distance: 8, + formatter: p => { + const d = p.data; + let s = `{v|${fmt(d.value)}${unit}}`; + if (typeof d.change === 'number') { + const cls = d.change >= 0 ? 'up' : 'down'; + const txt = `${d.change >= 0 ? '↑ +' : '↓ '}${d.change}%`; + s += ` {${cls}|${txt}}`; + } + return s; + }, + rich, + }, + data: sorted.map(i => ({ value: i.value, change: i.change })), + }, + ], + }; +} + +/** + * 盈亏双向对比条形图(正=红,负=绿) + * items: [{ name, value }] + */ +export function diffOption(items) { + const sorted = [...items].sort((a, b) => b.value - a.value); + return { + grid: { left: 4, right: 60, top: 6, bottom: 6, containLabel: true }, + tooltip: { + trigger: 'axis', + axisPointer: { type: 'shadow' }, + formatter: p => `${p[0].name}${p[0].value > 0 ? '盈利' : '亏损'} ${fmt(Math.abs(p[0].value))} 万元`, + }, + xAxis: { type: 'value', show: false }, + yAxis: { + type: 'category', + data: sorted.map(i => i.name), + axisTick: { show: false }, + axisLine: { show: false }, + axisLabel: { color: '#606266', fontSize: 12, width: 100, overflow: 'truncate' }, + }, + series: [ + { + type: 'bar', + barWidth: 10, + itemStyle: { + borderRadius: 5, + color: p => (p.value >= 0 ? '#e04b4b' : '#3aa15c'), + }, + label: { + show: true, + position: 'right', + distance: 8, + formatter: p => `${p.value > 0 ? '+' : ''}${fmt(p.value)}`, + color: '#303133', + fontSize: 12, + fontWeight: 600, + }, + data: sorted.map(i => i.value), + }, + ], + }; +} + +/** + * 环形占比图 + * items: [{ name, value }] + */ +export function donutOption(items, { centerTitle = '', centerSub = '' } = {}) { + const palette = ['#4a90e2', '#2bb3a3', '#e0b14c', '#8b5cf6', '#e04b4b', '#3aa15c', '#9aa5b5', '#5aa9ff']; + return { + color: palette, + tooltip: { trigger: 'item', formatter: p => `${p.name}${fmt(p.value)}(${p.percent}%)` }, + legend: { show: false }, + series: [ + { + type: 'pie', + radius: ['52%', '74%'], + center: ['50%', '50%'], + avoidLabelOverlap: true, + itemStyle: { borderColor: '#fff', borderWidth: 2 }, + label: { + show: true, + color: '#606266', + fontSize: 11, + formatter: p => `${p.name}\n${p.percent}%`, + }, + labelLine: { length: 10, length2: 8, lineStyle: { color: '#c0c4cc' } }, + data: items, + }, + ], + graphic: centerTitle + ? [ + { + type: 'text', + left: 'center', + top: '44%', + style: { text: centerTitle, fontSize: 18, fontWeight: 700, fill: '#303133' }, + }, + { + type: 'text', + left: 'center', + top: '56%', + style: { text: centerSub, fontSize: 11, fill: '#909399' }, + }, + ] + : [], + }; +} + +/** + * 分组柱状图(收入/费用对比) + * categories: string[];series: [{ name, data, color }] + */ +export function groupBarOption(categories, series) { + return { + tooltip: { trigger: 'axis' }, + legend: { top: 0, right: 0, itemWidth: 14, itemHeight: 8, textStyle: { color: '#606266', fontSize: 12 } }, + grid: { left: 8, right: 16, top: 36, bottom: 4, containLabel: true }, + xAxis: { + type: 'category', + data: categories, + axisTick: { show: false }, + axisLine: { lineStyle: { color: '#e4e7ed' } }, + axisLabel: { color: '#909399', fontSize: 11, interval: 0, rotate: categories.length > 8 ? 30 : 0 }, + }, + yAxis: { + type: 'value', + splitLine: { lineStyle: { color: '#f0f2f5' } }, + axisLabel: { color: '#909399', fontSize: 11 }, + }, + series: series.map(s => ({ + name: s.name, + type: 'bar', + barWidth: 14, + itemStyle: { color: s.color, borderRadius: [3, 3, 0, 0] }, + data: s.data, + })), + }; +} + +/** + * 面积折线图 + * categories: string[];series: [{ name, data, color }] + */ +export function lineAreaOption(categories, series, { rotate = false } = {}) { + return { + tooltip: { trigger: 'axis' }, + legend: series.length > 1 + ? { top: 0, right: 0, itemWidth: 16, itemHeight: 8, textStyle: { color: '#606266', fontSize: 12 } } + : { show: false }, + grid: { left: 8, right: 20, top: series.length > 1 ? 36 : 20, bottom: 4, containLabel: true }, + xAxis: { + type: 'category', + boundaryGap: false, + data: categories, + axisTick: { show: false }, + axisLine: { lineStyle: { color: '#e4e7ed' } }, + axisLabel: { color: '#909399', fontSize: 11, rotate: rotate ? 30 : 0 }, + }, + yAxis: { + type: 'value', + splitLine: { lineStyle: { color: '#f0f2f5' } }, + axisLabel: { color: '#909399', fontSize: 11 }, + }, + series: series.map(s => ({ + name: s.name, + type: 'line', + smooth: true, + symbol: 'circle', + symbolSize: 5, + lineStyle: { color: s.color, width: 2 }, + itemStyle: { color: s.color }, + areaStyle: { + color: { + type: 'linear', + x: 0, y: 0, x2: 0, y2: 1, + colorStops: [ + { offset: 0, color: hexFade(s.color, 0.18) }, + { offset: 1, color: hexFade(s.color, 0.02) }, + ], + }, + }, + data: s.data, + })), + }; +} + +/** + * 堆叠柱状图 + * categories: string[];series: [{ name, data, color }] + */ +export function stackBarOption(categories, series) { + return { + tooltip: { trigger: 'axis' }, + legend: { top: 0, right: 0, itemWidth: 14, itemHeight: 8, textStyle: { color: '#606266', fontSize: 12 } }, + grid: { left: 8, right: 16, top: 36, bottom: 4, containLabel: true }, + xAxis: { + type: 'category', + data: categories, + axisTick: { show: false }, + axisLine: { lineStyle: { color: '#e4e7ed' } }, + axisLabel: { color: '#909399', fontSize: 11, interval: 0, rotate: categories.length > 8 ? 30 : 0 }, + }, + yAxis: { + type: 'value', + splitLine: { lineStyle: { color: '#f0f2f5' } }, + axisLabel: { color: '#909399', fontSize: 11 }, + }, + series: series.map(s => ({ + name: s.name, + type: 'bar', + stack: 'total', + barWidth: 22, + itemStyle: { color: s.color }, + data: s.data, + })), + }; +} diff --git a/src/views/wel/components/rank-panel.vue b/src/views/wel/components/rank-panel.vue new file mode 100644 index 0000000..1ffaa6e --- /dev/null +++ b/src/views/wel/components/rank-panel.vue @@ -0,0 +1,46 @@ + + + + {{ title }} + {{ unit }} + + + + + + + + + diff --git a/src/views/wel/components/section-business.vue b/src/views/wel/components/section-business.vue new file mode 100644 index 0000000..9322f72 --- /dev/null +++ b/src/views/wel/components/section-business.vue @@ -0,0 +1,164 @@ + + + + 业务单元情况 + + + + + + + + + + + + + + diff --git a/src/views/wel/components/section-finance.vue b/src/views/wel/components/section-finance.vue new file mode 100644 index 0000000..59a6dfd --- /dev/null +++ b/src/views/wel/components/section-finance.vue @@ -0,0 +1,68 @@ + + + + 财务情况 + + + + + + 营业收支对比 + 万元 + + + + + + + 主营业务收入/费用趋势 + 万元 + + + + + + + + + diff --git a/src/views/wel/components/section-fleet.vue b/src/views/wel/components/section-fleet.vue new file mode 100644 index 0000000..19cc1c3 --- /dev/null +++ b/src/views/wel/components/section-fleet.vue @@ -0,0 +1,75 @@ + + + + 车队与线路 + + + + + + + + + + + + + + + + + diff --git a/src/views/wel/components/section-kpi.vue b/src/views/wel/components/section-kpi.vue new file mode 100644 index 0000000..074fcd6 --- /dev/null +++ b/src/views/wel/components/section-kpi.vue @@ -0,0 +1,183 @@ + + + + 核心经营指标 + + + + + + + + {{ card.label }} + + 环比 {{ card.trend >= 0 ? '+' : '' }}{{ card.trend }}% + + + + {{ card.value }}{{ card.unit }} + + + + {{ s.name }} + {{ s.value }} + + {{ s.change >= 0 ? '↑' : '↓' }} {{ Math.abs(s.change) }}% + + + + + + + + + + + + diff --git a/src/views/wel/components/section-project.vue b/src/views/wel/components/section-project.vue new file mode 100644 index 0000000..a1ad6e2 --- /dev/null +++ b/src/views/wel/components/section-project.vue @@ -0,0 +1,70 @@ + + + + 项目情况 + + + + + + + + + + + + + + + + + diff --git a/src/views/wel/components/section-structure.vue b/src/views/wel/components/section-structure.vue new file mode 100644 index 0000000..d8e3504 --- /dev/null +++ b/src/views/wel/components/section-structure.vue @@ -0,0 +1,114 @@ + + + + 运输结构 + + + + + + + + {{ c.label }} + + {{ c.value }}{{ c.unit }} + + + 环比 {{ c.change >= 0 ? '+' : '' }}{{ c.change }}% + + + + + + + + + + + {{ d.title }} + {{ d.unit }} + + + + + + + + + + + diff --git a/src/views/wel/components/section-summary.vue b/src/views/wel/components/section-summary.vue new file mode 100644 index 0000000..7891a0a --- /dev/null +++ b/src/views/wel/components/section-summary.vue @@ -0,0 +1,67 @@ + + + + + + + 车辆耗时占比 + 按小时 + + + + + + + + 单据完成趋势 + 按周 + + + + + + + + + + + diff --git a/src/views/wel/components/section-vehicle.vue b/src/views/wel/components/section-vehicle.vue new file mode 100644 index 0000000..528f6b3 --- /dev/null +++ b/src/views/wel/components/section-vehicle.vue @@ -0,0 +1,76 @@ + + + + 车务管理 + + + + + + + + {{ c.label }} + + {{ c.value }}{{ c.unit }} + + + 环比 {{ c.change >= 0 ? '+' : '' }}{{ c.change }}% + + + + + + + + + 车辆耗费构成 + 万元 + + + + + + + + + diff --git a/src/views/wel/components/wel-chart.vue b/src/views/wel/components/wel-chart.vue new file mode 100644 index 0000000..2be838b --- /dev/null +++ b/src/views/wel/components/wel-chart.vue @@ -0,0 +1,57 @@ + + + + + + + diff --git a/src/views/wel/components/wel-filters.vue b/src/views/wel/components/wel-filters.vue new file mode 100644 index 0000000..3af1636 --- /dev/null +++ b/src/views/wel/components/wel-filters.vue @@ -0,0 +1,49 @@ + + + 统计时间 + + + + + + + + {{ conditionLabel }} + + + + + + + + + + diff --git a/src/views/wel/dashboard.scss b/src/views/wel/dashboard.scss new file mode 100644 index 0000000..519aa48 --- /dev/null +++ b/src/views/wel/dashboard.scss @@ -0,0 +1,96 @@ +/* 首页看板公共样式:各板块组件 scoped 引入 */ +.wel-card { + background: #ffffff; + border-radius: 10px; + padding: 16px 20px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); +} + +.wel-sec__head { + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + gap: 8px; + margin-bottom: 14px; +} + +.wel-sec__title { + font-size: 15px; + font-weight: 600; + color: #303133; +} + +.wel-filter { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; +} + +.wel-filter__label { + font-size: 13px; + color: #909399; + white-space: nowrap; +} + +.wel-filter .el-select { + width: 120px; +} + +.panel-title { + display: flex; + align-items: baseline; + gap: 6px; + font-size: 14px; + font-weight: 600; + color: #303133; + margin-bottom: 10px; + + .panel-title__unit { + font-size: 12px; + font-weight: 400; + color: #909399; + } +} + +.mini-card { + background: #ffffff; + border-radius: 10px; + padding: 14px 18px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); + + .mini-card__label { + font-size: 13px; + color: #909399; + margin-bottom: 6px; + } + + .mini-card__value { + font-size: 22px; + font-weight: 700; + color: #303133; + line-height: 1.2; + } + + .mini-card__unit { + font-size: 12px; + font-weight: 400; + color: #909399; + margin-left: 4px; + } + + .mini-card__trend { + font-size: 12px; + margin-top: 4px; + color: #909399; + + &.is-up { + color: #f04747; + } + + &.is-down { + color: #2ba471; + } + } +} diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue index 1f3a13e..5ceea6a 100644 --- a/src/views/wel/index.vue +++ b/src/views/wel/index.vue @@ -1,788 +1,56 @@ - - - - - - - - - - - - - - - - - 你好,{{ userName }}👋 - - - TMS-ERP 货运管理系统 · {{ todayText }} - - - - - - 新建运单 - - - + + + + + + + + - - - - - - - - - {{ m.label }} - - {{ m.value }}{{ m.unit }} - - - - - - {{ Math.abs(m.trend) }}% - {{ m.sub }} - - - - - - - - - - - - 运单量趋势 - 近 7 日(单) - - - - {{ b.value }} - - - - {{ b.label }} - - - - - - - - - 货物类型分布 - - - - - - - - - {{ donutTotal }} - 总运单 - - - - - - {{ s.name }} - {{ s.value }}% - - - - - - - - - - - - - 运输方式占比 - - - - {{ t.name }} - - - - {{ t.value }}% - - - - - - - - - 预警提醒 - - - - - - - {{ a.title }} - {{ a.desc }} - - {{ a.time }} - - - - - - - - - - 快捷入口 - - - - - - - {{ q.name }} - - - +
- TMS-ERP 货运管理系统 · {{ todayText }} -