|
@@ -614,7 +614,11 @@ export class IncidentCreateComponent implements OnInit {
|
614
|
614
|
this.applicationBuildingList = data.list;
|
615
|
615
|
if(buildingId){
|
616
|
616
|
let hasBuildingId = this.applicationBuildingList.some(v => v.id == buildingId);
|
617
|
|
- hasBuildingId && (this.incidentModel.area = buildingId);
|
|
617
|
+ if(hasBuildingId){
|
|
618
|
+ this.incidentModel.area = buildingId;
|
|
619
|
+ }else{
|
|
620
|
+ this.incidentModel.area = undefined;
|
|
621
|
+ }
|
618
|
622
|
}
|
619
|
623
|
}
|
620
|
624
|
});
|
|
@@ -627,12 +631,12 @@ export class IncidentCreateComponent implements OnInit {
|
627
|
631
|
}
|
628
|
632
|
// 楼层列表
|
629
|
633
|
applicationFloorList:any[] = [];
|
630
|
|
- searchApplicationFloor(keyWord?, floorId?) {
|
|
634
|
+ searchApplicationFloor(keyWord?, floorId?, buildingId?) {
|
631
|
635
|
let postData = {
|
632
|
636
|
idx: 0,
|
633
|
637
|
sum: 9999,
|
634
|
638
|
floor: {
|
635
|
|
- buildId: this.incidentModel.area || undefined,
|
|
639
|
+ buildId: buildingId || this.incidentModel.area || undefined,
|
636
|
640
|
hosId: this.incidentModel.hosId,
|
637
|
641
|
},
|
638
|
642
|
};
|
|
@@ -645,7 +649,11 @@ export class IncidentCreateComponent implements OnInit {
|
645
|
649
|
this.applicationFloorList = data.list;
|
646
|
650
|
if(floorId){
|
647
|
651
|
let hasFloorId = this.applicationFloorList.some(v => v.id == floorId);
|
648
|
|
- hasFloorId && (this.incidentModel.place = floorId);
|
|
652
|
+ if(hasFloorId){
|
|
653
|
+ this.incidentModel.place = floorId;
|
|
654
|
+ }else{
|
|
655
|
+ this.incidentModel.place = undefined;
|
|
656
|
+ }
|
649
|
657
|
}
|
650
|
658
|
}
|
651
|
659
|
});
|
|
@@ -751,7 +759,7 @@ export class IncidentCreateComponent implements OnInit {
|
751
|
759
|
let buildingId = deptObj.building ? deptObj.building.id : undefined;
|
752
|
760
|
buildingId && this.searchApplicationBuilding('', buildingId);
|
753
|
761
|
let floorId = deptObj.floor ? deptObj.floor.id : undefined;
|
754
|
|
- floorId && this.searchApplicationFloor('', floorId);
|
|
762
|
+ buildingId && floorId && this.searchApplicationFloor('', floorId, buildingId);
|
755
|
763
|
this.incidentModel.houseNumber = deptObj.address;
|
756
|
764
|
}
|
757
|
765
|
|