guanqb
2023-04-03 2ddc317300584f1789cb6f4a72c6870c7541d7a2
修改
7 files modified
1 files added
166 ■■■■■ changed files
src/components/map/components/houseDeepDataPopup.vue 102 ●●●●● patch | view | raw | blame | history
src/components/map/components/mapSearchPopup.vue 1 ●●●● patch | view | raw | blame | history
src/components/map/index.vue 5 ●●●● patch | view | raw | blame | history
src/components/mapSearchBox/index.vue 1 ●●●● patch | view | raw | blame | history
src/store/getters.js 4 ●●● patch | view | raw | blame | history
src/store/modules/popupParams.js 19 ●●●● patch | view | raw | blame | history
src/views/activity/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 33 ●●●● patch | view | raw | blame | history
src/components/map/components/houseDeepDataPopup.vue
New file
@@ -0,0 +1,102 @@
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-02 09:39:32
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-01 14:43:39
 * @FilePath: \srs-police-affairs\src\components\map\components\mapSearchPopup.vue
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<template>
    <div>
        <div v-if="houseDeepDataPopup" class="popup-dom" id="houseDeepDataPopup">
            <div style="transform: translate(-50%, 0);">
                <!-- 样式自己修改 -->
                <div class="content" :class="{ 'scale-dom': scaleDomFlag }">
                    {{ houseDeepDataPopupData.name }}
                </div>
                <div class="bottom-arrow"></div>
            </div>
        </div>
    </div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
    name: 'houseDeepDataPopup',
    inject: ["getWidth", 'userInfo'],
    data () {
        return {
            scaleDomFlag: false
        }
    },
    computed: {
        ...mapGetters([
            'houseDeepDataPopup',
            'houseDeepDataPopupData'
        ])
    },
    mounted () {
        if (this.getWidth() > 7000) {
            this.scaleDomFlag = true
        } else {
            this.scaleDomFlag = false
        }
    },
    methods: {
    }
}
</script>
<style lang="scss" scoped>
.popup-dom {
    position: fixed;
    top: -16px;
    left: 0;
    z-index: 1 !important;
    &>.popup-box {
        position: relative;
    }
    .bottom-arrow {
        position: absolute;
        left: 50%;
        bottom: 0px;
        width: 0;
        height: 0;
        border: 10px solid transparent;
        border-top-color: $bg-color;
        transform: translate(-50%, 100%);
    }
    .scale-dom {
        transform: scale(3);
        transform-origin: left;
    }
    .content {
        padding: 0.5vh;
        width: 220px;
        background: $bg-color;
        border-radius: 4px;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
</style>
src/components/map/components/mapSearchPopup.vue
@@ -44,7 +44,6 @@
    },
    mounted () {
        if (this.getWidth() > 7000) {
            this.scaleDomFlag = true
        } else {
src/components/map/index.vue
@@ -89,6 +89,8 @@
        <map-search-popup></map-search-popup>
        <house-deep-data-popup></house-deep-data-popup>
        <y-tool-tip></y-tool-tip>
        <assemble-box></assemble-box>
@@ -160,13 +162,14 @@
import activityPolicePopup from './components/activityPolicePopup.vue'
import videoListPopup from './components/videoListPopup.vue'
import mapSearchPopup from './components/mapSearchPopup.vue'
import houseDeepDataPopup from './components/houseDeepDataPopup.vue'
import yToolTip from './components/yToolTip.vue'
import createTools from '@/utils/tools/index'
export default {
    name: 'mapBox',
    components: { mapPopup, activityPolicePopup, videoListPopup, mapSearchPopup, yToolTip },
    components: { mapPopup, activityPolicePopup, videoListPopup, mapSearchPopup, houseDeepDataPopup, yToolTip },
    data () {
        return {
src/components/mapSearchBox/index.vue
@@ -106,7 +106,6 @@
        searchExtensivelyChange (e) {
            // console.log(e)
        },
        searchExtensivelyFocus () {
src/store/getters.js
@@ -17,7 +17,9 @@
    videoListPopupData: (state) => state.popupParams.videoListPopupData,
    mapSearchPopup: (state) => state.popupParams.mapSearchPopup,
    mapSearchPopupData: (state) => state.popupParams.mapSearchPopupData,
    houseDeepDataPopup: (state) => state.popupParams.houseDeepDataPopup
    houseDeepDataPopup: (state) => state.popupParams.houseDeepDataPopup,
    houseDeepDataPopupData: (state) => state.popupParams.houseDeepDataPopupData,
}
export default getters
src/store/modules/popupParams.js
@@ -25,7 +25,8 @@
        mapSearchPopup: false,
        houseDeepDataPopup: false,
        mapSearchPopupData: {}
        mapSearchPopupData: {},
        houseDeepDataPopupData: {}
    },
    mutations: {
@@ -54,14 +55,24 @@
        SET_MAPSEARCHPOPUP (state, mapSearchPopup) {
            state.mapSearchPopup = mapSearchPopup
        },
            console.log('SET_MAPSEARCHPOPUP', mapSearchPopup)
        SET_HOUSEDEEPDATAPOPUP (state, mapSearchPopup) {
            state.houseDeepDataPopup = mapSearchPopup
        },
        SET_MAPSEARCHPOPUPDATA (state, mapSearchPopupData) {
            state.mapSearchPopupData = mapSearchPopupData
            console.log('SET_MAPSEARCHPOPUPDATA', mapSearchPopupData)
        },
        SET_HOUSEDEEPDATAPOPUP (state, houseDeepDataPopup) {
            state.houseDeepDataPopup = houseDeepDataPopup
            console.log('SET_HOUSEDEEPDATAPOPUP', houseDeepDataPopup)
        },
        SET_HOUSEDEEPDATAPOPUPDATA (state, houseDeepDataPopupData) {
            state.houseDeepDataPopupData = houseDeepDataPopupData
            console.log('SET_HOUSEDEEPDATAPOPUPDATA', houseDeepDataPopupData)
        }
    },
src/views/activity/index.vue
@@ -695,6 +695,7 @@
                            this.$EventBus.$emit('layerPointAdd', {
                                layerName: layerName,
                                type: "billboard",
                                layerType: 'ClusterLayer',
                                params: {
                                    ...item,
                                    lng: item.longitude,
src/views/house/index.vue
@@ -74,10 +74,10 @@
                <div class="base-info" v-show="navType == 0">
                    <div class="sub-nav-list">
                        <div class="sub-nav" :class="{ on: subNavType == 1 }" @click="subNavType = 1">楼栋</div>
                        <div class="sub-nav" :class="{ on: subNavType == 2 }" @click="subNavType = 2">出入口</div>
                        <div class="sub-nav" :class="{ on: subNavType == 3 }" @click="subNavType = 3">停车场</div>
                        <div class="sub-nav" :class="{ on: subNavType == 4 }" @click="subNavType = 4">商业</div>
                        <div class="sub-nav" :class="{ on: subNavType == 1 }" @click="switchSubNav(1)">楼栋</div>
                        <div class="sub-nav" :class="{ on: subNavType == 2 }" @click="switchSubNav(2)">出入口</div>
                        <div class="sub-nav" :class="{ on: subNavType == 3 }" @click="switchSubNav(3)">停车场</div>
                        <div class="sub-nav" :class="{ on: subNavType == 4 }" @click="switchSubNav(4)">商业</div>
                    </div>
                    <div class="floor-content" v-show="subNavType == 1">
@@ -187,7 +187,7 @@
                                                <!-- :class="[{ 'chuzu': value.houseType == '出租' }, { 'zizhu': value.houseType == '自住' }, { 'kongzhi': value.houseType == '空置' }, { 'shangye': value.houseType == '商业' }]" -->
                                                {{ value.properties.fojcu }}
                                                <!-- <div class="flow"></div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="warning"></div>-->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <div class="warning"></div>-->
                                            </div>
                                        </div>
                                    </div>
@@ -606,6 +606,16 @@
            this.getAoiByPtStd(e)
        },
        // 切换小区信息导航栏
        switchSubNav (type) {
            this.subNavType = type
            this.$store.commit('SET_HOUSEDEEPDATAPOPUP', false)
            this.$EventBus.$emit("mapClearLayer", {
                layerName: "deepDataLayer",
                type: "VectorLayer",
            })
        },
        /**
         * @description: 顶部搜索条件更改
         * @param {*} val
@@ -727,6 +737,12 @@
        navClick (e) {
            this.navType = e.target.dataset.type
            this.$store.commit('SET_HOUSEDEEPDATAPOPUP', false)
            this.$EventBus.$emit("mapClearLayer", {
                layerName: "deepDataLayer",
                type: "VectorLayer",
            })
            if (this.navType == 1) {
                this.policeInfoLoading = true
@@ -1126,6 +1142,11 @@
                siteJd: `${row.x}`,
                siteWd: `${row.y}`,
                siteGd: 1000,
            })
            this.$store.commit('SET_HOUSEDEEPDATAPOPUP', true)
            this.$store.commit('SET_HOUSEDEEPDATAPOPUPDATA', {
                ...row
            })
            var popup = new global.DC.DivForms(global.viewer, {
@@ -1583,6 +1604,8 @@
            showBtn: false,
        })
        this.$store.commit('SET_HOUSEDEEPDATAPOPUP', false)
        this.$parent.$parent.resize("0px")
        this.$EventBus.$emit("mapRemoveLayer", {
            layerName: "searchLayer",