修改看板

boardTest
夜笙歌 3 weeks ago
parent a988a368bc
commit 9256fa50b3

@ -133,6 +133,11 @@
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button
@click="toIndex"
>
返回首页
</el-button>
<el-button <el-button
@click="closeRealtimeAlarmDialog" @click="closeRealtimeAlarmDialog"
:loading="alarmProcessing" :loading="alarmProcessing"
@ -189,65 +194,65 @@ export default {
}) })
} }
}) })
// setInterval(() => { setInterval(() => {
// let e = { let e = {
// "monitorId": "T0002_0101", "monitorId": "T0002_0101",
// "isFlag": 1, "isFlag": 1,
// "deviceParam": { "deviceParam": {
// "objid": 1927987087563427800, "objid": 1927987087563427800,
// "monitorId": "T0002_0101", "monitorId": "T0002_0101",
// "temperature": 27.68, "temperature": 27.68,
// "humidity": 0, "humidity": 0,
// "illuminance": 0, "illuminance": 0,
// "noise": 0, "noise": 0,
// "concentration": 0, "concentration": 0,
// "VibrationSpeed": 0, "VibrationSpeed": 0,
// "VibrationDisplacement": 0, "VibrationDisplacement": 0,
// "VibrationAcceleration": 0, "VibrationAcceleration": 0,
// "VibrationTemp": 0, "VibrationTemp": 0,
// "collectTime": "2024-09-03T04:47:06", "collectTime": "2024-09-03T04:47:06",
// "recordTime": "2025-05-29T15:15:16.3016212+08:00" "recordTime": "2025-05-29T15:15:16.3016212+08:00"
// }, },
// "alarmRules": [ "alarmRules": [
// { {
// "objid": 30020, "objid": 30020,
// "monitorId": "T0002_0101 ", "monitorId": "T0002_0101 ",
// "ruleId": null, "ruleId": null,
// "ruleName": "T0002_0101 20", "ruleName": "T0002_0101 表的温度大于阈值 20",
// "triggerRule": 0, "triggerRule": 0,
// "monitorField": 0, "monitorField": 0,
// "triggerValue": 20, "triggerValue": 20,
// "cause": "-", "cause": "温度过高-备注",
// "alarmId": 202506051636001, "alarmId": 202506051636001,
// }, },
// { {
// "objid": 30021, "objid": 30021,
// "monitorId": "T0002_0101 ", "monitorId": "T0002_0101 ",
// "ruleId": null, "ruleId": null,
// "ruleName": "T0002_0101 30", "ruleName": "T0002_0101表的温度小于阈值 30",
// "triggerRule": 1, "triggerRule": 1,
// "monitorField": 0, "monitorField": 0,
// "triggerValue": 30, "triggerValue": 30,
// "cause": "-", "cause": "温度过低-备注",
// "alarmId": 202506051636001, "alarmId": 202506051636001,
// } }
// ], ],
// "alarmContents": [ "alarmContents": [
// "T0002_01012025-05-29 15:15:16T0002_0101 20,:,:20.00,:-", "T0002_0101传感器数据在2025-05-29 15:15:16触发T0002_0101 表的温度大于阈值 20异常告警,告警规则:大于,阈值:20.00,详细信息:温度过高-备注",
// "T0002_01012025-05-29 15:15:16T0002_0101 30,:,:30.00,:-" "T0002_0101传感器数据在2025-05-29 15:15:16触发T0002_0101表的温度小于阈值 30异常告警,告警规则:小于,阈值:30.00,详细信息:温度过低-备注"
// ], ],
// "recordTime": 1748566080572 "recordTime": 1748566080572
// } }
//
// if (e.alarmContents.length > 0) { if (e.alarmContents.length > 0) {
// e.alarmRules.forEach((item, index) => { e.alarmRules.forEach((item, index) => {
// if (!this.almData.find(v => v.monitorId === e.monitorId && v.alarmRules[0].objid === item.objid)) { if (!this.almData.find(v => v.monitorId === e.monitorId && v.alarmRules[0].objid === item.objid)) {
// this.almData.push({...e, alarmRules: [item], alarmContents: [e.alarmContents[index]], isWaiting: false}) this.almData.push({...e, alarmRules: [item], alarmContents: [e.alarmContents[index]], isWaiting: false})
// } }
// }) })
// } }
//
// }, 3000) }, 3000)
}, },
watch: { watch: {
almData: { almData: {
@ -472,6 +477,13 @@ export default {
} else { } else {
return '' return ''
} }
},
toIndex() {
let data = this.currentRealtimeAlarm
let index = this.almData.findIndex(v => v.monitorId === data.monitorId && v.alarmRules[0].objid === data.alarmRules[0].objid)
this.$set(this.almData[index], 'isWaiting', true)
this.$router.push('/')
} }
} }
} }

Loading…
Cancel
Save