From bda127148b7a03f515b845dead5b70508a7918f7 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 24 Dec 2021 15:41:37 +0800
Subject: [PATCH] 逻辑调整部分文件更换

---
 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