wuxiang il y a 1 an
Parent
commit
01ac8212a9
1 fichiers modifiés avec 16 ajouts et 11 suppressions
  1. 16 11
      src/views/map/index.vue

+ 16 - 11
src/views/map/index.vue

@@ -692,7 +692,7 @@ export default {
       }
       for (let i = 0; i < redunit.length; i++) {
         let component = redunit[i].component_movementjson[redunit[i].component_movementjson.name]
-        this.markLocationbyJson(parseFloat(component.properties.launch_lat), parseFloat(component.properties.launch_lon), parseFloat(component.properties.launch_h), redunit[i].component_movementjson.name, "red")
+        this.markLocationbyJson(parseFloat(component.properties.launch_lat), parseFloat(component.properties.launch_lon), parseFloat(component.properties.launch_h), redunit[i].name, "red")
         let point1 = {
           longitude: parseFloat(component.properties.launch_lon),
           latitude: parseFloat(component.properties.launch_lat),
@@ -1294,7 +1294,7 @@ export default {
           }
         }
         this.thaadList[name] = {
-          range: 700000.0,
+          range: 300000.0,
           health: 100.0,
           id: this.id,
           fire_number: fire_number,
@@ -1317,7 +1317,7 @@ export default {
 
       if (type == 'blue') {
         console.log(' radar!!!');
-        const range = 700000;
+        const range = 300000;
         let entity2 = this.$data._viewer2D.entities.add({
           id: this.id,
           position: position,
@@ -1565,14 +1565,17 @@ export default {
       };
       await axios
         .post("/api/traj", this.jsonData, config).then(res => {
-          console.log('res :>> ', res);
-          let data = res.data[1].data[0]
+          console.log('res :>> ', res.data);
+          console.log('nameidlist :>> ', this.nameIdList);
+          let data = res.data[1].data[0];
           for (let key in data) {
-            let isSatellite = true
+           
+            let isSatellite = false
             //判断是否为卫星
-            for (let i = 0; i < this.nameIdList.length; i++) {
-              if (key === this.nameIdList[i].name || key === 'dateTime') {
-                isSatellite = false
+            for (let i = 0; i < this.jsonData.satellite.length; i++) {
+              
+              if (key == this.jsonData.satellite[i].name) {
+                isSatellite = true
                 break
               }
             }
@@ -1740,10 +1743,12 @@ export default {
       await axios
         .post("/api/pos", { simulation_time: newTimeString + '.000' }).then(res => {
           let data = res.data[1].data
- //恢复雷达拦截数量
- this.radarFireRecover()
+          //恢复雷达拦截数量
+          this.radarFireRecover()
           //依次更新每个模型位置
           for (let i = 0; i < this.nameIdList.length; i++) {
+            console.log(this.nameIdList[i].name)
+            console.log(data)
             if (this.nameIdList[i].name in data) {
               console.log(' 开始移动' + this.nameIdList[i].name);
               for(let j=0;j<this.redList.length;j++){