dedsudiyu 2 vuotta sitten
vanhempi
commit
ce1ccc9714
2 muutettua tiedostoa jossa 17 lisäystä ja 29 poistoa
  1. 5 15
      src/layout/components/AppMain.vue
  2. 12 14
      src/views/newEvacuationBigData.vue

+ 5 - 15
src/layout/components/AppMain.vue

@@ -232,30 +232,20 @@ export default {
             this.$set(this,'closePlan',true);
           }
           this.$set(this,'textType',true);
-          for(let i=0;i<response.data.length;i++){
-            if(response.data[i].riskAttribute == '1'&&response.data[i].ifcheck != '1'){
-              this.$router.push({
-                path: "/emergencyManagement/evacuation/newPerformEvacuation",
-                query: {
-                  buildId: response.data[i].buildId,
-                  floorId:response.data[i].floorId,
-                  subId:response.data[i].subId,
-                  riskPlanId:response.data[i].riskPlanId,
-                }
-              })
-              return
-            }
-          }
           //没有火焰预案并且没有查看过
           for(let i=0;i<response.data.length;i++){
             if(response.data[i].riskAttribute != '1'&&response.data[i].ifcheck != '1'){
+              //如果就在应急预案页面责终止跳转
+              if(self.$route.path == '/emergencyManagement/evacuation/newPerformEvacuation'){
+                return
+              }
               this.$router.push({
                 path: "/emergencyManagement/evacuation/newPerformEvacuation",
                 query: {
                   buildId: response.data[i].buildId,
                   floorId:response.data[i].floorId,
                   subId:response.data[i].subId,
-                  riskPlanId:response.data[i].riskPlanId,
+                  groupId:response.data[i].groupId,
                 }
               })
               return

+ 12 - 14
src/views/newEvacuationBigData.vue

@@ -184,7 +184,7 @@
                   <p class="plan-title-p" :class="item.riskPlanLevel==1?'color-type-1':(item.riskPlanLevel==2?'color-type-2':(item.riskPlanLevel==3?'color-type-3':(item.riskPlanLevel==4?'color-type-4':'')))">{{item.riskPlanLevelName}}</p>
                   <p class="plan-text-p">{{item.name}}</p>
                 </div>
-                <p class="plan-button-p" v-if="item.riskAttribute == 1" @click="shadeButton(7,item.riskPlanId)">结束预案</p>
+                <p class="plan-button-p" v-if="item.riskAttribute == 1" @click="shadeButton(7,item.groupId)">结束预案</p>
               </div>
             </div>
           </div>
@@ -344,7 +344,7 @@
             <p>是否确认执行一键灭火</p>
             <p>该操作存在风险,请您务必确认实验室内人员已安全撤离</p>
           </div>
-          <div class="text-box" v-if="shadeType == 2 || shadeType == 3 || shadeType == 4">
+          <div class="text-box" v-if="shadeType == 2 || shadeType == 3 || shadeType == 4 || shadeType == 5">
             <p>{{shadeText}}</p>
             <p></p>
           </div>
@@ -429,6 +429,7 @@
            exitHazardTotal,getFireStatus,getFloorData,getBuildOrFloorList,
            executeEvacuation,endEvacuation,openLight,closeLight,getRedisEvacuation,
            outfirepc,isCancelOutFile,selectTriggerInfo,riskPlanId} from '@/api/evacuationBigData/index.js'
+  import { closeRiskPlan } from '@/api/bigData/index.js'
   export default {
     name: 'newEvacuationBigData',
     props:{
@@ -577,8 +578,8 @@
         this.$set(this,'floorId',parseInt(this.$route.query.floorId));
         this.$set(this,'subId',parseInt(this.$route.query.subId));
         this.$set(this,'checkSubId',parseInt(this.$route.query.subId));
-        if(this.$route.query.riskPlanId){
-          this.setRiskPlanId(this.$route.query.riskPlanId);
+        if(this.$route.query.groupId){
+          this.setRiskPlanId(this.$route.query.groupId);
         }
         this.$set(this,'planDataType',true);
         this.initialization();
@@ -599,10 +600,9 @@
       //标记当前查看的预案
       setRiskPlanId(id){
         let obj = {
-          riskPlanId:id,
+          groupId:id,
           ifcheck:1,
         };
-        console.log('riskPlanId',obj);
         riskPlanId(obj).then(response => {})
       },
       //初始化
@@ -729,19 +729,15 @@
             })
           }else if(this.shadeType == 5){
             //结束预案
-            let obj = {
-              buildId:this.buildingId,
-              floorId:this.floorId,
-            }
-            endEvacuation(obj).then(response => {
+            closeRiskPlan({id:this.checkRiskPlanId}).then(response => {
               this.$set(this,'shadeType',0);
-              this.getBuildingData();
-            })
+              this.selectTriggerInfo();
+            });
           }
         }else if(type == 6){
           this.$set(this,'shadeText','是否结束疏散?');
           this.$set(this,'shadeType',4);
-        }else if(type == 6){
+        }else if(type == 7){
           this.$set(this,'shadeText','是否结束预案?');
           this.$set(this,'checkRiskPlanId',text);
           this.$set(this,'shadeType',5);
@@ -1774,6 +1770,7 @@
                     self.planMapList[x].riskPlanLevel = newData.riskPlanLevel;
                     self.planMapList[x].riskPlanLevelName = newData.riskPlanLevelName;
                     self.planMapList[x].name = newData.name;
+                    self.planMapList[x].groupId = newData.groupId;
                     self.planMapList[x].planType = true;
                   }
                 }
@@ -1786,6 +1783,7 @@
                     self.planMapList[x].riskAttribute = null;
                     self.planMapList[x].riskPlanLevel = null;
                     self.planMapList[x].riskPlanLevelName = null;
+                    self.planMapList[x].groupId = null;
                     self.planMapList[x].name = null;
                   }
                 }