From 78247a814915ab217f38e192b5ed72bce0e04e5b Mon Sep 17 00:00:00 2001 From: Cheng Zhou Date: Thu, 21 May 2026 15:48:19 +0800 Subject: [PATCH] Remove non-admin workbench --- backend/scripts/storage_persistence_audit.py | 3 - docs/audits/storage-persistence-audit.md | 2 - docs/audits/storage-persistence-governance.md | 2 +- .../2026-03-04-ctms-enterprise-ui-design.md | 5 +- ...3-30-docs-reorganization-implementation.md | 1 - ...-03-31-business-table-width-unification.md | 2 - frontend/src/api/axios.ts | 4 +- frontend/src/components/Layout.vue | 7 +- frontend/src/components/StudySelector.vue | 2 +- frontend/src/locales/zh-CN.ts | 29 - frontend/src/router.test.ts | 12 +- frontend/src/router/index.ts | 21 +- frontend/src/views/Login.vue | 4 +- frontend/src/views/admin/AuditLogs.vue | 2 +- frontend/src/views/admin/Projects.test.ts | 9 + .../src/views/workbench/MyWorkbench.test.ts | 24 - frontend/src/views/workbench/MyWorkbench.vue | 740 ------------------ .../workbench/components/CenterSummary.vue | 124 --- .../workbench/components/PersonalTodo.vue | 251 ------ .../workbench/components/SectionCard.vue | 266 ------- 20 files changed, 36 insertions(+), 1474 deletions(-) delete mode 100644 frontend/src/views/workbench/MyWorkbench.test.ts delete mode 100644 frontend/src/views/workbench/MyWorkbench.vue delete mode 100644 frontend/src/views/workbench/components/CenterSummary.vue delete mode 100644 frontend/src/views/workbench/components/PersonalTodo.vue delete mode 100644 frontend/src/views/workbench/components/SectionCard.vue diff --git a/backend/scripts/storage_persistence_audit.py b/backend/scripts/storage_persistence_audit.py index d5e4a148..5e643246 100755 --- a/backend/scripts/storage_persistence_audit.py +++ b/backend/scripts/storage_persistence_audit.py @@ -68,9 +68,6 @@ def classify(file_path: str, key_expr: str) -> tuple[str, str, str]: if any(k in lowered for k in ("ctms_sidebar_collapsed", "study", "site", "role")): return ("low", "ui-preference", "UI偏好/上下文缓存") - if "personaltodo" in file_path.lower(): - return ("low", "feature-cache", "工作台本地待办缓存(非核心主数据)") - return ("medium", "unknown", "未命中规则,建议人工复核是否为业务关键数据") diff --git a/docs/audits/storage-persistence-audit.md b/docs/audits/storage-persistence-audit.md index 8182d9b1..a08598da 100644 --- a/docs/audits/storage-persistence-audit.md +++ b/docs/audits/storage-persistence-audit.md @@ -56,5 +56,3 @@ | low | auth-session | `frontend/src/utils/auth.ts` | 17 | `localStorage.setItem` | `CREDENTIAL_KEY` | 认证/会话数据(非业务主数据) | | low | auth-session | `frontend/src/utils/auth.ts` | 24 | `localStorage.getItem` | `CREDENTIAL_KEY` | 认证/会话数据(非业务主数据) | | low | auth-session | `frontend/src/utils/auth.ts` | 38 | `localStorage.removeItem` | `CREDENTIAL_KEY` | 认证/会话数据(非业务主数据) | -| low | feature-cache | `frontend/src/views/workbench/components/PersonalTodo.vue` | 79 | `localStorage.getItem` | `props.storageKey` | 工作台本地待办缓存(非核心主数据) | -| low | feature-cache | `frontend/src/views/workbench/components/PersonalTodo.vue` | 91 | `localStorage.setItem` | `props.storageKey` | 工作台本地待办缓存(非核心主数据) | diff --git a/docs/audits/storage-persistence-governance.md b/docs/audits/storage-persistence-governance.md index ffa19ce2..14f7de6a 100644 --- a/docs/audits/storage-persistence-governance.md +++ b/docs/audits/storage-persistence-governance.md @@ -23,7 +23,7 @@ backend/scripts/storage_persistence_audit.py --fail-on-banned - 高风险:4 条(均为 `ProjectDetail` 本地草稿兜底读写) - 中风险:0 条 -- 低风险:42 条(会话、偏好、工作台本地待办等) +- 低风险:40 条(会话、偏好等) ## 4. 已完成整改 diff --git a/docs/plans/2026-03-04-ctms-enterprise-ui-design.md b/docs/plans/2026-03-04-ctms-enterprise-ui-design.md index 241a54cb..65b7c015 100644 --- a/docs/plans/2026-03-04-ctms-enterprise-ui-design.md +++ b/docs/plans/2026-03-04-ctms-enterprise-ui-design.md @@ -80,9 +80,8 @@ 3. 统一状态体系:加载态、空态、错误态、禁用态、风险高亮态。 #### P1(有余量时) -1. `/workbench` 视觉升级。 -2. 表单页统一(新建/编辑页头、分组、主次按钮)。 -3. 克制型关键动效(入场/hover)。 +1. 表单页统一(新建/编辑页头、分组、主次按钮)。 +2. 克制型关键动效(入场/hover)。 #### P2(后续阶段) 1. 全模块扩展(知识库、启动授权细分页)。 diff --git a/docs/plans/2026-03-30-docs-reorganization-implementation.md b/docs/plans/2026-03-30-docs-reorganization-implementation.md index 57c16d46..2abd8321 100644 --- a/docs/plans/2026-03-30-docs-reorganization-implementation.md +++ b/docs/plans/2026-03-30-docs-reorganization-implementation.md @@ -67,7 +67,6 @@ Expected: PASS with the regrouped files. ### Task 3: Remove obsolete docs and local artifacts **Files:** -- Delete: `/Users/zcc/MyCTMS/ctms-dev/.worktrees/main/docs/workbench-ui-optimization.md` - Delete: `/Users/zcc/MyCTMS/ctms-dev/.worktrees/main/docs/plans/2026-03-05-rd-monitor-design.md` - Delete: `/Users/zcc/MyCTMS/ctms-dev/.worktrees/main/docs/plans/2026-03-05-rd-monitor-implementation.md` diff --git a/docs/plans/2026-03-31-business-table-width-unification.md b/docs/plans/2026-03-31-business-table-width-unification.md index 61011946..1ea95fc8 100644 --- a/docs/plans/2026-03-31-business-table-width-unification.md +++ b/docs/plans/2026-03-31-business-table-width-unification.md @@ -37,7 +37,6 @@ - Modify: `frontend/src/components/attachments/AttachmentList.vue` - Modify: `frontend/src/components/fees/FeeAttachmentPanel.vue` - Modify: `frontend/src/components/FaqList.vue` -- Modify: `frontend/src/views/workbench/components/CenterSummary.vue` **Step 1: 仅保留业务浏览页** @@ -93,7 +92,6 @@ - Modify: `frontend/src/components/attachments/AttachmentList.vue` - Modify: `frontend/src/components/fees/FeeAttachmentPanel.vue` - Modify: `frontend/src/components/FaqList.vue` -- Modify: `frontend/src/views/workbench/components/CenterSummary.vue` **Step 1: 对齐详情子表策略** diff --git a/frontend/src/api/axios.ts b/frontend/src/api/axios.ts index e669ed03..b6bf5b29 100644 --- a/frontend/src/api/axios.ts +++ b/frontend/src/api/axios.ts @@ -71,7 +71,7 @@ instance.interceptors.response.use( // 认证相关的错误由具体页面自行处理,避免重复提示 return Promise.reject(error); } - // 如果当前项目不存在或已失效,清理项目并跳到工作台 + // 如果当前项目不存在或已失效,清理项目并跳到项目管理页 if (status === 404 && typeof data?.message === "string" && data.message.toLowerCase().includes("study")) { try { const studyStore = useStudyStore(); @@ -79,7 +79,7 @@ instance.interceptors.response.use( } catch { /* ignore */ } - router.push("/workbench"); + router.push("/admin/projects"); } if (status === 401) { const config = error.config as ApiRequestConfig; diff --git a/frontend/src/components/Layout.vue b/frontend/src/components/Layout.vue index f11390b1..2d0dca0b 100644 --- a/frontend/src/components/Layout.vue +++ b/frontend/src/components/Layout.vue @@ -12,11 +12,6 @@ class="aside-menu" @select="handleMenuSelect" > - - - {{ TEXT.menu.workbench }} - -