shuishen
2022-09-20 fa12140c18251405c2393400f957f90eef5c4807
警车、视频等更改
4 files modified
1 files added
184 ■■■■ changed files
public/video/sp.mp4 patch | view | raw | blame | history
src/components/map/index.vue 17 ●●●● patch | view | raw | blame | history
src/views/home/index.vue 16 ●●●●● patch | view | raw | blame | history
src/views/police/index.vue 106 ●●●●● patch | view | raw | blame | history
src/views/video/index.vue 45 ●●●● patch | view | raw | blame | history
public/video/sp.mp4
Binary files differ
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-20 11:42:23
 * @LastEditTime: 2022-09-20 15:05:14
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -345,7 +345,7 @@
        })
        this.$EventBus.$on('flyToPosition', (params) => {
            that.flyToPosition(params.siteJd, params.siteWd, params.siteGd = 0, params.siteHeading = 0, params.sitePitch = -90, params.siteRoll = 0, params.time = 3)
            that.flyToPosition(params.siteJd, params.siteWd, params.siteGd = 2000, params.siteHeading = 0, params.sitePitch = -90, params.siteRoll = 0, params.time = 3)
        })
@@ -447,7 +447,8 @@
         */
        mapClearLayer (layerName, type) {
            if (type == 'VectorLayer') {
                layersObjcect[layerName].clear()
                if (layersObjcect[layerName] && layersObjcect[layerName] != null)
                    layersObjcect[layerName].clear()
            }
        },
@@ -461,8 +462,6 @@
        layerPointAdd (layerName, type, params, incident) {
            if (!layersObjcect[layerName] || layersObjcect[layerName] == null) {
                this.mapAddLayer(layerName, 'VectorLayer')
                console.log(global.viewer.imageryLayers)
            }
            let pointElement
@@ -581,9 +580,11 @@
         * @param {*} incident 模型点击事件
         */
        removeMxTileset (titlesetName, incident) {
            tilesetObject[titlesetName].off(global.DC.MouseEventType.CLICK, incident)
            tilesetLayer.removeOverlay(tilesetObject[titlesetName])
            tilesetObject[titlesetName] = null
            if (tilesetObject[titlesetName] && tilesetObject[titlesetName] != null) {
                tilesetObject[titlesetName].off(global.DC.MouseEventType.CLICK, incident)
                tilesetLayer.removeOverlay(tilesetObject[titlesetName])
                tilesetObject[titlesetName] = null
            }
        },
    },
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-20 14:38:00
 * @LastEditTime: 2022-09-20 14:41:50
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 * 
@@ -203,7 +203,7 @@
            }],
            panoramaList: [{
                name: '1号监控',
                name: '1号全景',
                lng: 116.027002,
                lat: 28.683302,
                alt: 100,
@@ -630,8 +630,7 @@
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'carLayers',
                        type: "billboard",
                        params: item,
                        incident: (e) => { console.log(e) }
                        params: item
                    })
                })
            } else {
@@ -648,8 +647,7 @@
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'phoneLayers',
                        type: "billboard",
                        params: item,
                        incident: (e) => { console.log(e) }
                        params: item
                    })
                })
            } else {
@@ -666,8 +664,7 @@
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'monitoringLayers',
                        type: "billboard",
                        params: item,
                        incident: (e) => { console.log(e) }
                        params: item
                    })
                })
            } else {
@@ -684,8 +681,7 @@
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'panoramaLayers',
                        type: "billboard",
                        params: item,
                        incident: (e) => { console.log(e) }
                        params: item
                    })
                })
            } else {
src/views/police/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-20 14:34:22
 * @LastEditTime: 2022-09-20 14:56:52
 * @FilePath: \srs-police-affairs\src\views\police\index.vue
 * @Description: 辖区管理
 * 
@@ -12,13 +12,14 @@
<template>
    <div class="container">
        <div class="switch-box">
            <div class="police-car" @click="navType = 1">警车</div>
            <div class="interphone" @click="navType = 2">手台</div>
            <div class="police-car" @click="navClick(1)">警车</div>
            <div class="interphone" @click="navClick(2)">手台</div>
        </div>
        <div class="search-box">
            <input type="text" placeholder="请输入搜索条件" />
            <button>搜索</button>
        </div>
        <div class="list-show">
            <div class="car-list" v-show="navType == 1">
                <div class="list-box">
@@ -27,7 +28,8 @@
                        stripe
                        style="width: 100%"
                        :header-cell-style="{'text-align':'center'}"
                        :cell-style="{'text-align':'center'}"
                        :cell-style="{'text-align':'center', 'cursor':'pointer'}"
                        @cell-click="rowClick"
                    >
                        <el-table-column type="index" label="序号" width="50">
                            <template slot-scope="scope">
@@ -58,7 +60,8 @@
                        stripe
                        style="width: 100%"
                        :header-cell-style="{'text-align':'center'}"
                        :cell-style="{'text-align':'center'}"
                        :cell-style="{'text-align':'center', 'cursor':'pointer'}"
                        @cell-click="rowClick"
                    >
                        <el-table-column type="index" label="序号" width="50">
                            <template slot-scope="scope">
@@ -111,20 +114,103 @@
            this.currentPage = currentPage
            console.log(this.currentPage)  //点击第几页
        },
        getData () {
            for (let i = 0; i < 5; i++) {
                let lng = 120.381058 + Math.random() * 0.5
                let lat = 31.101156 + Math.random() * 0.5
                let lng = 116.011126 + Math.random() * 0.005
                let lat = 28.651340 + Math.random() * 0.005
                this.$EventBus.$emit('layerPointAdd', {
                    layerName: 'carLayers',
                    type: "billboard",
                    params: {
                        name: `${i}号警车`,
                        lng: lng,
                        lat: lat,
                        alt: 100,
                        url: '/img/icon/car.png'
                    }
                })
                let carNum = Math.random() * 5000000 + ''
                // this.arr.push({ "carID": `#${carNum.slice(0, 6)}`, "carType": "大众", "position": `(${lng.toFixed(6)},${lat.toFixed(6)})` })
                this.arr.push({ "carID": `#${carNum.slice(0, 6)}`, "carType": "大众" })
                this.arr.push({ "carID": `#${carNum.slice(0, 6)}`, "carType": "大众", lng: lng, lat: lat, name: `${i}号警车`, url: '/img/icon/car.png' })
            }
            for (let i = 0; i < 5; i++) {
                let lng = 116.011126 + Math.random() * 0.005
                let lat = 28.651340 + Math.random() * 0.005
                let phoneNum = Math.random() * 500000000 + ''
                this.arr2.push({ "phoneID": `${phoneNum.slice(0, 8)}`, "phoneType": "华为" })
                this.arr2.push({ "phoneID": `${phoneNum.slice(0, 8)}`, "phoneType": "华为", lng: lng, lat: lat, name: `${i}号手台`, url: '/img/icon/phone.png' })
            }
        },
        navClick (type) {
            this.navType = type
            if (type == 1) {
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'phoneLayers',
                    type: 'VectorLayer'
                })
                this.arr.forEach(item => {
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'carLayers',
                        type: "billboard",
                        params: {
                            name: item.name,
                            lng: item.lng,
                            lat: item.lat,
                            alt: 100,
                            url: item.url
                        }
                    })
                })
            } else {
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'carLayers',
                    type: 'VectorLayer'
                })
                this.arr2.forEach(item => {
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'phoneLayers',
                        type: "billboard",
                        params: {
                            name: item.name,
                            lng: item.lng,
                            lat: item.lat,
                            alt: 100,
                            url: item.url
                        }
                    })
                })
            }
        },
        rowClick (row) {
            this.$EventBus.$emit('flyToPosition', {
                layerName: 'carLayers',
                siteJd: row.lng,
                siteWd: row.lat
            })
        }
    },
    destroyed () {
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'carLayers',
            type: 'VectorLayer'
        })
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'phoneLayers',
            type: 'VectorLayer'
        })
    }
}
</script>
src/views/video/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-17 10:13:22
 * @LastEditTime: 2022-09-20 15:00:43
 * @FilePath: \srs-police-affairs\src\views\video\index.vue
 * @Description: 辖区管理
 * 
@@ -23,15 +23,16 @@
                        stripe
                        style="width: 100%"
                        :header-cell-style="{'text-align':'center'}"
                        :cell-style="{'text-align':'center'}"
                        :cell-style="{'text-align':'center', 'cursor':'pointer'}"
                        @cell-click="rowClick"
                    >
                        <el-table-column type="index" label="序号" width="50">
                            <template slot-scope="scope">
                                <span>{{(currentPage - 1) * pagesize + scope.$index + 1}}</span>
                            </template>
                        </el-table-column>
                        <el-table-column prop="carID" label="车牌号" width="80"></el-table-column>
                        <el-table-column prop="carType" label="警车类型"></el-table-column>
                        <el-table-column prop="equipmentID" label="设备ID" width="80"></el-table-column>
                        <el-table-column prop="equipmentType" label="设备类型"></el-table-column>
                        <!-- <el-table-column prop="position" label="经纬度"></el-table-column> -->
                    </el-table>
                </div>
@@ -78,13 +79,43 @@
        },
        getData () {
            for (let i = 0; i < 5; i++) {
                // let lng = 120.381058 + Math.random() * 0.5
                // let lat = 31.101156 + Math.random() * 0.5
                let lng = 116.011126 + Math.random() * 0.005
                let lat = 28.651340 + Math.random() * 0.005
                this.$EventBus.$emit('layerPointAdd', {
                    layerName: 'monitoringLayers',
                    type: "billboard",
                    params: {
                        name: `${i}号监控`,
                        lng: lng,
                        lat: lat,
                        alt: 100,
                        url: '/img/icon/video.png'
                    }
                })
                let carNum = Math.random() * 5000000 + ''
                // this.arr.push({ "carID": `#${carNum.slice(0, 6)}`, "carType": "大众", "position": `(${lng.toFixed(6)},${lat.toFixed(6)})` })
                this.arr.push({ "carID": `#${carNum.slice(0, 6)}`, "carType": "大众" })
                this.arr.push({ "equipmentID": `#${carNum.slice(0, 6)}`, "equipmentType": "云台", lng: lng, lat: lat, name: `${i}号监控`, url: '/img/icon/video.png' })
            }
        },
        rowClick (row) {
            this.$EventBus.$emit('flyToPosition', {
                layerName: 'carLayers',
                siteJd: row.lng,
                siteWd: row.lat
            })
        }
    },
    destroyed () {
        this.$EventBus.$emit('mapClearLayer', {
            layerName: 'monitoringLayers',
            type: 'VectorLayer'
        })
    }
}
</script>