包装线产线生产看板2分钟自动跳产线

Signed-off-by: Yangwl <1726150332@qq.com>
master
Yangwl 1 month ago
parent 95df62e99e
commit 9efaf5e388

@ -444,7 +444,9 @@ export default {
actProduction: [],
ceshitable: [{}, {}, {}, {}, {}, {}],
pollTimer: null,
timer: null
timer: null,
currentIndex: 0,
rotationTimer: null
};
},
created() {},
@ -462,11 +464,24 @@ export default {
this.timer = setInterval(() => {
this.getProductionNumberPLC();
}, 10000);
this.startRotation()
},
beforeDestroy() {
clearInterval(this.rotationTimer)
clearInterval(this.timer)
},
methods: {
startRotation() {
this.rotationTimer = setInterval(() => {
if(this.dictDatatype?.length > 0) {
this.currentIndex = (this.currentIndex + 1) % this.dictDatatype.length
console.log(this.currentIndex + 1);
// console.log(this.dictDatatype);
this.selectxtclasses = this.dictDatatype[this.currentIndex].equCode
this.selectline2(this.selectxtclasses) // change
}
}, 120000)
},
back() {
this.$router.push({ path: "/index" });
},

Loading…
Cancel
Save