shuishen
2022-09-22 c4866f13bf3315293d48f2ab90f2f87255e1f712
逻辑调整
5 files modified
2 files added
537 ■■■■ changed files
public/img/bg.png patch | view | raw | blame | history
public/img/icon/house.png patch | view | raw | blame | history
src/components/map/index.vue 23 ●●●● patch | view | raw | blame | history
src/styles/dc/index.scss 3 ●●●● patch | view | raw | blame | history
src/views/home/index.vue 229 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 272 ●●●●● patch | view | raw | blame | history
src/views/lyout/index.vue 10 ●●●●● patch | view | raw | blame | history
public/img/bg.png
public/img/icon/house.png
src/components/map/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 17:00:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-09-22 08:46:54
 * @LastEditTime: 2022-09-22 11:26:48
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -261,13 +261,13 @@
                // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
                // fromDegrees()方法,将经纬度和高程转换为世界坐标
                destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
                    116.027429, 28.681978, 8000.0
                    116.112550, 28.196631, 50000
                ),
                orientation: {
                    // 指向
                    heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                    // 视角
                    pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                    pitch: global.DC.Namespace.Cesium.Math.toRadians(-45),
                    roll: 0.0
                }
            })
@@ -338,7 +338,7 @@
        })
        this.$EventBus.$on('layerPolygonAdd', (params) => {
            that.layerPolygonAdd(params.layerName, params.positions, params.material)
            that.layerPolygonAdd(params.layerName, params.positions, params.material, params.distanceDisplayCondition)
        })
        this.$EventBus.$on('layerPolylineAdd', (params) => {
@@ -483,14 +483,14 @@
                pointElement.size = [32, 32]
            } else if (type == "label") {
                pointElement = new global.DC.Label(new global.DC.Position(Number(params.lng), Number(params.lat), 0), params.url)
                pointElement = new global.DC.Label(new global.DC.Position(Number(params.lng), Number(params.lat), Number(params.alt)), params.text)
                pointElement.setStyle({
                    fillColor: global.DC.Color.CRIMSON,
                    style: global.DC.Namespace.Cesium.LabelStyle.FILL_AND_OUTLINE,
                    outlineColor: global.DC.Color.WHITE, // 边框颜色
                    outlineWidth: 8, // 边框大小,
                    font: '14px sans-serif',
                    outlineWidth: 4, // 边框大小,
                    font: '16px sans-serif',
                    pixelOffset: { x: 0, y: -24 }
                })
            }
@@ -506,8 +506,9 @@
         * @param {*} layerName 图层名称
         * @param {*} positions 图层位置数据
         * @param {*} material 颜色
         * @param {*} distanceDisplayCondition 可见距离
         */
        layerPolygonAdd (layerName, positions, material) {
        layerPolygonAdd (layerName, positions, material, distanceDisplayCondition) {
            if (!layersObjcect[layerName] || layersObjcect[layerName] == null) {
                this.mapAddLayer(layerName, 'VectorLayer')
@@ -518,6 +519,7 @@
            polygon.setStyle({
                material: material,
                distanceDisplayCondition: distanceDisplayCondition,
                perPositionHeight: true,
            })
@@ -606,9 +608,6 @@
            tilesetLayer.addOverlay(tilesetObject[titlesetName])
            // global.viewer.flyTo(tilesetObject[titlesetName])
            this.toPosition(116.027212, 28.678499, 600, -3, -45)
            tilesetObject[titlesetName].on(global.DC.MouseEventType.CLICK, incident)
        },
@@ -640,7 +639,7 @@
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 20px;
        left: 420px;
        bottom: 10px;
        width: 36px;
        height: 36px;
src/styles/dc/index.scss
@@ -11,13 +11,14 @@
.dc-location-bar {
    left: 50% !important;
    bottom: 10px !important;
    transform: translate(-50%, 0);
}
.dc-zoom-controller {
    top: auto !important;
    bottom: 56px !important;
    right: 20px !important;
    left: 420px !important;
    width: 36px !important;
    height: auto !important;
    border-radius: 5px !important;
src/views/home/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-09-22 08:48:28
 * @LastEditTime: 2022-09-22 11:54:04
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 * 
@@ -80,7 +80,7 @@
            </div>
            <div class="alert-box">
                <div class="title">
                    <div class="one-level">警情历史(近一年)</div>
                    <div class="one-level">历史警情(近一年)</div>
                    <!-- <div class="two-level">历史累计</div> -->
                </div>
@@ -93,7 +93,7 @@
            </div>
            <div class="crowd-box">
                <div class="title">
                    <div class="one-level">重点稳控/服务人群</div>
                    <div class="one-level">重点人群</div>
                    <div class="two-level">当前38</div>
                </div>
@@ -231,6 +231,8 @@
</template>
<script>
let cylinderLayer = null
export default {
    data () {
        return {
@@ -248,6 +250,44 @@
            phoneDetails: {},
            phoneTitle: '',
            phoneVisible: false,
            houseList: [
                {
                    name: '1号小区',
                    lng: 116.022877,
                    lat: 28.685077,
                    alt: 100,
                    url: '/img/icon/house.png'
                },
                {
                    name: '2号小区',
                    lng: 116.024711,
                    lat: 28.712695,
                    alt: 100,
                    url: '/img/icon/house.png'
                },
                {
                    name: '3号小区',
                    lng: 116.008426,
                    lat: 28.671838,
                    alt: 100,
                    url: '/img/icon/house.png'
                },
                {
                    name: '4号小区',
                    lng: 116.017700,
                    lat: 28.675880,
                    alt: 100,
                    url: '/img/icon/house.png'
                },
                {
                    name: '5号小区',
                    lng: 116.035374,
                    lat: 28.681405,
                    alt: 100,
                    url: '/img/icon/house.png'
                }
            ],
            carList: [{
                name: '1号警车',
@@ -319,7 +359,7 @@
            arr: [{ 'type': '孤寡老人', 'num': '0', 'radio': '0.00%' }, { 'type': '邪教人员', 'num': '1', 'radio': '2.00%' }, { 'type': '上访人员', 'num': '8', 'radio': '14.00%' }, { 'type': '涉毒', 'num': '15', 'radio': '27.00%' }, { 'type': '留守儿童', 'num': '6', 'radio': '11.00%' }, { 'type': '重点青少年', 'num': '5', 'radio': '9.00%' }],
            chooseData: {},
            oneSelected: '',
            oneSelected: '全部',
            twoSelected: '',
            threeSelected: '',
            twoChooseData: {},
@@ -400,7 +440,48 @@
                ]
            ]
            let position2 = [
                [
                    [116.015526, 28.647454, 0],
                    [116.285670, 28.732610, 0],
                    [116.146022, 28.726446, 0],
                    [116.063119, 28.708172, 0],
                ],
                [
                    [116.285670, 28.732610, 0],
                    [116.085312, 28.807226, 0],
                    [116.071504, 28.750699, 0],
                    [116.146022, 28.726446, 0],
                ],
                [
                    [116.085312, 28.807226, 0],
                    [115.930150, 28.733535, 0],
                    [116.045446, 28.729623, 0],
                    [116.071504, 28.750699, 0]
                ],
                [
                    [115.930150, 28.733535, 0],
                    [115.986738, 28.683523, 0],
                    [116.015526, 28.647454, 0],
                    [116.063119, 28.708172, 0],
                    [116.045446, 28.729623, 0]
                ],
                [
                    [116.045446, 28.729623, 0],
                    [116.063119, 28.708172, 0],
                    [116.146022, 28.726446, 0],
                    [116.071504, 28.750699, 0]
                ]
            ]
            cylinderLayer = new global.DC.PrimitiveLayer('cylinderLayer')
            global.viewer.addLayer(cylinderLayer)
            position.forEach((item, index) => {
                let str = ''
                item.forEach(it => {
                    str = str + `${it[0]},${it[1]},${it[2]};`
@@ -410,6 +491,49 @@
                    layerName: 'polygonLayer',
                    positions: str,
                    material: positionColor[index],
                    distanceDisplayCondition: {
                        near: 20000, //最近距离
                        far: Number.MAX_VALUE //最远距离
                    }
                })
                const center = this.getCenter(item)
                this.$EventBus.$emit('layerPointAdd', {
                    layerName: 'homePersonLayer',
                    type: 'label',
                    params: {
                        lng: center[0],
                        lat: center[1],
                        alt: 1200,
                        text: '5656'
                    }
                })
                let cylinder = new global.DC.LightCylinderPrimitive(new global.DC.Position(center[0], center[1]), 1200, 1, 600)
                cylinder.setStyle({
                    color: global.DC.Namespace.Cesium.Color.fromBytes(
                        102, 176, 255,
                        255
                    )
                })
                cylinderLayer.addOverlay(cylinder)
            })
            position2.forEach((item, index) => {
                let str = ''
                item.forEach(it => {
                    str = str + `${it[0]},${it[1]},${it[2]};`
                })
                this.$EventBus.$emit('layerPolygonAdd', {
                    layerName: 'polygonLayer',
                    positions: str,
                    material: positionColor[index],
                    distanceDisplayCondition: {
                        near: 0, //最近距离
                        far: 20000 //最远距离
                    }
                })
            })
@@ -419,6 +543,33 @@
    updated () {
    },
    methods: {
        getCenter (arr) {
            let centerLonLat = []
            if (arr.length) {
                const lon = []
                const lat = []
                const poly = []
                for (let i = 0, len = arr.length; i < len; i++) {
                    lon.push(arr[i][0])
                    lat.push(arr[i][1])
                }
                for (let i = 0, len = lon.length; i < len; i++) {
                    poly.push({
                        x: parseFloat(lon[i]),
                        y: parseFloat(lat[i]),
                        z: 0
                    })
                }
                const sortedLongitudeArray = poly.map(item => item.x).sort()
                const sortedLatitudeArray = poly.map(item => item.y).sort()
                const centerLongitude = ((parseFloat(sortedLongitudeArray[0]) + parseFloat(sortedLongitudeArray[sortedLongitudeArray.length - 1])) / 2).toFixed(14)
                const centerLatitude = ((parseFloat(sortedLatitudeArray[0]) + parseFloat(sortedLatitudeArray[sortedLatitudeArray.length - 1])) / 2).toFixed(14)
                console.log(centerLongitude, centerLatitude)
                centerLonLat = [Number(centerLongitude), Number(centerLatitude)]
            }
            return centerLonLat
        },
        navClick (e) {
            this.navType = e.target.dataset.type
        },
@@ -727,23 +878,26 @@
            option && myChart.setOption(option)
        },
        // 模型的点击事件
        tilesetClick (e) {
            this.$router.push({ path: '/lyout/house', query: { searchName: 'xxx小区' } })
        },
        houseChange (e) {
            if (e == true) {
                this.$EventBus.$emit('addMxTileset', {
                    titlesetName: 'sdTilesetLayer',
                    titlesetUrl: "/sd/tileset.json",
                    incident: this.tilesetClick
                this.houseList.forEach(item => {
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'houseLayers',
                        type: "billboard",
                        params: item,
                        incident: this.houseSiteClick
                    })
                })
            } else {
                this.$EventBus.$emit('removeMxTileset', {
                    titlesetName: 'sdTilesetLayer'
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'houseLayers',
                    type: 'VectorLayer'
                })
            }
        },
        houseSiteClick (e) {
            this.$router.push({ path: '/lyout/house', query: { searchName: 'xxx小区' } })
        },
        carChange (e) {
@@ -819,7 +973,7 @@
        },
        getChooseData () {
            let arr1 = ['信州区车站派出所', '信州区沙溪派出所', '信州区灵溪派出所', '信州区北门派出所', '信州区江光派出所', '信州区水南派出所', '信州区秦峰派出所', '信州区茅家岭派出所', '信州区西市派出所', '信州区朝阳派出所']
            let arr1 = ['全部', '车站派出所', '沙溪派出所', '灵溪派出所', '北门派出所', '江光派出所', '水南派出所', '秦峰派出所', '茅家岭派出所', '西市派出所', '朝阳派出所']
            let arr2 = ['辖区1', '辖区2', '辖区3', '辖区4', '辖区5', '辖区6', '辖区7', '辖区8']
            let arr3 = ['A小区', 'B小区', 'C小区']
            var obj = {}
@@ -872,6 +1026,24 @@
    },
    watch: {
        oneSelected (item1, item2) {
            if (item1 == '全部') {
                this.$EventBus.$emit('toPosition', {
                    siteJd: 116.112550,
                    siteWd: 28.196631,
                    siteGd: 50000,
                    siteHeading: 0,
                    sitePitch: -45
                })
            } else if (item1 == '车站派出所') {
                this.$EventBus.$emit('toPosition', {
                    siteJd: 116.082737,
                    siteWd: 28.724034,
                    siteGd: 18000,
                    siteHeading: -3,
                    sitePitch: -90
                })
            }
            this.twoChooseData = this.chooseData[item1]
        },
        twoSelected (item1, item2) {
@@ -897,15 +1069,10 @@
            type: 'VectorLayer'
        })
        if (this.houseLayerShow == false) {
            this.$EventBus.$emit('addMxTileset', {
                titlesetName: 'sdTilesetLayer',
                titlesetUrl: "/sd/tileset.json",
                incident: this.tilesetClick
            })
        }
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'houseLayers',
            type: 'VectorLayer'
        })
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'carLayers',
@@ -926,6 +1093,18 @@
            layerName: 'panoramaLayers',
            type: 'VectorLayer'
        })
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'homePersonLayer',
            type: 'VectorLayer'
        })
        cylinderLayer.clear()
        cylinderLayer.remove()
        cylinderLayer = null
    },
}
</script>
src/views/house/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-09-21 18:07:42
 * @LastEditTime: 2022-09-22 11:24:11
 * @FilePath: \srs-police-affairs\src\views\house\index.vue
 * @Description: 小区-栋-层-房屋
 * 
@@ -18,7 +18,9 @@
        </div>
        <div class="result-content">
            <div class="housing-estate-info">
                <div class="housing-bg"></div>
                <div class="housing-bg">
                    <img style="width: 100%; height: 100%;" src="/img/bg.png" alt />
                </div>
                <div class="housing-introduce">
                    <div>
                        <div class="l">分类属性:</div>
@@ -56,10 +58,11 @@
                <div class="floor-content">
                    <div class="ridgepole-list">
                        <div
                            v-for="(item, index) in 10"
                            v-for="(item, index) in villageHousesList"
                            :key="index"
                            @click="ridgepoleNum = item"
                        >{{item}}栋</div>
                            @click="buildingClick(item)"
                            :class="{on: ridgepoleNum.name == item.name}"
                        >{{item.name}}</div>
                    </div>
                    <div class="ridgepole-info">
                        <div class="title">楼栋信息</div>
@@ -67,15 +70,15 @@
                        <div class="content">
                            <div>
                                <div>电梯</div>
                                <div>{{ ridgepoleNum != 10 ? '有' : '无' }}</div>
                                <div>{{ ridgepoleNum.elevator == true ? '有' : '无' }}</div>
                            </div>
                            <div>
                                <div>楼层总数</div>
                                <div>{{ ridgepoleNum != (2 || 6 || 10) ? 54 : 60}}</div>
                                <div>{{ ridgepoleNum.floorAll }}</div>
                            </div>
                            <div>
                                <div>户室总数</div>
                                <div>{{ ridgepoleNum != (2 || 6 || 10) ? 200 : 240}}</div>
                                <div>{{ ridgepoleNum.familyRoom }}</div>
                            </div>
                        </div>
                    </div>
@@ -85,26 +88,26 @@
                        <div class="content">
                            <div class="one">
                                <div>
                                    <div>{{ ridgepoleNum != (2 || 6 || 10) ? 40 : 60}}</div>
                                    <div>{{ ridgepoleNum.realityPerson }}</div>
                                    <div>实有人口</div>
                                </div>
                                <div>
                                    <div>{{ ridgepoleNum != (2 || 6 || 10) ? 10 : 15}}</div>
                                    <div>{{ ridgepoleNum.emphasisPerson }}</div>
                                    <div>重点人口</div>
                                </div>
                            </div>
                            <div class="two">
                                <div>
                                    <div>{{ ridgepoleNum != (2 || 6 || 10) ? 6 : 14}}</div>
                                    <div>{{ ridgepoleNum.kosekiPerson }}</div>
                                    <div>户籍人口</div>
                                </div>
                                <div>
                                    <div>{{ ridgepoleNum != (2 || 6 || 10) ? 9 : 22}}</div>
                                    <div>{{ ridgepoleNum.flowPerson }}</div>
                                    <div>流动人口</div>
                                </div>
                                <div>
                                    <div>{{ ridgepoleNum != (2 || 6 || 10) ? 22 : 8}}</div>
                                    <div>{{ ridgepoleNum.outsidePerson }}</div>
                                    <div>境外人口</div>
                                </div>
                            </div>
@@ -115,19 +118,19 @@
                        <div class="content">
                            <div>
                                <div>7</div>
                                <div>{{ ridgepoleNum.houseAll }}</div>
                                <div>房屋总数</div>
                            </div>
                            <div>
                                <div>2</div>
                                <div>{{ ridgepoleNum.rent }}</div>
                                <div>出租</div>
                            </div>
                            <div>
                                <div>2</div>
                                <div>{{ ridgepoleNum.occupation }}</div>
                                <div>自住</div>
                            </div>
                            <div>
                                <div>2</div>
                                <div>{{ ridgepoleNum.vacancy }}</div>
                                <div>空置</div>
                            </div>
                        </div>
@@ -303,7 +306,24 @@
export default {
    data () {
        return {
            ridgepoleNum: 1,
            ridgepoleNum: {
                name: '1栋',
                lng: 116.020894,
                lat: 28.687406,
                alt: 360,
                elevator: true,
                floorAll: 48,
                familyRoom: 288,
                realityPerson: 160,
                emphasisPerson: 16,
                kosekiPerson: 98,
                flowPerson: 20,
                outsidePerson: 16,
                houseAll: 288,
                rent: 120,
                occupation: 160,
                vacancy: 8
            },
            searchHouse: '',
            navType: 0,
            arr: [
@@ -339,6 +359,188 @@
                }
            ],
            dialogVisible: false,
            villageHousesList: [
                {
                    name: '1栋',
                    lng: 116.020894,
                    lat: 28.687406,
                    alt: 360,
                    elevator: true,
                    floorAll: 48,
                    familyRoom: 288,
                    realityPerson: 160,
                    emphasisPerson: 16,
                    kosekiPerson: 98,
                    flowPerson: 20,
                    outsidePerson: 16,
                    houseAll: 288,
                    rent: 120,
                    occupation: 160,
                    vacancy: 8
                },
                {
                    name: '2栋',
                    lng: 116.020919,
                    lat: 28.686838,
                    alt: 360,
                    elevator: true,
                    floorAll: 48,
                    familyRoom: 260,
                    realityPerson: 156,
                    emphasisPerson: 11,
                    kosekiPerson: 126,
                    flowPerson: 26,
                    outsidePerson: 16,
                    houseAll: 260,
                    rent: 80,
                    occupation: 148,
                    vacancy: 32
                },
                {
                    name: '3栋',
                    lng: 116.020980,
                    lat: 28.686286,
                    alt: 360,
                    elevator: true,
                    floorAll: 48,
                    familyRoom: 288,
                    realityPerson: 160,
                    emphasisPerson: 16,
                    kosekiPerson: 98,
                    flowPerson: 20,
                    outsidePerson: 16,
                    houseAll: 288,
                    rent: 120,
                    occupation: 160,
                    vacancy: 8
                },
                {
                    name: '4栋',
                    lng: 116.021010,
                    lat: 28.685721,
                    alt: 360,
                    elevator: true,
                    floorAll: 48,
                    familyRoom: 260,
                    realityPerson: 156,
                    emphasisPerson: 11,
                    kosekiPerson: 126,
                    flowPerson: 26,
                    outsidePerson: 16,
                    houseAll: 260,
                    rent: 80,
                    occupation: 148,
                    vacancy: 32
                },
                {
                    name: '5栋',
                    lng: 116.021033,
                    lat: 28.685127,
                    alt: 360,
                    elevator: true,
                    floorAll: 48,
                    familyRoom: 288,
                    realityPerson: 160,
                    emphasisPerson: 16,
                    kosekiPerson: 98,
                    flowPerson: 20,
                    outsidePerson: 16,
                    houseAll: 288,
                    rent: 120,
                    occupation: 160,
                    vacancy: 8
                },
                {
                    name: '6栋',
                    lng: 116.024115,
                    lat: 28.685852,
                    alt: 360,
                    elevator: true,
                    floorAll: 48,
                    familyRoom: 260,
                    realityPerson: 156,
                    emphasisPerson: 11,
                    kosekiPerson: 126,
                    flowPerson: 26,
                    outsidePerson: 16,
                    houseAll: 260,
                    rent: 80,
                    occupation: 148,
                    vacancy: 32
                },
                {
                    name: '7栋',
                    lng: 116.024124,
                    lat: 28.685838,
                    alt: 360,
                    elevator: true,
                    floorAll: 48,
                    familyRoom: 288,
                    realityPerson: 160,
                    emphasisPerson: 16,
                    kosekiPerson: 98,
                    flowPerson: 20,
                    outsidePerson: 16,
                    houseAll: 288,
                    rent: 120,
                    occupation: 160,
                    vacancy: 8
                },
                {
                    name: '8栋',
                    lng: 116.028297,
                    lat: 28.686011,
                    alt: 360,
                    elevator: true,
                    floorAll: 48,
                    familyRoom: 260,
                    realityPerson: 156,
                    emphasisPerson: 11,
                    kosekiPerson: 126,
                    flowPerson: 26,
                    outsidePerson: 16,
                    houseAll: 260,
                    rent: 80,
                    occupation: 148,
                    vacancy: 32
                },
                {
                    name: '9栋',
                    lng: 116.028294,
                    lat: 28.686452,
                    alt: 360,
                    elevator: true,
                    floorAll: 48,
                    familyRoom: 288,
                    realityPerson: 160,
                    emphasisPerson: 16,
                    kosekiPerson: 98,
                    flowPerson: 20,
                    outsidePerson: 16,
                    houseAll: 288,
                    rent: 120,
                    occupation: 160,
                    vacancy: 8
                },
                {
                    name: '10栋',
                    lng: 116.027542,
                    lat: 28.686920,
                    alt: 360,
                    elevator: true,
                    floorAll: 48,
                    familyRoom: 260,
                    realityPerson: 156,
                    emphasisPerson: 11,
                    kosekiPerson: 126,
                    flowPerson: 26,
                    outsidePerson: 16,
                    houseAll: 260,
                    rent: 80,
                    occupation: 148,
                    vacancy: 32
                }
            ],
            JWdetails: {},
            apartmentOptions: [{
                value: '1',
@@ -366,6 +568,19 @@
    mounted () {
        this.$nextTick(() => {
            this.searchHouse = this.$route.query.searchName
            this.$EventBus.$emit('addMxTileset', {
                titlesetName: 'sdTilesetLayer',
                titlesetUrl: '/sd/tileset.json'
            })
            this.$EventBus.$emit('toPosition', {
                siteJd: 116.027212,
                siteWd: 28.678499,
                siteGd: 600,
                siteHeading: -3,
                sitePitch: -45
            })
        })
    },
    updated () {
@@ -393,6 +608,22 @@
            this.residentDetailsShow = false
        },
        buildingClick (item) {
            if (item.name == this.ridgepoleNum.name) return
            this.ridgepoleNum = item
            this.ridgepoleNum.siteJd = item.lng
            this.ridgepoleNum.siteWd = item.lat
            this.ridgepoleNum.siteGd = item.alt
            this.$EventBus.$emit('toPosition', this.ridgepoleNum)
        }
    },
    destroyed () {
        this.$EventBus.$emit('removeMxTileset', {
            titlesetName: 'sdTilesetLayer'
        })
    }
}
</script>
@@ -492,6 +723,11 @@
                        height: 36px;
                        border: 1px solid #ccc;
                        cursor: pointer;
                        &.on {
                            color: orange;
                            border-color: orange;
                        }
                    }
                }
src/views/lyout/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:24
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-09-21 17:50:48
 * @LastEditTime: 2022-09-22 11:21:18
 * @FilePath: \srs-police-affairs\src\views\lyout\index.vue
 * @Description: 
 * 
@@ -64,14 +64,11 @@
                    menuName: '安保活动',
                    path: '/lyout/activity'
                },
            ],
            // 当前跳转的路径
            currentPath: ''
            ]
        }
    },
    mounted () {
        this.currentPath = this.$route.path
    },
    methods: {
@@ -83,8 +80,7 @@
         */
        goToPath (params) {
            if (params.path) {
                if (params.path == this.currentPath) return
                this.currentPath = params.path
                if (this.$route.path == params.path) return
                this.$router.push(params.path)
            } else {
                params.childrenFlag = !params.childrenFlag