工单排程详情修改提交001

This commit is contained in:
2024-07-18 10:37:00 +08:00
parent a02a401ccb
commit 4e8f49dcd5

View File

@@ -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()
},