Browse Source

距离整数,夹角两位小数

Rmengdi 2 tháng trước cách đây
mục cha
commit
e5e3c648ee
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      uavps-web/src/views/system/task/index.vue

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

@@ -1700,8 +1700,10 @@ export default {
                 newData[i].longitude,
                 0
               );
-              this.platformInfo.distance = returnData.distance.toFixed(7);
-              this.platformInfo.bearing = returnData.bearing.toFixed(7);
+              this.platformInfo.distance = Number(
+                returnData.distance.toFixed()
+              );
+              this.platformInfo.bearing = Number(returnData.bearing.toFixed(2));
               this.trackGraphicsLine.moveTo(
                 this.platformInfo.coordinateX,
                 this.platformInfo.coordinateY