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
@@ -291,10 +291,8 @@
<div>
<div style="margin-bottom:12px;display:flex;gap:8px;align-items:center;">
<span style="font-weight:500;">COSO内控自检表 — CMA P1内部控制五要素</span>
<el-select v-model="cosoEntity" size="small" style="width:160px;" @change="loadCosoChecklist">
<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="loadCosoChecklist" :loading="cosoLoading">刷新</el-button>
<el-button v-if="cosoData" type="primary" size="small" style="margin-left:12px;">生成改善行动</el-button>
</div>
@@ -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<any>(null)
const cosoLoading = ref(false)
const cosoExpanded = ref<Record<string, boolean>>({})
@@ -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) {