| | |
| | | countDownHour:0, |
| | | countDownMinute:0, |
| | | Arr:[], |
| | | // 记录定时器状态 |
| | | procInfoTimer:null, |
| | | cutdownTimer: null |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | } |
| | | }); |
| | | this.getProgressInfo(); |
| | | setInterval(() => { |
| | | this.getProgressInfo(); |
| | | }, 6000); |
| | | if (!this.procInfoTimer) { |
| | | this.procInfoTimer = setInterval(() => { |
| | | this.getProgressInfo(); |
| | | }, 6000); |
| | | } |
| | | } |
| | | console.log(this.procedureList, "===1111procedureList"); |
| | | // setTimeout(() => { |
| | |
| | | } |
| | | if(res.code!=200||!this.taskData.Procedure.ID){ |
| | | this.getcountdown(); |
| | | setInterval(() => { |
| | | this.getcountdown(); |
| | | }, 60000); |
| | | // 控制重新请求getTaskInfo, 只开启一个定时器 |
| | | if (!this.cutdownTimer) { |
| | | this.cutdownTimer = setInterval(() => { |
| | | this.getcountdown(); |
| | | }, 60000); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | |
| | | if (Object.keys(this.taskData).length > 0 && this.taskData.Procedure.ID) { |
| | | this.$refs.control.islook = true; |
| | | } else { |
| | | this.$confirm( "当前设备没有工序!", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => {}) |
| | | .catch(() => {}); |
| | | this.$message.error("当前设备没有工序!"); |
| | | |
| | | } |
| | | }, |
| | | // 右侧完成 |
| | |
| | | } |
| | | }); |
| | | } else { |
| | | this.$confirm( "当前设备没有工序!", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => {}) |
| | | .catch(() => {}); |
| | | this.$message.error("当前设备没有工序!"); |
| | | } |
| | | }, |
| | | getRandomNumber(min, max) { |