dedsudiyu 2 년 전
부모
커밋
ede36995ee
1개의 변경된 파일27개의 추가작업 그리고 11개의 파일을 삭제
  1. 27 11
      src/views/newEvacuationBigData.vue

+ 27 - 11
src/views/newEvacuationBigData.vue

@@ -1755,22 +1755,38 @@
           for(let o=0;o<self.mapList.length;o++){
             if(self.mapList[o].type == 1){
               let num = 0;
+              let newData = {};
               for(let i=0;i<response.data.length;i++){
                 if(response.data[i].subId == self.mapList[o].subId){
-                  self.mapList[o].planType = true;
-                  for(let x=0;x<self.planMapList.length;x++){
-                    if(self.planMapList[x].subId == self.mapList[o].subId){
-                      self.planMapList[x].riskPlanTriggerTime = response.data[i].riskPlanTriggerTime;
-                      self.planMapList[x].riskAttribute = response.data[i].riskAttribute;
-                      self.planMapList[x].riskPlanLevel = response.data[i].riskPlanLevel;
-                      self.planMapList[x].riskPlanLevelName = response.data[i].riskPlanLevelName;
-                      self.planMapList[x].name = response.data[i].name;
-                      self.planMapList[x].planType = true;
-                    }
+                  num++
+                  newData = response.data[i];
+                }
+              }
+              if(num != 0){
+                self.mapList[o].planType = true;
+                for(let x=0;x<self.planMapList.length;x++){
+                  if(self.planMapList[x].subId == self.mapList[o].subId){
+                    self.planMapList[x].riskPlanTriggerTime = newData.riskPlanTriggerTime;
+                    self.planMapList[x].riskAttribute = newData.riskAttribute;
+                    self.planMapList[x].riskPlanLevel = newData.riskPlanLevel;
+                    self.planMapList[x].riskPlanLevelName = newData.riskPlanLevelName;
+                    self.planMapList[x].name = newData.name;
+                    self.planMapList[x].planType = true;
+                  }
+                }
+              }else{
+                self.mapList[o].planType = false;
+                for(let x=0;x<self.planMapList.length;x++){
+                  if(self.planMapList[x].subId == self.mapList[o].subId){
+                    self.planMapList[x].planType = false;
+                    self.planMapList[x].riskPlanTriggerTime = null;
+                    self.planMapList[x].riskAttribute = null;
+                    self.planMapList[x].riskPlanLevel = null;
+                    self.planMapList[x].riskPlanLevelName = null;
+                    self.planMapList[x].name = null;
                   }
                 }
               }
-              // self.mapList[o].planType = num != 0;
             }
           }
           //浮层实验室预案标记