Переглянути джерело

隐藏显示后,查看两点距离bug

Rmengdi 1 день тому
батько
коміт
937a50a9ed
1 змінених файлів з 15 додано та 2 видалено
  1. 15 2
      uavps-web/src/views/system/task/index.vue

+ 15 - 2
uavps-web/src/views/system/task/index.vue

@@ -1342,7 +1342,12 @@ export default {
         secondLng = this.targetLblAry[`${val}`].longitude;
         secondLat = this.targetLblAry[`${val}`].latitude;
       }
-      this.calculateDistance(firstLng, firstLat, secondLng, secondLat);
+      this.airDistance = this.calculateDistance(
+        firstLat,
+        firstLng,
+        secondLat,
+        secondLng
+      );
     },
     /** 提交按钮 */
     submitForm() {
@@ -1692,6 +1697,11 @@ export default {
             }
           } else {
             this.addAir(newData[i], true);
+            const label = "目标无人机" + newData[i].aircraftNumber;
+            this.allSpriteInfo.push({
+              id: targetData.aircrafts[i].aircraftNumber,
+              label,
+            });
           }
 
           if (targetUav && this.cycleCount % this.updatePathFlag == 0) {
@@ -1937,7 +1947,6 @@ export default {
             if (item.parent) {
               item.parent.removeChild(item);
             }
-
             // 可选:销毁精灵并释放资源
             item.destroy();
             delete this.targetDataR[item.id];
@@ -1953,6 +1962,10 @@ export default {
             this.webSocket.send(msg);
 
             this.hideList.push(id);
+            let index = this.allSpriteInfo.findIndex((info) => {
+              return info.id == item.id;
+            });
+            this.allSpriteInfo.splice(index, 1);
           }
           // 只隐藏飞机,不隐藏轨迹
           if (!(item instanceof PIXI.Graphics)) {