maxiaoxiao 10 月之前
父節點
當前提交
1faf39c5e7
共有 1 個文件被更改,包括 7 次插入6 次删除
  1. 7 6
      src/views/cockpit/js/tdsy.js

+ 7 - 6
src/views/cockpit/js/tdsy.js

@@ -44,7 +44,7 @@ export function addLayer(obj) {
         })
     );
 }
-export const remove = () => {
+export const remove = (isreset) => {
     if (gy_jd_entity) {
         viewer.dataSources.remove(gy_jd_entity);
         gy_jd_entity = null
@@ -53,11 +53,12 @@ export const remove = () => {
         viewer.imageryLayers.remove(layer);
         layer = null
     }
-    store.setCockpit_vector({
-        title: "",
-        tableData: [],
-        columns: [],
-    })
+    if (isreset)
+        store.setCockpit_vector({
+            title: "",
+            tableData: [],
+            columns: [],
+        })
     // if (gy_jd_entity.entities) {
     //     gy_jd_entity.entities.values.forEach((res) => {
     //         if (res.name == type) {