|
@@ -863,12 +863,14 @@ function alarmRelation(item) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function warningRelation(source) {
|
|
function warningRelation(source) {
|
|
|
- const code = text(source.warningNo || source.warningId || source.warningCode)
|
|
|
|
|
|
|
+ const actualWarning = text(source.warningNo || source.warningId)
|
|
|
|
|
+ const code = text(actualWarning || source.warningCode)
|
|
|
const name = text(source.warningName || source.warningTypeName || source.warningContent)
|
|
const name = text(source.warningName || source.warningTypeName || source.warningContent)
|
|
|
if (!code && !name) return null
|
|
if (!code && !name) return null
|
|
|
return {
|
|
return {
|
|
|
kind: 'warning',
|
|
kind: 'warning',
|
|
|
- kindLabel: '预警',
|
|
|
|
|
|
|
+ // 只有真实预警编号才叫「预警」;仅有 warning_code 时它是预警类型,不能冒充关联预警。
|
|
|
|
|
+ kindLabel: actualWarning ? '预警' : '预警类型',
|
|
|
code,
|
|
code,
|
|
|
name: name || code,
|
|
name: name || code,
|
|
|
status: eventStatusText(source.warningStatus || source.status, 'WARNING'),
|
|
status: eventStatusText(source.warningStatus || source.status, 'WARNING'),
|