From 9c50a6a7cf6f40af955672f7b38950aa61a5484f Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 25 Dec 2021 09:32:43 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web
---
src/components/campusNav/index.vue | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/src/components/campusNav/index.vue b/src/components/campusNav/index.vue
index f10d29e..09370d2 100644
--- a/src/components/campusNav/index.vue
+++ b/src/components/campusNav/index.vue
@@ -73,23 +73,17 @@
routeLayer: null
}
},
- props: {
- comeName: {
- type: String,
- default: ''
- },
- getToName: {
- type: String,
- default: ''
- }
- },
computed: {
...mapGetters([
'viewer',
// 起点
'startingPoint',
// 终点
- 'terminus'
+ 'terminus',
+ // 出发名称
+ 'getToName',
+ // 到达名称
+ 'comeName'
])
},
created () {
@@ -142,14 +136,26 @@
document.onmouseup = null
}
},
+
closeModel () {
- this.$parent.closeCampusNav()
+ if (this.$route.path.indexOf('/campusnavi') != -1) {
+ this.$store.dispatch('delVisitedViews', this.$route)
+ this.$router.push('/pcLayout/default')
+ }
+
+ this.$store.commit('SET_COMENAME', '')
+ this.$store.commit('SET_TERMINUS', null)
+ this.$store.commit('SET_GETTONAME', '')
+ this.$store.commit('SET_STARTINGPOINT', null)
+ this.$store.commit('SET_CAMPUSNAVFLAG', false)
},
+
tabClick (param) {
this.navigationWay = param
this.tabOneFlag = !this.tabOneFlag
this.tabTwoFlag = !this.tabTwoFlag
},
+
startNavigation () {
if (this.routeLayer == null) {
this.routeLayer = new this.DC.VectorLayer('navigation')
@@ -233,6 +239,7 @@
})
}
},
+
clearLayer () {
if (this.routeLayer != null) {
this.routeLayer.clear()
--
Gitblit v1.9.3