guanqb
2022-09-20 5e77d75c30795cf892f5550db94669975ff573f9
Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
5 files modified
5 files added
1 files deleted
879 ■■■■ changed files
.eslintrc.js 41 ●●●●● patch | view | raw | blame | history
public/img/icon/car.png patch | view | raw | blame | history
public/img/icon/map-panorama.png patch | view | raw | blame | history
public/img/icon/phone.png patch | view | raw | blame | history
public/img/icon/video.png patch | view | raw | blame | history
public/video/sp.mp4 patch | view | raw | blame | history
src/components/map/index.vue 40 ●●●●● patch | view | raw | blame | history
src/views/home/index copy.vue 635 ●●●●● patch | view | raw | blame | history
src/views/house/index.vue 12 ●●●● 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
.eslintrc.js
@@ -1,17 +1,28 @@
/*
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-09-07 09:34:58
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-09-20 14:35:16
 * @FilePath: \srs-police-affairs\.eslintrc.js
 * @Description:
 *
 * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved.
 */
module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/essential',
    'eslint:recommended'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
    root: true,
    env: {
        node: true
    },
    'extends': [
        'plugin:vue/essential',
        'eslint:recommended'
    ],
    parserOptions: {
        parser: 'babel-eslint'
    },
    rules: {
        'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
        'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
        "no-unused-vars": "off"
    }
}
public/img/icon/car.png
public/img/icon/map-panorama.png
public/img/icon/phone.png
public/img/icon/video.png
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-19 18:19:53
 * @LastEditTime: 2022-09-20 15:05:14
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -181,11 +181,12 @@
                }
            })
            // global.viewer.scene.globe.depthTestAgainstTerrain = false
            // 去除logo
            let primitiveArr = global.viewer.scene.primitives._primitives
            global.viewer.scene.primitives.remove(primitiveArr[0])
            // global.viewer.scene.globe.depthTestAgainstTerrain = true
            // 已声明的图层添加到地图上
            siteEntitylayers = new global.DC.VectorLayer('siteEntitylayers')
@@ -344,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)
        })
@@ -401,7 +402,7 @@
         * @param {*} url 图标地址
         */
        addSiteEntity (item, url) {
            const billboard = new global.DC.Billboard(new global.DC.Position(Number(item.lon), Number(item.lat)), url)
            const billboard = new global.DC.Billboard(new global.DC.Position(Number(item.lng), Number(item.lat)), url)
            billboard.size = [20, 28]
            billboard.attrParams = item
            siteEntitylayers.addOverlay(billboard)
@@ -419,8 +420,10 @@
        mapAddLayer (layerName, type) {
            if (type == 'VectorLayer') {
                if (!layersObjcect[layerName]) layersObjcect[layerName] = null
                layersObjcect[layerName] = new global.DC.VectorLayer('layerName')
                global.viewer.addLayer(layersObjcect[layerName])
                layersObjcect[layerName] = new global.DC.VectorLayer(layerName)
                layersObjcect[layerName].addTo(global.viewer)
            }
        },
@@ -444,7 +447,8 @@
         */
        mapClearLayer (layerName, type) {
            if (type == 'VectorLayer') {
                layersObjcect[layerName].clear()
                if (layersObjcect[layerName] && layersObjcect[layerName] != null)
                    layersObjcect[layerName].clear()
            }
        },
@@ -456,15 +460,18 @@
         * @param {*} incident 添加的点位事件
         */
        layerPointAdd (layerName, type, params, incident) {
            if (!layersObjcect[layerName] || layersObjcect[layerName] == null) {
                this.mapAddLayer(layerName, 'VectorLayer')
            }
            let pointElement
            if (type == "billboard") {
                pointElement = new global.DC.Billboard(new global.DC.Position(Number(params.lon), Number(params.lat)), params.url)
                pointElement = new global.DC.Billboard(new global.DC.Position(Number(params.lng), Number(params.lat), Number(params.alt)), params.url)
                pointElement.size = [20, 28]
                pointElement.size = [32, 32]
            } else if (type == "label") {
                pointElement = new global.DC.Label(new global.DC.Position(Number(params.lon), Number(params.lat), 0), params.url)
                pointElement = new global.DC.Label(new global.DC.Position(Number(params.lng), Number(params.lat), 0), params.url)
                pointElement.setStyle({
                    fillColor: global.DC.Color.CRIMSON,
@@ -475,7 +482,9 @@
                    pixelOffset: { x: 0, y: -24 }
                })
            }
            pointElement.attrParams = params
            layersObjcect[layerName].addOverlay(pointElement)
            pointElement.on(global.DC.MouseEventType.CLICK, incident)
        },
@@ -489,13 +498,14 @@
        layerPolygonAdd (layerName, positions, material) {
            if (!layersObjcect[layerName] || layersObjcect[layerName] == null) {
                this.mapAddLayer(layerName, 'VectorLayer')
                layersObjcect[layerName].allowDrillPicking = true
            }
            let polygon = new global.DC.Polygon(positions)
            polygon.setStyle({
                material: material,
                extrudedHeight: 0,
                perPositionHeight: true
            })
@@ -570,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 copy.vue
File was deleted
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-17 17:59:21
 * @LastEditTime: 2022-09-20 14:38:38
 * @FilePath: \srs-police-affairs\src\views\house\index.vue
 * @Description: 小区-栋-层-房屋
 * 
@@ -571,22 +571,22 @@
            }
        }
        .police-info {
            ::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;
                cursor: pointer;
            }
            ::v-deep .el-dialog__header {
            :deep(.el-dialog__header) {
                margin-top: 150px;
            }
            ::v-deep .el-dialog__title {
            :deep(.el-dialog__title) {
                line-height: 24px;
                font-size: 24px;
                font-weight: 700;
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-17 09:58:40
 * @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>