|
|
|
@ -562,4 +562,37 @@ export class StationWeeklyPlanComponent implements OnInit {
|
|
|
|
|
this.getTaskListPass(this.stationData[0]) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
allPass(item) { |
|
|
|
|
console.log(item) |
|
|
|
|
this.modal.confirm({ |
|
|
|
|
nzTitle: `确定要全部接受该模块下所有任务吗?`, |
|
|
|
|
nzOkText: '确定', |
|
|
|
|
nzOkType: 'default', |
|
|
|
|
nzOnOk: () => { |
|
|
|
|
let ids = [] |
|
|
|
|
item.data.forEach(element => { |
|
|
|
|
ids.push(element.id) |
|
|
|
|
}); |
|
|
|
|
this.http.post(`/api/PlanTasks/ApprovalMany`, null, { |
|
|
|
|
params: { |
|
|
|
|
ids: ids, |
|
|
|
|
approvalStatus: '通过' |
|
|
|
|
} |
|
|
|
|
}).subscribe({ |
|
|
|
|
next: (data) => { |
|
|
|
|
this.message.create('success', '成功'); |
|
|
|
|
item.data.forEach(element => { |
|
|
|
|
element.approvalStatus = '通过' |
|
|
|
|
}); |
|
|
|
|
this.getTaskListPass(this.stationData[0]) |
|
|
|
|
}, |
|
|
|
|
error: (err) => { |
|
|
|
|
this.message.create('warning', '失败'); |
|
|
|
|
item.isLoading = false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
nzCancelText: '取消' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|