liyg 2 年之前
父節點
當前提交
d6651cebe7
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7 4
      src/views/statisticalReport/components/salesLogisticsStatistics/mapTest.vue

+ 7 - 4
src/views/statisticalReport/components/salesLogisticsStatistics/mapTest.vue

@@ -413,9 +413,12 @@ export default {
     addIndex() {
       let that = this
       let increment = that.listPath[0].runPath.length * 0.1
-      that.pathNavigator.start(
-        (that.point + increment) % that.listPath[0].runPath.length
-      )
+      let result = that.point + increment
+      if(result < that.listPath[0].runPath.length){
+        that.pathNavigator.start(that.point + increment)
+      }else{
+        that.pathNavigator.start(that.listPath[0].runPath.length-1)
+      }
     },
     ///che
     navgControl() {},
@@ -693,7 +696,7 @@ export default {
         })
         // 创建巡航器
         that.pathNavigator = that.pathSimplifierIns.createPathNavigator(0, {
-          loop: true, // 是否循环
+          loop: false, // 是否循环
           speed: that.speed, // 速度(km/h)
           pathNavigatorStyle: {
             width: 20,