修改告警信息处理

dev
夜笙歌 7 months ago
parent cfbf403311
commit dc869f57f2

@ -438,7 +438,6 @@ export default {
this.$refs.chart3.setData(option3) this.$refs.chart3.setData(option3)
}, },
dispose(e) { dispose(e) {
console.log(e)
this.$confirm('该问题已处理?', '提示', { this.$confirm('该问题已处理?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',

@ -15,22 +15,22 @@
<div class="table1"> <div class="table1">
<div style="background-color: #094170"> <div style="background-color: #094170">
<div class="scrollTable" style="font-weight: bold;width: 8%"> <div class="scrollTable" style="font-weight: bold;width: 10%">
告警编号 告警编号
</div> </div>
<div class="scrollTable" style="font-weight: bold;width: 8%"> <div class="scrollTable" style="font-weight: bold;width: 15%">
告警类型 告警类型
</div> </div>
<div class="scrollTable" style="font-weight: bold;width: 15%"> <div class="scrollTable" style="font-weight: bold;width: 15%">
告警级别 告警级别
</div> </div>
<div class="scrollTable" style="font-weight: bold;width: 21%"> <div class="scrollTable" style="font-weight: bold;width: 30%">
告警单元 告警单元
</div> </div>
<div class="scrollTable" style="font-weight: bold;width: 20%"> <div class="scrollTable" style="font-weight: bold;width: 20%">
告警时间 告警时间
</div> </div>
<div class="scrollTable" style="font-weight: bold;width: 8%"> <div class="scrollTable" style="font-weight: bold;width: 10%">
处理情况 处理情况
</div> </div>
</div> </div>
@ -38,23 +38,24 @@
style="height: calc(100% - 33px);overflow: hidden;"> style="height: calc(100% - 33px);overflow: hidden;">
<div v-for="(item, index) in table1Data" :key="index"> <div v-for="(item, index) in table1Data" :key="index">
<div :style='"background-color:" + ((index % 2 === 0) ? "#053460" : "#032d57")'> <div :style='"background-color:" + ((index % 2 === 0) ? "#053460" : "#032d57")'>
<div class="scrollTable" style="width: 8%"> <div class="scrollTable" style="width: 10%">
{{ item.data1 }} {{ item.alarmInfoId }}
</div> </div>
<div class="scrollTable" style="width: 8%"> <div class="scrollTable" style="width: 15%">
{{ item.data2 }} {{ item.alarmTypeName }}
</div> </div>
<div class="scrollTable" style="width: 15%"> <div class="scrollTable" style="width: 15%">
{{ item.data3 }} {{ item.alarmLevelName }}
</div> </div>
<div class="scrollTable" style="width: 21%"> <div class="scrollTable" style="width: 30%">
{{ item.data4 }} {{ item.monitorUnitName }}
</div> </div>
<div class="scrollTable" style="width: 20%"> <div class="scrollTable" style="width: 20%">
{{ item.data5 }} {{ item.alarmTime }}
</div> </div>
<div class="scrollTable" style="width: 8%"> <div class="scrollTable" style="width: 10%">
<span style="color: #67C23A;">已处理</span> <el-button v-if="item.handleStatus === '0'" size="mini" type="primary" @click="dispose(item)"></el-button>
<span v-else style="color: #67C23A;">已处理</span>
</div> </div>
</div> </div>
</div> </div>
@ -90,6 +91,9 @@ import {
getAlarmCountGroupAlarmType, getAlarmCountGroupAlarmType,
getAlarmInfos getAlarmInfos
} from '@/api/board/smartScene' } from '@/api/board/smartScene'
import {
handleAlarmInfo
} from '@/api/board/index'
export default { export default {
components: { components: {
@ -175,15 +179,36 @@ export default {
}, },
async setAlarmInfos(e) { async setAlarmInfos(e) {
const {rows: data} = await getAlarmInfos({"sceneId":e}) const {rows: data} = await getAlarmInfos({"sceneId":e})
this.table1Data = data.map((e,i)=>{ this.table1Data = data
return { },
data1: e.alarmInfoId, dispose(e) {
data2: e.alarmTypeName, this.$confirm('该问题已处理?', '提示', {
data3: e.alarmLevelName, confirmButtonText: '确定',
data4: e.monitorUnitName, cancelButtonText: '取消',
data5: e.alarmTime, 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: '已取消'
});
});
} }
} }
}; };

Loading…
Cancel
Save