From f2570ef49457a6b5613e2e7d57410a0a3f514c8c Mon Sep 17 00:00:00 2001 From: wx <645899409@qq.com> Date: Tue, 23 Dec 2025 16:25:06 +0800 Subject: [PATCH] =?UTF-8?q?update=201.=E6=A0=B9=E6=8D=AE=E6=96=B0=E7=96=86?= =?UTF-8?q?=E5=8F=8D=E9=A6=88(12.22)=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=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 | 14 +++++++++ src/views/indexSun.vue | 20 +++++++++---- src/views/indexSun/centerMap.vue | 47 +++++++++++++++++++++++++++++++ src/views/indexSun/emerModal.vue | 3 +- src/views/indexSun/heartModal.vue | 2 +- src/views/indexSun/indexSun.ts | 5 ++-- src/views/indexSun/twoNewR.vue | 12 +++++--- 7 files changed, 89 insertions(+), 14 deletions(-) diff --git a/src/assets/mapUtils/map.ts b/src/assets/mapUtils/map.ts index 8e5db10..5087991 100644 --- a/src/assets/mapUtils/map.ts +++ b/src/assets/mapUtils/map.ts @@ -25,6 +25,8 @@ export const Map = { driving: null, walking: null, mapDriverOrWalkLoading: false, + layerGroup: null, + layerData: null, /** * @desc 地图舒适化 * @param el dom元素 id选择器 @@ -60,6 +62,18 @@ export const Map = { this.drawOutLine(); } }); + const satellite = new AMap.TileLayer.Satellite({ + zIndex: 11, + }); + + const roadNet = new AMap.TileLayer.RoadNet({ + zIndex: 12, + }); + this.layerData = { satellite, roadNet }; + this.layerGroup = new AMap.LayerGroup([satellite, roadNet]); + this.layerGroup.setMap(this.map); + satellite.hide(); + roadNet.hide(); resolve(); }); }); diff --git a/src/views/indexSun.vue b/src/views/indexSun.vue index 3d0a0c5..9c0004d 100644 --- a/src/views/indexSun.vue +++ b/src/views/indexSun.vue @@ -64,7 +64,7 @@ />
- +
@@ -99,7 +99,10 @@ + @@ -200,6 +203,7 @@ const showMapBottom = ref(false); const userData = ref({}); const centerMapRef = ref(); + const twoNewR = ref(); const otherLoading = ref(false); onMounted(() => { @@ -225,6 +229,10 @@ } }); + function openRBModal(item: any) { + twoNewR.value.handlePolice(item); + } + const getTime = () => { dateInfo.value = { day: dayjs().format('YYYY年MM月DD日'), @@ -238,7 +246,7 @@ } ); - async function forHelp(record: any) { + async function forHelp(record: any, showBottomInfo = true) { indexModalRef.value.closeDialog(); record['lat'] = record?.latitude; record['lon'] = record?.longitude; @@ -260,7 +268,7 @@ showRestB.value = false; userData.value = record; } - await confirmHelp(record); + await confirmHelp(record, showBottomInfo); } function toOther() { @@ -399,7 +407,7 @@ const hospitalList = ref([]); //医院列表 const showHospitalList = ref(false); - async function confirmHelp(data: any) { + async function confirmHelp(data: any, showBottomInfo = true) { showMapBottom.value = false; Map.driveLine && Map.driveLine.clear(); try { @@ -414,7 +422,7 @@ userData.value = data; if (!data.lon || !data.lat) { centerMapRef.value.newResetMap(); - showMapBottom.value = data?.emergencyType != 2; + showMapBottom.value = data?.emergencyType != 2 && showBottomInfo; return; } Map.removeOverlayGroup(); diff --git a/src/views/indexSun/centerMap.vue b/src/views/indexSun/centerMap.vue index daf437e..1353443 100644 --- a/src/views/indexSun/centerMap.vue +++ b/src/views/indexSun/centerMap.vue @@ -72,6 +72,14 @@
未获取到当前求助信息的位置信息
+ +
+ + 默认地图 + 卫星地图 + 标准地图 + +