| | |
| | | |
| | | <template> |
| | | <div class="home"> |
| | | <!-- v-if="Object.keys(taskData).length > 0 && taskData.Procedure.ID" --> |
| | | <template > |
| | | <!-- --> |
| | | <template v-if="Object.keys(taskData).length > 0 && taskData.Procedure.ID"> |
| | | <div class="left"> |
| | | <p class="title"> |
| | | 生产管理看板 |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <!-- v-else --> |
| | | <template > |
| | | <!-- --> |
| | | <template v-else> |
| | | <div class="home-img-box"> |
| | | <div class="bg-title"> |
| | | <img src="../../public/bg-title.png" /> |
| | |
| | | countDownHour:0, |
| | | countDownMinute:0, |
| | | Arr:[], |
| | | // 记录定时器状态 |
| | | procInfoTimer:null, |
| | | cutdownTimer: null |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | }; |
| | | getTaskInfo().then((res) => { |
| | | if (res.code == 200) { |
| | | this.procedureList=[] |
| | | this.taskData = res.data |
| | | ? res.data |
| | | : { |
| | |
| | | } |
| | | }); |
| | | 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); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.$refs.control.islook = true; |
| | | } else { |
| | | this.$message.error("当前设备没有工序!"); |
| | | |
| | | } |
| | | }, |
| | | // 右侧完成 |
| | |
| | | font-size: 30px; |
| | | font-weight: 700; |
| | | } |
| | | .el-button--primary { |
| | | border: 0; |
| | | font-weight: 700 !important; |
| | | font-size: 16px !important; |
| | | } |
| | | |
| | | .color_4efefa { |
| | | color: #4efefa; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | .el-button--primary { |
| | | border: 0; |
| | | font-weight: 700 !important; |
| | | font-size: 16px; |
| | | } |
| | | </style> |