liuyg
2021-12-25 9c50a6a7cf6f40af955672f7b38950aa61a5484f
Merge branch 'master' of http://192.168.0.105:10010/r/school-web
15 files modified
3 files added
606 ■■■■■ changed files
public/img/leftnav/map-monitor.png patch | view | raw | blame | history
src/api/pc/leftNav/index.js 18 ●●●● patch | view | raw | blame | history
src/api/pc/public/arc.js 4 ●●●● patch | view | raw | blame | history
src/api/pc/service/index.js 106 ●●●●● patch | view | raw | blame | history
src/components/arcNavBar/index.vue 8 ●●●● patch | view | raw | blame | history
src/components/campusNav/index.vue 31 ●●●●● patch | view | raw | blame | history
src/components/leftNav/index.vue 42 ●●●●● patch | view | raw | blame | history
src/components/map/components/campusBuildingSearch.vue 45 ●●●● patch | view | raw | blame | history
src/components/map/components/mapPopup.vue 45 ●●●●● patch | view | raw | blame | history
src/components/map/index.vue 33 ●●●●● patch | view | raw | blame | history
src/components/serviceNavBar/index.vue 133 ●●●●● patch | view | raw | blame | history
src/main.js 1 ●●●● patch | view | raw | blame | history
src/pcviews/campusnavi/index.vue 57 ●●●●● patch | view | raw | blame | history
src/router/axios.js 4 ●●●● patch | view | raw | blame | history
src/store/getters.js 27 ●●●● patch | view | raw | blame | history
src/store/index.js 6 ●●●● patch | view | raw | blame | history
src/store/modules/navigation.js 23 ●●●●● patch | view | raw | blame | history
src/store/modules/search.js 23 ●●●●● patch | view | raw | blame | history
public/img/leftnav/map-monitor.png
src/api/pc/leftNav/index.js
@@ -2,30 +2,22 @@
 * @Author: Morpheus
 * @Date: 2021-05-09 15:17:44
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-12-23 14:09:00
 * @Last Modified time: 2021-12-24 15:11:14
 */
// 右侧nav栏相关
import request from '@/router/axios'
export const getComeList = (params) => {
export const getLifeList = (params) => {
    return request({
        url: '/blade-door/door/selectDoor',
        url: '/blade-life/life/selectList',
        method: 'get',
        params: params
    })
}
export const getParkList = (params) => {
export const getMonitorList = (params) => {
    return request({
        url: '/blade-parking/parking/selectPark',
        method: 'get',
        params: params
    })
}
export const getAEDkList = (params) => {
    return request({
        url: '/blade-aed/aed/selectAed',
        url: '/blade-architecture/architecture/selectVideo',
        method: 'get',
        params: params
    })
src/api/pc/public/arc.js
@@ -2,7 +2,7 @@
 * @Author: Morpheus
 * @Date: 2021-05-09 15:17:44
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-12-21 14:31:00
 * @Last Modified time: 2021-12-24 11:30:06
 */
// 校区
import request from '@/router/axios'
@@ -33,7 +33,7 @@
export const getMechanismDetail = (params) => {
    return request({
        url: '/blade-mechanism/mechanism/detail',
        url: '/blade-architecture/architecture/selectInfo',
        method: 'get',
        params: params
    })
src/api/pc/service/index.js
@@ -2,110 +2,22 @@
 * @Author: Morpheus
 * @Date: 2021-05-09 15:17:44
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-12-22 13:44:26
 * @Last Modified time: 2021-12-24 11:26:04
 */
// 校区
import request from '@/router/axios'
export const getLifeList = (params) => {
    return request({
        url: '/blade-life/life/list',
        method: 'get',
        params: params
    })
}
export const getList = (params) => {
    return request({
        url: '/blade-system/dict-biz/dictionary?code=campus',
        method: 'get',
        params: params
    })
}
export const getCanteenList = (params) => {
    return request({
        url: '/blade-restaurant/restaurant/list',
        method: 'get',
        params: params
    })
}
export const getSupermarketList = (params) => {
    return request({
        url: '/blade-supermarket/supermarket/list',
        method: 'get',
        params: params
    })
}
export const getMedicalList = (params) => {
    return request({
        url: '/blade-medical/medical/list',
        method: 'get',
        params: params
    })
}
export const getExpressList = (params) => {
    return request({
        url: '/blade-mail/mail/list',
        method: 'get',
        params: params
    })
}
export const getShowersList = (params) => {
    return request({
        url: '/blade-bathroom/bathroom/list',
        method: 'get',
        params: params
    })
}
export const getTransferList = (params) => {
    return request({
        url: '/blade-transference/transference/list',
        method: 'get',
        params: params
    })
}
export const getCopyList = (params) => {
    return request({
        url: '/blade-duplicate/duplicate/list',
        method: 'get',
        params: params
    })
}
export const getBankList = (params) => {
    return request({
        url: '/blade-network/network/list',
        method: 'get',
        params: params
    })
}
export const getAedList = (params) => {
    return request({
        url: '/blade-aed/aed/list',
        method: 'get',
        params: params
    })
}
export const getServiceList = (params) => {
    return request({
        url: '/blade-signal/signal/list',
        method: 'get',
        params: params
    })
}
export const getParkList = (params) => {
    return request({
        url: '/blade-parking/parking/list',
        method: 'get',
        params: params
    })
}
export const getAlleywayList = (params) => {
    return request({
        url: '/blade-door/door/list',
        method: 'get',
        params: params
    })
src/components/arcNavBar/index.vue
@@ -175,6 +175,7 @@
                var imgArr = result.tpurl.split(',')
                var tabOne = res.data.data[0].jx.split(',')
                var tabTwo = res.data.data[0].sh.split(',')
                this.$store.commit('SET_POPUPBGURL', imgArr[0])
                this.$store.commit('SET_POPUPQRURL', result.codeurl)
@@ -190,7 +191,12 @@
                } else {
                    this.$store.commit('SET_TEACHLIST', [])
                }
                this.$store.commit('SET_LIVELIST', [])
                if (res.data.data[0].sh != '') {
                    this.$store.commit('SET_LIVELIST', tabTwo)
                } else {
                    this.$store.commit('SET_LIVELIST', [])
                }
                this.newPopup(result)
                this.viewer.flyToPosition(
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()
src/components/leftNav/index.vue
@@ -14,7 +14,7 @@
<script>
import { getAEDkList, getParkList, getComeList, getSceneList, getWayList, getTagList } from '@/api/pc/leftNav/index'
import { getLifeList, getMonitorList, getSceneList, getWayList, getTagList } from '@/api/pc/leftNav/index'
export default {
    name: 'leftNav',
@@ -46,14 +46,14 @@
                    checked: '/img/leftnav/scene-checked.png',
                    layer: 'sceneLayer'
                },
                // {
                //     flag: false,
                //     label: '监控',
                //     img: '/img/leftnav/monitor.png',
                //     normal: '/img/leftnav/monitor.png',
                //     checked: '/img/leftnav/monitor-checked.png',
                //     layer: 'sceneLayer'
                // },
                {
                    flag: false,
                    label: '监控',
                    img: '/img/leftnav/monitor.png',
                    normal: '/img/leftnav/monitor.png',
                    checked: '/img/leftnav/monitor-checked.png',
                    layer: 'monitorLayer'
                },
                // {
                //     flag: false,
                //     label: '活动',
@@ -92,6 +92,7 @@
            tagLayer: null,
            wayLayer: null,
            sceneLayer: null,
            monitorLayer: null,
            activityLayer: null,
            aedLayer: null,
            parkLayer: null,
@@ -134,10 +135,10 @@
            viewer.addLayer(this.wayLayer)
            this.sceneLayer = new this.DC.VectorLayer('sceneLayer')
            viewer.addLayer(this.sceneLayer)
            this.monitorLayer = new this.DC.VectorLayer('monitorLayer')
            viewer.addLayer(this.monitorLayer)
            this.aedLayer = new this.DC.VectorLayer('aedLayer')
            viewer.addLayer(this.aedLayer)
            this.parkLayer = new this.DC.HtmlLayer('parkLayer')
            viewer.addLayer(this.parkLayer)
            this.comeLayer = new this.DC.VectorLayer('comeLayer')
@@ -183,6 +184,15 @@
                this.wayLayer.show = false
            })
            getMonitorList().then(res => {
                res.data.data.forEach(item => {
                    const billboard = new this.DC.Billboard(new that.DC.Position(Number(item.jd), Number(item.wd), 0), '/img/leftnav/map-monitor.png')
                    billboard.size = [20, 20]
                    this.monitorLayer.addOverlay(billboard)
                })
                this.monitorLayer.show = false
            })
            getSceneList().then(res => {
                res.data.data.forEach(item => {
                    const billboard = new this.DC.Billboard(new that.DC.Position(Number(item.jd), Number(item.wd), 0), '/img/leftnav/map-panorama.png')
@@ -192,7 +202,7 @@
                this.sceneLayer.show = false
            })
            getAEDkList().then(res => {
            getLifeList({ lifetype: 9 }).then(res => {
                res.data.data.forEach(item => {
                    const label = new this.DC.Label(new that.DC.Position(Number(item.jd), Number(item.wd), 0), item.mechanismname)
                    label.setStyle({
@@ -213,7 +223,7 @@
                this.aedLayer.show = false
            })
            getParkList().then(res => {
            getLifeList({ lifetype: 11 }).then(res => {
                res.data.data.forEach(item => {
                    const divIcon = new this.DC.DivIcon(
                        new that.DC.Position(Number(item.jd), Number(item.wd), 0),
@@ -237,7 +247,7 @@
                this.parkLayer.show = false
            })
            getComeList().then(res => {
            getLifeList({ lifetype: 12 }).then(res => {
                res.data.data.forEach(item => {
                    const label = new that.DC.Label(new that.DC.Position(Number(item.jd), Number(item.wd), 0), item.mechanismname)
                    label.setStyle({
@@ -257,10 +267,6 @@
                })
                this.comeLayer.show = false
            })
            this.tagLayer.show = false
            this.wayLayer.show = false
            this.sceneLayer.show = false
        }
    }
}
src/components/map/components/campusBuildingSearch.vue
@@ -1,7 +1,5 @@
<template>
    <div>
        <campusNav ref="campusNavRoute"
                   v-show="campusNavFlag" />
        <div class="map-campus-serarch">
            <el-input class="search-input"
                      placeholder="校园搜索…"
@@ -16,25 +14,52 @@
                           icon="el-icon-my-search"></el-button>
            </el-button-group>
        </div>
        <div class="map-campus-shortcut">
            <div class="shortcut-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>
                </ul>
            </div>
        </div>
    </div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
    name: 'campusBuildingSearch',
    data () {
        return {
            campusNavFlag: false
            shortcutList: [
                {
                    bgimg: '/img/search/',
                    span: '党群机构'
                }
            ]
        }
    },
    computed: {
        ...mapGetters([
            // 校内导航的显示关闭
            'campusNavFlag'
        ])
    },
    methods: {
        navigationShow () {
            this.campusNavFlag = true
        },
        closeCampusNav () {
            this.campusNavFlag = false
            if (this.campusNavFlag == false) {
                this.$store.commit('SET_CAMPUSNAVFLAG', true)
            }
        }
    }
@@ -52,6 +77,8 @@
    width: 320px;
    height: 40px;
    z-index: 11;
    border-radius: 5px;
    box-shadow: 0 0 10px 2px #666;
    .search-input {
        float: left;
@@ -59,6 +86,8 @@
        border-radius: 5px 0 0 5px;
        input {
            border: none;
            border-right: 1px solid #dcdfe6;
            border-radius: 5px 0 0 5px;
        }
    }
src/components/map/components/mapPopup.vue
@@ -89,7 +89,7 @@
                                                    <ul>
                                                        <li v-for="(item, index) in teachList"
                                                            :key="index"
                                                            @click="mechanismDetailPopup(item)">
                                                            @click="mechanismDetailPopup(0, item)">
                                                            <i class="popup-icon location-icon deblurring"></i>
                                                            {{item}}
                                                        </li>
@@ -98,7 +98,8 @@
                                                <div>
                                                    <ul>
                                                        <li v-for="(item, index) in liveList"
                                                            :key="index">
                                                            :key="index"
                                                            @click="mechanismDetailPopup(1, item)">>
                                                            <i class="popup-icon location-icon deblurring"></i>
                                                            {{item}}
                                                        </li>
@@ -170,11 +171,6 @@
                  ref="popupImgs">
        </el-image>
        <campusNav ref="campusNavRoute"
                   :comeName="comeName"
                   :getToName="getToName"
                   v-show="campusNavFlag" />
        <audio ref="audioControlPlay"
               style="position: fixed; left: 111111111px;"
               v-html="audioSource"
@@ -194,9 +190,6 @@
        return {
            DC: null,
            tabBtnFlag: '教学科研行政',
            campusNavFlag: false,
            comeName: '',
            getToName: '',
            QRCodeFlag: false,
            audioSource: '',
            audioFlag: false
@@ -232,36 +225,35 @@
            // 教学
            'teachList',
            // 科研
            'liveList'
            'liveList',
            // 校内导航的显示关闭
            'campusNavFlag'
        ])
    },
    created () {
        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}">`
        }
    },
    methods: {
        tabBtnClick (param) {
            this.tabBtnFlag = param
        },
        closeCampusNav () {
            this.campusNavFlag = false
            this.$refs.campusNavRoute.clearLayer()
            this.$store.commit('SET_STARTINGPOINT', null)
            this.$store.commit('SET_TERMINUS', null)
            this.comeName = ''
            this.getToName = ''
        },
        comeHereClick () {
            this.comeName = this.stateName
            this.$store.commit('SET_COMENAME', this.stateName)
            this.$store.commit('SET_TERMINUS', this.pointPosition)
            if (this.campusNavFlag == false) this.campusNavFlag = true
            if (this.campusNavFlag == false) this.$store.commit('SET_CAMPUSNAVFLAG', true)
        },
        getToHereClick () {
            this.getToName = this.stateName
            this.$store.commit('SET_GETTONAME', this.stateName)
            this.$store.commit('SET_STARTINGPOINT', this.pointPosition)
            if (this.campusNavFlag == false) this.campusNavFlag = true
            if (this.campusNavFlag == false) this.$store.commit('SET_CAMPUSNAVFLAG', true)
        },
        qrCodeClick () {
@@ -309,7 +301,6 @@
            if (this.audioSource == '') {
                var zhText = encodeURI(this.$refs.DomIntroduceText.innerText)
                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}">`
                console.log(this.audioSource)
                this.$refs.audioControlPlay.play()
                this.audioFlag = true
            } else {
@@ -327,8 +318,8 @@
            this.audioFlag = false
        },
        mechanismDetailPopup (param) {
            getMechanismDetail({ mechanismname: param }).then(res => {
        mechanismDetailPopup (num, param) {
            getMechanismDetail({ num: num, mechanismName: param }).then(res => {
                console.log(res)
                var result = res.data.data
                this.$store.commit('CLEAR_ALL', null)
src/components/map/index.vue
@@ -7,10 +7,10 @@
        <mapPopup />
        <!-- <campusBuildingSearch /> -->
        <div class="keep-out">
            智慧校园
        </div>
        <campusBuildingSearch />
        <campusNav ref="campusNavRoute"
                   v-show="campusNavFlag" />
    </div>
</template>
<script>
@@ -52,7 +52,9 @@
            // 详情弹框显示关闭
            'detailsPopup',
            // 全景弹框显示关闭
            'panoramaPopup'
            'panoramaPopup',
            // 校内导航的显示关闭
            'campusNavFlag'
        ])
    },
    mounted () {
@@ -138,9 +140,11 @@
            popup.hide()
            const baselayer = that.DC.ImageryLayerFactory.createArcGisImageryLayer({
                url:
                    'http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
            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' // 行政区划
            })
            viewer.addBaseLayer(baselayer, {
                iconUrl: 'examples/images/icon/img.png',
@@ -271,17 +275,4 @@
</script>
<style lang='scss' scope>
.keep-out {
    position: fixed;
    left: 6px;
    bottom: 2px;
    z-index: 11;
    width: 72px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border-radius: 8px;
}
</style>
src/components/serviceNavBar/index.vue
@@ -46,11 +46,8 @@
<script>
import { mapGetters } from 'vuex'
import {
    getList, getCanteenList, getSupermarketList,
    getMedicalList, getExpressList, getShowersList,
    getTransferList, getCopyList, getBankList,
    getAedList, getServiceList, getParkList,
    getAlleywayList
    getList,
    getLifeList
} from '@/api/pc/service/index'
export default {
@@ -167,127 +164,15 @@
        getChilsNavs (campus) {
            this.itemNavList = []
            if (this.arcCode == 1) {
                getCanteenList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
            getLifeList({ lifetype: this.arcCode, campus: campus }).then(res => {
                res.data.data.records.forEach(item => {
                    this.itemNavList.push({
                        navTitle: item.mechanismname,
                        icon: '/img/navicon/tag.png',
                        details: item
                    })
                })
            } else if (this.arcCode == 2) {
                getSupermarketList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 3) {
                getMedicalList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 4) {
                getExpressList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 5) {
                getShowersList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 6) {
                getTransferList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 7) {
                getCopyList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 8) {
                getBankList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 9) {
                getAedList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 10) {
                getServiceList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 11) {
                getParkList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 12) {
                getAlleywayList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            }
            })
        },
        mapPopup (param) {
            var result = param
src/main.js
@@ -43,6 +43,7 @@
Vue.component(CollapseTransition.name, CollapseTransition) // 主要样式
global.DC = DC // 将DC提升到全局变量,方便在工程中直接使用
DC.accessToken = 'U2FsdGVkX19E68JwtuCiNYLQg2UETLoPcwbGWsp4SejjwWVGadfsVjxZ4AGTQDzle7IlVcGFE8ZNPxxFr5gOThfeJdsOCWDWe7gJPishuAw='
global.echarts = echarts // 将DC提升到全局变量,方便在工程中直接使用
DC.DivForms = DivForms
src/pcviews/campusnavi/index.vue
@@ -1,35 +1,56 @@
<template>
    <div>
        <campusNav ref="campusNavRoute"
                   :comeName="comeName"
                   :getToName="getToName"
                   v-show="campusNavFlag" />
    </div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
    data () {
        return {
            campusNavFlag: true,
            comeName: '',
            getToName: ''
        }
    },
    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)
    },
    methods: {
        closeCampusNav () {
            this.campusNavFlag = false
            this.$refs.campusNavRoute.clearLayer()
            this.$store.commit('SET_STARTINGPOINT', null)
            this.$store.commit('SET_TERMINUS', null)
            this.comeName = ''
            this.getToName = ''
            this.$store.dispatch('delVisitedViews', this.$route)
            this.$router.push('/pcLayout/default')
        }
    },
    destroyed () {
        this.campusNavFlag = false
    }
}
</script>
src/router/axios.js
@@ -9,8 +9,8 @@
const service = axios.create({
    //   baseURL: 'http://192.168.0.107:83',
    // baseURL: 'http://192.168.0.107:80',
    baseURL: 'http://s16s652780.51mypc.cn/api',
    baseURL: 'http://192.168.0.107:80',
    // baseURL: 'http://s16s652780.51mypc.cn/api',
    timeout: 600000 // request timeout
})
src/store/getters.js
@@ -6,18 +6,33 @@
    popupTableName: state => state.mobile.popupTableName,
    mBigPopupAfter: state => state.mobile.mBigPopupAfter,
    iconHide: state => state.mobile.iconHide,
    MobileWindowsHide: state => state.mobile.MobileWindowsHide,//随地图移动窗口
    MobileWindowChangeData: state => state.mobile.MobileWindowChangeData,//随地图移动窗口
    MobileWindowsHide: state => state.mobile.MobileWindowsHide, // 随地图移动窗口
    MobileWindowChangeData: state => state.mobile.MobileWindowChangeData, // 随地图移动窗口
    popupsDom: state => state.mobile.popupsDom,
    query: state => state.mobile.query,
    openmobileGoTo: state => state.mobile.openmobileGoTo,//测试
    ccDataState: state => state.mobile.ccDataState,//测试
    openmobileGoTo: state => state.mobile.openmobileGoTo, // 测试
    ccDataState: state => state.mobile.ccDataState, // 测试
    openmobilePanorama: state => state.mobile.openmobilePanorama,
    MobileWindowsHideFixed: state => state.mobile.MobileWindowsHideFixed,//固定窗口
    MobileWindowChangeDataFixed: state => state.mobile.MobileWindowChangeDataFixed,//固定窗口
    MobileWindowsHideFixed: state => state.mobile.MobileWindowsHideFixed, // 固定窗口
    MobileWindowChangeDataFixed: state => state.mobile.MobileWindowChangeDataFixed // 固定窗口
}
const navigation = {
    campusNavFlag: state => state.navigation.campusNavFlag,
    comeName: state => state.navigation.comeName,
    getToName: state => state.navigation.getToName
}
const search = {
    orgNavBarFlag: state => state.search.orgNavBarFlag,
    orgNavBarTitle: state => state.search.orgNavBarTitle,
    orgNavBarList: state => state.search.orgNavBarList
}
const getters = {
    ...mobile,
    ...navigation,
    ...search,
    viewer: state => state.viewer.viewer,
    popupBgUrl: state => state.popupParams.popupBgUrl,
    pupupQRUrl: state => state.popupParams.pupupQRUrl,
src/store/index.js
@@ -3,6 +3,8 @@
import viewer from './modules/viewer'
import popupParams from './modules/popupParams'
import navigation from './modules/navigation'
import search from './modules/search'
import mobile from './modules/mobile'
import getters from './getters'
@@ -12,7 +14,9 @@
    modules: {
        viewer,
        popupParams,
        mobile
        mobile,
        navigation,
        search
    },
    getters
})
src/store/modules/navigation.js
New file
@@ -0,0 +1,23 @@
const navigation = {
    state: {
        campusNavFlag: false,
        comeName: '',
        getToName: ''
    },
    mutations: {
        SET_CAMPUSNAVFLAG (state, campusNavFlag) {
            state.campusNavFlag = campusNavFlag
        },
        SET_COMENAME (state, comeName) {
            state.comeName = comeName
        },
        SET_GETTONAME (state, getToName) {
            state.getToName = getToName
        }
    },
    actions: {
    }
}
export default navigation
src/store/modules/search.js
New file
@@ -0,0 +1,23 @@
const search = {
    state: {
        orgNavBarFlag: false,
        orgNavBarTitle: [],
        orgNavBarList: []
    },
    mutations: {
        SET_ORGNAVBARFLAG (state, orgNavBarFlag) {
            state.orgNavBarFlag = orgNavBarFlag
        },
        SET_ORGNAVBARTITLE (state, orgNavBarTitle) {
            state.orgNavBarTitle = orgNavBarTitle
        },
        SET_ORGNAVBARLIST (state, orgNavBarList) {
            state.orgNavBarList = orgNavBarList
        }
    },
    actions: {
    }
}
export default search