修改告警信息处理

dev
夜笙歌 7 months ago
parent cfbf403311
commit dc869f57f2

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

@ -15,22 +15,22 @@
<div class="table1">
<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 class="scrollTable" style="font-weight: bold;width: 8%">
<div class="scrollTable" style="font-weight: bold;width: 15%">
告警类型
</div>
<div class="scrollTable" style="font-weight: bold;width: 15%">
告警级别
</div>
<div class="scrollTable" style="font-weight: bold;width: 21%">
<div class="scrollTable" style="font-weight: bold;width: 30%">
告警单元
</div>
<div class="scrollTable" style="font-weight: bold;width: 20%">
告警时间
</div>
<div class="scrollTable" style="font-weight: bold;width: 8%">
<div class="scrollTable" style="font-weight: bold;width: 10%">
处理情况
</div>
</div>
@ -38,23 +38,24 @@
style="height: calc(100% - 33px);overflow: hidden;">
<div v-for="(item, index) in table1Data" :key="index">
<div :style='"background-color:" + ((index % 2 === 0) ? "#053460" : "#032d57")'>
<div class="scrollTable" style="width: 8%">
{{ item.data1 }}
<div class="scrollTable" style="width: 10%">
{{ item.alarmInfoId }}
</div>
<div class="scrollTable" style="width: 8%">
{{ item.data2 }}
<div class="scrollTable" style="width: 15%">
{{ item.alarmTypeName }}
</div>
<div class="scrollTable" style="width: 15%">
{{ item.data3 }}
{{ item.alarmLevelName }}
</div>
<div class="scrollTable" style="width: 21%">
{{ item.data4 }}
<div class="scrollTable" style="width: 30%">
{{ item.monitorUnitName }}
</div>
<div class="scrollTable" style="width: 20%">
{{ item.data5 }}
{{ item.alarmTime }}
</div>
<div class="scrollTable" style="width: 8%">
<span style="color: #67C23A;">已处理</span>
<div class="scrollTable" style="width: 10%">
<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>
@ -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: '已取消'
});
});
}
}
};

Loading…
Cancel
Save