ソースを参照

驾驶舱开挖 ✔

王哲 2 ヶ月 前
コミット
12fe2404e6
2 ファイル変更12 行追加1 行削除
  1. 7 0
      src/views/SentryCockpit.vue
  2. 5 1
      src/views/SentryPage.vue

+ 7 - 0
src/views/SentryCockpit.vue

@@ -261,6 +261,12 @@
 
 		},
 		mounted() {
+		  this.$root.$on("clearAll", (data)=>{
+		    this.clearAll();
+		    if(data){
+		      console.log("data=", data);
+        }
+      });
       this.userStats();
       this.getPipeLengthByPressureLevel();
       this.jccdChart();
@@ -373,6 +379,7 @@
       },
       //清除
       clearAll() {
+        alert(666)
         this.$parent.$refs.supermap.closeMeasuringAll()
         this.$parent.$refs.supermap.closeExcavationAll()
         this.checkedCities = []

+ 5 - 1
src/views/SentryPage.vue

@@ -446,7 +446,11 @@
 				}
 			},
       jumpTo(path,idx){
-        if(idx != 2){
+        if(idx != 0){ // 驾驶舱
+          this.$root.$emit("clearAll", "data");
+          // this.$parents.$refs.SentryCockpit.clearAll();
+        }
+        if(idx != 2){ // 事件中心
           this.isEventDetails = false;
         }
         if(this.routerIdx == idx) return;