From 7144398a5cdec5778e9ac4850350be8c48cc31ed Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 6 Aug 2024 14:37:24 +0800 Subject: [PATCH] =?UTF-8?q?iot=E5=9C=B0=E5=9B=BE=E6=A0=87=E7=82=B9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../machinery/coding/component/MapDIalog.vue | 7 ++++-- .../machinery/coding/index.vue | 22 +++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) 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) }}--> - +