maxiaoxiao 11 месяцев назад
Родитель
Сommit
f66ab3a088

+ 13 - 10
src/components/Query/clickQuery/CockpitVector.vue

@@ -17,12 +17,11 @@
               item.name !== 'type' &&
               item.name !== 'create_time' &&
               item.name !== 'val1' &&
-              item.name !== 'val2'&&
+              item.name !== 'val2' &&
               item.name !== 'xmmc' &&
               item.name !== 'zlmj' &&
               item.name !== 'tzje' &&
-              item.name !== 'dataid' 
-
+              item.name !== 'dataid'
           )
         "
         style="width: 100%"
@@ -41,7 +40,11 @@
         >
         </el-table-column>
       </el-table>
-      <div id="seaTransferCharts" ref="echartsRef" v-if="store.state.vectordataid"></div>
+      <div
+        id="seaTransferCharts"
+        ref="echartsRef"
+        v-if="store.state.vectordataid"
+      ></div>
     </div>
   </div>
 </template>
@@ -80,15 +83,16 @@ export default {
       immediate: true,
       handler(newValue) {
         this.dataid = newValue;
-        this.$nextTick(()=>{
-          this.initChart();
-        })
+        if (newValue)
+          this.$nextTick(() => {
+            this.initChart();
+          });
       },
     },
     viewer_flag(newVal) {
       if (newVal) {
         // viewer.dataSources.removeAll();
-        store.state.vectordataid = 0
+        store.state.vectordataid = 0;
       }
     },
   },
@@ -317,8 +321,7 @@ export default {
   }, //生命周期 - 挂在完成
   beforeUpdate() {}, //生命周期 - 更新之前
   updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {
-  }, //生命周期 - 销毁之前
+  beforeDestroy() {}, //生命周期 - 销毁之前
   destroy() {}, //生命周期 - 销毁完成
   activated() {}, //若组件实例是 <KeepAlive> 缓存树的一部分,当组件被插入到 DOM 中时调用。
   deactivated() {}, //若组件实例是 <KeepAlive> 缓存树的一部分,当组件从 DOM 中被移除时调用。

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

@@ -194,7 +194,7 @@ export default {
     toggleVisibility() {
       this.removeMapLayerQuery();
       store.setToolBarAction(9);
-      tdsy.remove()
+      tdsy.remove(false)
       store.state.vectorData = [];
     },
     addGeometrys(fill) {