From 1b73dbb2726feccd7cffd6f1492e2dbecd99ac16 Mon Sep 17 00:00:00 2001 From: Hermes CI Fix Date: Mon, 14 Sep 2026 10:15:23 +0800 Subject: [PATCH] feat(ui): remove in-app entity switcher, entity fixed at login - MainLayout/ReportCenter: drop switch-entity switcher, keep read-only entity tag - KPIList/PredictDashboard/GrowthQuality: entity selectors locked to session entity - api/index.ts: drop switchEntity/myEntities wrappers (endpoint kept for compat) - sidebar brand now shows logged-in entity name (cma-remove-inapp-entity-switcher-20260914) --- frontend/src/api/index.ts | 2 - frontend/src/components/GrowthQuality.vue | 57 ++++++--------------- frontend/src/layouts/MainLayout.vue | 51 +++---------------- frontend/src/views/KPIList.vue | 39 ++------------ frontend/src/views/PredictDashboard.vue | 13 ++--- frontend/src/views/ReportCenter.vue | 62 +++-------------------- 6 files changed, 38 insertions(+), 186 deletions(-) diff --git a/frontend/src/api/index.ts b/frontend/src/api/index.ts index 1ddc07fd..1380ed79 100644 --- a/frontend/src/api/index.ts +++ b/frontend/src/api/index.ts @@ -38,8 +38,6 @@ api.interceptors.response.use( export const authApi = { login: (data: any) => api.post('/auth/login', data), register: (data: any) => api.post('/auth/register', data), - switchEntity: (data: any) => api.post('/auth/switch-entity', data), - myEntities: () => api.get('/auth/my-entities'), loginEntities: (username: string) => api.get('/auth/login-entities', { params: { username } }), } diff --git a/frontend/src/components/GrowthQuality.vue b/frontend/src/components/GrowthQuality.vue index 6c2b288c..c54f8733 100644 --- a/frontend/src/components/GrowthQuality.vue +++ b/frontend/src/components/GrowthQuality.vue @@ -4,12 +4,8 @@

📊 增长质量诊断

- - - - - - + + {{ currentEntityLabel }} 诊断
@@ -58,7 +54,6 @@
{{ result.diagnosis }}
查看明细 - 双实体对比
@@ -100,7 +95,7 @@ - + @@ -140,16 +135,15 @@