Browse Source

驾驶舱二级页面定位飞入关闭后实体销毁

lkk 1 year ago
parent
commit
12d36b8c39
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/components/Query/clickQuery/CockpitVector.vue

+ 8 - 0
src/components/Query/clickQuery/CockpitVector.vue

@@ -66,6 +66,9 @@ export default {
     vectordataid() {
       return store.state.vectordataid;
     },
+    viewer_flag() {
+      return store.state.viewer_flag;
+    },
   },
   //监控data中的数据变化
   watch: {
@@ -78,6 +81,11 @@ export default {
         })
       },
     },
+    viewer_flag(newVal) {
+      if (newVal) {
+        viewer.dataSources.removeAll();
+      }
+    },
   },
   //方法集合
   methods: {