Browse Source

[新增]一键通过功能

非煤矿山灾害智能感知和预警系统
邵佳豪 3 years ago
parent
commit
69f9bcf1c9
  1. 2
      src/app/home/task/da-oneself-plan/da-oneself-plan.component.html
  2. 2
      src/app/home/task/station-weekly-plan/station-weekly-plan.component.html
  3. 33
      src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts

2
src/app/home/task/da-oneself-plan/da-oneself-plan.component.html

@ -44,7 +44,7 @@
<p style="font-weight: 900;font-size: 36px;text-align: left;">
{{item.passed}}/{{item.data.length}}</p>
</div>
<button *ngIf="isExpand" nz-button class="btn">一键通过</button>
<!-- <button *ngIf="isExpand" nz-button class="btn">一键通过</button> -->
</div>
<div class="instrumentpanelitemright" *ngIf="isExpand">
<nz-progress [nzPercent]="item.percentage" nzType="circle" [nzFormat]="formatOne"

2
src/app/home/task/station-weekly-plan/station-weekly-plan.component.html

@ -67,7 +67,7 @@
<p style="font-weight: 900;font-size: 36px;text-align: left;">
{{item.passed}}/{{item.data.length}}</p>
</div>
<button *ngIf="isExpand" nz-button class="btn">一键通过</button>
<button *ngIf="isExpand" nz-button class="btn" (click)="allPass(item)">一键通过</button>
</div>
<div class="instrumentpanelitemright" *ngIf="isExpand">
<nz-progress [nzPercent]="item.percentage" nzType="circle" [nzFormat]="formatOne"

33
src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts

@ -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: '取消'
});
}
}

Loading…
Cancel
Save