Commit 240ebd45 by liuwange1

更改noPoint

parent 8eb80e35
...@@ -386,6 +386,11 @@ export default { ...@@ -386,6 +386,11 @@ export default {
menuCode: menuCode, menuCode: menuCode,
}) })
.then((e) => { .then((e) => {
e.data.list.forEach((item) => {
if (!this.isNumber(item.xaxis)) {
item.noPoint = true;
}
});
if (this.pageNum == 1) { if (this.pageNum == 1) {
this.alarmList = e.data.list; this.alarmList = e.data.list;
} else { } else {
...@@ -394,6 +399,17 @@ export default { ...@@ -394,6 +399,17 @@ export default {
this.isScrolling = false; 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) { alarmClickHandle(index) {
if (this.alarmActiveIndex == index) { if (this.alarmActiveIndex == index) {
...@@ -404,11 +420,19 @@ export default { ...@@ -404,11 +420,19 @@ export default {
}); });
} else { } else {
this.alarmActiveIndex = index; 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", { this.$axios.post("/osc/sendString", {
arg: JSON.stringify({ data: this.alarmList[index] }), arg: JSON.stringify({ data: this.alarmList[index] }),
name: "/BJTC_OSC", name: "/BJTC_OSC",
}); });
} }
}
}, },
scrolll(e) { scrolll(e) {
if ( 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