guanqb
2022-09-20 e0713d5b1077dd03eed20ec12e13c49c57491fd9
地区选择下拉框
1 files modified
251 ■■■■■ changed files
src/views/home/index.vue 251 ●●●●● patch | view | raw | blame | history
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-19 18:29:26
 * @LastEditTime: 2022-09-20 14:41:50
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 * 
@@ -117,16 +117,16 @@
                <el-checkbox v-model="houseLayerShow" @change="houseChange">小区</el-checkbox>
            </div>
            <div class="layers-control-btn">
                <el-checkbox v-model="carLayerShow">警车</el-checkbox>
                <el-checkbox v-model="carLayerShow" @change="carChange">警车</el-checkbox>
            </div>
            <div class="layers-control-btn">
                <el-checkbox v-model="phoneLayerShow">手台</el-checkbox>
                <el-checkbox v-model="phoneLayerShow" @change="phoneChange">手台</el-checkbox>
            </div>
            <div class="layers-control-btn">
                <el-checkbox v-model="videoLayerShow">监控</el-checkbox>
                <el-checkbox v-model="monitoringLayerShow" @change="monitoringChange">监控</el-checkbox>
            </div>
            <div class="layers-control-btn">
                <el-checkbox v-model="panoramaLayerShow">全景</el-checkbox>
                <el-checkbox v-model="panoramaLayerShow" @change="panoramaChange">全景</el-checkbox>
            </div>
        </div>
        <div class="top-container">
@@ -160,15 +160,81 @@
            houseLayerShow: false,
            carLayerShow: false,
            phoneLayerShow: false,
            videoLayerShow: false,
            monitoringLayerShow: false,
            panoramaLayerShow: false,
            carList: [{
                name: '1号警车',
                lng: 115.998703,
                lat: 28.691435,
                alt: 100,
                url: '/img/icon/car.png'
            }, {
                name: '2号警车',
                lng: 115.984703,
                lat: 28.673435,
                alt: 100,
                url: '/img/icon/car.png'
            }, {
                name: '3号警车',
                lng: 116.009054,
                lat: 28.674692,
                alt: 100,
                url: '/img/icon/car.png'
            }],
            phoneList: [{
                name: '1号手台',
                lng: 116.007370,
                lat: 28.662075,
                alt: 100,
                url: '/img/icon/phone.png'
            }, {
                name: '2号手台',
                lng: 116.033595,
                lat: 28.702225,
                alt: 100,
                url: '/img/icon/phone.png'
            }, {
                name: '3号手台',
                lng: 115.99685299,
                lat: 28.70599572,
                alt: 100,
                url: '/img/icon/phone.png'
            }],
            monitoringList: [{
                name: '1号监控',
                lng: 116.025398,
                lat: 28.663066,
                alt: 100,
                url: '/img/icon/video.png'
            }, {
                name: '2号监控',
                lng: 116.0145001,
                lat: 28.694361,
                alt: 100,
                url: '/img/icon/video.png'
            }, {
                name: '3号监控',
                lng: 116.018293,
                lat: 28.624986,
                alt: 100,
                url: '/img/icon/video.png'
            }],
            panoramaList: [{
                name: '1号全景',
                lng: 116.027002,
                lat: 28.683302,
                alt: 100,
                url: '/img/icon/map-panorama.png'
            }],
            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: '',
            twoSelected: '',
            threeSelected: '',
            twoChooseData: {},
            threeChooseData: [],
            threeChooseData: []
        }
    },
    created () {
@@ -180,17 +246,72 @@
        this.initEquipmentEcharts()
        this.initEventChangeEcharts()
        this.initEventCountEcharts()
        this.$nextTick(() => {
            let positionColor = [
                global.DC.Namespace.Cesium.Color.fromBytes(
                    3,
                    255,
                    13,
                    100
                ),
                global.DC.Namespace.Cesium.Color.fromBytes(
                    102, 176, 255,
                    100
                ),
                global.DC.Namespace.Cesium.Color.fromBytes(
                    230, 162, 60,
                    100
                ),
                global.DC.Namespace.Cesium.Color.fromBytes(
                    245, 108, 108,
                    100
                ),
                global.DC.Namespace.Cesium.Color.fromBytes(
                    139, 195, 74,
                    100
                ),
                global.DC.Namespace.Cesium.Color.fromBytes(
                    244, 67, 54,
                    100
                ),
            ]
            let position = [
                [
                    [115.935114, 28.627012, 100],
                    [115.930150, 28.733535, 100],
                    [115.986738, 28.683523, 100],
                    [116.015526, 28.647454, 100],
                ],
                [
                    [115.935114, 28.627012, 100],
                    [116.015526, 28.647454, 100],
                    [116.080062, 28.590419, 100],
                    [116.075505, 28.528672, 100],
                    [115.959503, 28.530546, 100],
                ],
                [
                    [116.080062, 28.590419, 100],
                    [116.075505, 28.528672, 100],
                    [116.167934, 28.527504, 100],
                    [116.346666, 28.615709, 100],
                ],
                [
                    [116.015526, 28.647454, 100],
                    [116.080062, 28.590419, 100],
                    [116.346666, 28.615709, 100],
                    [116.285670, 28.732610, 100],
                ],
                [
                    [116.015526, 28.647454, 100],
                    [116.285670, 28.732610, 100],
                    [116.085312, 28.807226, 100],
                    [115.930150, 28.733535, 100],
                    [115.986738, 28.683523, 100]
                ]
            ]
            position.forEach((item) => {
            position.forEach((item, index) => {
                let str = ''
                item.forEach(it => {
                    str = str + `${it[0]},${it[1]},${it[2]};`
@@ -199,12 +320,7 @@
                this.$EventBus.$emit('layerPolygonAdd', {
                    layerName: 'polygonLayer',
                    positions: str,
                    material: global.DC.Namespace.Cesium.Color.fromBytes(
                        3,
                        255,
                        13,
                        10
                    ),
                    material: positionColor[index],
                })
            })
        })
@@ -532,6 +648,74 @@
                })
            }
        },
        carChange (e) {
            if (e == true) {
                this.carList.forEach(item => {
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'carLayers',
                        type: "billboard",
                        params: item
                    })
                })
            } else {
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'carLayers',
                    type: 'VectorLayer'
                })
            }
        },
        phoneChange (e) {
            if (e == true) {
                this.phoneList.forEach(item => {
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'phoneLayers',
                        type: "billboard",
                        params: item
                    })
                })
            } else {
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'phoneLayers',
                    type: 'VectorLayer'
                })
            }
        },
        monitoringChange (e) {
            if (e == true) {
                this.monitoringList.forEach(item => {
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'monitoringLayers',
                        type: "billboard",
                        params: item
                    })
                })
            } else {
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'monitoringLayers',
                    type: 'VectorLayer'
                })
            }
        },
        panoramaChange (e) {
            if (e == true) {
                this.panoramaList.forEach(item => {
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'panoramaLayers',
                        type: "billboard",
                        params: item
                    })
                })
            } else {
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'panoramaLayers',
                    type: 'VectorLayer'
                })
            }
        },
        getChooseData () {
            let arr1 = ['一区', '二区', '三区']
            let arr2 = ['1所', '2所', '3所']
@@ -565,7 +749,38 @@
            console.log(item2)
            this.threeChooseData = this.twoChooseData[item1]
        }
    }
    },
    destroyed () {
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'polygonLayer',
            type: 'VectorLayer'
        })
        this.$EventBus.$emit('removeMxTileset', {
            titlesetName: 'sdTilesetLayer'
        })
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'carLayers',
            type: 'VectorLayer'
        })
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'phoneLayers',
            type: 'VectorLayer'
        })
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'monitoringLayers',
            type: 'VectorLayer'
        })
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'panoramaLayers',
            type: 'VectorLayer'
        })
    },
}
</script>
@@ -610,15 +825,15 @@
                background: #ff0000;
            }
        }
        ::v-deep .el-table tr:nth-child(2n) {
        :deep(.el-table tr:nth-child(2n)) {
            background: #03254c;
            color: #fff;
        }
        ::v-deep .el-table tr:nth-child(2n-1) {
        :deep(.el-table tr:nth-child(2n-1)) {
            background: #26426a;
            color: #fff;
        }
        ::v-deep .el-table tr:hover td {
        :deep(.el-table tr:hover td) {
            color: #000;
        }
    }