From 9efaf5e388c7b413f847dffda71fb64c8bbc101f Mon Sep 17 00:00:00 2001 From: Yangwl <1726150332@qq.com> Date: Mon, 19 May 2025 10:37:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E8=A3=85=E7=BA=BF=E4=BA=A7=E7=BA=BF?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=9C=8B=E6=9D=BF2=E5=88=86=E9=92=9F?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=B7=B3=E4=BA=A7=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yangwl <1726150332@qq.com> --- src/views/kanban/Packagingline/index2.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/views/kanban/Packagingline/index2.vue b/src/views/kanban/Packagingline/index2.vue index 0b28297..05e7c4f 100644 --- a/src/views/kanban/Packagingline/index2.vue +++ b/src/views/kanban/Packagingline/index2.vue @@ -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" }); },