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