guanqb
2023-04-11 08a79b319ac5eba050d4b3ffc16b62d0bdd9182d
首页全屏按钮优化
4 files modified
49 ■■■■■ changed files
src/components/map/index.vue 29 ●●●● patch | view | raw | blame | history
src/store/getters.js 1 ●●●● patch | view | raw | blame | history
src/store/modules/popupParams.js 5 ●●●●● patch | view | raw | blame | history
src/views/home/index.vue 14 ●●●● patch | view | raw | blame | history
src/components/map/index.vue
@@ -10,23 +10,23 @@
-->
<template>
    <div class="viewer-box" id="viewer-container">
    <slot ref="mainContent" name="mainContent"></slot>
    <slot name="showButton"></slot>
        <slot ref="mainContent" name="mainContent"></slot>
        <slot name="showButton"></slot>
        <div class="over-look-btn">
            <el-tooltip content="一键俯视" placement="top" effect="dark">
            <i class="fa fa-eye" style="vertical-align: middle; cursor: pointer" @click="overLookClick"></i>
        </el-tooltip>
                <i class="fa fa-eye" style="vertical-align: middle; cursor: pointer" @click="overLookClick"></i>
            </el-tooltip>
        </div>
        <!-- 全屏控制按钮 -->
        <div class="screen-full-btn">
            <!-- <el-tooltip v-if="isFullscreen" content="缩放" placement="top" effect="dark">
                                                                                                                                    <i class="fa fa-compress" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                                                                                                                                </el-tooltip> -->
            <el-tooltip v-if="!isShowHomeContentBtn && isFullscreen" content="缩放" placement="top" effect="dark">
                <i class="fa fa-compress" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
            </el-tooltip>
            <!-- <el-tooltip v-if="!isFullscreen" content="全屏" placement="top" effect="dark">
                                                                                                                                        <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                                                                                                                                    </el-tooltip> -->
            <el-tooltip content="显示/隐藏" placement="top" effect="dark">
            <el-tooltip v-if="!isShowHomeContentBtn && !isFullscreen" content="全屏" placement="top" effect="dark">
                <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
            </el-tooltip>
            <el-tooltip v-if="isShowHomeContentBtn" content="显示/隐藏" placement="top" effect="dark">
                <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="switchShowHomeContent"></i>
            </el-tooltip>
        </div>
@@ -162,6 +162,7 @@
import houseDeepDataPopup from './components/houseDeepDataPopup.vue'
import yToolTip from './components/yToolTip.vue'
import createTools from '@/utils/tools/index'
import { mapGetters } from 'vuex'
export default {
    name: 'mapBox',
@@ -188,14 +189,15 @@
    },
    computed: {
        ...mapGetters([
            'isShowHomeContentBtn'
        ]),
    },
    mounted () {
        if (global.viewer != null) {
            global.viewer = null
        }
        const that = this
        // 初始化地图
@@ -950,7 +952,6 @@
                labelElement.on(global.DC.MouseEventType.CLICK, incident)
            } else if (type == 'HeatPoint') {
                layersObjcect[layerName].setPositions(params.positions)
                console.log('----------HeatPoint------------', params.positions)
            }
        },
src/store/getters.js
@@ -22,6 +22,7 @@
    videoRowClickPopup: (state) => state.popupParams.videoRowClickPopup,
    videoRowClickPopupData: (state) => state.popupParams.videoRowClickPopupData,
    isShowHomeContent: (state) => state.popupParams.isShowHomeContent,
    isShowHomeContentBtn: (state) => state.popupParams.isShowHomeContentBtn,
}
export default getters
src/store/modules/popupParams.js
@@ -33,6 +33,7 @@
        houseDeepDataPopupData: {},
        isShowHomeContent: true,
        isShowHomeContentBtn: true,
    },
    mutations: {
@@ -88,6 +89,10 @@
        SET_ISSHOWHOMECONTENT (state, isShowHomeContent) {
            state.isShowHomeContent = isShowHomeContent
        },
        SET_ISSHOWHOMECONTENTBTN (state, isShowHomeContent) {
            state.isShowHomeContentBtn = isShowHomeContent
        },
    },
    actions: {
src/views/home/index.vue
@@ -573,6 +573,7 @@
            this.policeStaionID = this.userInfo.dept_id
        }
        this.$store.commit('SET_ISSHOWHOMECONTENT', true)
        this.$store.commit('SET_ISSHOWHOMECONTENTBTN', true)
        this.getPoliceStationTree(1)
        // setTimeout(() => {
@@ -1952,6 +1953,12 @@
    destroyed () {
        this.$store.commit('SET_MAPSEARCHPOPUP', false)
        this.$store.commit('SET_ISSHOWHOMECONTENTBTN', false)
        this.$store.commit('SET_DETAILSPOPUP', {
            showBox: false,
            showBtn: false
        })
        this.showHomeContentBtnStyle()
        loading && loading.close()
@@ -1959,12 +1966,6 @@
        this.clearPolygonLayer()
        // cylinderLayer != null && cylinderLayer != undefined && cylinderLayer != '' && cylinderLayer.remove()
        this.$store.commit('SET_DETAILSPOPUP', {
            showBox: false,
            showBtn: false
        })
        global.viewer.dataSources.removeAll()
@@ -2023,7 +2024,6 @@
            type: 'ClusterLayer'
        })
        this.$store.commit('SET_MAPSEARCHPOPUP', false)
        if (cylinderLayer != null) {
            cylinderLayer.remove()