diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue index 19333778..2678dcf0 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue @@ -176,6 +176,8 @@ export default { ], count: 0, + + trackAni: null, // 轨迹实例 } }, @@ -186,6 +188,7 @@ export default { }, beforeDestroy() { + console.log(this.trackAni, '轨迹实例--') this.map.clearOverlays() this.map.destroy() this.map = null @@ -209,13 +212,13 @@ export default { // 修改线的样式 polyline.setStrokeColor('#EA3323') // 线颜色 #EA3323 // polyline.setStrokeWeight(2) // 线宽 - let trackAni = new BMapGLLib.TrackAnimation(this.map, polyline, { + this.trackAni = new BMapGLLib.TrackAnimation(this.map, polyline, { overallView: true, // 动画完成后自动调整视野到总览 tilt: 30, // 轨迹播放的角度,默认为55 duration: 5000, // 动画持续时长,默认为10000,单位ms delay: 2000, // 动画开始的延迟,默认0,单位ms }) - trackAni.start() + this.trackAni.start() // 设置起点终点图标 this.triggerMovement() }, diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue index cf61c275..e664ca0d 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue @@ -135,6 +135,7 @@ @@ -151,13 +152,13 @@ label="设备类型" align="center" prop="deviceType" - :show-overflow-tooltip="true" + show-overflow-tooltip /> {{ parseTime(scope.row.createTime) }}--> - +