From c0199b7b27837482f8bcb50f93847140ba689fd9 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 20 Sep 2023 15:06:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E7=AA=97=E5=AE=8C?= =?UTF-8?q?=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/AiDvRender.vue | 100 +++++++++++++++++++++++++++--------- ui/packages/tools/AiMap.vue | 10 ++-- 2 files changed, 80 insertions(+), 30 deletions(-) diff --git a/components/AiDvRender.vue b/components/AiDvRender.vue index 1cbbe6ae..9b3ca750 100644 --- a/components/AiDvRender.vue +++ b/components/AiDvRender.vue @@ -7,7 +7,8 @@ :title="data.title" :theme="theme" :border="data.border || ''"> - - - + + +
+
+
+
+ -
`, position: [e.lng, e.lat] }).on('click', () => { - if (!!e.openWin || e.infoWindowHtml) { - map.clearInfoWindow() - infoWin.setContent(e.infoWindowHtml ? `
${e.infoWindowHtml}
` : - [`
`, `${e.label}`, '
'].join('') - ) - infoWin.open(map, [e.lng, e.lat]) - } + this.mapDialog = true + this.$nextTick(() => { + this.$refs.mapInfoWin.innerHTML = e.infoWindowHtml || [`
`, `${e.label}`, '
'].join('') + map.setZoomAndCenter(18, [e.lng, e.lat]) + map.setPitch(60) + }) }) }) - this.data.is3d && map.setPitch(65) + this.data.is3d > 0 && map.setPitch(65) if (this.data.is3dAround == 1) { this.timer = setInterval(() => map?.setRotation(360, false, 16000)) } @@ -210,7 +224,7 @@ export default { diff --git a/ui/packages/tools/AiMap.vue b/ui/packages/tools/AiMap.vue index 6ca450cd..1ef241e3 100644 --- a/ui/packages/tools/AiMap.vue +++ b/ui/packages/tools/AiMap.vue @@ -2,6 +2,7 @@
+
@@ -25,11 +26,6 @@ export default { onlyShowArea: Boolean, satellite: Boolean }, - computed: { - viewMode() { - return this.is3d ? '3D' : '2D' - } - }, data() { return { amap: null, @@ -46,7 +42,7 @@ export default { }, methods: { initMap(c = 0) { - let {plugins, viewMode, mapStyle} = this + let {plugins, mapStyle} = this AMapLoader.load({ key: '54a02a43d9828a8f9cd4f26fe281e74e', version: '2.0', @@ -58,7 +54,7 @@ export default { if (this.$refs.amap) { this.amap = new AMap.Map(this.$refs.amap, { mapStyle, - viewMode, + viewMode: "3D", terrain: true, resizeEnable: true, skyColor: "#082243",