feat(ui): converge 6 page-level entity selectors to read-only session tag

- DataQuality / ProductMatrix / AlertList / ActionPlanLibrary /
  views.GrowthQuality / PredictAccuracy: drop entity el-select
  (including the "all entities" option), show read-only session
  entity tag (not clickable), same style as the top bar tag
- drop page-level entity param from those requests; backend resolves
  entity from the session token (assert_entity_scope / get_entity_id)
- utils/entity.ts: add sessionEntityName() (cma_entity_name else id map)
- P3: ReportCenter header emoji removed; components/GrowthQuality
  detail drill-down el-dialog -> MyDialog

(cma-entity-selectors-converge-6pages-20260914)
This commit is contained in:
Hermes CI Fix
2026-09-14 11:32:52 +08:00
parent 115a0ec755
commit e6dd8f61f0
9 changed files with 54 additions and 45 deletions
+6 -6
View File
@@ -78,10 +78,8 @@
<template v-if="activeTab === 'riskMatrix'">
<div style="margin-bottom:12px;display:flex;gap:8px;align-items:center;">
<span style="font-weight:500;">风险矩阵 — CMA P2 ERM框架</span>
<el-select v-model="riskEntity" size="small" style="width:160px;" @change="loadRiskMatrix">
<el-option label="陕西酣客(白酒经销)" value="hanke" />
<el-option label="陕西博海科技(IT服务)" value="bohai" />
</el-select>
<!-- 企业只读标识(不可点):账套由登录窗口选定,页内无切换入口 -->
<el-tag size="small" type="primary" effect="plain">{{ entityLabel }}</el-tag>
<el-button size="small" @click="loadRiskMatrix" :loading="riskLoading">刷新</el-button>
</div>
@@ -373,6 +371,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { alertApi, userApi, actionPlanApi, kpiApi, alertRulesApi } from '../api/index'
import BotSourceTag from '../components/BotSourceTag.vue'
import RiskCell from '../components/charts/RiskCell.vue'
import { sessionEntityName } from '../utils/entity'
const route = useRoute()
const activeTab = ref((route.meta?.tab as string) || 'alerts')
@@ -721,7 +720,8 @@ async function loadUsers() {
}
// ── 风险矩阵 ──
const riskEntity = ref('hanke')
// 企业只读标识(账套由登录窗口选定,页内无切换入口)
const entityLabel = ref(sessionEntityName())
const riskData = ref<any>(null)
const riskLoading = ref(false)
const selectedRisk = ref<any>(null)
@@ -743,7 +743,7 @@ async function loadRiskMatrix() {
riskLoading.value = true
selectedRisk.value = null
try {
const r: any = await alertApi.riskMatrix({ entity: riskEntity.value })
const r: any = await alertApi.riskMatrix()
riskData.value = r
} catch { ElMessage.error('加载风险矩阵失败') }
riskLoading.value = false