From 3c7863a90ad9759b6b8f0b64705628a38d964a0c Mon Sep 17 00:00:00 2001 From: Lufaneng Date: Tue, 30 Sep 2025 13:50:30 +0800 Subject: [PATCH] 1 --- src/components.d.ts | 2 + src/router/index.js | 6 + src/style/main.scss | 20 ++ src/utils/rpc.js | 1 - src/views/Dashboard/OrderTypeChart.vue | 128 ++++++++++++ src/views/Dashboard/RecentDrawings.vue | 145 +++++++++++++ src/views/Dashboard/RecentOrders.vue | 120 +++++++++++ src/views/Dashboard/RevenueChart.vue | 181 +++++++++++++++++ src/views/Dashboard/index.vue | 269 +++++++++++++++++++++++++ src/views/GenerateRecord/index.vue | 8 + 10 files changed, 879 insertions(+), 1 deletion(-) create mode 100644 src/views/Dashboard/OrderTypeChart.vue create mode 100644 src/views/Dashboard/RecentDrawings.vue create mode 100644 src/views/Dashboard/RecentOrders.vue create mode 100644 src/views/Dashboard/RevenueChart.vue create mode 100644 src/views/Dashboard/index.vue diff --git a/src/components.d.ts b/src/components.d.ts index 48baaf7..fa54962 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ declare module 'vue' { ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElHeader: typeof import('element-plus/es')['ElHeader'] + ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMain: typeof import('element-plus/es')['ElMain'] @@ -35,6 +36,7 @@ declare module 'vue' { ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTag: typeof import('element-plus/es')['ElTag'] ElTree: typeof import('element-plus/es')['ElTree'] MapSelector: typeof import('./components/MapSelector.vue')['default'] Pagination: typeof import('./components/Pagination/index.vue')['default'] diff --git a/src/router/index.js b/src/router/index.js index 8cd2c38..60ac0e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -18,6 +18,12 @@ export const constantRoutes = [ // 动态路由配置(需要权限) export const asyncRoutes = [ + { + path: 'dashboard', + name: 'Dashboard', + component: () => import('@/views/Dashboard/index.vue'), + meta: { title: '仪表盘', permissions: ['dashboard'] }, + }, { path: 'SystemManage', meta: { title: '系统管理', permissions: ['system'] }, diff --git a/src/style/main.scss b/src/style/main.scss index 82830d4..e8949a3 100644 --- a/src/style/main.scss +++ b/src/style/main.scss @@ -34,3 +34,23 @@ body { .pointer { cursor: pointer; } + +*::-webkit-scrollbar { + width: 12px; + height: 12px; +} +*::-webkit-scrollbar-button { + width: 0px; + height: 0px; + display: none; +} +*::-webkit-scrollbar-corner { + background-color: transparent; +} +*::-webkit-scrollbar-thumb { + border: 4px solid rgba(0, 0, 0, 0); + height: 6px; + border-radius: 25px; + background-clip: padding-box; + background-color: rgba(0, 0, 0, 0.3); +} diff --git a/src/utils/rpc.js b/src/utils/rpc.js index 5185646..9b1952b 100644 --- a/src/utils/rpc.js +++ b/src/utils/rpc.js @@ -46,7 +46,6 @@ instance.interceptors.request.use( // HTTP response拦截 instance.interceptors.response.use( (response) => { - console.log(response) if (response.data.error.code === 200) { return Promise.resolve(response.data.result) } else if (response.data.error.code === 401) { diff --git a/src/views/Dashboard/OrderTypeChart.vue b/src/views/Dashboard/OrderTypeChart.vue new file mode 100644 index 0000000..74c8a43 --- /dev/null +++ b/src/views/Dashboard/OrderTypeChart.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/src/views/Dashboard/RecentDrawings.vue b/src/views/Dashboard/RecentDrawings.vue new file mode 100644 index 0000000..ad1607c --- /dev/null +++ b/src/views/Dashboard/RecentDrawings.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/src/views/Dashboard/RecentOrders.vue b/src/views/Dashboard/RecentOrders.vue new file mode 100644 index 0000000..bf7c956 --- /dev/null +++ b/src/views/Dashboard/RecentOrders.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/src/views/Dashboard/RevenueChart.vue b/src/views/Dashboard/RevenueChart.vue new file mode 100644 index 0000000..15b887e --- /dev/null +++ b/src/views/Dashboard/RevenueChart.vue @@ -0,0 +1,181 @@ + + + + + diff --git a/src/views/Dashboard/index.vue b/src/views/Dashboard/index.vue new file mode 100644 index 0000000..7323658 --- /dev/null +++ b/src/views/Dashboard/index.vue @@ -0,0 +1,269 @@ + + + + + diff --git a/src/views/GenerateRecord/index.vue b/src/views/GenerateRecord/index.vue index 2f47233..739af6d 100644 --- a/src/views/GenerateRecord/index.vue +++ b/src/views/GenerateRecord/index.vue @@ -35,6 +35,14 @@ header-row-class-name="table-header" > + +