From 5c7c3cc18ce38ec6897808d63359cf774b958a30 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 31 Dec 2021 09:05:59 +0800
Subject: [PATCH] 冲突
---
src/components/map/components/dimension.vue | 309 ++++++++
src/pcviews/service/aed.vue | 22
public/img/icon/monitor.png | 0
src/pcviews/arc/venue.vue | 38
src/pcviews/arc/edifact.vue | 38
src/pcviews/service/medical.vue | 22
src/store/getters.js | 9
src/pcviews/arc/teaching.vue | 38
public/img/search/ofc.png | 0
src/pcLayout/index.vue | 3
src/pcviews/service/alleyway.vue | 22
src/pcviews/service/showers.vue | 22
src/components/map/index.vue | 184 ++--
src/components/serviceNavBar/index.vue | 4
src/pcviews/orgnav/teaching.vue | 43
src/pcviews/orgnav/rest.vue | 43
public/img/search/venue.png | 0
src/pcviews/orgnav/masses.vue | 43
src/pcviews/arc/culture.vue | 38
src/api/pc/public/search.js | 16
src/pcviews/orgnav/ofc.vue | 43
public/img/search/dorm.png | 0
src/pcviews/campusnavi/index.vue | 32
src/pcviews/service/service.vue | 20
src/components/arcNavBar/index.vue | 66 +
src/pcviews/arc/dorm.vue | 38
src/store/modules/search.js | 15
src/pcviews/service/bank.vue | 22
src/pcviews/orgnav/directly.vue | 43
src/pcviews/service/supermarket.vue | 22
src/pcviews/arc/rest.vue | 38
src/components/leftNav/index.vue | 4
src/styles/divforms/panoramaBox.scss | 56 +
src/components/map/components/mapPopup.vue | 106 ++
src/pcviews/service/park.vue | 22
src/components/map/components/campusBuildingSearch.vue | 371 +++++++++
src/components/orgNavBar/index.vue | 38
src/store/modules/popupParams.js | 17
src/pcviews/service/transfer.vue | 22
public/img/search/scenery.png | 0
src/pcviews/service/canteen.vue | 22
src/styles/divforms/popup.scss | 9
src/store/modules/mobile.js | 224 ++--
src/pcviews/service/copy.vue | 22
src/styles/pcpage/dc-ui.scss | 18
public/img/search/teach.png | 0
src/pcviews/arc/family.vue | 38
public/img/search/org.png | 0
src/pcviews/service/express.vue | 22
src/store/modules/viewer.js | 30
50 files changed, 1,814 insertions(+), 440 deletions(-)
diff --git a/public/img/icon/monitor.png b/public/img/icon/monitor.png
new file mode 100644
index 0000000..9133654
--- /dev/null
+++ b/public/img/icon/monitor.png
Binary files differ
diff --git a/public/img/search/dorm.png b/public/img/search/dorm.png
new file mode 100644
index 0000000..d440980
--- /dev/null
+++ b/public/img/search/dorm.png
Binary files differ
diff --git a/public/img/search/ofc.png b/public/img/search/ofc.png
new file mode 100644
index 0000000..c5ec2b5
--- /dev/null
+++ b/public/img/search/ofc.png
Binary files differ
diff --git a/public/img/search/org.png b/public/img/search/org.png
new file mode 100644
index 0000000..c218e36
--- /dev/null
+++ b/public/img/search/org.png
Binary files differ
diff --git a/public/img/search/scenery.png b/public/img/search/scenery.png
new file mode 100644
index 0000000..ea71448
--- /dev/null
+++ b/public/img/search/scenery.png
Binary files differ
diff --git a/public/img/search/teach.png b/public/img/search/teach.png
new file mode 100644
index 0000000..cda8f2f
--- /dev/null
+++ b/public/img/search/teach.png
Binary files differ
diff --git a/public/img/search/venue.png b/public/img/search/venue.png
new file mode 100644
index 0000000..c1c6ae3
--- /dev/null
+++ b/public/img/search/venue.png
Binary files differ
diff --git a/src/api/pc/public/search.js b/src/api/pc/public/search.js
new file mode 100644
index 0000000..8e7aac0
--- /dev/null
+++ b/src/api/pc/public/search.js
@@ -0,0 +1,16 @@
+/*
+ * @Author: Morpheus
+ * @Date: 2021-05-09 15:17:44
+ * @Last Modified by: Morpheus
+ * @Last Modified time: 2021-12-27 09:23:11
+ */
+// 校区
+import request from '@/router/axios'
+
+export const getSearchList = (params) => {
+ return request({
+ url: '/blade-architecture/architecture/selectLook',
+ method: 'get',
+ params: params
+ })
+}
diff --git a/src/components/arcNavBar/index.vue b/src/components/arcNavBar/index.vue
index 8ec562e..636466e 100644
--- a/src/components/arcNavBar/index.vue
+++ b/src/components/arcNavBar/index.vue
@@ -10,7 +10,7 @@
src="/img/icon/xyjz.png"
alt="">
<span>
- {{title}}
+ {{arcNavBarTitle}}
</span>
</div>
<img class="close"
@@ -53,16 +53,12 @@
return {
moveFlag: false,
itemNavList: [],
+ titleList: [],
DC: null
}
},
props: {
- title: {
- type: String
- },
- arcCode: {
- type: Number
- }
+
},
computed: {
...mapGetters([
@@ -78,23 +74,33 @@
// 介绍
'introduceText',
// 全景地址
- 'panoramaUrl'
+ 'panoramaUrl',
+ 'arcNavBarTitle',
+ 'arcNavBarCode'
])
},
created () {
this.DC = global.DC
- this.titleList = []
- getList().then(res => {
- res.data.data.forEach(item => {
- this.titleList.push({ title: item.dictValue, flag: false, key: item.dictKey })
- })
-
- this.titleList[0].flag = true
-
- this.getChilsNavs(this.titleList[0].key)
- })
},
mounted () {
+
+ },
+ watch: {
+ arcNavBarCode: {
+ immediate: true,
+ handler (newCode, oldCode) {
+ this.titleList = []
+ getList().then(res => {
+ res.data.data.forEach(item => {
+ this.titleList.push({ title: item.dictValue, flag: false, key: item.dictKey })
+ })
+
+ this.titleList[0].flag = true
+
+ this.getChilsNavs(this.titleList[0].key)
+ })
+ }
+ }
},
methods: {
move (e) {
@@ -143,9 +149,7 @@
document.onmouseup = null
}
},
- closeModel () {
- this.$parent.closeModel()
- },
+
topNavClick (item, index) {
this.titleList.forEach(item => {
item.flag = false
@@ -155,10 +159,11 @@
this.getChilsNavs(item.key)
},
+
getChilsNavs (campus) {
this.itemNavList = []
- getChildNavList({ campus: campus, type: this.arcCode }).then(res => {
+ getChildNavList({ campus: campus, type: this.arcNavBarCode }).then(res => {
res.data.data.forEach(item => {
this.itemNavList.push({
navTitle: item.mechanismname,
@@ -168,6 +173,7 @@
})
})
},
+
mapPopup (param) {
getChildNavDetail({ id: param.id }).then(res => {
var result = res.data.data[0].list
@@ -186,6 +192,9 @@
this.$store.commit('SET_INTRODUCETEXT', result.introduce)
this.$store.commit('SET_PANORAMAURL', result.panoramaurl)
this.$store.commit('SET_POPUPIMGATLAS', imgArr)
+ if (result.videourl && result.videourl != '') {
+ this.$store.commit('SET_MONITORURL', result.videourl)
+ }
if (res.data.data[0].jx != '') {
this.$store.commit('SET_TEACHLIST', tabOne)
} else {
@@ -207,6 +216,7 @@
)
})
},
+
newPopup (item) {
const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd), Number(item.heading), Number(item.pitch), Number(item.roll)))
// eslint-disable-next-line no-unused-vars
@@ -219,6 +229,18 @@
this.$store.commit('SET_PANORAMAPOPUP', false)
this.$store.commit('SET_DETAILSPOPUP', true)
+ },
+
+ closeModel () {
+ var path = this.$route.path
+ if (path.indexOf('/arc') != -1) {
+ this.$store.dispatch('delVisitedViews', this.$route)
+ this.$router.push('/pcLayout/default')
+ }
+
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
}
}
}
diff --git a/src/components/leftNav/index.vue b/src/components/leftNav/index.vue
index 4d134e8..a735ae6 100644
--- a/src/components/leftNav/index.vue
+++ b/src/components/leftNav/index.vue
@@ -275,8 +275,8 @@
<style scoped lang='scss'>
.left-nav {
position: fixed;
- top: 100px;
- right: 20px;
+ top: 160px;
+ right: 30px;
// bottom: 20px;
// left: 0;
z-index: 1;
diff --git a/src/components/map/components/campusBuildingSearch.vue b/src/components/map/components/campusBuildingSearch.vue
index bccc2f3..7c9e6c3 100644
--- a/src/components/map/components/campusBuildingSearch.vue
+++ b/src/components/map/components/campusBuildingSearch.vue
@@ -1,9 +1,12 @@
<template>
<div>
- <div class="map-campus-serarch">
+ <div class="map-campus-search"
+ id="CampusSearchPanel">
<el-input class="search-input"
placeholder="校园搜索…"
- v-model="input3">
+ v-model="searchInput"
+ @input="searchValueChange"
+ @focus="shortcutFlag = true">
</el-input>
<el-button-group>
<el-button @click="navigationShow"
@@ -13,22 +16,31 @@
type="primary"
icon="el-icon-my-search"></el-button>
</el-button-group>
- </div>
- <div class="map-campus-shortcut">
- <div class="shortcut-box">
+ <div v-show="searchValShow"
+ class="search-value-box">
<ul>
- <li><img src="" alt=""><span>党群机构</span></li>
- <li><img src="" alt=""><span></span></li>
- <li><img src="" alt=""><span></span></li>
- <li><img src="" alt=""><span></span></li>
- <li><img src="" alt=""><span></span></li>
- <li><img src="" alt=""><span></span></li>
- <li><img src="" alt=""><span></span></li>
- <li><img src="" alt=""><span></span></li>
- <li><img src="" alt=""><span></span></li>
+ <li v-for="(item, index) in searchValList"
+ :key="index"
+ @click="loadPopup(item)">
+ {{item.name}}
+ </li>
</ul>
</div>
-
+ <div class="map-campus-shortcut"
+ v-show="shortcutFlag">
+ <div class="shortcut-box">
+ <ul>
+ <li v-for="(item, index) in shortcutList"
+ :key="index">
+ <el-button @click="openModelPopup(item)">
+ <img :src="item.bgimg"
+ alt="">
+ <span>{{item.title}}</span>
+ </el-button>
+ </li>
+ </ul>
+ </div>
+ </div>
</div>
</div>
</template>
@@ -37,29 +49,242 @@
import { mapGetters } from 'vuex'
+import { getList } from '@/api/pc/orgnav/index'
+import { getSearchList } from '@/api/pc/public/search'
+
export default {
name: 'campusBuildingSearch',
data () {
return {
+ DC: null,
shortcutList: [
{
- bgimg: '/img/search/',
- span: '党群机构'
+ bgimg: '/img/search/org.png',
+ title: '党群机构',
+ type: 'orgnav',
+ path: '/pcLayout/default/orgnav/masses',
+ code: 1
+ },
+ {
+ bgimg: '/img/search/ofc.png',
+ title: '职能部处',
+ type: 'orgnav',
+ path: '/pcLayout/default/orgnav/ofc',
+ code: 2
+ },
+ {
+ bgimg: '/img/search/teach.png',
+ title: '教学科研',
+ type: 'arc',
+ path: '/pcLayout/default/arc/teaching',
+ code: 2
+ },
+ {
+ bgimg: '/img/search/venue.png',
+ title: '校内场馆',
+ type: 'arc',
+ path: '/pcLayout/default/arc/venue',
+ code: 3
+ },
+ {
+ bgimg: '/img/search/dorm.png',
+ title: '学生宿舍',
+ type: 'arc',
+ path: '/pcLayout/default/arc/dorm',
+ code: 4
+ },
+ {
+ bgimg: '/img/search/scenery.png',
+ title: '文化风景',
+ type: 'arc',
+ path: '/pcLayout/default/arc/culture',
+ code: 5
}
- ]
+ ],
+ shortcutFlag: false,
+ searchInput: '',
+ searchValShow: false,
+ searchValList: []
}
},
computed: {
...mapGetters([
+ 'viewer',
// 校内导航的显示关闭
- 'campusNavFlag'
+ 'campusNavFlag',
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
])
},
+ created () {
+ this.DC = global.DC
+ },
methods: {
+ searchValueChange () {
+ if (this.searchInput == '') {
+ this.searchValList = []
+ this.searchValShow = false
+ return
+ }
+ getSearchList({ mechanismName: this.searchInput }).then(res => {
+ if (res.data.data.length > 0) {
+ this.searchValList = res.data.data
+ this.searchValShow = true
+ }
+ })
+ },
+
navigationShow () {
if (this.campusNavFlag == false) {
this.$store.commit('SET_CAMPUSNAVFLAG', true)
}
+ },
+
+ openModelPopup (param) {
+ var list = []
+ if (this.$route.path.indexOf('/service') != -1) {
+ this.$store.dispatch('delVisitedViews', this.$route)
+ this.$router.push('/pcLayout/default')
+ }
+
+ if (param.type == 'orgnav') {
+ var path = this.$route.path
+ if (path.indexOf('/arc') != -1) {
+ this.$store.dispatch('delVisitedViews', this.$route)
+ this.$router.push('/pcLayout/default')
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+
+ this.$store.commit('SET_ORGNAVBARTITLE', param.title)
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+
+ this.$store.commit('SET_ORGNAVBARFLAG', true)
+
+ getList({ type: param.code }).then(res => {
+ res.data.data.records.forEach(item => {
+ list.push({
+ navTitle: item.mechanismname,
+ icon: '/img/navicon/tag.png',
+ longitude: item.jd,
+ latitude: item.wd,
+ alt: item.gd,
+ heading: item.heading,
+ pitch: item.pitch,
+ roll: item.roll,
+ bgImg: item.tpurl,
+ QRImg: item.codeurl,
+ address: item.address,
+ telephone: item.telephone,
+ introduce: item.introduce,
+ videourl: item.videourl
+ })
+ })
+
+ this.$store.commit('SET_ORGNAVBARLIST', list)
+ })
+ } else if (param.type == 'arc') {
+ if (this.$route.path.indexOf('/orgnav') != -1) {
+ this.$store.dispatch('delVisitedViews', this.$route)
+ this.$router.push('/pcLayout/default')
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+
+ this.$store.commit('SET_ARCNAVBARTITLE', param.title)
+ this.$store.commit('SET_ARCNAVBARCODE', param.code)
+ this.$store.commit('SET_ARCNAVBARFLAG', true)
+ }
+ },
+
+ shortcutShow (event) {
+ var sp = document.getElementById('CampusSearchPanel')
+
+ if (sp) {
+ if (!sp.contains(event.target)) { // 这句是说如果我们点击到了id为myPanel以外的区域
+ this.shortcutFlag = false
+ }
+ }
+ },
+
+ loadPopup (param) {
+ var that = this
+
+ that.searchInput = ''
+ that.searchValList = []
+ that.searchValShow = false
+
+ this.$store.commit('CLEAR_ALL', null)
+
+ var result = param.list
+
+ var imgArr = result.tpurl.split(',')
+ var tabOne = param.jx.split(',')
+ var tabTwo = param.sh.split(',')
+
+ this.$store.commit('SET_POPUPBGURL', imgArr[0])
+ this.$store.commit('SET_POPUPQRURL', result.codeurl)
+ this.$store.commit('SET_POINTPOSITION', [Number(result.jd), Number(result.wd), Number(result.gd), Number(result.heading), Number(result.pitch), Number(result.roll)])
+ this.$store.commit('SET_STATENAME', result.mechanismname)
+ this.$store.commit('SET_SITENAME', result.address)
+ this.$store.commit('SET_TELEPHONE', result.telephone)
+ this.$store.commit('SET_INTRODUCETEXT', result.introduce)
+ if (result.panoramaurl != '') {
+ this.$store.commit('SET_PANORAMAURL', result.panoramaurl)
+ }
+ if (result.videourl && result.videourl != '') {
+ this.$store.commit('SET_MONITORURL', result.videourl)
+ }
+ this.$store.commit('SET_POPUPIMGATLAS', imgArr)
+ if (param.jx != '') {
+ this.$store.commit('SET_TEACHLIST', tabOne)
+ } else {
+ this.$store.commit('SET_TEACHLIST', [])
+ }
+
+ if (param.sh != '') {
+ this.$store.commit('SET_LIVELIST', tabTwo)
+ } else {
+ this.$store.commit('SET_LIVELIST', [])
+ }
+
+ this.newPopup(result)
+ this.viewer.flyToPosition(
+ new this.DC.Position(Number(result.jd), Number(result.wd), 3000, Number(result.heading), Number(result.pitch), Number(result.roll)),
+ () => {
+
+ },
+ 3
+ )
+ },
+
+ newPopup (item) {
+ const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd), Number(item.heading), Number(item.pitch), Number(item.roll)))
+ // 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_MONITORPOPUP', false)
+ this.$store.commit('SET_DETAILSPOPUP', true)
}
}
@@ -67,7 +292,7 @@
</script>
<style lang='scss' scope>
-.map-campus-serarch {
+.map-campus-search {
position: fixed;
top: 100px;
left: 0;
@@ -75,19 +300,21 @@
bottom: auto;
margin: auto;
width: 320px;
- height: 40px;
+ min-height: 40px;
+ max-height: 360px;
+ height: auto;
z-index: 11;
border-radius: 5px;
- box-shadow: 0 0 10px 2px #666;
+ box-shadow: 0 0 14px 2px rgb(221, 221, 221);
.search-input {
float: left;
width: 240px;
+ height: 40px;
border-radius: 5px 0 0 5px;
input {
- border: none;
- border-right: 1px solid #dcdfe6;
+ box-sizing: border-box;
border-radius: 5px 0 0 5px;
}
}
@@ -98,11 +325,12 @@
.el-button {
margin: 0;
- position: relative;
+ padding: 0;
width: 40px;
- height: 40px;
+ height: 40px !important;
+ position: relative;
border-radius: 0;
- border: none;
+ border: 1px solid #dcdfe6;
i {
margin: auto;
@@ -114,9 +342,98 @@
}
}
+ .el-button:nth-child(1) {
+ border-left: none;
+ border-right: none;
+ }
+
.el-button:nth-child(2) {
+ border-left: none;
+ border-right: none;
border-radius: 0 5px 5px 0;
}
}
+
+ .search-value-box {
+ position: absolute;
+ top: 41px;
+ left: 0;
+ width: auto;
+ min-width: 240px;
+ max-height: 520px;
+ background: #fff;
+ overflow-y: auto;
+ box-shadow: 0 0 14px 2px rgb(221, 221, 221);
+ border-radius: 5px;
+
+ ul {
+ li {
+ padding-left: 20px;
+ height: 36px;
+ line-height: 36px;
+ cursor: pointer;
+ }
+
+ li:hover {
+ background: #f5f5f5;
+ }
+ }
+ }
+
+ .map-campus-shortcut {
+ margin-top: 20px;
+ width: 100%;
+ height: 320px;
+ background: #fff;
+ border-radius: 5px;
+
+ .shortcut-box {
+ padding-top: 36px;
+ ul {
+ display: flex;
+ width: 100%;
+ height: 120px;
+ justify-content: space-around;
+ flex-wrap: wrap;
+
+ li {
+ width: 84px;
+ height: 76px;
+
+ .el-button {
+ width: 80px;
+ height: 70px;
+ padding: 6px 12px;
+ background: #efefef;
+ border: none;
+ border-radius: 5px;
+ box-sizing: border-box;
+ text-align: center;
+
+ & > span {
+ width: auto;
+ height: auto;
+
+ img {
+ margin-top: 4px;
+ width: 26px;
+ height: 26px;
+ }
+
+ span {
+ display: block;
+ font-size: 14px;
+ line-height: 28px;
+ }
+ }
+ }
+
+ .el-button:focus {
+ border: 1px solid #000;
+ }
+ }
+ }
+ }
+ }
}
</style>
diff --git a/src/components/map/components/dimension.vue b/src/components/map/components/dimension.vue
new file mode 100644
index 0000000..0b7d024
--- /dev/null
+++ b/src/components/map/components/dimension.vue
@@ -0,0 +1,309 @@
+<template>
+ <div class="dimension-cut">
+ <el-radio-group v-model="dimensionValue"
+ size="medium"
+ @change="dimensionChange">
+ <el-radio-button label="3 维"></el-radio-button>
+ <el-radio-button label="2.5维"></el-radio-button>
+ </el-radio-group>
+ </div>
+</template>
+
+<script>
+
+import { mapGetters } from 'vuex'
+
+export default {
+ name: 'dimension',
+ data () {
+ return {
+ DC: null,
+ dimensionValue: '3 维',
+ newLayer: null,
+ provider: null,
+ wallLayer: null,
+ tileset: null,
+ tilesetLayer: null,
+ titlesetLayerFlag: false,
+ silhouetteBlue: null,
+ wallArr: [
+ [116.41526036, 27.95352217, 100],
+ [116.41128018, 27.95789328, 100],
+ [116.40246486, 27.96397110, 100],
+ [116.39728537, 27.96779573, 100],
+ [116.39588026, 27.96862679, 100],
+ [116.38903705, 27.97029865, 100],
+ [116.38872398, 27.97051829, 100],
+ [116.38892229, 27.97090120, 100],
+ [116.38906721, 27.97190632, 100],
+ [116.38706808, 27.97195638, 100],
+ [116.38649076, 27.97114448, 100],
+ [116.38214070, 27.97312735, 100],
+ [116.37876213, 27.97582549, 100],
+ [116.37851310, 27.97664153, 100],
+ [116.37634915, 27.98039526, 100],
+ [116.37439220, 27.98131916, 100],
+ [116.36995935, 27.97936074, 100],
+ [116.37217247, 27.97498147, 100],
+ [116.35099819, 27.97539586, 100],
+ [116.35103749, 27.98088050, 100],
+ [116.33972460, 27.97987911, 100],
+ [116.33950071, 27.97372028, 100],
+ [116.32313266, 27.97004136, 100],
+ [116.32606743, 27.95863979, 100],
+ [116.34788837, 27.92538024, 100],
+ [116.34566310, 27.92338627, 100],
+ [116.34874490, 27.91718915, 100],
+ [116.35311999, 27.91804451, 100],
+ [116.35109257, 27.92284807, 100],
+ [116.35975153, 27.92900526, 100],
+ [116.35660704, 27.93816236, 100],
+ [116.39585177, 27.93945304, 100],
+ [116.41526036, 27.95352217, 100]
+ ]
+ }
+ },
+ computed: {
+ ...mapGetters([
+ 'viewer',
+ // 校内导航的显示关闭
+ 'campusNavFlag',
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ created () {
+ this.DC = global.DC
+ },
+ watch: {
+ viewer: {
+ immediate: true,
+ handler (newCode, oldCode) {
+ if (this.titlesetLayerFlag == false && newCode != null) {
+ var that = this
+ that.tilesetLayer = new that.DC.TilesetLayer('tilesetLayer')
+ that.viewer.addLayer(that.tilesetLayer)
+ that.tileset = new that.DC.Tileset(
+ 'http://data.mars3d.cn/3dtiles/max-shihua/tileset.json',
+ {
+ luminanceAtZenith: 0.5
+ }
+ )
+ that.tilesetLayer.addOverlay(that.tileset)
+
+ that.silhouetteBlue = that.DC.Namespace.Cesium.PostProcessStageLibrary.createEdgeDetectionStage()
+ that.silhouetteBlue.uniforms.color = that.DC.Namespace.Cesium.Color.fromBytes(9, 162, 40)
+ that.silhouetteBlue.uniforms.length = 0.01
+ that.silhouetteBlue.selected = []
+
+ that.viewer.scene.postProcessStages.add(
+ that.DC.Namespace.Cesium.PostProcessStageLibrary.createSilhouetteStage([
+ that.silhouetteBlue
+ ])
+ )
+
+ var highlighted = {
+ feature: undefined,
+ originalColor: new that.DC.Namespace.Cesium.Color()
+ }
+
+ var selected = {
+ feature: undefined,
+ originalColor: new that.DC.Namespace.Cesium.Color()
+ }
+
+ that.tileset.on(that.DC.MouseEventType.CLICK, e => {
+ that.viewer.scene.globe.depthTestAgainstTerrain = false
+
+ that.$store.commit('CLEAR_ALL', null)
+
+ var imgArr = ['http://223.82.109.183:2081/zhxy/upload/20211222/f66dc4527eb4cc1b2d33fa3a5b345ed0.jpg']
+
+ that.$store.commit('SET_POPUPBGURL', imgArr[0])
+ that.$store.commit('SET_POPUPQRURL', 'http://223.82.109.183:2081/zhxy/upload/20211222/9c324adea5d9e5b50cd8f874d5f780f4.png')
+ that.$store.commit('SET_POINTPOSITION', [Number(e.wgs84Position.lng), Number(e.wgs84Position.lat), Number(e.wgs84Position.alt), Number(0), Number(0), Number(0)])
+ that.$store.commit('SET_STATENAME', e.overlay.attr.name)
+ that.$store.commit('SET_SITENAME', e.overlay.attr['地址'])
+ that.$store.commit('SET_POPUPIMGATLAS', imgArr)
+
+ // 定制化窗体
+ // eslint-disable-next-line no-unused-vars
+ var popup = new that.DC.DivForms(that.viewer, {
+ domId: 'divFormsDomBox',
+ position: [
+ that.DC.Transform.transformWGS84ToCartesian(new that.DC.Position(Number(e.wgs84Position.lng), Number(e.wgs84Position.lat), Number(e.wgs84Position.alt), Number(0), Number(0), Number(0)))
+ ]
+ })
+
+ that.$store.commit('SET_DETAILSPOPUP', true)
+ that.$store.commit('SET_PANORAMAPOPUP', false)
+ })
+
+ that.tileset.on(that.DC.MouseEventType.MOUSE_MOVE, e => {
+ that.silhouetteBlue.selected = []
+
+ if (that.DC.Namespace.Cesium.defined(highlighted.feature)) {
+ highlighted.feature.color = highlighted.originalColor
+ highlighted.feature = undefined
+ }
+
+ if (e.feature !== selected.feature) {
+ that.silhouetteBlue.selected = [e.feature]
+
+ highlighted.feature = e.feature
+
+ that.DC.Namespace.Cesium.Color.clone(
+ e.feature.color,
+ highlighted.originalColor
+ )
+ e.feature.color = that.DC.Namespace.Cesium.Color.fromBytes(155, 255, 175)
+ }
+ })
+
+ var provider = new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+ url: 'http://www.tdtfz.com/OneMapServer/rest/services/fzsw2019/MapServer/WMTS/tile/1.0.0/fzsw2019/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}',
+ layer: 'fzsw2019',
+ style: 'default',
+ tileMatrixSetID: 'default028mm',
+ format: 'image/jpgpng',
+ tilingScheme: new that.DC.Namespace.Cesium.GeographicTilingScheme(),
+ maximumLevel: 19,
+ tileMatrixLabels: [
+ '0',
+ '1',
+ '2',
+ '3',
+ '4',
+ '5',
+ '6',
+ '7',
+ '8',
+ '9',
+ '10',
+ '11',
+ '12',
+ '13',
+ '14',
+ '15',
+ '16',
+ '17',
+ '18',
+ '19'
+ ]
+ })
+ that.newLayer = that.viewer.imageryLayers.addImageryProvider(provider)
+
+ that.wallLayer = new that.DC.VectorLayer('wallLayer')
+ that.viewer.addLayer(that.wallLayer)
+
+ that.wallArr.forEach(item => {
+ item = item.join(',')
+ })
+ that.wallArr = that.wallArr.join(';')
+ const wall = new that.DC.Wall(
+ that.wallArr
+ )
+ wall.setStyle({
+ material: new that.DC.WallTrailMaterialProperty({
+ color: that.DC.Namespace.Cesium.Color.fromBytes(0, 142, 255, 150),
+ // color: that.DC.Color.CYAN,
+ speed: 10
+ })
+ })
+ that.wallLayer.addOverlay(wall)
+
+ that.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(116.36618337, 27.95911915, 1000.0),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0
+ }
+ })
+
+ this.tilesetLayer.show = false
+ this.titlesetLayerFlag = true
+ }
+ }
+ }
+ },
+ methods: {
+ dimensionChange () {
+ var that = this
+ if (that.dimensionValue == '3 维') {
+ that.wallLayer.show = false
+ that.viewer.imageryLayers.remove(that.newLayer)
+ that.newLayer = null
+ that.silhouetteBlue.selected = []
+ that.tilesetLayer.show = true
+ that.viewer.flyTo(that.tileset)
+ } else {
+ that.tilesetLayer.show = false
+ var provider = new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+ url: 'http://www.tdtfz.com/OneMapServer/rest/services/fzsw2019/MapServer/WMTS/tile/1.0.0/fzsw2019/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}',
+ layer: 'fzsw2019',
+ style: 'default',
+ tileMatrixSetID: 'default028mm',
+ format: 'image/jpgpng',
+ tilingScheme: new that.DC.Namespace.Cesium.GeographicTilingScheme(),
+ maximumLevel: 19,
+ tileMatrixLabels: [
+ '0',
+ '1',
+ '2',
+ '3',
+ '4',
+ '5',
+ '6',
+ '7',
+ '8',
+ '9',
+ '10',
+ '11',
+ '12',
+ '13',
+ '14',
+ '15',
+ '16',
+ '17',
+ '18',
+ '19'
+ ]
+ })
+ that.newLayer = that.viewer.imageryLayers.addImageryProvider(provider)
+
+ that.wallLayer.show = true
+
+ that.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(116.36618337, 27.95911915, 1000.0),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0
+ }
+ })
+ }
+ }
+ }
+
+}
+</script>
+
+<style lang='scss' scope>
+.dimension-cut {
+ position: fixed;
+ top: 100px;
+ right: 10px;
+ width: auto;
+ // height: 40px;
+ z-index: 1;
+}
+</style>
diff --git a/src/components/map/components/mapPopup.vue b/src/components/map/components/mapPopup.vue
index 44b37ca..10d7f4c 100644
--- a/src/components/map/components/mapPopup.vue
+++ b/src/components/map/components/mapPopup.vue
@@ -72,6 +72,11 @@
<i class="popup-icon live-action-nav deblurring"></i>
实景
</li>
+ <li v-show="panoramaUrl != null && panoramaUrl != ''"
+ @click="monitorClick">
+ <i class="popup-icon monitor-nav deblurring"></i>
+ 监控
+ </li>
</ul>
</div>
<div v-show="teachList.length > 0 || liveList.length > 0"
@@ -85,7 +90,7 @@
@click="tabBtnClick('生活服务')">生活服务</li>
</ul>
<div class="btm-content">
- <div class="on">
+ <div :class="{'on': tabBtnFlag == '教学科研行政'}">
<ul>
<li v-for="(item, index) in teachList"
:key="index"
@@ -95,11 +100,11 @@
</li>
</ul>
</div>
- <div>
+ <div :class="{'on': tabBtnFlag == '生活服务'}">
<ul>
<li v-for="(item, index) in liveList"
:key="index"
- @click="mechanismDetailPopup(1, item)">>
+ @click="mechanismDetailPopup(1, item)">
<i class="popup-icon location-icon deblurring"></i>
{{item}}
</li>
@@ -118,6 +123,7 @@
</div>
</div>
</div>
+
<div v-if="panoramaPopup"
class="panorama-dom"
id="PanoramaBox">
@@ -142,11 +148,39 @@
</div>
</div>
</div>
+
+ <div v-if="monitorPopup"
+ class="monitor-dom"
+ id="MonitorBox">
+ <div style="width: 100%; height: 100%;">
+ <div class="monitor-container">
+ <div class="monitor-wrap">
+ <div class="content-wrap">
+ <div class="title">
+ {{stateName}}
+ <img @click="closeMonitorPopupBox"
+ class="close-box"
+ src="/img/navicon/close.png"
+ alt="">
+ </div>
+ <div class="content">
+ <video :src="monitorUrl"
+ controls
+ autoplay></video>
+ </div>
+ </div>
+ </div>
+ <div class="arrow"></div>
+ </div>
+ </div>
+ </div>
</div>
<!-- 二维码弹框相关 -->
<el-dialog title="场景二维码"
:visible.sync="QRCodeFlag"
+ :modal="false"
+ :modal-append-to-body="false"
width='44%'>
<div style="margin: 0; position: relative; width: 100%; height: 352px;">
<img width="260"
@@ -175,7 +209,6 @@
style="position: fixed; left: 111111111px;"
v-html="audioSource"
@ended="overAudio">
-
</audio>
</div>
</template>
@@ -214,12 +247,16 @@
'telephone',
// 介绍
'introduceText',
- // 全景地址
- 'panoramaUrl',
// 详情弹框显示关闭
'detailsPopup',
+ // 全景地址
+ 'panoramaUrl',
// 全景弹框显示关闭
'panoramaPopup',
+ // 监控地址
+ 'monitorUrl',
+ // 监控弹框显示关闭
+ 'monitorPopup',
'popupImgAtlas',
// 教学
@@ -234,9 +271,28 @@
this.DC = global.DC
},
watch: {
- introduceText: function (newQuestion, oldQuestion) {
- var zhText = encodeURI(newQuestion)
- this.audioSource = `<source src="http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=4&text=${zhText}" type="audio/mpeg"><embed height="0" width="0" src="http://tts.baidu.com/text2audio?text=${zhText}">`
+ introduceText: {
+ immediate: true,
+ handler (newQuestion, oldQuestion) {
+ var zhText = encodeURI(newQuestion)
+ this.audioSource = `<source src="http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=4&text=${zhText}" type="audio/mpeg"><embed height="0" width="0" src="http://tts.baidu.com/text2audio?text=${zhText}">`
+ }
+ },
+ teachList: {
+ immediate: true,
+ handler (newCode, oldCode) {
+ if (newCode.length > 0) {
+ this.tabBtnFlag = '教学科研行政'
+ }
+ }
+ },
+ liveList: {
+ immediate: true,
+ handler (newCode, oldCode) {
+ if (newCode.length > 0 && this.teachList.length == 0) {
+ this.tabBtnFlag = '生活服务'
+ }
+ }
}
},
methods: {
@@ -279,8 +335,30 @@
positions
]
})
+
this.$store.commit('SET_DETAILSPOPUP', false)
+ this.$store.commit('SET_MONITORPOPUP', false)
this.$store.commit('SET_PANORAMAPOPUP', true)
+ },
+
+ monitorClick () {
+ if (this.audioFlag == true) {
+ this.$refs.audioControlPlay.pause()
+ this.audioFlag = false
+ }
+ // eslint-disable-next-line new-cap
+ var positions = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position.fromArray(this.pointPosition))
+ this.viewer.scene.globe.depthTestAgainstTerrain = false
+ // eslint-disable-next-line no-unused-vars
+ var monitor = new this.DC.PanoramaBox(this.viewer, {
+ domId: 'MonitorBox',
+ position: [
+ positions
+ ]
+ })
+ this.$store.commit('SET_PANORAMAPOPUP', false)
+ this.$store.commit('SET_DETAILSPOPUP', false)
+ this.$store.commit('SET_MONITORPOPUP', true)
},
closeMapPopupBox () {
@@ -295,6 +373,11 @@
closePanoramaPopupBox () {
this.$store.commit('SET_PANORAMAURL', '')
this.$store.commit('SET_PANORAMAPOPUP', false)
+ },
+
+ closeMonitorPopupBox () {
+ this.$store.commit('SET_MONITORURL', '')
+ this.$store.commit('SET_MONITORPOPUP', false)
},
audioPlay () {
@@ -320,7 +403,6 @@
mechanismDetailPopup (num, param) {
getMechanismDetail({ num: num, mechanismName: param }).then(res => {
- console.log(res)
var result = res.data.data
this.$store.commit('CLEAR_ALL', null)
@@ -335,6 +417,10 @@
this.$store.commit('SET_INTRODUCETEXT', result.introduce)
this.$store.commit('SET_POPUPIMGATLAS', imgArr)
+ if (result.videourl && result.videourl != '') {
+ this.$store.commit('SET_MONITORURL', result.videourl)
+ }
+
this.newPopup(result)
this.viewer.flyToPosition(
new this.DC.Position(Number(result.jd), Number(result.wd), 3000, Number(result.heading), Number(result.pitch), Number(result.roll)),
diff --git a/src/components/map/index.vue b/src/components/map/index.vue
index 20e9a18..35d8883 100644
--- a/src/components/map/index.vue
+++ b/src/components/map/index.vue
@@ -1,16 +1,22 @@
/* eslint-disable camelcase */
<template>
<div id="viewer-container"
- style="height: 100%; width: 100%;">
+ style="height: 100%; width: 100%;"
+ @click="mapClick($event)">
+
+ <dimension />
<left-nav ref="leftNav"></left-nav>
<mapPopup />
- <campusBuildingSearch />
+ <campusBuildingSearch ref="campusBuildingSearch" />
<campusNav ref="campusNavRoute"
v-show="campusNavFlag" />
+
+ <org-nav-bar v-if="orgNavBarFlag"></org-nav-bar>
+ <arc-nav-bar v-if="arcNavBarFlag"></arc-nav-bar>
</div>
</template>
<script>
@@ -18,12 +24,14 @@
import { mapGetters } from 'vuex'
import mapPopup from './components/mapPopup.vue'
import campusBuildingSearch from './components/campusBuildingSearch.vue'
+import dimension from './components/dimension.vue'
export default {
name: 'mapBox',
components: {
mapPopup,
- campusBuildingSearch
+ campusBuildingSearch,
+ dimension
},
data () {
return {
@@ -54,7 +62,9 @@
// 全景弹框显示关闭
'panoramaPopup',
// 校内导航的显示关闭
- 'campusNavFlag'
+ 'campusNavFlag',
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
])
},
mounted () {
@@ -118,10 +128,6 @@
viewer.measure.deactivate()
}
- function gotoModel () {
- viewer.flyTo(tileset)
- }
-
function initViewer () {
viewer = new that.DC.Viewer('viewer-container', {
contextOptions: {
@@ -134,22 +140,83 @@
that.$store.commit('SET_VIEWER', viewer)
+ viewer.on(that.DC.SceneEventType.CAMERA_CHANGED, (e) => {
+ const height = Math.ceil(viewer.camera.positionCartographic.height)
+
+ if (height < 100) {
+ viewer.camera.setView({
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(viewer.camera.positionCartographic.longitude, viewer.camera.positionCartographic.latitude, 100),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0
+ }
+ })
+ };
+ if (height > 600000) {
+ viewer.camera.setView({
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(viewer.camera.positionCartographic.longitude, viewer.camera.positionCartographic.latitude, 600000),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0
+ }
+ })
+ }
+ })
+
+ // 最小
+ viewer.scene.screenSpaceCameraController.minimumZoomDistance = 500
+ // 最大
+ viewer.scene.screenSpaceCameraController.maximumZoomDistance = 600000
+ // 设置相机缩小时的速率
+ viewer.scene.screenSpaceCameraController._minimumZoomRate = 30000
+ // 设置相机放大时的速率
+ viewer.scene.screenSpaceCameraController._maximumZoomRate = 5906376272000
+ // 视角平移
+ viewer.scene.screenSpaceCameraController.enableRotate = true
+ // 视角缩放
+ viewer.scene.screenSpaceCameraController.enableZoom = true
+ // 视角旋转
+ viewer.scene.screenSpaceCameraController.enableTilt = false
+
that.$refs.leftNav.initialize(viewer)
- const popup = viewer.popup
+ // const baselayer = that.DC.ImageryLayerFactory.createImageryLayer(that.DC.ImageryType.XYZ, {
+ // url: 'https://webmap-tile.sf-express.com/MapTileService/rt?x={col}&y={row}&z={level}'
+ // // url: 'https://webmap-tile.sf-express.com/MapTileService/rt?fetchtype=static&x={x}&y={y}&z={z}&project=sfmap&pic_size=256&pic_type=png8&data_name=361100&data_format=merged-dat&data_type=normal' // 行政区划
- popup.hide()
+ // })
- const baselayer = that.DC.ImageryLayerFactory.createImageryLayer(that.DC.ImageryType.XYZ, {
- // url: 'https://webmap-tile.sf-express.com/MapTileService/rt?x={col}&y={row}&z={level}'
+ const baselayer = that.DC.ImageryLayerFactory.createAmapImageryLayer(
+ {
+ crs: 'WGS84'
+ }
+ )
- url: 'https://webmap-tile.sf-express.com/MapTileService/rt?fetchtype=static&x={x}&y={y}&z={z}&project=sfmap&pic_size=256&pic_type=png8&data_name=361100&data_format=merged-dat&data_type=normal' // 行政区划
-
+ const arcgisLayer = that.DC.ImageryLayerFactory.createArcGisImageryLayer({
+ url: 'http://59.55.128.156:6080/arcgis/rest/services/fzhl/MapServer'
})
+
viewer.addBaseLayer(baselayer, {
- iconUrl: 'examples/images/icon/img.png',
name: '影像'
})
+
+ viewer.imageryLayers.addImageryProvider(arcgisLayer)
+
+ // viewer.addBaseLayer(baselayer, {
+ // iconUrl: 'examples/images/icon/img.png',
+ // name: '影像'
+ // })
+
+ // viewer.addBaseLayer(wmtslayer, {
+ // iconUrl: 'examples/images/icon/img.png',
+ // name: '影像'
+ // })
// // eslint-disable-next-line camelcase
// const baselayer_shaded = that.DC.ImageryLayerFactory.createArcGisImageryLayer({
@@ -181,80 +248,7 @@
// name: '地形'
// })
- const tilesetLayer = new that.DC.TilesetLayer('tilesetLayer')
- viewer.addLayer(tilesetLayer)
- const tileset = new that.DC.Tileset(
- 'http://data.mars3d.cn/3dtiles/max-shihua/tileset.json',
- {
- luminanceAtZenith: 0.5
- }
- )
- tilesetLayer.addOverlay(tileset)
- setTimeout(() => {
- viewer.flyTo(tileset)
- }, 1500)
- tileset.on(that.DC.MouseEventType.CLICK, e => {
- viewer.scene.globe.depthTestAgainstTerrain = false
-
- that.$store.commit('CLEAR_ALL', null)
-
- var imgArr = ['http://223.82.109.183:2081/zhxy/upload/20211222/f66dc4527eb4cc1b2d33fa3a5b345ed0.jpg']
-
- that.$store.commit('SET_POPUPBGURL', imgArr[0])
- that.$store.commit('SET_POPUPQRURL', 'http://223.82.109.183:2081/zhxy/upload/20211222/9c324adea5d9e5b50cd8f874d5f780f4.png')
- that.$store.commit('SET_POINTPOSITION', [Number(e.wgs84Position.lng), Number(e.wgs84Position.lat), Number(e.wgs84Position.alt), Number(0), Number(0), Number(0)])
- that.$store.commit('SET_STATENAME', e.overlay.attr.name)
- that.$store.commit('SET_SITENAME', e.overlay.attr['地址'])
- that.$store.commit('SET_POPUPIMGATLAS', imgArr)
-
- // 定制化窗体
- // eslint-disable-next-line no-unused-vars
- var popup = new that.DC.DivForms(viewer, {
- domId: 'divFormsDomBox',
- position: [
- that.DC.Transform.transformWGS84ToCartesian(new that.DC.Position(Number(e.wgs84Position.lng), Number(e.wgs84Position.lat), Number(e.wgs84Position.alt), Number(0), Number(0), Number(0)))
- ]
- })
-
- that.$store.commit('SET_DETAILSPOPUP', true)
- that.$store.commit('SET_PANORAMAPOPUP', false)
- })
-
- const wallLayer = new that.DC.VectorLayer('wallLayer')
- viewer.addLayer(wallLayer)
- var arr = [
- [115.87597219, 28.74628526, 100],
- [115.87556558, 28.74415792, 100],
- [115.87459782, 28.74197687, 100],
- [115.87371834, 28.74219927, 100],
- [115.87210924, 28.74182217, 100],
- [115.86469971, 28.73630725, 100],
- [115.86387107, 28.73620123, 100],
- [115.86274498, 28.73616026, 100],
- [115.86173699, 28.74241350, 100],
- [115.86105468, 28.74643934, 100],
- [115.86609240, 28.74642593, 100],
- [115.87597219, 28.74628526, 100]
- ]
- arr.forEach(item => {
- item = item.join(',')
- })
- arr = arr.join(';')
- const wall = new that.DC.Wall(
- arr
- )
- wall.setStyle({
- material: new that.DC.WallTrailMaterialProperty({
- color: that.DC.Namespace.Cesium.Color.fromBytes(0, 142, 255, 150),
- // color: that.DC.Color.CYAN,
- speed: 10
- })
- })
- wallLayer.addOverlay(wall)
-
// viewer.use(new that.DC.Measure())
-
- // viewer.flyTo(wallLayer)
// viewer.flyToPosition(
// new that.DC.Position(117.08489820, 31.65413916, 1500, 0, -90, 45)
@@ -262,14 +256,24 @@
viewer.compass.enable = true
viewer.zoomController.enable = true
- // viewer.locationBar.enable = true
+ viewer.locationBar.enable = true
+ viewer.hawkeyeMap.enable = true
+ viewer.hawkeyeMap.addBaseLayer(
+ that.DC.ImageryLayerFactory.createAmapImageryLayer(
+ {
+ crs: 'WGS84'
+ }
+ )
+ )
// viewer.distanceLegend.enable = true
}
that.DC.ready(initViewer)
},
methods: {
-
+ mapClick (e) {
+ this.$refs.campusBuildingSearch.shortcutShow(e)
+ }
}
}
</script>
diff --git a/src/components/orgNavBar/index.vue b/src/components/orgNavBar/index.vue
index d8f67e1..f7caf99 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)
@@ -137,6 +129,9 @@
this.$store.commit('SET_TELEPHONE', item.telephone)
this.$store.commit('SET_INTRODUCETEXT', item.introduce)
this.$store.commit('SET_POPUPIMGATLAS', imgArr)
+ if (item.videourl && item.videourl != '') {
+ this.$store.commit('SET_MONITORURL', item.videourl)
+ }
this.newPopup(item)
this.viewer.flyToPosition(
@@ -146,6 +141,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 +154,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', [])
}
}
}
diff --git a/src/components/serviceNavBar/index.vue b/src/components/serviceNavBar/index.vue
index f6898f4..68cd47b 100644
--- a/src/components/serviceNavBar/index.vue
+++ b/src/components/serviceNavBar/index.vue
@@ -190,6 +190,10 @@
this.$store.commit('SET_PANORAMAURL', result.panoramaurl)
this.$store.commit('SET_POPUPIMGATLAS', imgArr)
+ if (result.videourl && result.videourl != '') {
+ this.$store.commit('SET_MONITORURL', result.videourl)
+ }
+
this.newPopup(result)
this.viewer.flyToPosition(
new this.DC.Position(Number(result.jd), Number(result.wd), 3000, Number(result.heading), Number(result.pitch), Number(result.roll)),
diff --git a/src/pcLayout/index.vue b/src/pcLayout/index.vue
index f43560b..9280a02 100644
--- a/src/pcLayout/index.vue
+++ b/src/pcLayout/index.vue
@@ -52,8 +52,6 @@
<el-menu-item index="/pcLayout/default/service/alleyway">出入口</el-menu-item>
</el-submenu>
- <el-menu-item index="/pcLayout/default/allquery"> <i class='custom-icon menu-zhcx'></i> 综合查询</el-menu-item>
-
<!-- <el-menu-item index="/pcLayout/default/campusnav"> <i class='custom-icon menu-xydl'></i> 校园导览</el-menu-item> -->
<el-menu-item index="/pcLayout/default/campusnavi"> <i class='custom-icon menu-xydh'></i> 校园导航</el-menu-item>
@@ -83,7 +81,6 @@
},
methods: {
handleSelect (key, keyPath) {
- console.log(key, keyPath)
}
}
}
diff --git a/src/pcviews/arc/culture.vue b/src/pcviews/arc/culture.vue
index 5ce4193..7f8fcfa 100644
--- a/src/pcviews/arc/culture.vue
+++ b/src/pcviews/arc/culture.vue
@@ -3,29 +3,49 @@
* @Name: 文化风景
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-15 11:48:47
+ * @Last Modified time: 2021-12-30 14:56:08
*/
<template>
<div>
- <arc-nav-bar :title="title"
- :arcCode="code"></arc-nav-bar>
+
</div>
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '文化风景',
- code: 5
+
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ARCNAVBARTITLE', '文化风景')
+ this.$store.commit('SET_ARCNAVBARCODE', 5)
+ this.$store.commit('SET_ARCNAVBARFLAG', true)
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/arc/dorm.vue b/src/pcviews/arc/dorm.vue
index 06fe0d2..34516fa 100644
--- a/src/pcviews/arc/dorm.vue
+++ b/src/pcviews/arc/dorm.vue
@@ -3,29 +3,49 @@
* @Name: 学生宿舍
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-15 11:48:43
+ * @Last Modified time: 2021-12-30 14:25:14
*/
<template>
<div>
- <arc-nav-bar :title="title"
- :arcCode="code"></arc-nav-bar>
+
</div>
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '学生宿舍',
- code: 4
+
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ARCNAVBARTITLE', '学生宿舍')
+ this.$store.commit('SET_ARCNAVBARCODE', 4)
+ this.$store.commit('SET_ARCNAVBARFLAG', true)
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/arc/edifact.vue b/src/pcviews/arc/edifact.vue
index dbab888..ce997e6 100644
--- a/src/pcviews/arc/edifact.vue
+++ b/src/pcviews/arc/edifact.vue
@@ -3,29 +3,49 @@
* @Name: 行政办公
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-15 11:48:39
+ * @Last Modified time: 2021-12-30 14:23:28
*/
<template>
<div>
- <arc-nav-bar :title="title"
- :arcCode="code"></arc-nav-bar>
+
</div>
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '行政办公',
- code: 1
+
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ARCNAVBARTITLE', '行政办公')
+ this.$store.commit('SET_ARCNAVBARCODE', 1)
+ this.$store.commit('SET_ARCNAVBARFLAG', true)
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/arc/family.vue b/src/pcviews/arc/family.vue
index b86b626..7bf0e72 100644
--- a/src/pcviews/arc/family.vue
+++ b/src/pcviews/arc/family.vue
@@ -3,29 +3,49 @@
* @Name: 家属住宅
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-15 11:48:35
+ * @Last Modified time: 2021-12-30 14:25:24
*/
<template>
<div>
- <arc-nav-bar :title="title"
- :arcCode="code"></arc-nav-bar>
+
</div>
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '家属住宅',
- code: 6
+
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ARCNAVBARTITLE', '家属住宅')
+ this.$store.commit('SET_ARCNAVBARCODE', 6)
+ this.$store.commit('SET_ARCNAVBARFLAG', true)
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/arc/rest.vue b/src/pcviews/arc/rest.vue
index 36411e5..55f78da 100644
--- a/src/pcviews/arc/rest.vue
+++ b/src/pcviews/arc/rest.vue
@@ -3,29 +3,49 @@
* @Name: 其他楼宇
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-15 11:48:17
+ * @Last Modified time: 2021-12-30 14:25:28
*/
<template>
<div>
- <arc-nav-bar :title="title"
- :arcCode="code"></arc-nav-bar>
+
</div>
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '其他楼宇',
- code: 7
+
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ARCNAVBARTITLE', '其他楼宇')
+ this.$store.commit('SET_ARCNAVBARCODE', 7)
+ this.$store.commit('SET_ARCNAVBARFLAG', true)
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/arc/teaching.vue b/src/pcviews/arc/teaching.vue
index cf891e0..d7562b0 100644
--- a/src/pcviews/arc/teaching.vue
+++ b/src/pcviews/arc/teaching.vue
@@ -3,29 +3,49 @@
* @Name: 教学科研
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-15 11:48:26
+ * @Last Modified time: 2021-12-30 14:54:33
*/
<template>
<div>
- <arc-nav-bar :title="title"
- :arcCode="code"></arc-nav-bar>
+
</div>
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '教学科研',
- code: 2
+
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ARCNAVBARTITLE', '教学科研')
+ this.$store.commit('SET_ARCNAVBARCODE', 2)
+ this.$store.commit('SET_ARCNAVBARFLAG', true)
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/arc/venue.vue b/src/pcviews/arc/venue.vue
index 48ff9fa..6bbaa2b 100644
--- a/src/pcviews/arc/venue.vue
+++ b/src/pcviews/arc/venue.vue
@@ -3,29 +3,49 @@
* @Name: 校内场馆
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-15 11:48:23
+ * @Last Modified time: 2021-12-30 14:25:37
*/
<template>
<div>
- <arc-nav-bar :title="title"
- :arcCode="code"></arc-nav-bar>
+
</div>
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '校内场馆',
- code: 3
+
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ARCNAVBARTITLE', '校内场馆')
+ this.$store.commit('SET_ARCNAVBARCODE', 3)
+ this.$store.commit('SET_ARCNAVBARFLAG', true)
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/campusnavi/index.vue b/src/pcviews/campusnavi/index.vue
index 4f02eb1..ca4c13d 100644
--- a/src/pcviews/campusnavi/index.vue
+++ b/src/pcviews/campusnavi/index.vue
@@ -6,8 +6,6 @@
<script>
-import { mapGetters } from 'vuex'
-
export default {
data () {
return {
@@ -15,36 +13,8 @@
}
},
- computed: {
- ...mapGetters([
- 'viewer',
- 'popupBgUrl',
- 'pupupQRUrl',
- // 终点
- 'terminus',
- // 起点
- 'startingPoint',
- // 点信息
- 'pointPosition',
- // 点名称
- 'stateName',
- // 地址
- 'siteName',
- // 介绍
- 'introduceText',
- // 全景地址
- 'panoramaUrl',
- // 详情弹框显示关闭
- 'detailsPopup',
- // 全景弹框显示关闭
- 'panoramaPopup',
- // 校内导航的显示关闭
- 'campusNavFlag'
- ])
- },
-
mounted () {
- if (this.campusNavFlag == false) this.$store.commit('SET_CAMPUSNAVFLAG', true)
+ this.$store.commit('SET_CAMPUSNAVFLAG', true)
},
methods: {
diff --git a/src/pcviews/orgnav/directly.vue b/src/pcviews/orgnav/directly.vue
index 712bfe4..5f9720a 100644
--- a/src/pcviews/orgnav/directly.vue
+++ b/src/pcviews/orgnav/directly.vue
@@ -3,25 +3,43 @@
* @Name: 直属及附属单位
* @Date: 2021-11-15 10:02:12
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 15:11:39
+ * @Last Modified time: 2021-12-30 14:25:45
*/
<template>
<div>
- <org-nav-bar :navList="list"
- :title="title"></org-nav-bar>
+
</div>
</template>
<script>
import { getList } from '@/api/pc/orgnav/index'
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '直属及附属单位',
list: []
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ORGNAVBARTITLE', '直属及附属单位')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+
+ this.$store.commit('SET_ORGNAVBARFLAG', true)
+
getList({ type: 3 }).then(res => {
res.data.data.records.forEach(item => {
this.list.push({
@@ -37,15 +55,22 @@
QRImg: item.codeurl,
address: item.address,
telephone: item.telephone,
- introduce: item.introduce
+ introduce: item.introduce,
+ videourl: item.videourl
})
})
+
+ this.$store.commit('SET_ORGNAVBARLIST', this.list)
})
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/orgnav/masses.vue b/src/pcviews/orgnav/masses.vue
index 41854f0..c64c595 100644
--- a/src/pcviews/orgnav/masses.vue
+++ b/src/pcviews/orgnav/masses.vue
@@ -3,25 +3,43 @@
* @Name: 党群机构
* @Date: 2021-11-15 10:02:12
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-20 11:26:52
+ * @Last Modified time: 2021-12-30 14:25:52
*/
<template>
<div>
- <org-nav-bar :navList="list"
- :title="title"></org-nav-bar>
+
</div>
</template>
<script>
import { getList } from '@/api/pc/orgnav/index'
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '党群机构',
list: []
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ORGNAVBARTITLE', '党群机构')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+
+ this.$store.commit('SET_ORGNAVBARFLAG', true)
+
getList({ type: 1 }).then(res => {
res.data.data.records.forEach(item => {
this.list.push({
@@ -37,15 +55,22 @@
QRImg: item.codeurl,
address: item.address,
telephone: item.telephone,
- introduce: item.introduce
+ introduce: item.introduce,
+ videourl: item.videourl
})
})
+
+ this.$store.commit('SET_ORGNAVBARLIST', this.list)
})
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/orgnav/ofc.vue b/src/pcviews/orgnav/ofc.vue
index 9b3e7e1..0143966 100644
--- a/src/pcviews/orgnav/ofc.vue
+++ b/src/pcviews/orgnav/ofc.vue
@@ -3,25 +3,43 @@
* @Name: 职能部处
* @Date: 2021-11-15 10:02:12
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-20 11:26:49
+ * @Last Modified time: 2021-12-30 14:25:58
*/
<template>
<div>
- <org-nav-bar :navList="list"
- :title="title"></org-nav-bar>
+
</div>
</template>
<script>
import { getList } from '@/api/pc/orgnav/index'
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '职能部处',
list: []
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ORGNAVBARTITLE', '职能部处')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+
+ this.$store.commit('SET_ORGNAVBARFLAG', true)
+
getList({ type: 2 }).then(res => {
res.data.data.records.forEach(item => {
this.list.push({
@@ -37,15 +55,22 @@
QRImg: item.codeurl,
address: item.address,
telephone: item.telephone,
- introduce: item.introduce
+ introduce: item.introduce,
+ videourl: item.videourl
})
})
+
+ this.$store.commit('SET_ORGNAVBARLIST', this.list)
})
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/orgnav/rest.vue b/src/pcviews/orgnav/rest.vue
index d4d787e..0db486d 100644
--- a/src/pcviews/orgnav/rest.vue
+++ b/src/pcviews/orgnav/rest.vue
@@ -3,25 +3,43 @@
* @Name: 其他机构
* @Date: 2021-11-15 10:02:12
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 15:13:31
+ * @Last Modified time: 2021-12-30 14:26:06
*/
<template>
<div>
- <org-nav-bar :navList="list"
- :title="title"></org-nav-bar>
+
</div>
</template>
<script>
import { getList } from '@/api/pc/orgnav/index'
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '其他机构',
list: []
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ORGNAVBARTITLE', '其他机构')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+
+ this.$store.commit('SET_ORGNAVBARFLAG', true)
+
getList({ type: 5 }).then(res => {
res.data.data.records.forEach(item => {
this.list.push({
@@ -37,15 +55,22 @@
QRImg: item.codeurl,
address: item.address,
telephone: item.telephone,
- introduce: item.introduce
+ introduce: item.introduce,
+ videourl: item.videourl
})
})
+
+ this.$store.commit('SET_ORGNAVBARLIST', this.list)
})
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/orgnav/teaching.vue b/src/pcviews/orgnav/teaching.vue
index 57e84aa..595e871 100644
--- a/src/pcviews/orgnav/teaching.vue
+++ b/src/pcviews/orgnav/teaching.vue
@@ -3,25 +3,43 @@
* @Name: 教学与科研机构
* @Date: 2021-11-15 10:02:12
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 15:12:33
+ * @Last Modified time: 2021-12-30 14:26:13
*/
<template>
<div>
- <org-nav-bar :navList="list"
- :title="title"></org-nav-bar>
+
</div>
</template>
<script>
import { getList } from '@/api/pc/orgnav/index'
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
- title: '教学与科研机构',
list: []
}
},
- created () {
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
+ },
+ mounted () {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ this.$store.commit('SET_ORGNAVBARTITLE', '教学与科研机构')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+
+ this.$store.commit('SET_ORGNAVBARFLAG', true)
+
getList({ type: 4 }).then(res => {
res.data.data.records.forEach(item => {
this.list.push({
@@ -37,15 +55,22 @@
QRImg: item.codeurl,
address: item.address,
telephone: item.telephone,
- introduce: item.introduce
+ introduce: item.introduce,
+ videourl: item.videourl
})
})
+
+ this.$store.commit('SET_ORGNAVBARLIST', this.list)
})
},
methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ },
+ beforeDestroy () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
}
}
}
diff --git a/src/pcviews/service/aed.vue b/src/pcviews/service/aed.vue
index 8c6de83..3e66589 100644
--- a/src/pcviews/service/aed.vue
+++ b/src/pcviews/service/aed.vue
@@ -3,7 +3,7 @@
* @Name: AED
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 11:41:47
+ * @Last Modified time: 2021-12-30 14:29:35
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/alleyway.vue b/src/pcviews/service/alleyway.vue
index 58673fb..af42644 100644
--- a/src/pcviews/service/alleyway.vue
+++ b/src/pcviews/service/alleyway.vue
@@ -3,7 +3,7 @@
* @Name: 出入口
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 11:41:46
+ * @Last Modified time: 2021-12-30 14:30:43
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/bank.vue b/src/pcviews/service/bank.vue
index 6038c09..ec3b599 100644
--- a/src/pcviews/service/bank.vue
+++ b/src/pcviews/service/bank.vue
@@ -3,7 +3,7 @@
* @Name: 银行网点
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 11:41:52
+ * @Last Modified time: 2021-12-30 14:30:51
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/canteen.vue b/src/pcviews/service/canteen.vue
index d600905..d9bb098 100644
--- a/src/pcviews/service/canteen.vue
+++ b/src/pcviews/service/canteen.vue
@@ -3,7 +3,7 @@
* @Name: 食堂餐厅
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 11:41:55
+ * @Last Modified time: 2021-12-30 14:30:54
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/copy.vue b/src/pcviews/service/copy.vue
index 9389889..1a24907 100644
--- a/src/pcviews/service/copy.vue
+++ b/src/pcviews/service/copy.vue
@@ -3,7 +3,7 @@
* @Name: 打字复印
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 11:41:56
+ * @Last Modified time: 2021-12-30 14:31:00
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/express.vue b/src/pcviews/service/express.vue
index e19790a..a0059f4 100644
--- a/src/pcviews/service/express.vue
+++ b/src/pcviews/service/express.vue
@@ -3,7 +3,7 @@
* @Name: 邮寄快递
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 11:43:27
+ * @Last Modified time: 2021-12-30 14:31:05
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/medical.vue b/src/pcviews/service/medical.vue
index 96a18cb..4131e1c 100644
--- a/src/pcviews/service/medical.vue
+++ b/src/pcviews/service/medical.vue
@@ -3,7 +3,7 @@
* @Name: 校内医疗
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 11:42:06
+ * @Last Modified time: 2021-12-30 14:31:10
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/park.vue b/src/pcviews/service/park.vue
index 217933b..081b8b7 100644
--- a/src/pcviews/service/park.vue
+++ b/src/pcviews/service/park.vue
@@ -3,7 +3,7 @@
* @Name: 停车场
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 11:42:09
+ * @Last Modified time: 2021-12-30 14:31:15
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/service.vue b/src/pcviews/service/service.vue
index 071ccbc..26fd986 100644
--- a/src/pcviews/service/service.vue
+++ b/src/pcviews/service/service.vue
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/showers.vue b/src/pcviews/service/showers.vue
index 474719d..d77eab5 100644
--- a/src/pcviews/service/showers.vue
+++ b/src/pcviews/service/showers.vue
@@ -3,7 +3,7 @@
* @Name: 学生浴室
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 11:42:15
+ * @Last Modified time: 2021-12-30 14:31:23
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/supermarket.vue b/src/pcviews/service/supermarket.vue
index 94c7345..701d327 100644
--- a/src/pcviews/service/supermarket.vue
+++ b/src/pcviews/service/supermarket.vue
@@ -3,7 +3,7 @@
* @Name: 购物超市
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-21 11:42:18
+ * @Last Modified time: 2021-12-30 14:31:31
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/pcviews/service/transfer.vue b/src/pcviews/service/transfer.vue
index f460510..49b5d24 100644
--- a/src/pcviews/service/transfer.vue
+++ b/src/pcviews/service/transfer.vue
@@ -3,7 +3,7 @@
* @Name: 圈存机
* @Date: 2021-11-15 17:14:47
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-22 11:21:20
+ * @Last Modified time: 2021-12-30 14:31:32
*/
<template>
<div>
@@ -14,6 +14,9 @@
</template>
<script>
+
+import { mapGetters } from 'vuex'
+
export default {
data () {
return {
@@ -23,6 +26,23 @@
}
},
created () {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit('SET_ORGNAVBARTITLE', '')
+ this.$store.commit('SET_ORGNAVBARLIST', [])
+ this.$store.commit('SET_ORGNAVBARFLAG', false)
+ }
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit('SET_ARCNAVBARTITLE', '')
+ this.$store.commit('SET_ARCNAVBARCODE', '')
+ this.$store.commit('SET_ARCNAVBARFLAG', false)
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校内导航的显示关闭
+ 'orgNavBarFlag',
+ 'arcNavBarFlag'
+ ])
},
methods: {
closeModel () {
diff --git a/src/store/getters.js b/src/store/getters.js
index df7ad6d..e951b6c 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -30,7 +30,10 @@
const search = {
orgNavBarFlag: state => state.search.orgNavBarFlag,
orgNavBarTitle: state => state.search.orgNavBarTitle,
- orgNavBarList: state => state.search.orgNavBarList
+ orgNavBarList: state => state.search.orgNavBarList,
+ arcNavBarFlag: state => state.search.arcNavBarFlag,
+ arcNavBarTitle: state => state.search.arcNavBarTitle,
+ arcNavBarCode: state => state.search.arcNavBarCode
}
const getters = {
@@ -48,8 +51,10 @@
telephone: state => state.popupParams.telephone,
introduceText: state => state.popupParams.introduceText,
panoramaUrl: state => state.popupParams.panoramaUrl,
- detailsPopup: state => state.popupParams.detailsPopup,
panoramaPopup: state => state.popupParams.panoramaPopup,
+ monitorUrl: state => state.popupParams.monitorUrl,
+ monitorPopup: state => state.popupParams.monitorPopup,
+ detailsPopup: state => state.popupParams.detailsPopup,
popupImgAtlas: state => state.popupParams.popupImgAtlas,
teachList: state => state.popupParams.teachList,
liveList: state => state.popupParams.liveList
diff --git a/src/store/modules/mobile.js b/src/store/modules/mobile.js
index 62f1ea6..62124b5 100644
--- a/src/store/modules/mobile.js
+++ b/src/store/modules/mobile.js
@@ -1,35 +1,36 @@
import $store from '../index'
const mobile = {
state: {
- mviewer: null,//地图实体类
- mBigPopup: false,//全屏弹窗
- popupOurOpenData: [],//全屏弹窗中下拉菜单数据
- popupTableName: [],//全屏弹窗标签页数据
- mBigPopupAfter: false,////全屏弹窗之前的弹窗
- ips: '',//获取的ip
- iconHide: false,//右侧伸缩状态
+ mviewer: null, // 地图实体类
+ mBigPopup: false, // 全屏弹窗
+ popupOurOpenData: [], // 全屏弹窗中下拉菜单数据
+ popupTableName: [], // 全屏弹窗标签页数据
+ mBigPopupAfter: false, /// /全屏弹窗之前的弹窗
+ ips: '', // 获取的ip
+ iconHide: false, // 右侧伸缩状态
// DC: '',//DC全局保存
- MobileWindowsHide: true,//改变点击窗口的显示状态
- MobileWindowChangeData: false,//改变点击窗口的数据
- popupsDom: '',//mobileDivForms的实体类
- query: {},//传输数据
- openmobileGoTo: false,//测试
- ccDataState: false,//测试
- openmobilePanorama: false,//实景显影
- MobileWindowsHideFixed: true,//改变点击窗口的显示状态--固定窗口
- MobileWindowChangeDataFixed: false,//改变点击窗口的数据--固定窗口
- //在每次飞行弹窗中 加入自己的点
+ MobileWindowsHide: true, // 改变点击窗口的显示状态
+ MobileWindowChangeData: false, // 改变点击窗口的数据
+ popupsDom: '', // mobileDivForms的实体类
+ query: {}, // 传输数据
+ openmobileGoTo: false, // 测试
+ ccDataState: false, // 测试
+ openmobilePanorama: false, // 实景显影
+ MobileWindowsHideFixed: true, // 改变点击窗口的显示状态--固定窗口
+ MobileWindowChangeDataFixed: false, // 改变点击窗口的数据--固定窗口
+ // 在每次飞行弹窗中 加入自己的点
pointLayer: null,
pointLayerData: {
flag: false,
- label: "选择点",
- img: "/img/leftnav/way.png",
- normal: "/img/leftnav/way.png",
- checked: "/img/leftnav/way-checked.png",
- layer: "pointLayer",
+ label: '选择点',
+ img: '/img/leftnav/way.png',
+ normal: '/img/leftnav/way.png',
+ checked: '/img/leftnav/way-checked.png',
+ layer: 'pointLayer'
},
- //默认起始点函数
+ // 默认起始点函数
startPointFn: '',
+<<<<<<< HEAD
dimension: "2.5D",// 维度
dimensionData: {// 维度镜头数据
heading: 0,
@@ -38,21 +39,25 @@
},
perspectiveControl: '',//视角控制:高度、角度 ()=>{}
perspectiveControls: '',//视角控制:高度、角度 ()=>{}
+=======
+ dimension: '2D', // 维度
+ perspectiveControl: '' // 视角控制:高度、角度 ()=>{}
+>>>>>>> 19621635052322005f31579f7f3d481750898d7c
},
mutations: {
MSET_VIEWER(state, viewer) {
state.mviewer = viewer
},
MSET_BIGPOPUP(state, viewer) {
- state.mBigPopup = viewer;
- $store.dispatch("closeMobileWindowsDom"); //关闭弹窗
+ state.mBigPopup = viewer
+ $store.dispatch('closeMobileWindowsDom') // 关闭弹窗
},
MSET_BIGPOPUPAFTER(state, viewer) {
- state.mBigPopupAfter = viewer;
- $store.dispatch("closeMobileWindowsDom"); //关闭弹窗
+ state.mBigPopupAfter = viewer
+ $store.dispatch('closeMobileWindowsDom') // 关闭弹窗
},
MSET_POPUPOUROPENDATA(state, viewer) {
- state.popupOurOpenData = viewer;
+ state.popupOurOpenData = viewer
},
MSET_ICONHIDE(state, viewer) {
state.iconHide = viewer
@@ -60,13 +65,13 @@
MSET_POPUPTABLENAME(state, viewer) {
state.popupTableName = viewer
},
- MSET_MOBILEWINDOWSHIDE(state, viewer) {//随地图移动窗口
- state.MobileWindowChangeData = !state.MobileWindowChangeData;
+ MSET_MOBILEWINDOWSHIDE(state, viewer) { // 随地图移动窗口
+ state.MobileWindowChangeData = !state.MobileWindowChangeData
state.MobileWindowsHide = viewer
},
MSETCC_SETCC(state, viewer) {
- state.ccDataState = !state.ccDataState;//专门测试
- state.query = viewer;
+ state.ccDataState = !state.ccDataState// 专门测试
+ state.query = viewer
},
MSET_POPUPDOM(state, viewer) {
state.popupsDom = viewer
@@ -80,23 +85,23 @@
MSET_OPENMOBILEPANORAMA(state, viewer) {
state.openmobilePanorama = viewer
},
- MSET_MOBILEWINDOWSHIDEFIXED(state, viewer) {//固定窗口
- state.MobileWindowChangeDataFixed = !state.MobileWindowChangeDataFixed;
+ MSET_MOBILEWINDOWSHIDEFIXED(state, viewer) { // 固定窗口
+ state.MobileWindowChangeDataFixed = !state.MobileWindowChangeDataFixed
state.MobileWindowsHideFixed = viewer
- console.log(state.MobileWindowChangeDataFixed);
+ console.log(state.MobileWindowChangeDataFixed)
},
- //默认位置
+ // 默认位置
MSET_MORENWEIZHI(state, data) {
- state.startPointFn = data;
+ state.startPointFn = data
},
- //开关飞入点图标
+ // 开关飞入点图标
MSET_OPENPOINTEL(state, val) {
if (val) {
- state.pointLayerData.img = state.pointLayerData.checked;
- state[state.pointLayerData.layer].show = true;
+ state.pointLayerData.img = state.pointLayerData.checked
+ state[state.pointLayerData.layer].show = true
} else {
- state.pointLayerData.img = state.pointLayerData.normal;
- state[state.pointLayerData.layer].show = false;
+ state.pointLayerData.img = state.pointLayerData.normal
+ state[state.pointLayerData.layer].show = false
}
},
//切换2D和2.5D
@@ -124,10 +129,10 @@
},
actions: {
MSET_CREADE({ state, commit, dispatch }) {
- state.pointLayer = new global.DC.VectorLayer("pointLayer");//创建图标实体类
- state.mviewer.addLayer(state.pointLayer);//添加到地图
+ state.pointLayer = new global.DC.VectorLayer('pointLayer')// 创建图标实体类
+ state.mviewer.addLayer(state.pointLayer)// 添加到地图
},
- setMobileWindows({ state, commit, dispatch }, data) {//打开随地图移动窗口
+ setMobileWindows({ state, commit, dispatch }, data) { // 打开随地图移动窗口
// 关闭前一个弹窗?
dispatch("closeMobileWindowsDom");
let clas, Flys;
@@ -139,46 +144,44 @@
nowHeight,
]
clas = [
- data.from == "PopupOurOnce" ? +data.lntLat[0] : +data.lntLat[0],
- data.from == "PopupOurOnce" ? +data.lntLat[1] - 0.00108 : +data.lntLat[1],
- data.from == "PopupOurOnce" ? 0 : 0,
+ data.from == 'PopupOurOnce' ? +data.lntLat[0] : +data.lntLat[0],
+ data.from == 'PopupOurOnce' ? +data.lntLat[1] - 0.00108 : +data.lntLat[1],
+ data.from == 'PopupOurOnce' ? 0 : 0
]
-
- } else if (state.dimension == "2.5D") {
+ } else if (state.dimension == '2.5D') {
Flys = [
+data.lntLat[0] + 0.01197,
+data.lntLat[1] - 0.0022,
- 330,
+ 330
]
clas = [
- data.from == "PopupOurOnce" ? +data.lntLat[0] : +data.lntLat[0],
- data.from == "PopupOurOnce" ? +data.lntLat[1] - 0.00108 : +data.lntLat[1] - 0.00048,
- data.from == "PopupOurOnce" ? 0 : 90.648862227,
+ data.from == 'PopupOurOnce' ? +data.lntLat[0] : +data.lntLat[0],
+ data.from == 'PopupOurOnce' ? +data.lntLat[1] - 0.00108 : +data.lntLat[1] - 0.00048,
+ data.from == 'PopupOurOnce' ? 0 : 90.648862227
]
}
-
if (data.useJWD) {
- var ellipsoid = state.mviewer.scene.globe.ellipsoid;
+ var ellipsoid = state.mviewer.scene.globe.ellipsoid
var cartographic = global.DC.Namespace.Cesium.Cartographic.fromDegrees(
// data.lntLat[0],
// data.lntLat[1] - 0.00048,//数值增大是下
// "90.648862227"
// clnt, clat, calt
...clas
- );
- data.position = ellipsoid.cartographicToCartesian(cartographic);
+ )
+ data.position = ellipsoid.cartographicToCartesian(cartographic)
}
// 传递响应数据
- commit("MSET_QUERY", data);
+ commit('MSET_QUERY', data)
// 定制化窗体
- let popupsDom = new global.DC.mobileDivForms(state.mviewer, {
- domId: "mobilePopup",
- title: data.query.name || "成教楼 ",
- className: "mobilePopup",
- content: document.getElementById("mobile-map_content_content"),
- position: [data.position],
- });
+ const popupsDom = new global.DC.mobileDivForms(state.mviewer, {
+ domId: 'mobilePopup',
+ title: data.query.name || '成教楼 ',
+ className: 'mobilePopup',
+ content: document.getElementById('mobile-map_content_content'),
+ position: [data.position]
+ })
// commit("MSET_MOBILEWINDOWSHIDE", false)//显示弹窗
// dispatch("CHANGETOC3", { // 转换坐标
// lnt: data.lntLat[0],
@@ -186,7 +189,7 @@
// }).then(res => {
// console.log(res)
- //基于高度基础设置
+ // 基于高度基础设置
// h:1530
// lnt: + 0.01187 x轴 大是向左
// Lat: - 0.0108 y轴 减是上
@@ -203,8 +206,7 @@
// data.query.from == "地图点击" ? 330 : 330,
// ]
-
- let Position = new global.DC.Position(//转坐标
+ const Position = new global.DC.Position(// 转坐标
// +data.lntLat[0] + 0.01197,
// +data.lntLat[1] - 0.0021,
// 330,
@@ -216,49 +218,49 @@
lntLat: [Position.lng, Position.lat, Position.alt],
heading: Position.heading,
pitch: Position.pitch,
- roll: Position.roll,
+ roll: Position.roll
})
// })
- commit("MSET_POPUPDOM", popupsDom)
+ commit('MSET_POPUPDOM', popupsDom)
},
closeMobileWindowsDom({ state, commit }) {
if (!state.MobileWindowsHide && state.popupsDom) {
- state.popupsDom.closeOur();
- commit("MSET_MOBILEWINDOWSHIDE", true);
+ state.popupsDom.closeOur()
+ commit('MSET_MOBILEWINDOWSHIDE', true)
}
},
- CHANGETOC3({ state, commit }, data) {// //转换经纬度坐标 成世界坐标cartesian3
- var ellipsoid = state.mviewer.scene.globe.ellipsoid;
+ CHANGETOC3({ state, commit }, data) { // //转换经纬度坐标 成世界坐标cartesian3
+ var ellipsoid = state.mviewer.scene.globe.ellipsoid
var cartographic = global.DC.Namespace.Cesium.Cartographic.fromDegrees(
data.lnt,
data.lat - 0.00006,
- data.alt || "90.648862227"
- );
- var position = ellipsoid.cartographicToCartesian(cartographic);
- return position;
+ data.alt || '90.648862227'
+ )
+ var position = ellipsoid.cartographicToCartesian(cartographic)
+ return position
},
SET_OPENWIDOWFIXED({ state, commit }, data) {
// 传递响应数据
- commit("MSET_QUERY", data);
- //显示窗口
- commit("MSET_MOBILEWINDOWSHIDEFIXED", false)
- //移动地图位置
+ commit('MSET_QUERY', data)
+ // 显示窗口
+ commit('MSET_MOBILEWINDOWSHIDEFIXED', false)
+ // 移动地图位置
state.mviewer.zoomToPosition(
new global.DC.Position(data.lntLat[0], data.lntLat[1] - 0.012, 1530, 0, -45)
- );
+ )
},
CLOSE_WIDOWFIXED({ state, commit }) {
- //隐藏窗口
+ // 隐藏窗口
if (!state.MobileWindowsHideFixed) {
console.log(state.MobileWindowsHideFixed)
- commit("MSET_MOBILEWINDOWSHIDEFIXED", true)
+ commit('MSET_MOBILEWINDOWSHIDEFIXED', true)
}
},
- //加入当时的选点
+ // 加入当时的选点
JOIN_POINT({ state, commit }, data) {
},
- //flyTo
+ // flyTo
mapFlyTo({ state, commit, dispatch }, data) {
state.mviewer.camera.flyTo({
destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
@@ -273,23 +275,23 @@
// pitch: data.pitch,
roll: data.roll
},
- duration: 1.6, //定位的时间间隔
- complete: () => {//完成后的回调
- if (data.fn) {//自定义回调
+ duration: 1.6, // 定位的时间间隔
+ complete: () => { // 完成后的回调
+ if (data.fn) { // 自定义回调
setTimeout(() => {
data.fn()
- }, 500);
+ }, 500)
}
if (!data.noOpen) {
setTimeout(() => {
// dispatch("MSET_POINTDATA", data.lntLat);//传入标记点
!state.MobileWindowsHide ||
- commit("MSET_MOBILEWINDOWSHIDE", false)//显示弹窗
- }, 0);
+ commit('MSET_MOBILEWINDOWSHIDE', false)// 显示弹窗
+ }, 0)
}
}
- });
- //官网flyto使用方法
+ })
+ // 官网flyto使用方法
// 1. Fly to a position with a top-down view
// viewer.camera.flyTo({
// destination : Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0)
@@ -321,32 +323,32 @@
},
// 飞入点加入位置
MSET_POINTDATA({ state, commit, dispatch }, data) {
- //加入坐标
- const positions = new global.DC.Position(data[0] - 0.0119, data[1] + 0.0111, 0);
+ // 加入坐标
+ const positions = new global.DC.Position(data[0] - 0.0119, data[1] + 0.0111, 0)
const billboard = new global.DC.Billboard(
positions,
- "/img/leftnav/map-panorama.png"
- );
- billboard.size = [16, 16];
- //订阅事件3
+ '/img/leftnav/map-panorama.png'
+ )
+ billboard.size = [16, 16]
+ // 订阅事件3
billboard.on(DC.MouseEventType.CLICK, (e) => {
// 定制化窗体
console.log(e)
- let query = { name: "选择点" },
- intLat = [e.wgs84Position.lng, e.wgs84Position.lat];
- let d = {
+ const query = { name: '选择点' }
+ const intLat = [e.wgs84Position.lng, e.wgs84Position.lat]
+ const d = {
position: null,
lntLat: intLat,
query: { ...(query || {}), introduce: null, address: intLat },
- useJWD: true, //仅使用经纬度
- };
- dispatch("setMobileWindows", d);
- });
- state.pointLayer.addOverlay(billboard); //实景
+ useJWD: true // 仅使用经纬度
+ }
+ dispatch('setMobileWindows', d)
+ })
+ state.pointLayer.addOverlay(billboard) // 实景
// commit("MSET_OPENPOINTEL", true);
},
MSET_LOCKPERSPECTIVEL({ state, commit, dispatch }, val) {
- //锁定
+ // 锁定
state.mviewer.camera.lookAtTransform(global.DC.Namespace.Cesium.Matrix4.IDENTITY)
// console.log(global.DC.Namespace.Cesium.Matrix4.IDENTITY)
},
diff --git a/src/store/modules/popupParams.js b/src/store/modules/popupParams.js
index 077817e..9a3e9ab 100644
--- a/src/store/modules/popupParams.js
+++ b/src/store/modules/popupParams.js
@@ -9,9 +9,11 @@
siteName: null,
telephone: null,
introduceText: null,
- panoramaUrl: null,
detailsPopup: false,
+ panoramaUrl: null,
panoramaPopup: false,
+ monitorUrl: null,
+ monitorPopup: false,
// 图集
popupImgAtlas: [],
teachList: [],
@@ -48,11 +50,17 @@
SET_PANORAMAURL (state, panoramaUrl) {
state.panoramaUrl = panoramaUrl
},
- SET_DETAILSPOPUP (state, detailsPopup) {
- state.detailsPopup = detailsPopup
- },
SET_PANORAMAPOPUP (state, panoramaPopup) {
state.panoramaPopup = panoramaPopup
+ },
+ SET_MONITORURL (state, monitorUrl) {
+ state.monitorUrl = monitorUrl
+ },
+ SET_MONITORPOPUP (state, monitorPopup) {
+ state.monitorPopup = monitorPopup
+ },
+ SET_DETAILSPOPUP (state, detailsPopup) {
+ state.detailsPopup = detailsPopup
},
SET_POPUPIMGATLAS (state, popupImgAtlas) {
state.popupImgAtlas = popupImgAtlas
@@ -69,6 +77,7 @@
state.introduceText = param
state.telephone = param
state.panoramaUrl = param
+ state.monitorUrl = param
state.teachList = []
state.liveList = []
}
diff --git a/src/store/modules/search.js b/src/store/modules/search.js
index 102a95e..dead091 100644
--- a/src/store/modules/search.js
+++ b/src/store/modules/search.js
@@ -2,7 +2,10 @@
state: {
orgNavBarFlag: false,
orgNavBarTitle: [],
- orgNavBarList: []
+ orgNavBarList: [],
+ arcNavBarFlag: false,
+ arcNavBarTitle: [],
+ arcNavBarCode: []
},
mutations: {
SET_ORGNAVBARFLAG (state, orgNavBarFlag) {
@@ -13,6 +16,16 @@
},
SET_ORGNAVBARLIST (state, orgNavBarList) {
state.orgNavBarList = orgNavBarList
+ },
+
+ SET_ARCNAVBARFLAG (state, arcNavBarFlag) {
+ state.arcNavBarFlag = arcNavBarFlag
+ },
+ SET_ARCNAVBARTITLE (state, arcNavBarTitle) {
+ state.arcNavBarTitle = arcNavBarTitle
+ },
+ SET_ARCNAVBARCODE (state, arcNavBarCode) {
+ state.arcNavBarCode = arcNavBarCode
}
},
actions: {
diff --git a/src/store/modules/viewer.js b/src/store/modules/viewer.js
index dd07d31..089c0ad 100644
--- a/src/store/modules/viewer.js
+++ b/src/store/modules/viewer.js
@@ -1,15 +1,39 @@
const viewer = {
state: {
- viewer: null
+ viewer: null,
+ visitedViews: [],
+ cachedViews: []
},
mutations: {
SET_VIEWER (state, viewer) {
- // console.log(viewer, 456)
state.viewer = viewer
+ },
+ DEL_VISITED_VIEWS: (state, view) => {
+ for (const [i, v] of state.visitedViews.entries()) {
+ if (v.path === view.path) {
+ state.visitedViews.splice(i, 1)
+ break
+ }
+ }
+ for (const i of state.cachedViews) {
+ if (i === view.name) {
+ const index = state.cachedViews.indexOf(i)
+ state.cachedViews.splice(index, 1)
+ break
+ }
+ }
}
},
actions: {
-
+ delVisitedViews ({
+ commit,
+ state
+ }, view) {
+ return new Promise((resolve) => {
+ commit('DEL_VISITED_VIEWS', view)
+ resolve([...state.visitedViews])
+ })
+ }
}
}
diff --git a/src/styles/divforms/panoramaBox.scss b/src/styles/divforms/panoramaBox.scss
index 530f5bf..32c4edd 100644
--- a/src/styles/divforms/panoramaBox.scss
+++ b/src/styles/divforms/panoramaBox.scss
@@ -30,6 +30,7 @@
margin: auto;
width: 18px;
height: 18px;
+ cursor: pointer;
}
}
}
@@ -49,4 +50,59 @@
transform: rotate(-45deg) translate(5px, -15px);
background-color: #28bbf0;
}
+}
+
+.monitor-dom {
+ position: fixed;
+ left: 0;
+ z-index: 1 !important;
+
+ .monitor-wrap {
+ position: relative;
+ overflow: hidden;
+ padding: 30px;
+
+ .content-wrap {
+ padding: 0 20px 20px 20px;
+
+ background-image: linear-gradient(180deg, transparent 0px, #28bbf06c 0px, #28bbf06c 50%, transparent 50%), linear-gradient(0deg, transparent 0px, #28bbf06c 0px, #28bbf06c 50.1%, transparent 50%);
+ border: 1px solid #29baf1;
+ box-shadow: 0 0px 12px #29b8f1e5;
+
+ .title {
+ position: relative;
+ line-height: 36px;
+ color: #fff;
+ text-align: center;
+
+ .close-box {
+ position: absolute;
+ top: 0;
+ right: 8px;
+ bottom: 0;
+ left: auto;
+ margin: auto;
+ width: 18px;
+ height: 18px;
+ cursor: pointer;
+ }
+ }
+ }
+
+ video {
+ width: 460px;
+ height: 320px;
+ object-fit: fill;
+ }
+ }
+
+ .arrow {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 45px;
+ height: 2px;
+ transform: rotate(-45deg) translate(5px, -15px);
+ background-color: #28bbf0;
+ }
}
\ No newline at end of file
diff --git a/src/styles/divforms/popup.scss b/src/styles/divforms/popup.scss
index 850cf27..7218484 100644
--- a/src/styles/divforms/popup.scss
+++ b/src/styles/divforms/popup.scss
@@ -10,6 +10,7 @@
li {
margin: 0 4px;
flex: 1;
+ min-width: 72px;
height: 30px;
line-height: 30px;
list-style: none;
@@ -48,6 +49,11 @@
.live-action-nav {
background: url(/img/icon/live-action.png) no-repeat;
+ background-size: 100% 100%;
+ }
+
+ .monitor-nav {
+ background: url(/img/icon/monitor.png) no-repeat;
background-size: 100% 100%;
}
@@ -142,7 +148,8 @@
p {
white-space: normal !important;
word-wrap: break-word !important;
- max-width: 396px;
+ min-width: 396px;
+ max-width: 492px;
font-size: 0.875rem;
line-height: 24px;
}
diff --git a/src/styles/pcpage/dc-ui.scss b/src/styles/pcpage/dc-ui.scss
index d6eb8c1..6bc3d01 100644
--- a/src/styles/pcpage/dc-ui.scss
+++ b/src/styles/pcpage/dc-ui.scss
@@ -12,4 +12,22 @@
transform: scale(1.6);
}
+ .dc-zoom-controller {
+ background: #2196f3;
+ }
+
+ .dc-compass .out-ring {
+ fill: #2196f3;
+ }
+
+ .dc-hawkeye-map {
+ left: auto;
+ right: 16px;
+ bottom: 16px;
+ }
+
+ .dc-compass .gyro {
+ fill: #2196f3;
+ }
+
}
\ No newline at end of file
--
Gitblit v1.9.3