Commit 240ebd45 by liuwange1

更改noPoint

parent 8eb80e35
......@@ -386,6 +386,11 @@ export default {
menuCode: menuCode,
})
.then((e) => {
e.data.list.forEach((item) => {
if (!this.isNumber(item.xaxis)) {
item.noPoint = true;
}
});
if (this.pageNum == 1) {
this.alarmList = e.data.list;
} else {
......@@ -394,6 +399,17 @@ export default {
this.isScrolling = false;
});
},
isNumber(value) {
if (value) {
if (typeof (value - 0) === "number" && !isNaN(value - 0)) {
return true;
} else {
return false;
}
} else {
return false;
}
},
// 点击报警事件
alarmClickHandle(index) {
if (this.alarmActiveIndex == index) {
......@@ -404,11 +420,19 @@ export default {
});
} else {
this.alarmActiveIndex = index;
console.log("type", this.alarmList[index].noPoint);
if (this.alarmList[index].noPoint) {
this.$axios.post("/osc/sendString", {
arg: JSON.stringify({ data: this.alarmList[index] }),
name: "/BJTC_NOPOINT_OSC",
});
} else {
this.$axios.post("/osc/sendString", {
arg: JSON.stringify({ data: this.alarmList[index] }),
name: "/BJTC_OSC",
});
}
}
},
scrolll(e) {
if (
......
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 sign in to comment