Commit 0e20a003 authored by 纪泽龙's avatar 纪泽龙

消警的就不提示了

parent cda58c26
......@@ -737,7 +737,9 @@ export default {
});
// 管道
console.log("polyLineArr", polyLineArr);
// 报警信息存储
let errorObj;
if (polyLineArr.length > 0) {
polyLineArr.forEach((item) => {
// 获取循报警设备的id
......@@ -759,7 +761,6 @@ export default {
if (polyline) {
let options = polyline.getExtData();
errorObj = polyline;
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options.lineData.view = this;
......@@ -783,6 +784,8 @@ export default {
options.lineData.alarmValue = null;
console.log("管道");
} else {
// 报警弹框
this.openError(polyline.getExtData().lineData);
// 报警声音
this.audio();
polyline.setOptions({ strokeColor: "#ff0000" });
......@@ -833,7 +836,6 @@ export default {
})[0];
if (device) {
const options = device.getExtData();
errorObj = device;
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options.view = this;
......@@ -848,6 +850,8 @@ export default {
// 报警信息
options.alarmValue = null;
} else {
// 报警弹框
this.openError(device.getExtData());
// 报警声音
this.audio();
options.alarmState = 1;
......@@ -910,22 +914,28 @@ 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,
duration:"30000",
message: `<div>
<div style="color:#000">设备名称:${options.deviceName}</div>
<div style="color:#000">设备编号:${options.iotNo}</div>
this.$nextTick(() => {
this.$refs.Bottom.repeatClick();
this.$notify({
title: `${options.deviceName || options.pipeName}报警`,
dangerouslyUseHTMLString: true,
duration: "30000",
message: `<div>
<div style="color:#000">设备名称:${
options.deviceName || options.pipeName
}</div>
<div style="color:#000">设备编号:${
options.iotNo || options.pipeCode
}</div>
</div>`,
type: "warning",
type: "warning",
});
});
},
......
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