Commit ad9c9750 by liuwange1

巡检

parent 55d2b4b5
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
osc: 11, osc: 11,
oscName: "/EZ_AF", oscName: "/EZ_AF",
roadList: [], roadList: [],
roadActiveIndex: 0, roadActiveIndex: -1,
listL: [], listL: [],
listR: [], listR: [],
activeIndex: 0, activeIndex: 0,
...@@ -194,11 +194,26 @@ export default { ...@@ -194,11 +194,26 @@ export default {
}); });
}, },
roadClick(index) { roadClick(index) {
this.roadActiveIndex = index; if (index == this.roadActiveIndex) {
this.$axios.post("/osc/sendInt", { this.$axios.post("/osc/sendInt", {
arg: this.roadList[index].lineId, arg: false,
name: "/XJ_LINE_ID", name: "/JKYL",
}); });
this.roadActiveIndex = -1;
} else {
this.roadActiveIndex = index;
this.$axios
.post("/osc/sendInt", {
arg: true,
name: "/JKYL",
})
.then(() => {
this.$axios.post("/osc/sendInt", {
arg: this.roadList[index].lineId,
name: "/XJ_LINE_ID",
});
});
}
}, },
LYchange(e) { LYchange(e) {
this.activeIndex = e.target.selectedIndex; this.activeIndex = e.target.selectedIndex;
......
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