Kaynağa Gözat

飞机轨迹问题

Rmengdi 3 hafta önce
ebeveyn
işleme
5955a5eead
1 değiştirilmiş dosya ile 8 ekleme ve 5 silme
  1. 8 5
      uavps-web/src/views/system/task/index.vue

+ 8 - 5
uavps-web/src/views/system/task/index.vue

@@ -357,7 +357,6 @@
             <el-input-number
               v-model="form.fixedMultiTargetFormation.targetTotal"
               :min="1"
-              :max="50"
               label="请输入飞机数量"
             ></el-input-number>
           </el-form-item>
@@ -1721,6 +1720,7 @@ export default {
             secondLng
           );
         }
+
         for (let i = 0; i < newData.length; i++) {
           const id = newData[i].aircraftNumber;
           const targetUav = this.targetDataR[`${id}`];
@@ -1783,14 +1783,17 @@ export default {
               label,
             });
           }
-
-          if (targetUav && this.cycleCount % this.updatePathFlag == 0) {
+        }
+        if (this.cycleCount % this.updatePathFlag == 0) {
+          for (let i = 0; i < newData.length; i++) {
+            const id = newData[i].aircraftNumber;
+            const targetUav = this.targetDataR[`${id}`];
             // 更新路径绘制
             this.updatePath(id, targetUav.x, targetUav.y);
           }
-
-          this.cycleCount++;
         }
+        this.cycleCount++;
+
         if (data.targetAircraft != null) {
           for (let i = 0; i < this.targetTotal; i++) {
             const id = targetData.aircrafts[i].aircraftNumber;