From b5f8881176bcb44928758e25d7d7a6fc140840c5 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 17 Dec 2021 15:06:23 +0800
Subject: [PATCH] 弹框完善
---
src/components/orgNavBar/index.vue | 30 ++++++++++++++++++++----------
1 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/src/components/orgNavBar/index.vue b/src/components/orgNavBar/index.vue
index 536a5e1..cc9b184 100644
--- a/src/components/orgNavBar/index.vue
+++ b/src/components/orgNavBar/index.vue
@@ -37,6 +37,9 @@
<script>
import { mapGetters } from 'vuex'
+
+var $ = window.$
+
export default {
name: 'OrgNavBar',
data () {
@@ -64,7 +67,13 @@
// 点信息
'pointPosition',
// 点名称
- 'stateName'
+ 'stateName',
+ // 地址
+ 'siteName',
+ // 介绍
+ 'introduceText',
+ // 全景地址
+ 'panoramaUrl'
])
},
methods: {
@@ -118,14 +127,15 @@
this.$parent.closeModel()
},
mapPopup (item) {
+ this.$store.commit('CLEAR_ALL', null)
+
this.$store.commit('SET_POPUPBGURL', item.bgImg)
this.$store.commit('SET_POPUPQRURL', item.QRImg)
- this.$store.commit('SET_POINTPOSITION', [item.longitude, item.latitude, item.alt, item.heading, item.pitch, item.roll])
+ this.$store.commit('SET_POINTPOSITION', [Number(item.longitude), Number(item.latitude), Number(item.alt), Number(item.heading), Number(item.pitch), Number(item.roll)])
this.$store.commit('SET_STATENAME', item.navTitle)
- console.log(this.popupBgUrl)
var that = this
- // item.alt, item.heading, item.pitch, item.roll
+
this.viewer.zoomToPosition(
new this.DC.Position(item.longitude, item.latitude, item.alt, item.heading, item.pitch, item.roll),
function () {
@@ -135,16 +145,16 @@
},
newPopup (item) {
const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(item.longitude, item.latitude, item.alt, item.heading, item.pitch, item.roll))
- // eslint-disable-next-line new-cap
- var popup = new this.DC.divForms(this.viewer, {
- domId: 'div1',
- title: item.navTitle,
- className: 'divForms-dom',
- content: document.getElementById('mapChildContent'),
+ // eslint-disable-next-line no-unused-vars
+ var popup = new this.DC.DivForms(this.viewer, {
+ domId: 'divFormsDomBox',
position: [
position
]
})
+
+ this.$store.commit('SET_PANORAMAPOPUP', false)
+ this.$store.commit('SET_DETAILSPOPUP', true)
}
}
}
--
Gitblit v1.9.3