From f23fd9975bd58f5134208b3c6a2da450a352d5a3 Mon Sep 17 00:00:00 2001 From: Wangxin Date: Sun, 9 Nov 2025 13:39:46 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90web=E3=80=91=20=E9=A2=84=E8=AD=A6?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=A2=9E=E5=8A=A0=E7=BC=96=E8=BE=91=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inMonitoring/inMonitor/message/index.vue | 9 ++++++ ALOps_sys_fe/alops-ui/src/views/index.vue | 30 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/message/index.vue b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/message/index.vue index 231f417b..b29ebf75 100644 --- a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/message/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/message/index.vue @@ -75,6 +75,7 @@ @@ -300,6 +301,14 @@ export default { this.open = true this.title = "处理" }, + + /** 编辑按钮操作 */ + handleEdit(row) { + this.reset() + this.form = {...row} + this.open = true + this.title = "编辑" + }, /** 提交按钮 */ submitForm: function() { this.$refs["form"].validate(valid => { diff --git a/ALOps_sys_fe/alops-ui/src/views/index.vue b/ALOps_sys_fe/alops-ui/src/views/index.vue index bbc663f5..7d7859f2 100644 --- a/ALOps_sys_fe/alops-ui/src/views/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/index.vue @@ -109,6 +109,9 @@ class="warning-item" >
{{ warning.name }} + + {{ getStatusText2(warning.status) }} +
预警时间: {{ warning.time }}
设备位置: {{ warning.location }}
@@ -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 {