From 46cb5180acf67330f80900250438e167eb379f95 Mon Sep 17 00:00:00 2001 From: FCD <2453864257@qq.com> Date: Tue, 25 Nov 2025 14:10:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E7=BA=BF=E7=9C=8B=E6=9D=BF=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/kanban/Packagingline/index2.vue | 36 +++++++++++++++-------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/src/views/kanban/Packagingline/index2.vue b/src/views/kanban/Packagingline/index2.vue index 0636115..43fb109 100644 --- a/src/views/kanban/Packagingline/index2.vue +++ b/src/views/kanban/Packagingline/index2.vue @@ -451,27 +451,30 @@ export default { // this.getdatalist(this.selectxt) this.selectfactoryCodelist(); this.gettime(); - this.startRotation() + // this.startRotation() this.timer = setInterval(() => { this.getProductionNumberPLC(); }, 10000); + }, 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事件 - } - }, 60000) - }, + // 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事件 + // } + // }, 60000) + // }, + + back() { this.$router.push({ path: "/index" }); }, @@ -513,7 +516,11 @@ export default { }).then((response) => { if (response) { this.dictDatatype = response; - _this.selectxtclasses = _this.dictDatatype[0].equCode; + if (_this.$route.query.equCode){ + _this.selectxtclasses = _this.$route.query.equCode; + }else { + _this.selectxtclasses = _this.dictDatatype[0].equCode; + } _this.getdatalist(); // _this.getDeviceRefreshTime(); } @@ -592,6 +599,9 @@ export default { //PLC产量信息 getProductionNumberPLC(){ const _this = this; + if (!_this.selectxtclasses){ + return; + } getProductionNumberPLC({ equCode: _this.selectxtclasses, factoryCode: "ds_" + _this.selectxt,