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:
@@ -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}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user