seimin 1 年之前
父節點
當前提交
b85b19bf16

+ 2 - 2
src/app/views/limit-initiation-time/limit-initiation-time.component.html

@@ -58,9 +58,9 @@
58
       <div class="content">
58
       <div class="content">
59
         <form nz-form [formGroup]="validateForm" class="addForm">
59
         <form nz-form [formGroup]="validateForm" class="addForm">
60
           <nz-form-item>
60
           <nz-form-item>
61
-            <nz-form-label [nzSpan]="24" nzRequired nzFor="taskType">任务类型</nz-form-label>
61
+            <nz-form-label [nzSpan]="24" nzRequired nzFor="taskTypeIds">任务类型</nz-form-label>
62
             <nz-form-control nzErrorTip="请选择任务类型!">
62
             <nz-form-control nzErrorTip="请选择任务类型!">
63
-              <nz-select class="formItem" nzMode="multiple" (nzOnSearch)="changeInp($event, 'taskType')" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择任务类型" formControlName="taskType" (nzOpenChange)="getTaskTypeList($event)">
63
+              <nz-select class="formItem" nzMode="multiple" (nzOnSearch)="changeInp($event, 'taskTypeIds')" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择任务类型" formControlName="taskTypeIds" (nzOpenChange)="getTaskTypeList($event)">
64
                 <ng-container *ngFor="let option of taskTypeList">
64
                 <ng-container *ngFor="let option of taskTypeList">
65
                   <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
65
                   <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
66
                 </ng-container>
66
                 </ng-container>

+ 7 - 7
src/app/views/limit-initiation-time/limit-initiation-time.component.ts

@@ -47,7 +47,7 @@ export class LimitInitiationTimeComponent implements OnInit {
47
   ngOnInit() {
47
   ngOnInit() {
48
     //防抖
48
     //防抖
49
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
49
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
50
-      if(v[1] === 'taskType'){
50
+      if(v[1] === 'taskTypeIds'){
51
         this.getTaskTypeList(true, v[0]);
51
         this.getTaskTypeList(true, v[0]);
52
       }else if(v[1] === 'building'){
52
       }else if(v[1] === 'building'){
53
         this.getBuildingList(true, v[0]);
53
         this.getBuildingList(true, v[0]);
@@ -103,7 +103,7 @@ export class LimitInitiationTimeComponent implements OnInit {
103
       .subscribe((data) => {
103
       .subscribe((data) => {
104
         this.loading1 = false;
104
         this.loading1 = false;
105
         if (data.status == 200) {
105
         if (data.status == 200) {
106
-          this.listOfData = data.list.map(v => ({...v, taskNames: v.taskTypeDTO.map(v => v.taskName.toString())}));
106
+          this.listOfData = data.list.map(v => ({...v, taskNames: v.taskTypes.map(v => v.taskName.toString())}));
107
           this.listLength = data.totalNum;
107
           this.listLength = data.totalNum;
108
         }
108
         }
109
       });
109
       });
@@ -253,7 +253,7 @@ export class LimitInitiationTimeComponent implements OnInit {
253
     this.startTimeHourdis = () => [];
253
     this.startTimeHourdis = () => [];
254
     this.startTimeMindis = () => [];
254
     this.startTimeMindis = () => [];
255
     this.validateForm = this.fb.group({
255
     this.validateForm = this.fb.group({
256
-      taskType: [null, [Validators.required]],
256
+      taskTypeIds: [null, [Validators.required]],
257
       limitAllDept: [1, [Validators.required]],
257
       limitAllDept: [1, [Validators.required]],
258
       buildingIds: [[]],
258
       buildingIds: [[]],
259
       deptIds: [[]],
259
       deptIds: [[]],
@@ -385,7 +385,7 @@ export class LimitInitiationTimeComponent implements OnInit {
385
     if (this.add) {
385
     if (this.add) {
386
       //增加
386
       //增加
387
       data = {
387
       data = {
388
-        taskType: this.validateForm.value.taskType.toString(),
388
+        taskTypeIds: this.validateForm.value.taskTypeIds.toString(),
389
         limitAllDept: this.validateForm.value.limitAllDept,
389
         limitAllDept: this.validateForm.value.limitAllDept,
390
         buildingIds: this.validateForm.value.buildingIds.length ? this.validateForm.value.buildingIds.toString() : null,
390
         buildingIds: this.validateForm.value.buildingIds.length ? this.validateForm.value.buildingIds.toString() : null,
391
         deptIds: this.validateForm.value.deptIds.length ? this.validateForm.value.deptIds.toString() : null,
391
         deptIds: this.validateForm.value.deptIds.length ? this.validateForm.value.deptIds.toString() : null,
@@ -406,7 +406,7 @@ export class LimitInitiationTimeComponent implements OnInit {
406
       //编辑
406
       //编辑
407
       data = {
407
       data = {
408
         ...this.coopId,
408
         ...this.coopId,
409
-        taskType: this.validateForm.value.taskType.toString(),
409
+        taskTypeIds: this.validateForm.value.taskTypeIds.toString(),
410
         limitAllDept: this.validateForm.value.limitAllDept,
410
         limitAllDept: this.validateForm.value.limitAllDept,
411
         buildingIds: this.validateForm.value.buildingIds.length ? this.validateForm.value.buildingIds.toString() : null,
411
         buildingIds: this.validateForm.value.buildingIds.length ? this.validateForm.value.buildingIds.toString() : null,
412
         deptIds: this.validateForm.value.deptIds.length ? this.validateForm.value.deptIds.toString() : null,
412
         deptIds: this.validateForm.value.deptIds.length ? this.validateForm.value.deptIds.toString() : null,
@@ -451,8 +451,8 @@ export class LimitInitiationTimeComponent implements OnInit {
451
     this.modal = true;
451
     this.modal = true;
452
     this.coopId = data;
452
     this.coopId = data;
453
 
453
 
454
-    this.taskTypeList = data.taskTypeDTO || [];
455
-    this.validateForm.controls.taskType.setValue(this.taskTypeList.map(v => v.id)); //任务类型
454
+    this.taskTypeList = data.taskTypes || [];
455
+    this.validateForm.controls.taskTypeIds.setValue(this.taskTypeList.map(v => v.id)); //任务类型
456
 
456
 
457
     this.validateForm.controls.limitAllDept.setValue(data.limitAllDept); //是否限制所有科室
457
     this.validateForm.controls.limitAllDept.setValue(data.limitAllDept); //是否限制所有科室
458
 
458