| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-01-11 15:59:14 |
| | | * @LastEditTime: 2023-01-11 17:21:27 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | |
| | | <div ref="RegionSelect" style="left: 0;" class="region-select"> |
| | | <map-select class="map-select" @selectCheck="policeStationSelect" :checkValue="policeStationCheckValue" |
| | | :options="policeStationOptions" :optionsName="'policeStationName'"></map-select> |
| | | :options="policeStationOptions" :optionsName="'name'"></map-select> |
| | | |
| | | <map-select class="map-select" @selectCheck="areaSelect" :checkValue="areaCheckValue" :options="areaOptions" |
| | | :optionsName="'areaCheckName'"></map-select> |
| | | :optionsName="'name'"></map-select> |
| | | |
| | | <map-select class="map-select" @selectCheck="housingSelect" :checkValue="housingCheckValue" |
| | | :options="housingOptions" :optionsName="'housingsName'"></map-select> |
| | | :options="housingOptions" :optionsName="'name'"></map-select> |
| | | </div> |
| | | |
| | | <el-dialog :title="panoramaTitle" :modal="true" :visible.sync="panoramaVisible" |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-show="policeInformationType == '出警信息' && JSON.stringify(CJdata) == '{}'" class="box no-data"> |
| | | 暂无数据 |
| | | <div v-show="policeInformationType == '出警信息' && JSON.stringify(CJdata) == '{}'" class="box no-data">暂无数据 |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { getPanoramaList } from "@/api/panorama" |
| | | import { getResidentialQuartersList } from '@/api/dept/index.js' |
| | | |
| | | let cylinderLayer = null |
| | | let circleLayer = null |
| | | let treeData = [ |
| | |
| | | }] |
| | | } |
| | | ] |
| | | |
| | | 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 |
| | | ) |
| | | 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(168, 45, 177, 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), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(255, 127, 80, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(100, 149, 237, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(220, 20, 60, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(0, 0, 139, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(189, 183, 107, 800), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(148, 0, 211, 800), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(255, 20, 147, 800), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(124, 252, 0, 800), |
| | | ] |
| | | |
| | | let timer = [] |
| | | |
| | | import flvjs from 'flv.js' |
| | | import axios from "axios" |
| | | |
| | | import { getPanoramaList } from "@/api/panorama" |
| | | import { getResidentialQuartersList } from '@/api/dept/index.js' |
| | | |
| | | import carList from '@/assets/data/car.js' |
| | | import phoneList from '@/assets/data/phone.js' |
| | | import monitoringList from '@/assets/data/monitoring.js' |
| | | // import houseList from '@/assets/data/house.js' |
| | | import areaOptionData from '@/assets/data/JurisdictionData/areaOptionData.js' |
| | | import policeStationOptions from '@/assets/data/JurisdictionData/policeStationOptions.js' |
| | | import housingDate from '@/assets/data/JurisdictionData/housingDate.js' |
| | | import leftContainer from './components/leftContainer' |
| | | import rightContainer from './components/rightContainer' |
| | | import bottomContainer from './components/bottomContainer' |
| | | import historyArr from '@/assets/data/activitysData/history.js' |
| | | import underwayArr from '@/assets/data/activitysData/underway.js' |
| | | import { getPoliceStationList } from "@/api/dept" |
| | | |
| | | import { convertStringToList } from "@/utils/geometryStringTool" |
| | | |
| | | import { getActAsPoliceList, getEquipmentPaging } from "@/api/home/index.js" |
| | | |
| | | import { getDevices } from '@/api/video/index.js' |
| | | import { getActAsPoliceList, getEquipmentPaging, getPoliceStationTree } from "@/api/home/index.js" |
| | | |
| | | export default { |
| | | data () { |
| | |
| | | this.carList = carList |
| | | this.phoneList = phoneList |
| | | this.monitoringList = monitoringList |
| | | // this.houseList = houseList |
| | | // this.areaOptionData = areaOptionData |
| | | // this.policeStationOptions = policeStationOptions |
| | | // this.housingDate = housingDate |
| | | //获取派出所责任区小区数据 |
| | | this.getPoliceStationList() |
| | | this.historyArr = historyArr |
| | | this.underwayArr = underwayArr |
| | | this.getPanoramaList() |
| | | |
| | | this.getResidentialQuartersList('361102') |
| | | |
| | | // this.getResidentialQuartersList('361102') |
| | | |
| | | this.$EventBus.$on('policeSituationSiteClick', (params) => { |
| | | that.policeSituationSiteClick(params) |
| | | }) |
| | | getPoliceStationTree(1).then(res => { |
| | | console.log(111, res.data.data) |
| | | this.policeStationOptions = res.data.data |
| | | }) |
| | | |
| | | }, |
| | | |
| | | mounted () { |
| | |
| | | document.querySelector('.image-switch-icon-btn').classList.add('iconbottom') |
| | | this.setDomStyle() |
| | | }) |
| | | // axios.get('/user/getUserList').then((res) => { |
| | | // console.log(res, 999) |
| | | // }} |
| | | |
| | | window.addEventListener('resize', this.setDomStyle) |
| | | } |
| | |
| | | }, |
| | | |
| | | policeStationSelect (item) { |
| | | this.policeStationCheckValue = item.policeStationName |
| | | this.policeStationCheckValue = item.name |
| | | if (item.policeStationName == "全部") { |
| | | this.clearPolygonLayer() |
| | | cylinderLayer.clear() |
| | | cylinderLayer.remove() |
| | | cylinderLayer = null |
| | | this.initPoliceStationLayer() |
| | | this.$EventBus.$emit('toPosition', { |
| | | siteJd: 116.112550, |
| | | siteWd: 28.196631, |
| | | siteGd: 50000, |
| | | siteHeading: 0, |
| | | sitePitch: -45 |
| | | }) |
| | | // this.initPoliceStationLayer() |
| | | // this.$EventBus.$emit('toPosition', { |
| | | // siteJd: 116.112550, |
| | | // siteWd: 28.196631, |
| | | // siteGd: 50000, |
| | | // siteHeading: 0, |
| | | // sitePitch: -45 |
| | | // }) |
| | | this.areaOptions = [] |
| | | this.housingOptions = [] |
| | | this.areaCheckValue = '请选择责任区' |
| | |
| | | } else { |
| | | this.initAreaOptionLayer(item) |
| | | cylinderLayer.clear() |
| | | this.areaCheckValue = '请选择责任区' |
| | | getPoliceStationTree(2, item.id).then(res => { |
| | | this.areaOptions = res.data.data |
| | | }) |
| | | } |
| | | this.policeStaionChecked = item |
| | | this.$refs.leftContainer.selectPoliceChangeData(item.policeStationName) |
| | |
| | | }, |
| | | |
| | | areaSelect (item) { |
| | | this.areaCheckValue = item.areaCheckName |
| | | this.areaCheckValue = item.name |
| | | if (item.areaCheckName == "全部") { |
| | | this.initAreaOptionLayer(this.policeStaionChecked) |
| | | this.housingOptions = [] |
| | | this.housingCheckValue = '请选择小区' |
| | | } else { |
| | | this.housingCheckValue = '请选择小区' |
| | | getPoliceStationTree(3, item.id).then(res => { |
| | | this.housingOptions = res.data.data |
| | | }) |
| | | this.areaChecked = item |
| | | this.initHousingLayer(item) |
| | | } |
| | |
| | | }, |
| | | |
| | | housingSelect (item) { |
| | | this.housingCheckValue = item.housingsName |
| | | this.housingCheckValue = item.name |
| | | if (item.housingsName == "全部") { |
| | | this.initHousingLayer(this.areaChecked) |
| | | } else { |
| | |
| | | cylinderLayer = new global.DC.PrimitiveLayer('cylinderLayer') |
| | | global.viewer.addLayer(cylinderLayer) |
| | | this.policeStationOptions.forEach((item, index) => { |
| | | console.log(item, 89) |
| | | if (item.position && item.position.length > 0) { |
| | | let str = '' |
| | | item.position.forEach(it => { |
| | | str = str + `${it[0]},${it[1]},${it[2]};` |
| | | }) |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'polygonLayer', |
| | | positions: str, |
| | | material: positionColor[index], |
| | | }) |
| | | const center = this.getCenter(item.position) |
| | | let itPositionStr = it.replace(/MULTIPOLYGON\(\(\(/g, '') |
| | | itPositionStr = itPositionStr.replace(/\)\)\)/g, '') |
| | | itPositionStr = itPositionStr.replace(/,/g, ";") |
| | | itPositionStr = itPositionStr.replace(/ /g, ",") |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'polygonLayer', |
| | | positions: itPositionStr, |
| | | material: positionColor[index], |
| | | }) |
| | | |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'polygonLayer', |
| | | type: 'label', |
| | | params: { |
| | | lng: center[0], |
| | | lat: center[1] - 0.03, |
| | | alt: 1200, |
| | | text: '5656' |
| | | }, |
| | | distanceDisplayCondition: { "near": 0, "far": 200000 } |
| | | }) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'polygonLayer', |
| | | type: 'label', |
| | | params: { |
| | | lng: center[0], |
| | | lat: center[1], |
| | | alt: 0, |
| | | text: item.policeStationName, |
| | | }, |
| | | distanceDisplayCondition: { "near": 0, "far": 200000 } |
| | | }) |
| | | let cylinder = new global.DC.LightCylinderPrimitive(new global.DC.Position(center[0] + 0.02, center[1] - 0.01), 1200, 1, 600) |
| | | cylinder.setStyle({ |
| | | color: global.DC.Namespace.Cesium.Color.fromBytes( |
| | | 102, 176, 255, |
| | | 255 |
| | | ) |
| | | }) |
| | | cylinderLayer.addOverlay(cylinder) |
| | | // item.position.forEach(it => { |
| | | // str = str + `${it[0]},${it[1]},${it[2]};` |
| | | // }) |
| | | |
| | | // const center = this.getCenter(item.position) |
| | | |
| | | // this.$EventBus.$emit('layerPointAdd', { |
| | | // layerName: 'polygonLayer', |
| | | // type: 'label', |
| | | // params: { |
| | | // lng: center[0], |
| | | // lat: center[1] - 0.03, |
| | | // alt: 1200, |
| | | // text: '5656' |
| | | // }, |
| | | // distanceDisplayCondition: { "near": 0, "far": 200000 } |
| | | // }) |
| | | // this.$EventBus.$emit('layerPointAdd', { |
| | | // layerName: 'polygonLayer', |
| | | // type: 'label', |
| | | // params: { |
| | | // lng: center[0], |
| | | // lat: center[1], |
| | | // alt: 0, |
| | | // text: item.policeStationName, |
| | | // }, |
| | | // distanceDisplayCondition: { "near": 0, "far": 200000 } |
| | | // }) |
| | | // let cylinder = new global.DC.LightCylinderPrimitive(new global.DC.Position(center[0] + 0.02, center[1] - 0.01), 1200, 1, 600) |
| | | // cylinder.setStyle({ |
| | | // color: global.DC.Namespace.Cesium.Color.fromBytes( |
| | | // 102, 176, 255, |
| | | // 255 |
| | | // ) |
| | | // }) |
| | | // cylinderLayer.addOverlay(cylinder) |
| | | } |
| | | }) |
| | | // this.houseChange(true) |
| | | }, |
| | | |
| | | initAreaOptionLayer (item) { |
| | | let center = this.getPoliceStationCenter(item.policeStationName) |
| | | // let center = this.getPoliceStationCenter(item.policeStationName) |
| | | this.clearPolygonLayer() |
| | | this.$EventBus.$emit('toPosition', { |
| | | siteJd: center[0], |
| | | siteWd: center[1], |
| | | siteGd: 60000, |
| | | siteHeading: -3, |
| | | sitePitch: -90 |
| | | }) |
| | | this.areaOptionData.some((option) => { |
| | | if (item.policeStationName == option.policeStationName) { |
| | | this.initAreaCheckoptions(option.areaCheckOptions) |
| | | this.areaOptions = option.areaCheckOptions |
| | | } |
| | | }) |
| | | // this.$EventBus.$emit('toPosition', { |
| | | // siteJd: center[0], |
| | | // siteWd: center[1], |
| | | // siteGd: 60000, |
| | | // siteHeading: -3, |
| | | // sitePitch: -90 |
| | | // }) |
| | | // this.areaOptionData.some((option) => { |
| | | // if (item.policeStationName == option.policeStationName) { |
| | | // this.initAreaCheckoptions(option.areaCheckOptions) |
| | | // this.areaOptions = option.areaCheckOptions |
| | | // } |
| | | // }) |
| | | }, |
| | | |
| | | initHousingLayer (item) { |
| | |
| | | layerName: 'activityLayers', |
| | | type: 'ClusterLayer' |
| | | }) |
| | | |
| | | cylinderLayer.clear() |
| | | cylinderLayer.remove() |
| | | cylinderLayer = null |
| | | if (cylinderLayer != null) { |
| | | cylinderLayer.clear() |
| | | cylinderLayer.remove() |
| | | cylinderLayer = null |
| | | } |
| | | circleLayer.clear() |
| | | circleLayer.remove() |
| | | circleLayer = null |