Browse Source

bug修复

seimin 7 months ago
parent
commit
6b4e6d81f0

+ 13 - 5
src/app/components/incidentManagement/incident-create/incident-create.component.ts

@@ -614,7 +614,11 @@ export class IncidentCreateComponent implements OnInit {
614
           this.applicationBuildingList = data.list;
614
           this.applicationBuildingList = data.list;
615
           if(buildingId){
615
           if(buildingId){
616
             let hasBuildingId = this.applicationBuildingList.some(v => v.id == buildingId);
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
   applicationFloorList:any[] = [];
633
   applicationFloorList:any[] = [];
630
-  searchApplicationFloor(keyWord?, floorId?) {
634
+  searchApplicationFloor(keyWord?, floorId?, buildingId?) {
631
     let postData = {
635
     let postData = {
632
       idx: 0,
636
       idx: 0,
633
       sum: 9999,
637
       sum: 9999,
634
       floor: {
638
       floor: {
635
-        buildId: this.incidentModel.area || undefined,
639
+        buildId: buildingId || this.incidentModel.area || undefined,
636
         hosId: this.incidentModel.hosId,
640
         hosId: this.incidentModel.hosId,
637
       },
641
       },
638
     };
642
     };
@@ -645,7 +649,11 @@ export class IncidentCreateComponent implements OnInit {
645
           this.applicationFloorList = data.list;
649
           this.applicationFloorList = data.list;
646
           if(floorId){
650
           if(floorId){
647
             let hasFloorId = this.applicationFloorList.some(v => v.id == floorId);
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
       let buildingId = deptObj.building ? deptObj.building.id : undefined;
759
       let buildingId = deptObj.building ? deptObj.building.id : undefined;
752
       buildingId && this.searchApplicationBuilding('', buildingId);
760
       buildingId && this.searchApplicationBuilding('', buildingId);
753
       let floorId = deptObj.floor ? deptObj.floor.id : undefined;
761
       let floorId = deptObj.floor ? deptObj.floor.id : undefined;
754
-      floorId && this.searchApplicationFloor('', floorId);
762
+      buildingId && floorId && this.searchApplicationFloor('', floorId, buildingId);
755
       this.incidentModel.houseNumber = deptObj.address;
763
       this.incidentModel.houseNumber = deptObj.address;
756
     }
764
     }
757
 
765
 

+ 1 - 1
src/app/components/incidentManagement/incident-substitutio-assign/incident-substitution-assign.component.ts

@@ -94,7 +94,7 @@ export class IncidentSubstitutionAssignComponent implements OnInit {
94
     if(id === 1){
94
     if(id === 1){
95
       // 人
95
       // 人
96
       this.requiredConfigChange('userId', true);
96
       this.requiredConfigChange('userId', true);
97
-    }else if(id === 2){
97
+    }else{
98
       // 组
98
       // 组
99
       this.requiredConfigChange('userId', false);
99
       this.requiredConfigChange('userId', false);
100
     }
100
     }

+ 13 - 5
src/app/views/fuwutai/fuwutai.component.ts

@@ -3052,7 +3052,11 @@ export class FuwutaiComponent implements OnInit {
3052
           this.applicationBuildingList = data.list;
3052
           this.applicationBuildingList = data.list;
3053
           if(buildingId){
3053
           if(buildingId){
3054
             let hasBuildingId = this.applicationBuildingList.some(v => v.id == buildingId);
3054
             let hasBuildingId = this.applicationBuildingList.some(v => v.id == buildingId);
3055
-            hasBuildingId && (this.incidentModel.area = buildingId);
3055
+            if(hasBuildingId){
3056
+              this.incidentModel.area = buildingId;
3057
+            }else{
3058
+              this.incidentModel.area = undefined;
3059
+            }
3056
           }
3060
           }
3057
         }
3061
         }
3058
       });
3062
       });
@@ -3065,12 +3069,12 @@ export class FuwutaiComponent implements OnInit {
3065
   }
3069
   }
3066
   // 楼层列表
3070
   // 楼层列表
3067
   applicationFloorList:any[] = [];
3071
   applicationFloorList:any[] = [];
3068
-  searchApplicationFloor(keyWord?, floorId?) {
3072
+  searchApplicationFloor(keyWord?, floorId?, buildingId?) {
3069
     let postData = {
3073
     let postData = {
3070
       idx: 0,
3074
       idx: 0,
3071
       sum: 9999,
3075
       sum: 9999,
3072
       floor: {
3076
       floor: {
3073
-        buildId: this.incidentModel.area || undefined,
3077
+        buildId: buildingId || this.incidentModel.area || undefined,
3074
         hosId: this.incidentModel.hosId,
3078
         hosId: this.incidentModel.hosId,
3075
       },
3079
       },
3076
     };
3080
     };
@@ -3083,7 +3087,11 @@ export class FuwutaiComponent implements OnInit {
3083
           this.applicationFloorList = data.list;
3087
           this.applicationFloorList = data.list;
3084
           if(floorId){
3088
           if(floorId){
3085
             let hasFloorId = this.applicationFloorList.some(v => v.id == floorId);
3089
             let hasFloorId = this.applicationFloorList.some(v => v.id == floorId);
3086
-            hasFloorId && (this.incidentModel.place = floorId);
3090
+            if(hasFloorId){
3091
+              this.incidentModel.place = floorId;
3092
+            }else{
3093
+              this.incidentModel.place = undefined;
3094
+            }
3087
           }
3095
           }
3088
         }
3096
         }
3089
       });
3097
       });
@@ -3253,7 +3261,7 @@ export class FuwutaiComponent implements OnInit {
3253
       let buildingId = deptObj.building ? deptObj.building.id : undefined;
3261
       let buildingId = deptObj.building ? deptObj.building.id : undefined;
3254
       buildingId && this.searchApplicationBuilding('', buildingId);
3262
       buildingId && this.searchApplicationBuilding('', buildingId);
3255
       let floorId = deptObj.floor ? deptObj.floor.id : undefined;
3263
       let floorId = deptObj.floor ? deptObj.floor.id : undefined;
3256
-      floorId && this.searchApplicationFloor('', floorId);
3264
+      buildingId && floorId && this.searchApplicationFloor('', floorId, buildingId);
3257
       this.incidentModel.houseNumber = deptObj.address;
3265
       this.incidentModel.houseNumber = deptObj.address;
3258
     }
3266
     }
3259
 
3267