guanqb
2022-11-07 bc947c1e8707a236a2154a2924360109e9d644d8
活动图标聚合效果
4 files modified
37 ■■■■ changed files
src/components/map/index.vue 26 ●●●● patch | view | raw | blame | history
src/styles/base/index.scss 1 ●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue 3 ●●●● patch | view | raw | blame | history
src/views/home/index.vue 7 ●●●●● patch | view | raw | blame | history
src/components/map/index.vue
@@ -13,10 +13,18 @@
        <!-- 全屏控制按钮 -->
        <div class="screen-full-btn">
            <el-tooltip v-if="isFullscreen" content="缩放" placement="bottom" effect="dark">
                <i class="fa fa-compress" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                <i
                    class="fa fa-compress"
                    style="vertical-align: middle; cursor: pointer"
                    @click="fullscreenchange"
                ></i>
            </el-tooltip>
            <el-tooltip v-if="!isFullscreen" content="全屏" placement="bottom" effect="dark">
                <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                <i
                    class="fa fa-expand"
                    style="vertical-align: middle; cursor: pointer"
                    @click="fullscreenchange"
                ></i>
            </el-tooltip>
        </div>
    </div>
@@ -237,7 +245,7 @@
        this.$EventBus.$on('layerPointAdd', (params) => {
            // eslint-disable-next-line no-unused-vars
            // console.log(params.incident)
            that.layerPointAdd(params.layerName, params.type, params.params, params.distanceDisplayCondition, params.incident)
            that.layerPointAdd(params.layerName, params.type, params.layerType, params.params, params.distanceDisplayCondition, params.incident)
        })
        this.$EventBus.$on('layerPolygonAdd', (params) => {
@@ -334,6 +342,12 @@
                layersObjcect[layerName] = new global.DC.VectorLayer(layerName)
                layersObjcect[layerName].addTo(global.viewer)
            } else if (type == 'ClusterLayer') {
                if (!layersObjcect[layerName]) layersObjcect[layerName] = null
                layersObjcect[layerName] = new global.DC.ClusterLayer(layerName)
                layersObjcect[layerName].addTo(global.viewer)
            }
        },
@@ -357,7 +371,7 @@
         * @param {*} type 图层类型
         */
        mapClearLayer (layerName, type) {
            if (type == 'VectorLayer') {
            if (type == 'VectorLayer' || type == 'ClusterLayer') {
                if (layersObjcect[layerName] && layersObjcect[layerName] != null)
                    layersObjcect[layerName].clear()
            }
@@ -370,12 +384,12 @@
         * @param {*} params 添加的点位参数(内容、详情)
         * @param {*} incident 添加的点位事件
         */
        layerPointAdd (layerName, type, params, distanceDisplayCondition = {
        layerPointAdd (layerName, type, layerType = 'VectorLayer', params, distanceDisplayCondition = {
            near: 0, //最近距离
            far: Number.MAX_VALUE //最远距离
        }, incident = (e) => { }) {
            if (!layersObjcect[layerName] || layersObjcect[layerName] == null) {
                this.mapAddLayer(layerName, 'VectorLayer')
                this.mapAddLayer(layerName, layerType)
            }
            let pointElement
src/styles/base/index.scss
@@ -250,7 +250,6 @@
                        display: inline-block;
                        text-align-last: justify;
                        margin-right: 20px;
                    }
                    &>div:nth-of-type(2) {
src/views/home/components/leftContainer.vue
@@ -466,14 +466,15 @@
        peopleTabClick (type) {
            this.peopletype = type
            homePersonmyChart.off('click')
            homePersonmyChart.dispose()
            this.$nextTick(() => {
                if (type == 0) {
                    this.initPersonEcharts()
                    homePersonmyChart.off('click')
                    this.clickPeopleChart()
                } else {
                    this.initkeyPersonEcharts()
                    homePersonmyChart.off('click')
                    this.clickkeyPersonChart()
                }
                homePersonmyChart.resize()
src/views/home/index.vue
@@ -796,7 +796,7 @@
                    })
                })
            } else {
                this.$EventBus.$emit('', {
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'houseLayers',
                    type: 'VectorLayer'
                })
@@ -883,13 +883,14 @@
            this.activitySelectChange()
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'activityLayers',
                type: 'VectorLayer'
                type: 'ClusterLayer'
            })
            if (this.activityLayerShow == true) {
                this.activityList.forEach(item => {
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'activityLayers',
                        type: "billboard",
                        layerType: 'ClusterLayer',
                        params: item,
                        incident: this.activitySiteClick
                    })
@@ -897,7 +898,7 @@
            } else {
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'activityLayers',
                    type: 'VectorLayer'
                    type: 'ClusterLayer'
                })
            }
        },