liuyg
2021-12-25 9c50a6a7cf6f40af955672f7b38950aa61a5484f
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()