From 4e8f49dcd5057e73bf2dbafb8ca4e33fcae3c686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Thu, 18 Jul 2024 10:37:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E6=8E=92=E7=A8=8B=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4001?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qualityManagement/FQC/thirtyFQC.vue | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/views/qualityManagement/FQC/thirtyFQC.vue b/src/views/qualityManagement/FQC/thirtyFQC.vue index fad4b81..0cfc2a0 100644 --- a/src/views/qualityManagement/FQC/thirtyFQC.vue +++ b/src/views/qualityManagement/FQC/thirtyFQC.vue @@ -674,7 +674,10 @@ toUpdateNum: 0, //弹窗更新值 toname: '', toindex: 0, //索引 + // 按钮计时器 timer: null, + // 工单数据计时器刷新 + timer2: null, mqttClient: null, mqttClientId: emqxUtil.title + Math.random().toString(16).substring(2, 8) } @@ -682,7 +685,7 @@ created() { this.initMqtt(); this.getcurrentWorkorder() - this.startTimer() + this.startTimer2() }, mounted() {}, watch: { @@ -1107,20 +1110,23 @@ }, //todo 定时任务 ,每4s 获取一次当前工单下的包装投入数 - startTimer() { - this.timer = setInterval(() => { + startTimer2() { + this.timer2 = setInterval(() => { //计算包装投入数 calculate_packagingInvestment({ workorder_id: this.CurrentWorkorder.clientWorkorder }).then((res) => { if (res.code == 200) { this.CurrentWorkorder.previousNumber = res.data } }) + // 更新工单白板 this.handlerSyncDataBoard(this.CurrentWorkorder.clientWorkorder); + // 更新工单状态 + this.getWorkOrderInListStatus(this.CurrentWorkorder.clientWorkorder); //this.getcurrentWorkorder() }, 5000) }, - stopTimer() { - clearInterval(this.timer) + stopTimer2() { + clearInterval(this.timer2) }, teamChange(value) { @@ -1312,7 +1318,7 @@ }, // 退出后关闭计时器 beforeDestroy() { - this.stopTimer() + this.stopTimer2() },