Commit c76792b9 authored by 纪泽龙's avatar 纪泽龙

报警提示

parent 7f149901
......@@ -737,6 +737,7 @@ export default {
});
// 管道
console.log("polyLineArr", polyLineArr);
let errorObj;
if (polyLineArr.length > 0) {
polyLineArr.forEach((item) => {
// 获取循报警设备的id
......@@ -758,7 +759,7 @@ export default {
if (polyline) {
let options = polyline.getExtData();
errorObj = polyline;
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options.lineData.view = this;
......@@ -832,6 +833,7 @@ export default {
})[0];
if (device) {
const options = device.getExtData();
errorObj = device;
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options.view = this;
......@@ -855,6 +857,7 @@ export default {
options.alarmValue = alarmValue;
}
device.setExtData(options);
device.setzIndex(13);
// 找到是列表里的哪个,改变它的状态,让列表里的这个设备变成红色
const myDevice = this.allList
......@@ -907,9 +910,24 @@ export default {
}
});
}
this.openError(errorObj.getExtData());
this.$refs.Bottom.repeatClick();
if (this.ws) return;
this.socket();
},
// 右边弹框
openError(options) {
this.$notify({
title: `${options.deviceName}报警`,
dangerouslyUseHTMLString: true,
message: `<div>
<div style="color:#000">设备名称:${options.deviceName}</div>
<div style="color:#000">设备编号:${options.iotNo}</div>
</div>`,
type: "warning",
});
},
socket() {
console.log("socket执行");
this.ws = new WebSocket(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment