From 4593a5c6ef4549a519681fa44d94fa242d15bec4 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 30 Dec 2021 11:57:28 +0800
Subject: [PATCH] 完善
---
src/components/orgNavBar/index.vue | 35 +++++++++++++++++++++--------------
1 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/src/components/orgNavBar/index.vue b/src/components/orgNavBar/index.vue
index d8f67e1..106d5da 100644
--- a/src/components/orgNavBar/index.vue
+++ b/src/components/orgNavBar/index.vue
@@ -10,7 +10,7 @@
src="/img/icon/jg.png"
alt="">
<span>
- {{title}}
+ {{orgNavBarTitle}}
</span>
</div>
<img class="close"
@@ -20,7 +20,7 @@
</div>
<div class="content">
<ul>
- <li v-for="(item, index) in navList"
+ <li v-for="(item, index) in orgNavBarList"
:key="index"
@click="mapPopup(item)">
<img :src="item.icon"
@@ -46,14 +46,6 @@
DC: null
}
},
- props: {
- navList: {
- type: Array
- },
- title: {
- type: String
- }
- },
created () {
this.DC = global.DC
},
@@ -71,7 +63,9 @@
// 介绍
'introduceText',
// 全景地址
- 'panoramaUrl'
+ 'panoramaUrl',
+ 'orgNavBarList',
+ 'orgNavBarTitle'
])
},
methods: {
@@ -121,9 +115,7 @@
document.onmouseup = null
}
},
- closeModel () {
- this.$parent.closeModel()
- },
+
mapPopup (item) {
this.$store.commit('CLEAR_ALL', null)
@@ -146,6 +138,7 @@
3
)
},
+
newPopup (item) {
const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(Number(item.longitude), Number(item.latitude), Number(item.alt), Number(item.heading), Number(item.pitch), Number(item.roll)))
// eslint-disable-next-line no-unused-vars
@@ -158,6 +151,20 @@
this.$store.commit('SET_PANORAMAPOPUP', false)
this.$store.commit('SET_DETAILSPOPUP', true)
+ },
+
+ closeModel () {
+ var path = this.$route.path
+ if (path.indexOf('/orgnav') != -1) {
+ this.$store.dispatch('delVisitedViews', this.$route)
+ this.$router.push('/pcLayout/default')
+ }
+
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+
+ this.$store.commit('SET_ORGNAVBARLIST', [])
}
}
}
--
Gitblit v1.9.3