From dc869f57f289c5cd3b816779356dd5969a76ea10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Fri, 26 Apr 2024 14:04:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=8A=E8=AD=A6=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/board/index/index.vue | 1 - ruoyi-ui/src/views/board/smartScene/index.vue | 71 +++++++++++++------ 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/ruoyi-ui/src/views/board/index/index.vue b/ruoyi-ui/src/views/board/index/index.vue index 36c5b25..3ccedfe 100644 --- a/ruoyi-ui/src/views/board/index/index.vue +++ b/ruoyi-ui/src/views/board/index/index.vue @@ -438,7 +438,6 @@ export default { this.$refs.chart3.setData(option3) }, dispose(e) { - console.log(e) this.$confirm('该问题已处理?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', diff --git a/ruoyi-ui/src/views/board/smartScene/index.vue b/ruoyi-ui/src/views/board/smartScene/index.vue index b7c6f7d..a58722e 100644 --- a/ruoyi-ui/src/views/board/smartScene/index.vue +++ b/ruoyi-ui/src/views/board/smartScene/index.vue @@ -15,22 +15,22 @@
-
+
告警编号
-
+
告警类型
告警级别
-
+
告警单元
告警时间
-
+
处理情况
@@ -38,23 +38,24 @@ style="height: calc(100% - 33px);overflow: hidden;">
-
- {{ item.data1 }} +
+ {{ item.alarmInfoId }}
-
- {{ item.data2 }} +
+ {{ item.alarmTypeName }}
- {{ item.data3 }} + {{ item.alarmLevelName }}
-
- {{ item.data4 }} +
+ {{ item.monitorUnitName }}
- {{ item.data5 }} + {{ item.alarmTime }}
-
- 已处理 +
+ 处理 + 已处理
@@ -90,6 +91,9 @@ import { getAlarmCountGroupAlarmType, getAlarmInfos } from '@/api/board/smartScene' +import { + handleAlarmInfo +} from '@/api/board/index' export default { components: { @@ -175,15 +179,36 @@ export default { }, async setAlarmInfos(e) { const {rows: data} = await getAlarmInfos({"sceneId":e}) - this.table1Data = data.map((e,i)=>{ - return { - data1: e.alarmInfoId, - data2: e.alarmTypeName, - data3: e.alarmLevelName, - data4: e.monitorUnitName, - data5: e.alarmTime, - } - }) + this.table1Data = data + }, + dispose(e) { + this.$confirm('该问题已处理?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + handleAlarmInfo({ + alarmInfoId:e.alarmInfoId + }).then(e=>{ + if(e.code === 200){ + this.$message({ + type: 'success', + message: '已处理!' + }); + this.setTable3() + }else{ + this.$message({ + type: 'info', + message: '网络错误' + }); + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消' + }); + }); } } };