Bladeren bron

bug修复

seimin 5 maanden geleden
bovenliggende
commit
6b4e6d81f0

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

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

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

@@ -94,7 +94,7 @@ export class IncidentSubstitutionAssignComponent implements OnInit {
94 94
     if(id === 1){
95 95
       // 人
96 96
       this.requiredConfigChange('userId', true);
97
-    }else if(id === 2){
97
+    }else{
98 98
       // 组
99 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 3052
           this.applicationBuildingList = data.list;
3053 3053
           if(buildingId){
3054 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 3071
   applicationFloorList:any[] = [];
3068
-  searchApplicationFloor(keyWord?, floorId?) {
3072
+  searchApplicationFloor(keyWord?, floorId?, buildingId?) {
3069 3073
     let postData = {
3070 3074
       idx: 0,
3071 3075
       sum: 9999,
3072 3076
       floor: {
3073
-        buildId: this.incidentModel.area || undefined,
3077
+        buildId: buildingId || this.incidentModel.area || undefined,
3074 3078
         hosId: this.incidentModel.hosId,
3075 3079
       },
3076 3080
     };
@@ -3083,7 +3087,11 @@ export class FuwutaiComponent implements OnInit {
3083 3087
           this.applicationFloorList = data.list;
3084 3088
           if(floorId){
3085 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 3261
       let buildingId = deptObj.building ? deptObj.building.id : undefined;
3254 3262
       buildingId && this.searchApplicationBuilding('', buildingId);
3255 3263
       let floorId = deptObj.floor ? deptObj.floor.id : undefined;
3256
-      floorId && this.searchApplicationFloor('', floorId);
3264
+      buildingId && floorId && this.searchApplicationFloor('', floorId, buildingId);
3257 3265
       this.incidentModel.houseNumber = deptObj.address;
3258 3266
     }
3259 3267