From 3842a81cb2225c31f7ac95440c3ab957b3d54aab Mon Sep 17 00:00:00 2001 From: hezhaohui Date: Fri, 17 Jul 2026 14:50:41 +0800 Subject: [PATCH] =?UTF-8?q?refactor(router):=20=E7=BB=9F=E4=B8=80=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E8=B7=AF=E7=94=B1=E5=91=BD=E5=90=8D=E4=B8=8E=E5=B1=82?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 背景 前端路由存在层级不一致、英文缩写混用、name 与 sidebar 文本不匹配等问题。 ## 变更内容 - 统一使用全称命名(Mgmt → Management, Ops → Operation) - 统一带前缀路径(/cluster → /infrastructure/cluster) - 合并可观测性模块(/monitor、/alert → /observable/*) - 修正 router name 与侧边栏中文标题对应关系 ## 路由对照 - /tasks → /task/log (TaskLog) - /resource/mgmt → /resource/management (ResourceManagement) - /service/mgmt → /service/management (ServiceManagement) - /audit/ops → /audit/operation (OperationAudit) - /cluster → /infrastructure/cluster (InfrastructureCluster) - /tenants → /business/quota (BusinessQuota) - /monitor → /observable/monitoring (MonitoringDashboard) - /alert → /observable/alert (AlertInformation) - /subsystem/authz → /subsystem/authorization (SubsystemAuthorization) --- frontend/src/components/Layout/AppSidebar.vue | 16 ++++---- frontend/src/router/index.ts | 40 +++++++++---------- frontend/src/views/dashboard/Index.vue | 2 +- frontend/src/views/service/Catalog.vue | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/frontend/src/components/Layout/AppSidebar.vue b/frontend/src/components/Layout/AppSidebar.vue index 69fb890..a87822f 100644 --- a/frontend/src/components/Layout/AppSidebar.vue +++ b/frontend/src/components/Layout/AppSidebar.vue @@ -11,28 +11,28 @@ ▤基础服务 - + ▧任务日志2 @@ -60,7 +60,7 @@ ▦全部总览 - + ▦子系统赋权 @@ -69,7 +69,7 @@ 📋登录审计 - + 📝运维操作审计 diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 4d94a0b..b60e42b 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -41,8 +41,8 @@ const router = createRouter({ meta: { title: '子系统详情' }, }, { - path: 'subsystem/authz', - name: 'SubsystemAuthz', + path: 'subsystem/authorization', + name: 'SubsystemAuthorization', component: () => import('@/views/subsystem/Authorization.vue'), meta: { title: '子系统赋权' }, }, @@ -53,8 +53,8 @@ const router = createRouter({ meta: { title: '登录审计' }, }, { - path: 'audit/ops', - name: 'OpsAudit', + path: 'audit/operation', + name: 'OperationAudit', component: () => import('@/views/audit/OpsAudit.vue'), meta: { title: '运维操作审计' }, }, @@ -65,20 +65,20 @@ const router = createRouter({ meta: { title: '资源状态看板' }, }, { - path: 'resource/mgmt', - name: 'ResourceMgmt', + path: 'resource/management', + name: 'ResourceManagement', component: () => import('@/views/resource/Management.vue'), meta: { title: '资源管理' }, }, { - path: 'cluster', - name: 'Cluster', + path: 'infrastructure/cluster', + name: 'InfrastructureCluster', component: () => import('@/views/cluster/ClusterList.vue'), meta: { title: '集群与容器' }, }, { - path: 'tenants', - name: 'Tenants', + path: 'business/quota', + name: 'BusinessQuota', component: () => import('@/views/resource/Tenants.vue'), meta: { title: '业务配额' }, }, @@ -86,19 +86,19 @@ const router = createRouter({ path: 'service/catalog', name: 'ServiceCatalog', component: () => import('@/views/service/Catalog.vue'), - meta: { title: '基础服务目录' }, + meta: { title: '基础服务' }, }, { - path: 'service/mgmt', - name: 'ServiceMgmt', + path: 'service/management', + name: 'ServiceManagement', component: () => import('@/views/service/Management.vue'), meta: { title: '服务管理' }, }, { - path: 'tasks', - name: 'Tasks', + path: 'task/log', + name: 'TaskLog', component: () => import('@/views/task/TaskCenter.vue'), - meta: { title: '任务中心' }, + meta: { title: '任务日志' }, }, { path: 'config', @@ -107,14 +107,14 @@ const router = createRouter({ meta: { title: '配置中心管理' }, }, { - path: 'monitor', - name: 'Monitor', + path: 'observable/monitoring', + name: 'MonitoringDashboard', component: () => import('@/views/monitor/Monitor.vue'), meta: { title: '监控看板' }, }, { - path: 'alert', - name: 'Alert', + path: 'observable/alert', + name: 'AlertInformation', component: () => import('@/views/monitor/Alert.vue'), meta: { title: '告警信息' }, }, diff --git a/frontend/src/views/dashboard/Index.vue b/frontend/src/views/dashboard/Index.vue index fb1764d..e0be28f 100644 --- a/frontend/src/views/dashboard/Index.vue +++ b/frontend/src/views/dashboard/Index.vue @@ -82,7 +82,7 @@

最近任务

- 查看全部 → + 查看全部 →
diff --git a/frontend/src/views/service/Catalog.vue b/frontend/src/views/service/Catalog.vue index 6369a71..a69fc76 100644 --- a/frontend/src/views/service/Catalog.vue +++ b/frontend/src/views/service/Catalog.vue @@ -249,7 +249,7 @@ const openWayne = async () => { const handleMysqlSubmit = () => { showMysqlModal.value = false ElMessage.success('MySQL 标准化交付已提交,完成后自动注册 CloudDM') - router.push({ name: 'Tasks' }) + router.push({ name: 'TaskLog' }) }