修改看板

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

@ -194,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_0101传感器数据在2025-05-29 15:15:16触发T0002_0101 表的温度大于阈值 20异常告警,告警规则:大于,阈值:20.00,详细信息:温度过高-备注", // "T0002_01012025-05-29 15:15:16T0002_0101 20,:,:20.00,:-",
"T0002_0101传感器数据在2025-05-29 15:15:16触发T0002_0101表的温度小于阈值 30异常告警,告警规则:小于,阈值:30.00,详细信息:温度过低-备注" // "T0002_01012025-05-29 15:15:16T0002_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: {

Loading…
Cancel
Save