|
@@ -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
|
|