| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-01-13 11:30:32 |
| | | * @LastEditTime: 2023-01-14 11:32:08 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | <el-checkbox v-model="carLayerShow" @change="carChange">警车</el-checkbox> |
| | | </div> |
| | | <div class="layers-control-btn phone"> |
| | | <el-checkbox v-model="phoneLayerShow" @change="phoneChange">摄像头</el-checkbox> |
| | | <el-checkbox v-model="cameraLayerShow" @change="cameraChange">摄像头</el-checkbox> |
| | | </div> |
| | | <!-- <div class="layers-control-btn moitor"> |
| | | <el-checkbox v-model="monitoringLayerShow" @change="monitoringChange">监控</el-checkbox> |
| | |
| | | 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 leftContainer from './components/leftContainer' |
| | | import rightContainer from './components/rightContainer' |
| | |
| | | import { convertStringToList } from "@/utils/geometryStringTool" |
| | | |
| | | import { getDevices } from '@/api/video/index.js' |
| | | import { getActAsPoliceList, getEquipmentPaging, getPoliceStationTree } from "@/api/home/index.js" |
| | | import { getActAsPoliceList, getEquipmentPaging, getPoliceStationTree, getEquipmentAll } from "@/api/home/index.js" |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | houseLayerShow: true, |
| | | carLayerShow: false, |
| | | phoneLayerShow: false, |
| | | cameraLayerShow: false, |
| | | monitoringLayerShow: false, |
| | | panoramaLayerShow: false, |
| | | policeSituationLayerShow: false, |
| | |
| | | peopleVisible: false, |
| | | houseList: [], |
| | | carList: [], |
| | | phoneList: [], |
| | | cameraList: [], |
| | | |
| | | monitoringList: [], |
| | | panoramaList: [{ |
| | | name: '1号全景', |
| | |
| | | |
| | | created () { |
| | | const that = this |
| | | this.carList = carList |
| | | this.phoneList = phoneList |
| | | |
| | | this.monitoringList = monitoringList |
| | | this.historyArr = historyArr |
| | | this.underwayArr = underwayArr |
| | |
| | | this.policeStationOptions = res.data.data |
| | | }) |
| | | |
| | | this.getEquipmentAll({ type: 0 }) |
| | | this.getEquipmentAll({ type: 1 }) |
| | | }, |
| | | |
| | | mounted () { |
| | |
| | | sitePitch: -90 |
| | | }) |
| | | }) |
| | | // axios.get('/user/getUserList').then((res) => { |
| | | // console.log(res, 999) |
| | | // }} |
| | | |
| | | window.addEventListener('resize', this.setDomStyle) |
| | | }, |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | getEquipmentAll (params) { |
| | | getEquipmentAll(params).then(res => { |
| | | if (params.type == 0) { |
| | | this.carList = res.data.data |
| | | } else { |
| | | this.cameraList = res.data.data |
| | | } |
| | | }) |
| | | }, |
| | | // 接出警切换 |
| | | alarmOrActAsPolice (type) { |
| | | this.policeInformationType = type |
| | |
| | | |
| | | carChange (e) { |
| | | if (e == true) { |
| | | this.carList.forEach(item => { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'carLayers', |
| | | type: "billboard", |
| | | params: item, |
| | | incident: this.siteClick |
| | | if (this.carList.length > 0) { |
| | | this.carList.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'carLayers', |
| | | type: "billboard", |
| | | params: { |
| | | ...item, |
| | | lng: item.longitude, |
| | | lat: item.latitude, |
| | | alt: 100, |
| | | url: '/img/icon/car.png' |
| | | }, |
| | | incident: this.phoneSiteClick |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } else { |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'carLayers', |
| | |
| | | } |
| | | }, |
| | | |
| | | phoneChange (e) { |
| | | cameraChange (e) { |
| | | if (e == true) { |
| | | this.phoneList.forEach(item => { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'phoneLayers', |
| | | type: "billboard", |
| | | params: item, |
| | | incident: this.phoneSiteClick |
| | | if (this.cameraList.length > 0) { |
| | | this.cameraList.forEach(item => { |
| | | |
| | | if (item.longitude && item.latitude) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'cameraLayers', |
| | | type: "billboard", |
| | | params: { |
| | | ...item, |
| | | lng: item.longitude, |
| | | lat: item.latitude, |
| | | alt: 100, |
| | | url: '/img/icon/camera.png' |
| | | }, |
| | | incident: this.phoneSiteClick |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }) |
| | | } |
| | | } else { |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'phoneLayers', |
| | | layerName: 'cameraLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | } |
| | |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'phoneLayers', |
| | | layerName: 'cameraLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |