From b6a2aeff86f1093c1f892e9ab7ed919de430e9c7 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Sun, 28 Aug 2022 14:23:30 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E5=8F=91=E5=B8=83=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../station-task-execution.component.ts | 23 ++++++++-------- .../station-weekly-plan.component.html | 3 ++- .../station-weekly-plan.component.ts | 27 +++++++++++++++++-- 3 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/app/home/task/station-task-execution/station-task-execution.component.ts b/src/app/home/task/station-task-execution/station-task-execution.component.ts index b164b6f..b10e9ac 100644 --- a/src/app/home/task/station-task-execution/station-task-execution.component.ts +++ b/src/app/home/task/station-task-execution/station-task-execution.component.ts @@ -68,22 +68,23 @@ export class StationTaskExecutionComponent implements OnInit { let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' let params = { Month: selectedTime, - OrganizationId: this.OrganizationId, + // OrganizationId: this.OrganizationId, TaskName: this.searchForm.taskname, CompanyName: this.searchForm.unitname, AssitantOrganizationId: this.searchForm.or, + approvalStatuses: ['已检查'], + SupervisorId: this.userId, PageNumber: this.PageNumber, - CreatorId: this.userId, PageSize: this.PageSize } - // this.http.get('/api/PlanTasks', { - // params: params - // }).subscribe((data: any) => { - // this.isloading = false - // console.log('任务申请列表', data); - // this.totalCount = data.totalCount - // this.taskLIst = [...data.items] - // }) + this.http.get('/api/PlanTasks', { + params: params + }).subscribe((data: any) => { + this.isloading = false + console.log('任务申请列表', data); + this.totalCount = data.totalCount + this.taskLIst = [...data.items] + }) } pageChange($event) { @@ -254,7 +255,7 @@ export class StationTaskExecutionComponent implements OnInit { } - + look(item) { } diff --git a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html index 441e5f7..339edf8 100644 --- a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html +++ b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html @@ -136,7 +136,8 @@ [nzPercent]="element.percentage"> - + {{element.isExpand ? '收起' :'展开'}} diff --git a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts index ff4994f..edf76e6 100644 --- a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts +++ b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts @@ -209,7 +209,7 @@ export class StationWeeklyPlanComponent implements OnInit { let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' let params = { Month: selectedTime, - approvalStatuses: "通过", + approvalStatuses: ['通过', '待检查', '已检查'], SupervisorId: this.userId, PageNumber: this.PageNumber, PageSize: this.PageSize @@ -403,7 +403,7 @@ export class StationWeeklyPlanComponent implements OnInit { Month: selectedTime, CompanyOrganizationId: item.id, PageNumber: this.PageNumber, - approvalStatuses: '通过', + approvalStatuses: ['通过', '待检查', '已检查'], PageSize: this.PageSize } item.isLoading = true @@ -517,4 +517,27 @@ export class StationWeeklyPlanComponent implements OnInit { modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); } + + + createTask(element) { + console.log(element) + let taskIds = [] + element.data.forEach(item => { + item.data.forEach(i => { + i.checkTime ? taskIds.push(i.id) : null + }); + }); + let params = { + ids: taskIds, + approvalStatus: '待检查' + } + this.http.post('/api/PlanTasks/ApprovalMany', null, { params: params }).subscribe({ + next: (data: any) => { + this.message.create('success', '发布成功'); + }, + error: (err) => { + this.message.create('warning', '发布失败'); + } + }) + } }