From 61f164a6f83c9f86971a516e109af54db03b1d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?cls=5F=E5=AE=81=E6=B3=A2=E6=9C=AC=E6=9C=BA?= <908705107@qq.com> Date: Sun, 21 Jun 2026 19:44:32 +0800 Subject: [PATCH] feat: restore dashboard workspace and analytics --- .gitignore | 3 +- .../src/locales/langs/zh-CN/menu-title.json | 1 + web/apps/web-ele/src/router/access.ts | 1 + web/apps/web-ele/src/router/light-menu.ts | 1 + .../src/router/routes/modules/dashboard.ts | 9 + .../dashboard/analytics/analytics-trends.vue | 95 +++ .../analytics/analytics-visits-data.vue | 69 ++ .../analytics/analytics-visits-sales.vue | 43 ++ .../analytics/analytics-visits-source.vue | 64 ++ .../dashboard/analytics/analytics-visits.vue | 58 ++ .../src/views/dashboard/analytics/index.vue | 93 +++ .../src/views/dashboard/workspace/index.vue | 722 ++++++------------ .../analysis/analysis-chart-card.vue | 24 + .../analysis/analysis-charts-tabs.vue | 40 + .../dashboard/analysis/analysis-overview.vue | 55 ++ .../src/ui/dashboard/analysis/index.ts | 3 + .../common-ui/src/ui/dashboard/index.ts | 3 + .../common-ui/src/ui/dashboard/typing.ts | 48 ++ .../src/ui/dashboard/workbench/index.ts | 5 + .../dashboard/workbench/workbench-header.vue | 67 ++ .../dashboard/workbench/workbench-project.vue | 63 ++ .../workbench/workbench-quick-nav.vue | 56 ++ .../ui/dashboard/workbench/workbench-todo.vue | 63 ++ .../dashboard/workbench/workbench-trends.vue | 64 ++ .../effects/common-ui/src/ui/index.ts | 1 + 25 files changed, 1155 insertions(+), 496 deletions(-) create mode 100644 web/apps/web-ele/src/views/dashboard/analytics/analytics-trends.vue create mode 100644 web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-data.vue create mode 100644 web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-sales.vue create mode 100644 web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-source.vue create mode 100644 web/apps/web-ele/src/views/dashboard/analytics/analytics-visits.vue create mode 100644 web/apps/web-ele/src/views/dashboard/analytics/index.vue create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-chart-card.vue create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-charts-tabs.vue create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-overview.vue create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/analysis/index.ts create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/index.ts create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/typing.ts create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/workbench/index.ts create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-header.vue create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-project.vue create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-nav.vue create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-todo.vue create mode 100644 web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-trends.vue diff --git a/.gitignore b/.gitignore index e88173d..0c0ed8d 100644 --- a/.gitignore +++ b/.gitignore @@ -197,6 +197,8 @@ web/apps/web-ele/src/views/online-dev/* web/apps/web-ele/src/views/dashboard/ !web/apps/web-ele/src/views/dashboard/ web/apps/web-ele/src/views/dashboard/* +!web/apps/web-ele/src/views/dashboard/analytics/ +!web/apps/web-ele/src/views/dashboard/analytics/** !web/apps/web-ele/src/views/dashboard/workspace/ !web/apps/web-ele/src/views/dashboard/workspace/** web/apps/web-ele/src/views/demos/ @@ -246,7 +248,6 @@ web/apps/web-ele/src/components/dashboard-design/utils/* !web/apps/web-ele/src/components/dashboard-design/utils/dataFetcher.ts web/apps/web-ele/src/components/document-designer/ web/apps/web-ele/src/components/workflow/designer/ -web/packages/effects/common-ui/src/ui/dashboard/ web/docs/src/public/guide/ web/packages/zq-univer/ web/apps/web-ele/src/locales/langs/*/dashboard-design.json* diff --git a/web/apps/web-ele/src/locales/langs/zh-CN/menu-title.json b/web/apps/web-ele/src/locales/langs/zh-CN/menu-title.json index 752cb41..c0ebafe 100644 --- a/web/apps/web-ele/src/locales/langs/zh-CN/menu-title.json +++ b/web/apps/web-ele/src/locales/langs/zh-CN/menu-title.json @@ -2,6 +2,7 @@ "home": "首页", "controlCenter": "控制中心", "workspace": "工作台", + "analytics": "分析页", "aiPlatform": "AI 平台", "aiAgent": "智能体", "workflowOrchestration": "流程编排", diff --git a/web/apps/web-ele/src/router/access.ts b/web/apps/web-ele/src/router/access.ts index 13be7aa..4493dd8 100644 --- a/web/apps/web-ele/src/router/access.ts +++ b/web/apps/web-ele/src/router/access.ts @@ -194,6 +194,7 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) { '../views/ai-platform/workflow/editor/index.vue', '../views/ai-platform/workflow/index.vue', '../views/ai-platform/workflow-runs/index.vue', + '../views/dashboard/analytics/index.vue', '../views/dashboard/workspace/index.vue', ]); diff --git a/web/apps/web-ele/src/router/light-menu.ts b/web/apps/web-ele/src/router/light-menu.ts index f729798..e59a3ff 100644 --- a/web/apps/web-ele/src/router/light-menu.ts +++ b/web/apps/web-ele/src/router/light-menu.ts @@ -1,6 +1,7 @@ export const LIGHT_MENU_NAMES = new Set([ 'ControlCenter', 'Dashboard', + 'DashboardAnalytics', 'DashboardWorkspace', 'AIAgent', 'AIKnowledgeDetail', diff --git a/web/apps/web-ele/src/router/routes/modules/dashboard.ts b/web/apps/web-ele/src/router/routes/modules/dashboard.ts index df1b0f2..ecd76b6 100644 --- a/web/apps/web-ele/src/router/routes/modules/dashboard.ts +++ b/web/apps/web-ele/src/router/routes/modules/dashboard.ts @@ -12,6 +12,15 @@ const routes: RouteRecordRaw[] = [ path: '/dashboard', redirect: '/dashboard/workspace', children: [ + { + component: () => import('#/views/dashboard/analytics/index.vue'), + meta: { + hideInMenu: true, + title: 'menu-title.analytics', + }, + name: 'DashboardAnalytics', + path: '/dashboard/analytics', + }, { component: () => import('#/views/dashboard/workspace/index.vue'), meta: { diff --git a/web/apps/web-ele/src/views/dashboard/analytics/analytics-trends.vue b/web/apps/web-ele/src/views/dashboard/analytics/analytics-trends.vue new file mode 100644 index 0000000..97e8c7a --- /dev/null +++ b/web/apps/web-ele/src/views/dashboard/analytics/analytics-trends.vue @@ -0,0 +1,95 @@ + + + diff --git a/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-data.vue b/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-data.vue new file mode 100644 index 0000000..ec3ef6b --- /dev/null +++ b/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-data.vue @@ -0,0 +1,69 @@ + + + diff --git a/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-sales.vue b/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-sales.vue new file mode 100644 index 0000000..6449293 --- /dev/null +++ b/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-sales.vue @@ -0,0 +1,43 @@ + + + diff --git a/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-source.vue b/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-source.vue new file mode 100644 index 0000000..b85b13b --- /dev/null +++ b/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits-source.vue @@ -0,0 +1,64 @@ + + + diff --git a/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits.vue b/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits.vue new file mode 100644 index 0000000..a977c42 --- /dev/null +++ b/web/apps/web-ele/src/views/dashboard/analytics/analytics-visits.vue @@ -0,0 +1,58 @@ + + + diff --git a/web/apps/web-ele/src/views/dashboard/analytics/index.vue b/web/apps/web-ele/src/views/dashboard/analytics/index.vue new file mode 100644 index 0000000..c61bbb5 --- /dev/null +++ b/web/apps/web-ele/src/views/dashboard/analytics/index.vue @@ -0,0 +1,93 @@ + + + diff --git a/web/apps/web-ele/src/views/dashboard/workspace/index.vue b/web/apps/web-ele/src/views/dashboard/workspace/index.vue index b64fdf9..fa21ba5 100644 --- a/web/apps/web-ele/src/views/dashboard/workspace/index.vue +++ b/web/apps/web-ele/src/views/dashboard/workspace/index.vue @@ -1,534 +1,266 @@ - - - diff --git a/web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-chart-card.vue b/web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-chart-card.vue new file mode 100644 index 0000000..294d517 --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-chart-card.vue @@ -0,0 +1,24 @@ + + + diff --git a/web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-charts-tabs.vue b/web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-charts-tabs.vue new file mode 100644 index 0000000..453ee5c --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-charts-tabs.vue @@ -0,0 +1,40 @@ + + + diff --git a/web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-overview.vue b/web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-overview.vue new file mode 100644 index 0000000..18c4929 --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-overview.vue @@ -0,0 +1,55 @@ + + + diff --git a/web/packages/effects/common-ui/src/ui/dashboard/analysis/index.ts b/web/packages/effects/common-ui/src/ui/dashboard/analysis/index.ts new file mode 100644 index 0000000..7c67b87 --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/analysis/index.ts @@ -0,0 +1,3 @@ +export { default as AnalysisChartCard } from './analysis-chart-card.vue'; +export { default as AnalysisChartsTabs } from './analysis-charts-tabs.vue'; +export { default as AnalysisOverview } from './analysis-overview.vue'; diff --git a/web/packages/effects/common-ui/src/ui/dashboard/index.ts b/web/packages/effects/common-ui/src/ui/dashboard/index.ts new file mode 100644 index 0000000..bc74424 --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/index.ts @@ -0,0 +1,3 @@ +export * from './analysis'; +export type * from './typing'; +export * from './workbench'; diff --git a/web/packages/effects/common-ui/src/ui/dashboard/typing.ts b/web/packages/effects/common-ui/src/ui/dashboard/typing.ts new file mode 100644 index 0000000..48fc9c7 --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/typing.ts @@ -0,0 +1,48 @@ +import type { Component } from 'vue'; + +interface AnalysisOverviewItem { + icon: Component | string; + title: string; + totalTitle: string; + totalValue: number; + value: number; +} + +interface WorkbenchProjectItem { + color?: string; + content: string; + date: string; + group: string; + icon: Component | string; + title: string; + url?: string; +} + +interface WorkbenchTrendItem { + avatar: string; + content: string; + date: string; + title: string; +} + +interface WorkbenchTodoItem { + completed: boolean; + content: string; + date: string; + title: string; +} + +interface WorkbenchQuickNavItem { + color?: string; + icon: Component | string; + title: string; + url?: string; +} + +export type { + AnalysisOverviewItem, + WorkbenchProjectItem, + WorkbenchQuickNavItem, + WorkbenchTodoItem, + WorkbenchTrendItem, +}; diff --git a/web/packages/effects/common-ui/src/ui/dashboard/workbench/index.ts b/web/packages/effects/common-ui/src/ui/dashboard/workbench/index.ts new file mode 100644 index 0000000..76b7af1 --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/workbench/index.ts @@ -0,0 +1,5 @@ +export { default as WorkbenchHeader } from './workbench-header.vue'; +export { default as WorkbenchProject } from './workbench-project.vue'; +export { default as WorkbenchQuickNav } from './workbench-quick-nav.vue'; +export { default as WorkbenchTodo } from './workbench-todo.vue'; +export { default as WorkbenchTrends } from './workbench-trends.vue'; diff --git a/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-header.vue b/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-header.vue new file mode 100644 index 0000000..6eeeaaf --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-header.vue @@ -0,0 +1,67 @@ + + + diff --git a/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-project.vue b/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-project.vue new file mode 100644 index 0000000..0f48369 --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-project.vue @@ -0,0 +1,63 @@ + + + diff --git a/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-nav.vue b/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-nav.vue new file mode 100644 index 0000000..86dc5c6 --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-nav.vue @@ -0,0 +1,56 @@ + + + diff --git a/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-todo.vue b/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-todo.vue new file mode 100644 index 0000000..90f20c1 --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-todo.vue @@ -0,0 +1,63 @@ + + + diff --git a/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-trends.vue b/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-trends.vue new file mode 100644 index 0000000..06f2a5e --- /dev/null +++ b/web/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-trends.vue @@ -0,0 +1,64 @@ + + + diff --git a/web/packages/effects/common-ui/src/ui/index.ts b/web/packages/effects/common-ui/src/ui/index.ts index 44ba0e8..fb99fde 100644 --- a/web/packages/effects/common-ui/src/ui/index.ts +++ b/web/packages/effects/common-ui/src/ui/index.ts @@ -1,3 +1,4 @@ export * from './about'; export * from './authentication'; +export * from './dashboard'; export * from './fallback';