| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-03-09 17:13:53 |
| | | * @LastEditTime: 2023-03-14 16:48:21 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | import { getActAsPoliceList, getEquipmentPaging, getPoliceStationTree, getEquipmentAll, getLandDetail } from "@/api/home/index.js" |
| | | import { getTalkEquimentPage, getPoliceCameraEquimentPage } from '@/api/home/equiment.js' |
| | | |
| | | |
| | | |
| | | |
| | | export default { |
| | | inject: ['userInfo'], |
| | | |
| | |
| | | // }, 3000) |
| | | |
| | | |
| | | this.getEquipmentAll({ type: 0 }) |
| | | this.getEquipmentAll({ type: 1 }) |
| | | |
| | | |
| | | }, |
| | | |
| | | mounted () { |
| | |
| | | name: '全部', |
| | | id: 1 |
| | | }) |
| | | |
| | | this.getEquipmentAll({ type: 0, deptId: this.userInfo.dept_id }) |
| | | this.getEquipmentAll({ type: 1, deptId: this.userInfo.dept_id }) |
| | | |
| | | if (this.userInfo.dept_id != '1123598813738675201') { |
| | | |
| | |
| | | }, |
| | | |
| | | getEquipmentAll (params) { |
| | | getEquipmentAll({ ...params, deptId: this.userInfo.dept_id }).then(res => { |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'carLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'cameraLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | getEquipmentAll({ ...params }).then(res => { |
| | | if (params.type == 0) { |
| | | this.carList = res.data.data |
| | | |
| | | if (this.carList.length > 0) { |
| | | this.carList.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'carLayers', |
| | | type: "billboard", |
| | | layerType: 'ClusterLayer', |
| | | params: { |
| | | ...item, |
| | | lng: item.longitude, |
| | | lat: item.latitude, |
| | | alt: 1, |
| | | url: '/img/icon/car.png' |
| | | }, |
| | | incident: this.phoneSiteClick |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | this.carChange(this.carLayerShow) |
| | | } |
| | | } else { |
| | | this.cameraList = res.data.data |
| | | |
| | | if (this.cameraList.length > 0) { |
| | | this.cameraList.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | // this.$EventBus.$emit('layerPointAdd', { |
| | | // layerName: 'cameraLayers', |
| | | // type: 'label', |
| | | // params: { |
| | | // lng: item.longitude, |
| | | // lat: item.latitude, |
| | | // alt: 1, |
| | | // text: item.name |
| | | // }, |
| | | // distanceDisplayCondition: { "near": 0, "far": 200000 } |
| | | // }) |
| | | |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'cameraLayers', |
| | | type: "billboard", |
| | | layerType: 'ClusterLayer', |
| | | params: { |
| | | ...item, |
| | | lng: item.longitude, |
| | | lat: item.latitude, |
| | | alt: 1, |
| | | url: '/img/icon/camera.png' |
| | | }, |
| | | incident: this.siteClick |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | this.cameraChange(this.cameraLayerShow) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.housingCheckValue = '请选择小区' |
| | | |
| | | this.policeStaionID = '' |
| | | |
| | | this.getEquipmentAll({ type: 0, deptId: this.userInfo.dept_id }) |
| | | this.getEquipmentAll({ type: 1, deptId: this.userInfo.dept_id }) |
| | | } else { |
| | | cylinderLayer.clear() |
| | | this.getPoliceStationTree(2, item.id) |
| | |
| | | this.housingCheckValue = '请选择小区' |
| | | |
| | | this.policeStaionID = item.id |
| | | |
| | | this.getEquipmentAll({ type: 0, deptId: this.policeStaionID }) |
| | | this.getEquipmentAll({ type: 1, deptId: this.policeStaionID }) |
| | | } |
| | | |
| | | this.$refs.leftContainer.getHomeAllData(this.policeStaionID) |
| | |
| | | |
| | | carChange (e) { |
| | | if (e == true) { |
| | | if (this.carList.length > 0) { |
| | | this.carList.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'carLayers', |
| | | type: "billboard", |
| | | layerType: 'ClusterLayer', |
| | | params: { |
| | | ...item, |
| | | lng: item.longitude, |
| | | lat: item.latitude, |
| | | alt: 1, |
| | | url: '/img/icon/car.png' |
| | | }, |
| | | incident: this.phoneSiteClick |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | this.$EventBus.$emit('layerShow', { |
| | | layerName: 'carLayers', |
| | | type: 'VectorLayer' |
| | | flag: false |
| | | }) |
| | | } else { |
| | | this.$EventBus.$emit('layerShow', { |
| | | layerName: 'carLayers', |
| | | flag: false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | cameraChange (e) { |
| | | if (e == true) { |
| | | if (this.cameraList.length > 0) { |
| | | this.cameraList.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | // this.$EventBus.$emit('layerPointAdd', { |
| | | // layerName: 'cameraLayers', |
| | | // type: 'label', |
| | | // params: { |
| | | // lng: item.longitude, |
| | | // lat: item.latitude, |
| | | // alt: 1, |
| | | // text: item.name |
| | | // }, |
| | | // distanceDisplayCondition: { "near": 0, "far": 200000 } |
| | | // }) |
| | | |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'cameraLayers', |
| | | type: "billboard", |
| | | layerType: 'ClusterLayer', |
| | | params: { |
| | | ...item, |
| | | lng: item.longitude, |
| | | lat: item.latitude, |
| | | alt: 1, |
| | | url: '/img/icon/camera.png' |
| | | }, |
| | | incident: this.siteClick |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | } |
| | | } else { |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | this.$EventBus.$emit('layerShow', { |
| | | layerName: 'cameraLayers', |
| | | type: 'VectorLayer' |
| | | flag: true |
| | | }) |
| | | } else { |
| | | this.$EventBus.$emit('layerShow', { |
| | | layerName: 'cameraLayers', |
| | | flag: false |
| | | }) |
| | | } |
| | | }, |