From e021bad79134d1df16bba2a304045cbb21e11af3 Mon Sep 17 00:00:00 2001 From: wx <645899409@qq.com> Date: Thu, 22 Jan 2026 14:48:32 +0800 Subject: [PATCH] =?UTF-8?q?update=201.=E4=BF=AE=E6=94=B9=E6=96=B0=E7=96=86?= =?UTF-8?q?=E5=BA=94=E6=80=A5=E5=9B=BE=E4=BE=8B=E7=AD=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/mapUtils/map.ts | 30 +++++++++++++++++++++++++----- src/views/indexSun.vue | 8 +++++++- src/views/indexSun/centerMap.vue | 12 ++++++++++++ src/views/indexSun/indexSun.ts | 9 +++++++++ 4 files changed, 53 insertions(+), 6 deletions(-) diff --git a/src/assets/mapUtils/map.ts b/src/assets/mapUtils/map.ts index 5087991..b654ed5 100644 --- a/src/assets/mapUtils/map.ts +++ b/src/assets/mapUtils/map.ts @@ -304,6 +304,7 @@ export const Map = { label: { content: isFunction(extData?.content) && extData?.content(result[i]), }, + zIndex: 99, ...extData?.extOption, }); arr.push(startMarker); @@ -460,6 +461,16 @@ export const Map = { }); this.infoWindow.open(this.map); }, + createEmerInfoModal({ option, content }, flag = true) { + let { latitude, longitude } = option; + this.infoWindow = new AMap.InfoWindow({ + position: [longitude, latitude], + offset: new AMap.Pixel(0, -8), + content: content, + closeWhenClickMap: flag, + }); + this.infoWindow.open(this.map); + }, clearInfoModal() { if (this.infoWindow) { this.infoWindow?.setMap(null); @@ -582,7 +593,7 @@ export const Map = { /** * @desc 创建应急人员Marker */ - createEmergencyMarker(option) { + createEmergencyMarker(option: any, isLabel = true, callback?: Callback) { this.clearEmergencyMarker(); const { sex, address, name, position } = option; const icon = sex == '1' ? female : male; @@ -590,15 +601,24 @@ export const Map = { position: position, icon: createIcon({ icon: watchIconR, iconSize: [80, 80], imageSize: [80, 80] }), offset: new AMap.Pixel(-40, -40), //设置偏移量 - label: { - content: `