|
|
|
@ -740,4 +740,26 @@ export class DaMonthlyTaskOverviewComponent implements OnInit {
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
deleteTask(element, item) { |
|
|
|
|
this.modal.confirm({ |
|
|
|
|
nzTitle: '确定删除此任务吗?', |
|
|
|
|
nzOkText: '确定', |
|
|
|
|
nzOkType: 'primary', |
|
|
|
|
nzOkDanger: true, |
|
|
|
|
nzOnOk: () => { |
|
|
|
|
this.http.delete(`/api/PlanTasks/${item.id}`).subscribe({ |
|
|
|
|
next: (data) => { |
|
|
|
|
this.message.create('success', '删除成功'); |
|
|
|
|
element.data = element.data.filter((i) => i.id != item.id); |
|
|
|
|
}, |
|
|
|
|
error: (err) => { |
|
|
|
|
this.message.create('warning', '删除失败'); |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
nzCancelText: '取消', |
|
|
|
|
nzOnCancel: () => console.log('Cancel'), |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|