From 3694c8e94d290cf84f51779d9f2543301c9b57b3 Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Wed, 31 Jan 2024 14:16:33 +0800 Subject: [PATCH] =?UTF-8?q?task#10595,crm=E7=B3=BB=E7=BB=9F=E8=B7=B3?= =?UTF-8?q?=E8=BD=ACH5=E5=8A=A8=E6=80=81=E5=8F=96=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/caseList/caseAuditList.vue | 3 ++- src/views/caseList/caseDetail.vue | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/views/caseList/caseAuditList.vue b/src/views/caseList/caseAuditList.vue index 3f296276..2d3db980 100644 --- a/src/views/caseList/caseAuditList.vue +++ b/src/views/caseList/caseAuditList.vue @@ -53,7 +53,8 @@ export default { } }, created() { - this.id = this.$route.params.id; + const urlParams = new URLSearchParams(window.location.search); + this.id = this.$route.params.id || urlParams.get('id'); }, async mounted() { await this.batchOrderCount(); diff --git a/src/views/caseList/caseDetail.vue b/src/views/caseList/caseDetail.vue index a45fa5cb..0cd6fdfc 100644 --- a/src/views/caseList/caseDetail.vue +++ b/src/views/caseList/caseDetail.vue @@ -193,6 +193,11 @@ export default { imageSize: new AMap.Size(43, 43) // 图片的实际尺寸 }), }); + let infoWindow = new AMap.InfoWindow({ + content: this.detailInfo?.apointAddress, // 替换为实际的地址文本 + offset: new AMap.Pixel(0, -30) // 设置信息窗体的偏移量,使其显示在点的上方 + }); + infoWindow.open(this.map, [this.detailInfo?.apointLongtitude, this.detailInfo?.apointLongtitude]); this.map.add(marker); // 事发地,b点 let marker1 = new AMap.Marker({ @@ -203,6 +208,11 @@ export default { imageSize: new AMap.Size(43, 43) // 图片的实际尺寸 }) }); + let infoWindow1 = new AMap.InfoWindow({ + content: this.detailInfo?.bpointAddress, // 替换为实际的地址文本 + offset: new AMap.Pixel(0, -30) // 设置信息窗体的偏移量,使其显示在点的上方 + }); + infoWindow1.open(this.map, [this.detailInfo?.bpointLongtitude, this.detailInfo?.bpointLongtitude]); this.map.add(marker1); let marker2='' if(this.detailInfo.cpointLongtitude && this.detailInfo.cpointLatitude){ @@ -214,7 +224,12 @@ export default { imageSize: new AMap.Size(28, 28) // 图片的实际尺寸 }) }); - this.map.add(marker2); + let infoWindow2 = new AMap.InfoWindow({ + content: this.detailInfo?.cpointAddress, // 替换为实际的地址文本 + offset: new AMap.Pixel(0, -30) // 设置信息窗体的偏移量,使其显示在点的上方 + }); + infoWindow2.open(this.map, [this.detailInfo?.cpointLongtitude, this.detailInfo?.cpointLongtitude]); + this.map.add(marker2); } if(this.detailInfo.cpointLongtitude && this.detailInfo.cpointLatitude){ this.map.setFitView([marker,marker1,marker2])