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', '发布失败'); + } + }) + } }