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: '已取消' + }); + }); } } };