| | |
| | | TaskCount:0, |
| | | plcStatus:0, |
| | | isTipShow:false, |
| | | isFinsh:0, |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | this.getDate2(); |
| | | }, 5000); |
| | | this.getTaskInfo(); |
| | | }, |
| | | watch:{ |
| | | isFinsh(){ |
| | | if(this.isFinsh==this.Tasks.length){ |
| | | this.getStartArr() |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | taskClick(){ |
| | |
| | | .procedure.workers |
| | | ? this.Tasks[i].Procedure.procedure.workers |
| | | : []; |
| | | |
| | | this.Tasks[i].procedureList.push([ |
| | | { |
| | | name: "工序", |
| | | ...this.Tasks[i].Procedure.procedure, |
| | | }, |
| | | ]); |
| | | |
| | | |
| | | if (this.Tasks[i].Procedure.ID) { |
| | | startTask({ id: this.Tasks[i].Procedure.ID }).then((res) => { |
| | | if (res.code == 200) { |
| | | // res.data.number |
| | | this.Tasks[i].procedureList[0].push({ |
| | | number: res.data.Number, |
| | | name: "工艺", |
| | | Arr:res.data.Params ? res.data.Params : [], |
| | | }); |
| | | this.Tasks[i].Arr=res.data.Params ? res.data.Params : [] |
| | | this.isFinsh=Number(i)+1 |
| | | } |
| | | }); |
| | | } |
| | | this.setInterCard("inputMaterials", "cardBox1&" + i, i); |
| | | this.setInterCard("outputMaterials", "cardBox3&" + i, i); |
| | | } |
| | | this.getStartArr() |
| | | |
| | | this.getProgressInfo(); |
| | | if (!this.procInfoTimer) { |
| | | this.procInfoTimer = setInterval(() => { |
| | |
| | | getStartArr(){ |
| | | for (let i in this.Tasks) { |
| | | if (this.Tasks[i].Procedure.Status==1) { |
| | | this.Arr = this.Tasks[i].procedureList[0].Arr ?this.Tasks[i].procedureList[0].Arr: []; |
| | | this.Arr = this.Tasks[i].Arr ?this.Tasks[i].Arr: []; |
| | | this.taskData=this.Tasks[i]; |
| | | break; |
| | | } |