diff --git a/frontend/src/components/GrowthQuality.vue b/frontend/src/components/GrowthQuality.vue index c54f8733..cb9d3186 100644 --- a/frontend/src/components/GrowthQuality.vue +++ b/frontend/src/components/GrowthQuality.vue @@ -98,7 +98,7 @@ - + - + @@ -139,6 +139,7 @@ import { ref, computed } from 'vue' import VChart from 'vue-echarts' import 'echarts' import { predictApi } from '../api/index' +import MyDialog from './MyDialog.vue' import { ElMessage } from 'element-plus' const loading = ref(false) diff --git a/frontend/src/utils/entity.ts b/frontend/src/utils/entity.ts index d937afe2..be9c9eec 100644 --- a/frontend/src/utils/entity.ts +++ b/frontend/src/utils/entity.ts @@ -23,3 +23,13 @@ export function effectiveEntityId(): number { const stored = Number(localStorage.getItem('cma_entity_id')) return Number.isNaN(stored) ? 1 : stored } + +/** 会话企业显示名:优先 localStorage.cma_entity_name(登录时写入),否则按会话 entity_id 映射 */ +export function sessionEntityName(): string { + const stored = localStorage.getItem('cma_entity_name') + if (stored) return stored + const id = effectiveEntityId() + if (id === 1) return '酣客' + if (id === 2) return '博海' + return `企业 #${id}` +} diff --git a/frontend/src/views/ActionPlanLibrary.vue b/frontend/src/views/ActionPlanLibrary.vue index 6aebbfa4..94af51fb 100644 --- a/frontend/src/views/ActionPlanLibrary.vue +++ b/frontend/src/views/ActionPlanLibrary.vue @@ -291,10 +291,8 @@
COSO内控自检表 — CMA P1内部控制五要素 - - - - + + {{ entityLabel }} 刷新 生成改善行动
@@ -350,6 +348,7 @@ import { useRoute, useRouter } from 'vue-router' import { ElMessage, ElMessageBox } from 'element-plus' import { actionPlanApi, kpiApi, userApi, okrApi } from '../api/index' import MyDialog from '../components/MyDialog.vue' +import { sessionEntityName } from '../utils/entity' const route = useRoute() const router = useRouter() @@ -645,7 +644,8 @@ function statusLabel(status: string) { } // ── COSO内控自检 ── -const cosoEntity = ref('hanke') +// 企业只读标识(账套由登录窗口选定,页内无切换入口) +const entityLabel = ref(sessionEntityName()) const cosoData = ref(null) const cosoLoading = ref(false) const cosoExpanded = ref>({}) @@ -657,7 +657,7 @@ function toggleCosoElement(id: string) { async function loadCosoChecklist() { cosoLoading.value = true try { - const r: any = await actionPlanApi.cosoChecklist({ entity: cosoEntity.value }) + const r: any = await actionPlanApi.cosoChecklist() cosoData.value = r // 默认展开第一个 if (r?.elements?.length > 0) { diff --git a/frontend/src/views/AlertList.vue b/frontend/src/views/AlertList.vue index 91f1d942..2ed91e30 100644 --- a/frontend/src/views/AlertList.vue +++ b/frontend/src/views/AlertList.vue @@ -78,10 +78,8 @@