|
|
|
|
@ -109,6 +109,9 @@ |
|
|
|
|
class="warning-item" > |
|
|
|
|
<div class="warning-header"> |
|
|
|
|
<span :class="['warning-type', `level-${warning.displayLevel}`]">{{ warning.name }}</span> |
|
|
|
|
<span :class="['warning-status-indicator', warning.status]"> |
|
|
|
|
{{ getStatusText2(warning.status) }} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="warning-time">预警时间: {{ warning.time }}</div> |
|
|
|
|
<div class="warning-position">设备位置: {{ warning.location }}</div> |
|
|
|
|
@ -398,6 +401,12 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getStatusText2(status) { |
|
|
|
|
console.log("%c 🤨: data -> status ", "font-size:16px;background-color:#df83a6;color:white;", status) |
|
|
|
|
if (status === 'HANDLED') return '已处理'; |
|
|
|
|
if (status === 'UNHANDLED') return '未处理'; |
|
|
|
|
return status; |
|
|
|
|
}, |
|
|
|
|
// 跳转到设备档案页面 |
|
|
|
|
goToDeviceFiles() { |
|
|
|
|
this.$router.push('/device/files'); |
|
|
|
|
@ -493,6 +502,7 @@ export default { |
|
|
|
|
time: row.occurTime ? this.formatOccurTime(row.occurTime) : '', |
|
|
|
|
location: row.location || '未知位置', |
|
|
|
|
ruleName: row.ruleName || '-', |
|
|
|
|
status: row.status || '-', |
|
|
|
|
message: row.message || '-' |
|
|
|
|
})); |
|
|
|
|
} |
|
|
|
|
@ -1429,6 +1439,26 @@ export default { |
|
|
|
|
|
|
|
|
|
.warning-header { |
|
|
|
|
margin-bottom: 8px; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.warning-status-indicator { |
|
|
|
|
font-size: 0.8rem; |
|
|
|
|
padding: 2px 6px; |
|
|
|
|
border-radius: 4px; |
|
|
|
|
font-weight: bold; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.warning-status-indicator.HANDLED { |
|
|
|
|
background-color: #4CAF50; |
|
|
|
|
color: white; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.warning-status-indicator.UNHANDLED { |
|
|
|
|
background-color: #F44336; |
|
|
|
|
color: white; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.warning-type { |
|
|
|
|
|