Browse Source

修改海域与集体上图出现的问题

lkk 1 năm trước cách đây
mục cha
commit
3c349b5eb8

+ 1 - 1
src/components/Query/clickQuery/CockpitVector.vue

@@ -85,7 +85,7 @@ export default {
     },
     viewer_flag(newVal) {
       if (newVal) {
-        viewer.dataSources.removeAll();
+        // viewer.dataSources.removeAll();
         store.state.vectordataid = 0
       }
     },

+ 3 - 4
src/views/cockpit/common/VectorSpace/BoxCommonVector.vue

@@ -405,16 +405,15 @@ export default {
     },
     watch: {
         cockpit_vector(newVal, oldVal) {
-            console.log('newVal: ', newVal);
             this.title = newVal.title
             this.word = newVal.word
-            if (newVal.tableData.length > 0) {
+            if (newVal.tableData && newVal.tableData.length > 0) {
 
                 this.active_dableData = newVal.tableData
                 this.tableData = newVal.tableData
                 this.init_vector()
 
-            } else {
+            } else if(this.title){
                 this.init_vector()
             }
             if (newVal.goitem) {
@@ -433,7 +432,7 @@ export default {
             viewer.dataSources.add(BoxCommonVector_entity);
 
         });
-    }
+    },
 
 };
 </script>

+ 2 - 0
src/views/cockpit/tdsy.vue

@@ -243,6 +243,8 @@ export default {
       store.setViewerFlagb(false);
       store.state.vectorData = arr;
       store.setActiveToolBar(9);
+      store.setCockpit_vector({
+        title: "",})
     },
     drawWktPloygon(item, itemColor, id) {
       let geom = {