修改看板

boardTest
夜笙歌 3 weeks ago
parent dd27a4ce93
commit 9bab70a3ef

@ -194,65 +194,65 @@ export default {
})
}
})
setInterval(() => {
let e = {
"monitorId": "T0002_0101",
"isFlag": 1,
"deviceParam": {
"objid": 1927987087563427800,
"monitorId": "T0002_0101",
"temperature": 27.68,
"humidity": 0,
"illuminance": 0,
"noise": 0,
"concentration": 0,
"VibrationSpeed": 0,
"VibrationDisplacement": 0,
"VibrationAcceleration": 0,
"VibrationTemp": 0,
"collectTime": "2024-09-03T04:47:06",
"recordTime": "2025-05-29T15:15:16.3016212+08:00"
},
"alarmRules": [
{
"objid": 30020,
"monitorId": "T0002_0101 ",
"ruleId": null,
"ruleName": "T0002_0101 表的温度大于阈值 20",
"triggerRule": 0,
"monitorField": 0,
"triggerValue": 20,
"cause": "温度过高-备注",
"alarmId": 202506051636001,
},
{
"objid": 30021,
"monitorId": "T0002_0101 ",
"ruleId": null,
"ruleName": "T0002_0101表的温度小于阈值 30",
"triggerRule": 1,
"monitorField": 0,
"triggerValue": 30,
"cause": "温度过低-备注",
"alarmId": 202506051636001,
}
],
"alarmContents": [
"T0002_0101传感器数据在2025-05-29 15:15:16触发T0002_0101 表的温度大于阈值 20异常告警,告警规则:大于,阈值:20.00,详细信息:温度过高-备注",
"T0002_0101传感器数据在2025-05-29 15:15:16触发T0002_0101表的温度小于阈值 30异常告警,告警规则:小于,阈值:30.00,详细信息:温度过低-备注"
],
"recordTime": 1748566080572
}
if (e.alarmContents.length > 0) {
e.alarmRules.forEach((item, index) => {
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})
}
})
}
}, 3000)
// setInterval(() => {
// let e = {
// "monitorId": "T0002_0101",
// "isFlag": 1,
// "deviceParam": {
// "objid": 1927987087563427800,
// "monitorId": "T0002_0101",
// "temperature": 27.68,
// "humidity": 0,
// "illuminance": 0,
// "noise": 0,
// "concentration": 0,
// "VibrationSpeed": 0,
// "VibrationDisplacement": 0,
// "VibrationAcceleration": 0,
// "VibrationTemp": 0,
// "collectTime": "2024-09-03T04:47:06",
// "recordTime": "2025-05-29T15:15:16.3016212+08:00"
// },
// "alarmRules": [
// {
// "objid": 30020,
// "monitorId": "T0002_0101 ",
// "ruleId": null,
// "ruleName": "T0002_0101 20",
// "triggerRule": 0,
// "monitorField": 0,
// "triggerValue": 20,
// "cause": "-",
// "alarmId": 202506051636001,
// },
// {
// "objid": 30021,
// "monitorId": "T0002_0101 ",
// "ruleId": null,
// "ruleName": "T0002_0101 30",
// "triggerRule": 1,
// "monitorField": 0,
// "triggerValue": 30,
// "cause": "-",
// "alarmId": 202506051636001,
// }
// ],
// "alarmContents": [
// "T0002_01012025-05-29 15:15:16T0002_0101 20,:,:20.00,:-",
// "T0002_01012025-05-29 15:15:16T0002_0101 30,:,:30.00,:-"
// ],
// "recordTime": 1748566080572
// }
//
// if (e.alarmContents.length > 0) {
// e.alarmRules.forEach((item, index) => {
// 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})
// }
// })
// }
//
// }, 3000)
},
watch: {
almData: {

Loading…
Cancel
Save