Selaa lähdekoodia

add remove all entities when exprt json

xyh 2 vuotta sitten
vanhempi
commit
73f6a8f7f2
1 muutettua tiedostoa jossa 15 lisäystä ja 0 poistoa
  1. 15 0
      src/views/situation/index.vue

+ 15 - 0
src/views/situation/index.vue

@@ -208,6 +208,21 @@ export default {
 
     },
     async getJson(row) {
+      this.viewer2D.entities.removeAll();
+      this.viewer3D.entities.removeAll();
+     const requestData = row
+     //发发送websockte请求
+    // if(this.websocket && this.websocket.readyState === WebSocket.OPEN){
+    //   console.log(' 发送请求');
+    //         this.websocket.send(JSON.stringify(requestData));
+    // }
+    //       else{
+    //         this.startWebSocket();
+    //         setTimeout(() => {
+    //           this.websocket.send(JSON.stringify(requestData));
+    //   }, 2000);
+
+    //       }
       let redunit = [];
       let blueunit = [];
       let satellite = [];