From 40eb75962a088c76a209647daac6ff46730c8691 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 10 Jul 2024 17:23:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../machinery/coding/component/MapDIalog.vue | 10 ++++++---- .../views/warehouseManage/machinery/coding/index.vue | 1 - 2 files changed, 6 insertions(+), 5 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 ab9bb469..ee27f634 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue @@ -84,7 +84,7 @@ export default { this.getEquipmentInfo() }, methods: { - handleQuery() { + async handleQuery() { console.log('🚀 ~ handleQuery ~ 查询:', this.queryForm.date) const params = { date: this.queryForm.date, @@ -92,10 +92,12 @@ export default { this.getEquipmentInfo(params) // 先销毁地图 再重新初始化 this.map.clearOverlays() - this.initMap() + this.map = null + await this.initMap() }, openMapDialog(val) { this.openMap = val + this.initMap() }, close() { this.openMap = false @@ -134,13 +136,13 @@ export default { let trackAni = new BMapGLLib.TrackAnimation(this.map, polyline, { overallView: true, // 动画完成后自动调整视野到总览 tilt: 30, // 轨迹播放的角度,默认为55 - duration: 10000, // 动画持续时长,默认为10000,单位ms + duration: 5000, // 动画持续时长,默认为10000,单位ms delay: 2000, // 动画开始的延迟,默认0,单位ms }) + trackAni.start() // 设置起点终点图标 this.triggerMovement() - trackAni.start() }) }, // 添加起点和终点的标记 diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue index fca24690..6f6987d9 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue @@ -837,7 +837,6 @@ export default { // 点击打开弹框 this.$refs.mapDialog.openMapDialog(true) this.$refs.mapDialog.getEquipmentInfo(params) - this.$refs.mapDialog.initMap() }, handlePush() { this.$modal