Browse Source

BUG修复

seimin 3 years ago
parent
commit
612791e31a

+ 1 - 0
src/app/views/hospital-config/hospital-config.component.ts

@@ -208,6 +208,7 @@ export class HospitalConfigComponent implements OnInit {
208
       this.validateForm.controls[i].markAsDirty();
208
       this.validateForm.controls[i].markAsDirty();
209
       this.validateForm.controls[i].updateValueAndValidity();
209
       this.validateForm.controls[i].updateValueAndValidity();
210
     }
210
     }
211
+    if (this.validateForm.invalid) return;
211
     let hospitalConfigList = JSON.parse(
212
     let hospitalConfigList = JSON.parse(
212
       JSON.stringify(this.hospitalConfigList)
213
       JSON.stringify(this.hospitalConfigList)
213
     );
214
     );

+ 1 - 1
src/app/views/task-type-management/task-type-management.component.html

@@ -165,7 +165,7 @@
165
         </div>
165
         </div>
166
         <div class="mb8 w100" *ngIf="isRemand == '1'">
166
         <div class="mb8 w100" *ngIf="isRemand == '1'">
167
           <nz-form-label class="label" nzRequired>选择自动送回的任务类型</nz-form-label>
167
           <nz-form-label class="label" nzRequired>选择自动送回的任务类型</nz-form-label>
168
-          <nz-select [ngClass]="{remandTypeId:!remandTypeId}" style="width:146px;" [nzDropdownMatchSelectWidth]="false"
168
+          <nz-select (nzOpenChange)="openSearchTaskList($event)" [ngClass]="{remandTypeId:!remandTypeId}" style="width:146px;" [nzDropdownMatchSelectWidth]="false"
169
             nzServerSearch nzShowSearch (nzOnSearch)="changeSearchTaskList($event)" nzPlaceHolder="请选择任务类型"
169
             nzServerSearch nzShowSearch (nzOnSearch)="changeSearchTaskList($event)" nzPlaceHolder="请选择任务类型"
170
             [(ngModel)]="remandTypeId">
170
             [(ngModel)]="remandTypeId">
171
             <ng-container *ngFor="let option of searchTaskList">
171
             <ng-container *ngFor="let option of searchTaskList">

+ 12 - 2
src/app/views/task-type-management/task-type-management.component.ts

@@ -578,6 +578,12 @@ export class TaskTypeManagementComponent implements OnInit {
578
       ];
578
       ];
579
     }
579
     }
580
   }
580
   }
581
+  // 选择自动送回的任务类型
582
+  openSearchTaskList(flag) {
583
+    if (flag) {
584
+      this.getSearchTaskList();
585
+    }
586
+  }
581
   //选择类型
587
   //选择类型
582
   currentChoice;
588
   currentChoice;
583
   itemChoice(data, index) {
589
   itemChoice(data, index) {
@@ -703,6 +709,8 @@ export class TaskTypeManagementComponent implements OnInit {
703
           taskName: data.remandTypeId.taskName,
709
           taskName: data.remandTypeId.taskName,
704
         });
710
         });
705
       }
711
       }
712
+    } else {
713
+      this.remandTypeId = null;
706
     }
714
     }
707
     if (data.defaultNullDeptId) {
715
     if (data.defaultNullDeptId) {
708
       this.defaultNullDeptId = `${data.defaultNullDeptId.id}__${data.defaultNullDeptId.dept}`;
716
       this.defaultNullDeptId = `${data.defaultNullDeptId.id}__${data.defaultNullDeptId.dept}`;
@@ -1798,7 +1806,9 @@ export class TaskTypeManagementComponent implements OnInit {
1798
       .subscribe((result) => {
1806
       .subscribe((result) => {
1799
         this.searchTaskLoading = false;
1807
         this.searchTaskLoading = false;
1800
         if (result.status == 200) {
1808
         if (result.status == 200) {
1801
-          this.searchTaskList = result.list;
1809
+          this.searchTaskList = result.list.filter(
1810
+            (item) => item.id != this.currentChoice.id
1811
+          );
1802
           this.searchTaskList.forEach((item) => {
1812
           this.searchTaskList.forEach((item) => {
1803
             item.id = `${item.id}__${item.taskName}`;
1813
             item.id = `${item.id}__${item.taskName}`;
1804
           });
1814
           });
@@ -2275,7 +2285,7 @@ export class TaskTypeManagementComponent implements OnInit {
2275
     this.promptModalShow = false;
2285
     this.promptModalShow = false;
2276
     this.promptContent = con;
2286
     this.promptContent = con;
2277
     this.ifSuccess = success;
2287
     this.ifSuccess = success;
2278
-    if (errorInfo) {
2288
+    if (errorInfo !== undefined) {
2279
       this.errorInfo = errorInfo;
2289
       this.errorInfo = errorInfo;
2280
     }
2290
     }
2281
     setTimeout(() => {
2291
     setTimeout(() => {