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
+8 -10
View File
@@ -198,12 +198,9 @@
<template #header>
<div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;">
<span>🛡️ DAMA数据治理规则检查(财务七规则)</span>
<div>
<el-select v-model="govEntity" style="width:130px;margin-right:8px;" @change="runGovernanceCheck">
<el-option label="全部实体" :value="0" />
<el-option label="酣客" :value="1" />
<el-option label="博海" :value="2" />
</el-select>
<div style="display:flex;align-items:center;gap:8px;">
<!-- 企业只读标识(不可点):账套由登录窗口选定,页内无切换入口 -->
<el-tag size="small" type="primary" effect="plain">{{ entityLabel }}</el-tag>
<el-button type="primary" @click="runGovernanceCheck" :loading="govChecking">重新检查</el-button>
</div>
</div>
@@ -289,6 +286,7 @@ import { ElMessage } from 'element-plus'
import VChart from 'vue-echarts'
import 'echarts'
import { dataQualityApi } from '../api/index'
import { sessionEntityName } from '../utils/entity'
const activeTab = ref('kpi')
const govLoaded = ref(false)
@@ -305,7 +303,8 @@ const govScore = ref(0)
const govTotalDeduct = ref(0)
const govIssues = ref<any[]>([])
const govCheckedAt = ref('')
const govEntity = ref(0)
// 企业只读标识(账套由登录窗口选定,页内无切换入口)
const entityLabel = ref(sessionEntityName())
const govChecking = ref(false)
const govRuleMeta = ref<any>({})
@@ -413,9 +412,8 @@ async function runCheck() {
async function runGovernanceCheck() {
govChecking.value = true
try {
const params: any = {}
if (govEntity.value) params.entity_id = govEntity.value
const r: any = await dataQualityApi.governanceCheck(params)
// 会话账套:不再传页面级 entity_id(后端 assert_entity_scope 按 token 绑定账套取数)
const r: any = await dataQualityApi.governanceCheck()
govScore.value = r.score ?? 0
govTotalDeduct.value = r.total_deduct ?? 0
govIssues.value = r.issues || []