From fcf088a6f6c4117cc95b59b62e99b313db688a0a Mon Sep 17 00:00:00 2001 From: zhoulinf <2507241354@qq.com> Date: Thu, 21 Aug 2025 10:15:57 +0800 Subject: [PATCH] =?UTF-8?q?story#7074,=E5=9C=B0=E5=9B=BE=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E6=94=B9=E5=8A=A8=E4=B8=BA=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/report/addressMap.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/views/report/addressMap.vue b/src/views/report/addressMap.vue index d7c43b38..aedbc729 100644 --- a/src/views/report/addressMap.vue +++ b/src/views/report/addressMap.vue @@ -75,14 +75,13 @@ } let content = '
'; let activeObj = this.addressList[this.activeIndex]; - let lanLat = activeObj.location.split(','); this.marker = new AMap.Marker({ - position: new AMap.LngLat( lanLat[0], lanLat[1] ), + position: new AMap.LngLat( activeObj.location.lng, activeObj.location.lat ), content: content, offset: new AMap.Pixel(-13, -30) }); this.map.add(this.marker) - this.map.setCenter([lanLat[0], lanLat[1]]) + this.map.setCenter([activeObj.location.lng, activeObj.location.lat]) }, successHandler() { if( this.activeIndex == null ) { @@ -90,11 +89,10 @@ return } let activeObj = this.addressList[this.activeIndex]; - let lanLat = activeObj.location.split(','); let _tempObj = { startPoiAddress: activeObj?.address + activeObj?.name, - startLat: lanLat[0], - startLng: lanLat[1], + startLat: activeObj?.location?.lat, + startLng: activeObj?.location?.lng, adCode: activeObj?.adcode, } sessionStorage.setItem('reportAddress', JSON.stringify(_tempObj))