seimin 1 月之前
父节点
当前提交
5d25addeda

+ 5 - 5
src/app/views/new-statistics/components/search-more/search-more.component.html

@@ -21,7 +21,7 @@
21
         <nz-form-item [hidden]="!fieldConfig.config.groupAndUser">
21
         <nz-form-item [hidden]="!fieldConfig.config.groupAndUser">
22
           <nz-form-label [nzSpan]="6" nzFor="userId">维修人员</nz-form-label>
22
           <nz-form-label [nzSpan]="6" nzFor="userId">维修人员</nz-form-label>
23
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择维修人员!">
23
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择维修人员!">
24
-            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeUserInp($event)" formControlName="userId" nzPlaceHolder="请选择维修人员" (nzOpenChange)="openChangeUser($event)" (ngModelChange)="setIsSelecting()">
24
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeUserInp($event)" formControlName="userId" nzPlaceHolder="请选择维修人员" (nzOpenChange)="openChangeUser($event)" (ngModelChange)="setIsSelecting(true)">
25
               <ng-container *ngFor="let option of userList">
25
               <ng-container *ngFor="let option of userList">
26
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
26
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
27
               </ng-container>
27
               </ng-container>
@@ -63,7 +63,7 @@
63
         <nz-form-item [hidden]="!fieldConfig.config.category123">
63
         <nz-form-item [hidden]="!fieldConfig.config.category123">
64
           <nz-form-label [nzSpan]="6" nzFor="category3Id">三级分类</nz-form-label>
64
           <nz-form-label [nzSpan]="6" nzFor="category3Id">三级分类</nz-form-label>
65
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择三级分类!">
65
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择三级分类!">
66
-            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCategory3Inp($event)" formControlName="category3Id" nzPlaceHolder="请选择三级分类" (nzOpenChange)="openChangeCategory3($event)" (ngModelChange)="setIsSelecting()">
66
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCategory3Inp($event)" formControlName="category3Id" nzPlaceHolder="请选择三级分类" (nzOpenChange)="openChangeCategory3($event)" (ngModelChange)="setIsSelecting(true)">
67
               <ng-container *ngFor="let option of category3List">
67
               <ng-container *ngFor="let option of category3List">
68
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.category" [nzValue]="option.id"></nz-option>
68
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.category" [nzValue]="option.id"></nz-option>
69
               </ng-container>
69
               </ng-container>
@@ -105,7 +105,7 @@
105
         <nz-form-item [hidden]="!fieldConfig.config.buildingAndFloor">
105
         <nz-form-item [hidden]="!fieldConfig.config.buildingAndFloor">
106
           <nz-form-label [nzSpan]="6" nzFor="floorId">楼<span style="visibility: hidden;">囧囧</span>层</nz-form-label>
106
           <nz-form-label [nzSpan]="6" nzFor="floorId">楼<span style="visibility: hidden;">囧囧</span>层</nz-form-label>
107
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择楼层!">
107
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择楼层!">
108
-            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeFloorInp($event)" formControlName="floorId" nzPlaceHolder="请选择楼层" (nzOpenChange)="openChangeFloor($event)" (ngModelChange)="setIsSelecting()">
108
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeFloorInp($event)" formControlName="floorId" nzPlaceHolder="请选择楼层" (nzOpenChange)="openChangeFloor($event)" (ngModelChange)="setIsSelecting(true)">
109
               <ng-container *ngFor="let option of floorList">
109
               <ng-container *ngFor="let option of floorList">
110
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.floorName" [nzValue]="option.id"></nz-option>
110
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.floorName" [nzValue]="option.id"></nz-option>
111
               </ng-container>
111
               </ng-container>
@@ -119,7 +119,7 @@
119
         <nz-form-item [hidden]="!fieldConfig.config.company">
119
         <nz-form-item [hidden]="!fieldConfig.config.company">
120
           <nz-form-label [nzSpan]="6" nzFor="companyId">三方公司</nz-form-label>
120
           <nz-form-label [nzSpan]="6" nzFor="companyId">三方公司</nz-form-label>
121
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择三方公司!">
121
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择三方公司!">
122
-            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCompanyInp($event)" formControlName="companyId" nzPlaceHolder="请选择三方公司" (nzOpenChange)="openChangeCompany($event)" (ngModelChange)="setIsSelecting()">
122
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCompanyInp($event)" formControlName="companyId" nzPlaceHolder="请选择三方公司" (nzOpenChange)="openChangeCompany($event)" (ngModelChange)="setIsSelecting(true)">
123
               <ng-container *ngFor="let option of companyList">
123
               <ng-container *ngFor="let option of companyList">
124
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
124
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
125
               </ng-container>
125
               </ng-container>
@@ -133,7 +133,7 @@
133
         <nz-form-item [hidden]="!fieldConfig.config.repairDept">
133
         <nz-form-item [hidden]="!fieldConfig.config.repairDept">
134
           <nz-form-label [nzSpan]="6" nzFor="repairDeptId">报修科室</nz-form-label>
134
           <nz-form-label [nzSpan]="6" nzFor="repairDeptId">报修科室</nz-form-label>
135
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择报修科室!">
135
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择报修科室!">
136
-            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" formControlName="repairDeptId" nzPlaceHolder="请选择报修科室" (nzOpenChange)="openChangeRepairDept($event)" (ngModelChange)="setIsSelecting()">
136
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" formControlName="repairDeptId" nzPlaceHolder="请选择报修科室" (nzOpenChange)="openChangeRepairDept($event)" (ngModelChange)="setIsSelecting(true)">
137
               <ng-container *ngFor="let option of repairDeptList">
137
               <ng-container *ngFor="let option of repairDeptList">
138
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
138
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
139
               </ng-container>
139
               </ng-container>

+ 15 - 6
src/app/views/new-statistics/components/search-more/search-more.component.ts

@@ -137,8 +137,8 @@ export class SearchMoreComponent implements OnInit {
137
   }
137
   }
138
 
138
 
139
   // 设置标志
139
   // 设置标志
140
-  setIsSelecting(){
141
-    this.isSelecting = true; // 设置标志
140
+  setIsSelecting(flag){
141
+    this.isSelecting = flag; // 设置标志
142
   }
142
   }
143
 
143
 
144
   // =================维修分组===================
144
   // =================维修分组===================
@@ -171,11 +171,12 @@ export class SearchMoreComponent implements OnInit {
171
     });
171
     });
172
   }
172
   }
173
   openChangeGroup(flag){
173
   openChangeGroup(flag){
174
+    flag && this.setIsSelecting(false);
174
     flag && this.getGroupList();
175
     flag && this.getGroupList();
175
   }
176
   }
176
 
177
 
177
   changeGroup(id){
178
   changeGroup(id){
178
-    this.setIsSelecting();
179
+    this.setIsSelecting(true);
179
     this.userList = [];
180
     this.userList = [];
180
     this.validateForm.controls.userId.setValue(null);
181
     this.validateForm.controls.userId.setValue(null);
181
     this.getUserList();
182
     this.getUserList();
@@ -218,6 +219,7 @@ export class SearchMoreComponent implements OnInit {
218
     });
219
     });
219
   }
220
   }
220
   openChangeUser(flag){
221
   openChangeUser(flag){
222
+    flag && this.setIsSelecting(false);
221
     flag && this.getUserList();
223
     flag && this.getUserList();
222
   }
224
   }
223
 
225
 
@@ -250,11 +252,12 @@ export class SearchMoreComponent implements OnInit {
250
     });
252
     });
251
   }
253
   }
252
   openChangeCategory1(flag){
254
   openChangeCategory1(flag){
255
+    flag && this.setIsSelecting(false);
253
     flag && this.getCategory1List();
256
     flag && this.getCategory1List();
254
   }
257
   }
255
 
258
 
256
   changeCategory1(id){
259
   changeCategory1(id){
257
-    this.setIsSelecting();
260
+    this.setIsSelecting(true);
258
     this.category2List = [];
261
     this.category2List = [];
259
     this.validateForm.controls.category2Id.setValue(null);
262
     this.validateForm.controls.category2Id.setValue(null);
260
     this.getCategory2List();
263
     this.getCategory2List();
@@ -296,11 +299,12 @@ export class SearchMoreComponent implements OnInit {
296
     });
299
     });
297
   }
300
   }
298
   openChangeCategory2(flag){
301
   openChangeCategory2(flag){
302
+    flag && this.setIsSelecting(false);
299
     flag && this.getCategory2List();
303
     flag && this.getCategory2List();
300
   }
304
   }
301
 
305
 
302
   changeCategory2(id){
306
   changeCategory2(id){
303
-    this.setIsSelecting();
307
+    this.setIsSelecting(true);
304
     this.category3List = [];
308
     this.category3List = [];
305
     this.validateForm.controls.category3Id.setValue(null);
309
     this.validateForm.controls.category3Id.setValue(null);
306
     this.getCategory3List();
310
     this.getCategory3List();
@@ -339,6 +343,7 @@ export class SearchMoreComponent implements OnInit {
339
     });
343
     });
340
   }
344
   }
341
   openChangeCategory3(flag){
345
   openChangeCategory3(flag){
346
+    flag && this.setIsSelecting(false);
342
     flag && this.getCategory3List();
347
     flag && this.getCategory3List();
343
   }
348
   }
344
 
349
 
@@ -382,11 +387,12 @@ export class SearchMoreComponent implements OnInit {
382
     });
387
     });
383
   }
388
   }
384
   openChangeBuilding(flag){
389
   openChangeBuilding(flag){
390
+    flag && this.setIsSelecting(false);
385
     flag && this.getBuildingList();
391
     flag && this.getBuildingList();
386
   }
392
   }
387
 
393
 
388
   changeBuilding(id){
394
   changeBuilding(id){
389
-    this.setIsSelecting();
395
+    this.setIsSelecting(true);
390
     this.floorList = [];
396
     this.floorList = [];
391
     this.validateForm.controls.floorId.setValue(null);
397
     this.validateForm.controls.floorId.setValue(null);
392
     this.getFloorList();
398
     this.getFloorList();
@@ -426,6 +432,7 @@ export class SearchMoreComponent implements OnInit {
426
     });
432
     });
427
   }
433
   }
428
   openChangeFloor(flag){
434
   openChangeFloor(flag){
435
+    flag && this.setIsSelecting(false);
429
     flag && this.getFloorList();
436
     flag && this.getFloorList();
430
   }
437
   }
431
 
438
 
@@ -459,6 +466,7 @@ export class SearchMoreComponent implements OnInit {
459
     });
466
     });
460
   }
467
   }
461
   openChangeCompany(flag){
468
   openChangeCompany(flag){
469
+    flag && this.setIsSelecting(false);
462
     flag && this.getCompanyList();
470
     flag && this.getCompanyList();
463
   }
471
   }
464
 
472
 
@@ -492,6 +500,7 @@ export class SearchMoreComponent implements OnInit {
492
     });
500
     });
493
   }
501
   }
494
   openChangeRepairDept(flag){
502
   openChangeRepairDept(flag){
503
+    flag && this.setIsSelecting(false);
495
     flag && this.getRepairDeptList();
504
     flag && this.getRepairDeptList();
496
   }
505
   }
497
 }
506
 }