|
@@ -109,6 +109,7 @@ export function entityDetailView(detail) {
|
|
|
// 等级与状态各有自己的语义色:等级沿用卡片那张四级词表,不与状态色混用。
|
|
// 等级与状态各有自己的语义色:等级沿用卡片那张四级词表,不与状态色混用。
|
|
|
levelLabel: current.levelLabel || '',
|
|
levelLabel: current.levelLabel || '',
|
|
|
levelTone: current.levelTone || '',
|
|
levelTone: current.levelTone || '',
|
|
|
|
|
+ levelCaption: current.levelCaption || '',
|
|
|
// 类别是身份而不是普通字段:抬头要能一眼看出是什么对象。
|
|
// 类别是身份而不是普通字段:抬头要能一眼看出是什么对象。
|
|
|
categoryText: current.categoryText || '',
|
|
categoryText: current.categoryText || '',
|
|
|
summary: Array.isArray(current.summary) ? current.summary : [],
|
|
summary: Array.isArray(current.summary) ? current.summary : [],
|
|
@@ -181,6 +182,7 @@ function normalizeAsset(identity, source) {
|
|
|
tone: isRiskTarget ? riskTone(riskColorRaw) : emergency ? 'neutral' : facilityStatusTone(source.status),
|
|
tone: isRiskTarget ? riskTone(riskColorRaw) : emergency ? 'neutral' : facilityStatusTone(source.status),
|
|
|
levelLabel,
|
|
levelLabel,
|
|
|
levelTone: isHazard ? hazardLevelTone(attributes.level) : '',
|
|
levelTone: isHazard ? hazardLevelTone(attributes.level) : '',
|
|
|
|
|
+ levelCaption: isHazard ? '隐患等级' : '',
|
|
|
raw: source,
|
|
raw: source,
|
|
|
categoryText: facilityCategoryText(category),
|
|
categoryText: facilityCategoryText(category),
|
|
|
coordinates: source.coordinates || null,
|
|
coordinates: source.coordinates || null,
|
|
@@ -897,8 +899,8 @@ function normalizeEvent(identity, source) {
|
|
|
levelLabel: level.label,
|
|
levelLabel: level.label,
|
|
|
levelTone: level.tone,
|
|
levelTone: level.tone,
|
|
|
raw: source,
|
|
raw: source,
|
|
|
- // 等级已移到状态徽标右侧;摘要卡不再重复(保留当前值 / 发生时间)。
|
|
|
|
|
- summary: summaryItems([['当前值', withUnit(source.value ?? source.actualValue, source.unit || source.warningUnit)], ['发生时间', formatEventTime(source.eventTime || source.createTime)]]),
|
|
|
|
|
|
|
+ // 摘要的发生时间与顶部指标卡重复;等级移到状态徽标右侧后,顶部指标卡整体删除。
|
|
|
|
|
+ summary: [],
|
|
|
tabs: family === 'WARNING'
|
|
tabs: family === 'WARNING'
|
|
|
? [tab('overview', '预警信息'), tab('records', '处置记录'), tab('relations', '关联信息'), tab('attachments', '附件')]
|
|
? [tab('overview', '预警信息'), tab('records', '处置记录'), tab('relations', '关联信息'), tab('attachments', '附件')]
|
|
|
: [tab('overview', '报警信息'), tab('relations', '关联信息'), tab('records', '处置记录'), tab('attachments', '附件')],
|
|
: [tab('overview', '报警信息'), tab('relations', '关联信息'), tab('records', '处置记录'), tab('attachments', '附件')],
|