Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
5 files modified
5 files added
1 files deleted
| | |
| | | /* |
| | | * @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" |
| | | } |
| | | } |
| | |
| | | * @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: 公用地图组件 |
| | | * |
| | |
| | | } |
| | | }) |
| | | |
| | | // 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') |
| | |
| | | }) |
| | | |
| | | 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) |
| | | }) |
| | | |
| | | |
| | |
| | | * @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) |
| | |
| | | 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) |
| | | } |
| | | }, |
| | | |
| | |
| | | */ |
| | | mapClearLayer (layerName, type) { |
| | | if (type == 'VectorLayer') { |
| | | layersObjcect[layerName].clear() |
| | | if (layersObjcect[layerName] && layersObjcect[layerName] != null) |
| | | layersObjcect[layerName].clear() |
| | | } |
| | | }, |
| | | |
| | |
| | | * @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, |
| | |
| | | pixelOffset: { x: 0, y: -24 } |
| | | }) |
| | | } |
| | | |
| | | pointElement.attrParams = params |
| | | |
| | | layersObjcect[layerName].addOverlay(pointElement) |
| | | pointElement.on(global.DC.MouseEventType.CLICK, incident) |
| | | }, |
| | |
| | | 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 |
| | | }) |
| | | |
| | |
| | | * @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 |
| | | } |
| | | }, |
| | | }, |
| | | |
| | |
| | | * @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: 小区-栋-层-房屋 |
| | | * |
| | |
| | | } |
| | | } |
| | | .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; |
| | |
| | | * @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: 辖区管理 |
| | | * |
| | |
| | | <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"> |
| | |
| | | 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"> |
| | |
| | | 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"> |
| | |
| | | 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> |
| | |
| | | * @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: 辖区管理 |
| | | * |
| | |
| | | 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> |
| | |
| | | }, |
| | | 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> |