seimin 9 月之前
父節點
當前提交
4ea42eb3fd

+ 5 - 4
src/app/views/inspection-address/inspection-address.component.ts

@@ -376,7 +376,7 @@ export class InspectionAddressComponent implements OnInit {
376 376
 
377 377
       if(this.deptDto && this.deptDto.floor){
378 378
         this.noChangeBuilding = true;
379
-        this.getFloors('add', '', this.deptDto.building.id);
379
+        this.getFloors('add', '', this.deptDto.building.id, false, true);
380 380
       }
381 381
     }
382 382
   }
@@ -394,7 +394,8 @@ export class InspectionAddressComponent implements OnInit {
394 394
 
395 395
   // 获取楼层
396 396
   floorList: any = [];
397
-  getFloors(type, keyword, buildId, init = false) {
397
+  getFloors(type, keyword, buildId, init = false, isNoChangeBuilding = false) {
398
+    console.log(isNoChangeBuilding)
398 399
     if(!buildId){
399 400
       this.floorList = [];
400 401
       return;
@@ -421,7 +422,7 @@ export class InspectionAddressComponent implements OnInit {
421 422
             this.floorList.unshift(this.coopData.floorDTO)
422 423
           }
423 424
           this.validateForm.controls.floorId.setValue(this.coopData.floorDTO.id);
424
-        } else if (this.deptDto && this.deptDto.floor){
425
+        } else if (isNoChangeBuilding && this.deptDto && this.deptDto.floor){
425 426
           let floorId = this.deptDto.floor.id;
426 427
           let flag = this.floorList.some(v => v.id == floorId);
427 428
           if(!flag){
@@ -578,7 +579,7 @@ export class InspectionAddressComponent implements OnInit {
578 579
 
579 580
     if(data.floorId){
580 581
       this.noChangeBuilding = true;
581
-      this.getFloors('add', '', data.buildId, true);
582
+      this.getFloors('add', '', data.buildId, true, true);
582 583
     }
583 584
   }
584 585
 

+ 11 - 0
src/app/views/inspection-execute/inspection-execute.component.html

@@ -41,6 +41,17 @@
41 41
             </nz-option>
42 42
           </nz-select>
43 43
         </div>
44
+        <div class="list-template__searchItem">
45
+          <span class="label">是否异常</span>:
46
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear nzPlaceHolder="请选择" [(ngModel)]="searchDto.exceptionId">
47
+            <ng-container *ngFor="let option of exceptionList">
48
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
49
+            </ng-container>
50
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
51
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
52
+            </nz-option>
53
+          </nz-select>
54
+        </div>
44 55
       </div>
45 56
       <div nz-col nzLg="8" class="list-template__btns">
46 57
         <button nz-button *ngIf="coopBtns.del" [disabled]="!checkedDepIds.length" class="btn default" (click)="showDelModal(data,'您确认要删除选中的巡检任务吗?','删除','delList')">批量删除</button>

+ 7 - 0
src/app/views/inspection-execute/inspection-execute.component.ts

@@ -172,6 +172,7 @@ export class InspectionExecuteComponent implements OnInit {
172 172
         inspectionId: this.searchDto.inspectionId || undefined,
173 173
         batchId: this.searchDto.batchId || undefined,
174 174
         status: this.searchDto.statusId ? { id: this.searchDto.statusId } : undefined,
175
+        exception: this.searchDto.exceptionId === undefined ? undefined : this.searchDto.exceptionId,
175 176
       },
176 177
     };
177 178
     this.mapOfCheckedId = {};
@@ -254,6 +255,12 @@ export class InspectionExecuteComponent implements OnInit {
254 255
     });
255 256
   }
256 257
 
258
+  // 是否异常
259
+  exceptionList:any[] = [
260
+    { id: 0, name: "否" },
261
+    { id: 1, name: "是" },
262
+  ];
263
+
257 264
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
258 265
   showPromptModal(con, success, promptInfo?) {
259 266
     this.promptModalShow = false;