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])