From b0648690b8d3b746eeca878be38fc7b4da5ffbe9 Mon Sep 17 00:00:00 2001
From: mayisheng <admin>
Date: Fri, 05 Aug 2022 09:22:08 +0800
Subject: [PATCH] 检查项目功能性问题及时进行改正
---
src/components/map/components/campusBuildingSearch.vue | 103 +++++++++++++---
src/components/orgNavBar/index.vue | 99 ++++++++++++----
src/components/searchDetails/index.vue | 127 ++++++++++++++++-----
3 files changed, 250 insertions(+), 79 deletions(-)
diff --git a/src/components/map/components/campusBuildingSearch.vue b/src/components/map/components/campusBuildingSearch.vue
index 92c6349..836ce86 100644
--- a/src/components/map/components/campusBuildingSearch.vue
+++ b/src/components/map/components/campusBuildingSearch.vue
@@ -115,12 +115,22 @@
// 校区内导航的显示关闭
'campusNavFlag',
'orgNavBarFlag',
- 'arcNavBarFlag'
+ 'arcNavBarFlag',
+ 'twoOrThree'
])
},
created () {
},
methods: {
+ coordinate (item) {
+ const arr = item.split(',')
+
+ return {
+ lng: arr[0],
+ lat: arr[1]
+ }
+ },
+
searchValueChange () {
if (this.searchInput == '') {
this.searchValList = []
@@ -217,6 +227,19 @@
loadPopup (param) {
var that = this
+ let obj = {}
+
+ if (param.x && param.x != '') {
+ const position = this.coordinate(param.x)
+ obj = {
+ lng: position.lng, lat: position.lat
+ }
+ } else {
+ obj = {
+ lng: param.longitude, lat: param.latitude
+ }
+ }
+
that.searchInput = ''
that.searchValList = []
that.searchValShow = false
@@ -227,14 +250,7 @@
this.$store.commit('SET_POPUPBGURL', imgArr[0])
this.$store.commit('SET_POPUPQRURL', param.codeurl)
- this.$store.commit('SET_POINTPOSITION', [
- Number(param.jd),
- Number(param.wd),
- Number(param.gd),
- Number(param.heading),
- Number(param.pitch),
- Number(param.roll)
- ])
+
this.$store.commit('SET_STATENAME', param.mechanismname)
this.$store.commit('SET_SITENAME', param.address)
this.$store.commit('SET_TELEPHONE', param.telephone)
@@ -260,25 +276,66 @@
this.$store.commit('SET_LIVELIST', [])
}
- this.newPopup(param)
- global.viewer.flyToPosition(
- new global.DC.Position(
- Number(param.jd),
- Number(param.wd),
- 300,
+ this.newPopup(param, obj)
+ if (this.twoOrThree == '三 维') {
+ this.$store.commit('SET_POINTPOSITION', [
+ Number(obj.lng),
+ Number(obj.lat),
+ Number(param.gd),
Number(param.heading),
Number(param.pitch),
Number(param.roll)
- ),
- () => { },
- 0.5
- )
+ ])
+
+ global.viewer.flyToPosition(
+ new global.DC.Position(
+ Number(obj.lng),
+ Number(obj.lat),
+ 300,
+ Number(param.heading),
+ Number(param.pitch),
+ Number(param.roll)
+ ),
+ () => { },
+ 0.5
+ )
+ } else {
+ this.$store.commit('SET_POINTPOSITION', [
+ Number(param.jd),
+ Number(param.wd),
+ Number(param.gd),
+ Number(param.heading),
+ Number(param.pitch),
+ Number(param.roll)
+ ])
+
+ global.viewer.flyToPosition(
+ new global.DC.Position(
+ Number(param.jd),
+ Number(param.wd),
+ 300,
+ Number(param.heading),
+ Number(param.pitch),
+ Number(param.roll)
+ ),
+ () => { },
+ 0.5
+ )
+ }
},
- newPopup (item) {
- const position = global.DC.Transform.transformWGS84ToCartesian(
- new global.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd))
- )
+ newPopup (item, obj) {
+ let position
+ if (this.twoOrThree == '三 维') {
+ position = global.DC.Transform.transformWGS84ToCartesian(
+ new global.DC.Position(Number(obj.lng), Number(obj.lat), Number(item.gd))
+ )
+ } else {
+ position = global.DC.Transform.transformWGS84ToCartesian(
+ new global.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd))
+ )
+ }
+
// eslint-disable-next-line no-unused-vars
var popup = new global.DC.DivForms(global.viewer, {
domId: 'divFormsDomBox',
diff --git a/src/components/orgNavBar/index.vue b/src/components/orgNavBar/index.vue
index e27987b..835aadf 100644
--- a/src/components/orgNavBar/index.vue
+++ b/src/components/orgNavBar/index.vue
@@ -157,20 +157,25 @@
},
mapPopup (item) {
+ let obj = {}
+
+ if (item.x && item.x != '') {
+ const position = this.coordinate(item.x)
+ obj = {
+ lng: position.lng, lat: position.lat
+ }
+ } else {
+ obj = {
+ lng: item.longitude, lat: item.latitude
+ }
+ }
+
this.$store.commit('CLEAR_ALL', null)
var imgArr = item.bgImg.split(',')
this.$store.commit('SET_POPUPBGURL', imgArr[0])
this.$store.commit('SET_POPUPQRURL', item.QRImg)
- 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)
this.$store.commit('SET_SITENAME', item.address)
this.$store.commit('SET_TELEPHONE', item.telephone)
@@ -180,29 +185,73 @@
this.$store.commit('SET_MONITORURL', item.videourl)
}
- this.newPopup(item)
- global.viewer.flyToPosition(
- new global.DC.Position(
- Number(item.longitude),
- Number(item.latitude),
- 300,
+ this.newPopup(item, obj)
+
+ if (this.twoOrThree == '三 维') {
+ this.$store.commit('SET_POINTPOSITION', [
+ Number(obj.lng),
+ Number(obj.lat),
+ Number(item.alt),
Number(item.heading),
Number(item.pitch),
Number(item.roll)
- ),
- function () { },
- 3
- )
- },
-
- newPopup (item) {
- const position = global.DC.Transform.transformWGS84ToCartesian(
- new global.DC.Position(
+ ])
+ global.viewer.flyToPosition(
+ new global.DC.Position(
+ Number(obj.lng),
+ Number(obj.lat),
+ 300,
+ Number(item.heading),
+ Number(item.pitch),
+ Number(item.roll)
+ ),
+ function () { },
+ 3
+ )
+ } else {
+ this.$store.commit('SET_POINTPOSITION', [
Number(item.longitude),
Number(item.latitude),
- Number(item.alt)
+ Number(item.alt),
+ Number(item.heading),
+ Number(item.pitch),
+ Number(item.roll)
+ ])
+ global.viewer.flyToPosition(
+ new global.DC.Position(
+ Number(item.longitude),
+ Number(item.latitude),
+ 300,
+ Number(item.heading),
+ Number(item.pitch),
+ Number(item.roll)
+ ),
+ function () { },
+ 3
)
- )
+ }
+ },
+
+ newPopup (item, obj) {
+ let position
+ if (this.twoOrThree == '三 维') {
+ position = global.DC.Transform.transformWGS84ToCartesian(
+ new global.DC.Position(
+ Number(obj.lng),
+ Number(obj.lat),
+ Number(item.alt)
+ )
+ )
+ } else {
+ position = global.DC.Transform.transformWGS84ToCartesian(
+ new global.DC.Position(
+ Number(item.longitude),
+ Number(item.latitude),
+ Number(item.alt)
+ )
+ )
+ }
+
// eslint-disable-next-line no-unused-vars
var popup = new global.DC.DivForms(global.viewer, {
domId: 'divFormsDomBox',
diff --git a/src/components/searchDetails/index.vue b/src/components/searchDetails/index.vue
index 11f2cc3..8036694 100644
--- a/src/components/searchDetails/index.vue
+++ b/src/components/searchDetails/index.vue
@@ -50,10 +50,20 @@
'introduceText',
// 全景地址
'panoramaUrl',
- 'searchPopupList'
+ 'searchPopupList',
+ 'twoOrThree'
])
},
methods: {
+ coordinate (item) {
+ const arr = item.split(',')
+
+ return {
+ lng: arr[0],
+ lat: arr[1]
+ }
+ },
+
move (e) {
const that = this
const odiv = this.$refs.searchNavBar // 获取目标元素
@@ -102,20 +112,25 @@
},
mapPopup (item) {
+ let obj = {}
+
+ if (item.x && item.x != '') {
+ const position = this.coordinate(item.x)
+ obj = {
+ lng: position.lng, lat: position.lat
+ }
+ } else {
+ obj = {
+ lng: item.longitude, lat: item.latitude
+ }
+ }
+
this.$store.commit('CLEAR_ALL', null)
var imgArr = item.tpurl.split(',')
this.$store.commit('SET_POPUPBGURL', imgArr[0])
this.$store.commit('SET_POPUPQRURL', item.codeurl)
- this.$store.commit('SET_POINTPOSITION', [
- Number(item.jd),
- Number(item.wd),
- Number(item.gd),
- Number(item.heading),
- Number(item.pitch),
- Number(item.roll)
- ])
this.$store.commit('SET_STATENAME', item.mechanismname)
this.$store.commit('SET_SITENAME', item.address)
this.$store.commit('SET_TELEPHONE', item.telephone)
@@ -139,32 +154,72 @@
this.$store.commit('SET_LIVELIST', [])
}
- this.newPopup(item)
- global.viewer.flyToPosition(
- new global.DC.Position(
- Number(item.jd),
- Number(item.wd),
- Number(300),
+ this.newPopup(item, obj)
+
+ if (this.twoOrThree == '三 维') {
+ this.$store.commit('SET_POINTPOSITION', [
+ Number(obj.lng),
+ Number(obj.lat),
+ Number(item.alt),
Number(item.heading),
Number(item.pitch),
Number(item.roll)
- ),
- function () { },
- 3
- )
+ ])
+ global.viewer.flyToPosition(
+ new global.DC.Position(
+ Number(obj.lng),
+ Number(obj.lat),
+ 300,
+ Number(item.heading),
+ Number(item.pitch),
+ Number(item.roll)
+ ),
+ function () { },
+ 3
+ )
+ } else {
+ this.$store.commit('SET_POINTPOSITION', [
+ Number(item.longitude),
+ Number(item.latitude),
+ Number(item.alt),
+ Number(item.heading),
+ Number(item.pitch),
+ Number(item.roll)
+ ])
+ global.viewer.flyToPosition(
+ new global.DC.Position(
+ Number(item.longitude),
+ Number(item.latitude),
+ 300,
+ Number(item.heading),
+ Number(item.pitch),
+ Number(item.roll)
+ ),
+ function () { },
+ 3
+ )
+ }
},
- newPopup (item) {
- const position = global.DC.Transform.transformWGS84ToCartesian(
- new global.DC.Position(
- Number(item.jd),
- Number(item.wd),
- Number(item.gd),
- Number(item.heading),
- Number(item.pitch),
- Number(item.roll)
+ newPopup (item, obj) {
+ let position
+ if (this.twoOrThree == '三 维') {
+ position = global.DC.Transform.transformWGS84ToCartesian(
+ new global.DC.Position(
+ Number(obj.lng),
+ Number(obj.lat),
+ Number(item.alt)
+ )
)
- )
+ } else {
+ position = global.DC.Transform.transformWGS84ToCartesian(
+ new global.DC.Position(
+ Number(item.longitude),
+ Number(item.latitude),
+ Number(item.alt)
+ )
+ )
+ }
// eslint-disable-next-line no-unused-vars
var popup = new global.DC.DivForms(global.viewer, {
domId: 'divFormsDomBox',
@@ -177,9 +232,19 @@
},
closeModel () {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
+ 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_SEARCHPOPUPLIST', [])
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+
+ this.$store.commit('SET_DETAILSPOPUP', false)
+ this.$store.commit('SET_PANORAMAPOPUP', false)
+ this.$store.commit('SET_MONITORPOPUP', false)
}
}
}
--
Gitblit v1.9.3