| | |
| | | this.Tasks = res.data.Tasks ? res.data.Tasks : []; |
| | | |
| | | this.TaskCount=res.data.TaskCount?res.data.TaskCount:0 |
| | | if (this.Tasks.length == 0&&this.TaskCount==0) { |
| | | if (this.activeName == 1) { |
| | | this.Tasks.push(object); |
| | | } else { |
| | | this.Tasks.push(object); |
| | | this.Tasks.push(object); |
| | | } |
| | | } |
| | | this.workers=res.data.workers?res.data.workers:[] |
| | | for (let i in this.Tasks) { |
| | | this.Tasks[i].procedureList = []; |
| | |
| | | }, 3000); |
| | | } |
| | | } |
| | | if (this.Tasks.length == 0) { |
| | | if (this.activeName == 1) { |
| | | this.Tasks.push(object); |
| | | } else { |
| | | this.Tasks.push(object); |
| | | this.Tasks.push(object); |
| | | } |
| | | } |
| | | if (res.code != 200 || this.Tasks.length == 0) { |
| | | this.getcountdown(); |
| | | // 控制重新请求getTaskInfo, 只开启一个定时器 |