| | |
| | | let policecarOption = [] |
| | | let cameraList = [] |
| | | let carList = [] |
| | | let carEquipmentList = [] |
| | | let talkBackEquipmentPublicList = [] |
| | | let talkBackEquipmentList = [] |
| | | let policeCarmeraList = [] |
| | | let drawLabelStatus = 'end' |
| | | let curLinePolygonPosition = '' |
| | | let curLinePosition = '' |
| | |
| | | label: '实时警力', |
| | | children: [{ |
| | | id: 7, |
| | | label: 'BOOM', |
| | | lng: 116.020595, |
| | | lat: 28.686225, |
| | | alt: 100, |
| | | label: '警车', |
| | | }, { |
| | | id: 8, |
| | | label: 'MDM', |
| | | lng: 116.030370, |
| | | lat: 28.685075, |
| | | alt: 100, |
| | | label: '手台', |
| | | children: [ |
| | | { |
| | | id: 10, |
| | | label: '公网', |
| | | }, |
| | | { |
| | | id: 11, |
| | | label: '专网', |
| | | } |
| | | ] |
| | | }, { |
| | | id: 9, |
| | | label: 'pdds', |
| | | lng: 116.021054, |
| | | lat: 28.684692, |
| | | alt: 100, |
| | | label: '执法记录仪', |
| | | }] |
| | | }, { |
| | | },{ |
| | | id: 3, |
| | | label: '视频监控' |
| | | }, |
| | |
| | | |
| | | this.getSecurityList(this.currentPage, this.pagesize) |
| | | |
| | | //摄像头 |
| | | this.getEquipmentAll({ type: 1 }) |
| | | //警车 |
| | | this.getEquipmentAll({ type: 0 }); |
| | | //手台-公网 |
| | | this.getEquipmentAll({ type: "2-1" }); |
| | | //手台-专网 |
| | | this.getEquipmentAll({ type: "2-2" }); |
| | | //执法记录仪 |
| | | this.getEquipmentAll({ type: 3 }) |
| | | |
| | | }, |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | if (e2.checkedNodes.some(item => { |
| | | |
| | | |
| | | e2.checkedNodes.some(item => { |
| | | return item.label == '视频监控' |
| | | })) { |
| | | if (cameraList.length > 0) { |
| | | cameraList.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'activityCameraLayers', |
| | | 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', { |
| | | layerName: 'activityCameraLayers', |
| | | type: 'VectorLayer' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/camera.png', cameraList, 'activityCameraLayers') : this.clearLayerIconForMap('activityCameraLayers'); |
| | | |
| | | e2.checkedNodes.some(item => { |
| | | return item.label == '警车' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/car.png', carList, 'activityCarLayers') : this.clearLayerIconForMap('activityCarLayers'); |
| | | |
| | | e2.checkedNodes.some(item => { |
| | | return item.label == '公网' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/p-talk.png', talkBackEquipmentPublicList, 'activityTalkBackEquipmentPublicLayers') : this.clearLayerIconForMap('activityTalkBackEquipmentPublicLayers'); |
| | | |
| | | |
| | | e2.checkedNodes.some(item => { |
| | | return item.label == '专网' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/p-b-talk.png', talkBackEquipmentList, 'activityTalkBackEquipmentLayers') : this.clearLayerIconForMap('activityTalkBackEquipmentLayers'); |
| | | |
| | | e2.checkedNodes.some(item => { |
| | | return item.label == '执法记录仪' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/p-b-camera.png', policeCarmeraList, 'activityPoliceCameraLayers') : this.clearLayerIconForMap('activityPoliceCameraLayers'); |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 清除当前图层数据 |
| | | * @param {*} layerName 图层名称 |
| | | */ |
| | | clearLayerIconForMap(layerName) { |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: layerName, |
| | | type: 'VectorLayer' |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 实时图标显示隐藏 |
| | | * @param {*} img 图标地址 |
| | | * @param {*} data 传入的数据(摄像头,手台等集合数据) |
| | | * @param {*} layerName 选中图层名称 |
| | | */ |
| | | iconImageShowOrHidden(img, data, layerName) { |
| | | if (data.length > 0) { |
| | | data.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: layerName, |
| | | type: "billboard", |
| | | params: { |
| | | ...item, |
| | | lng: item.longitude, |
| | | lat: item.latitude, |
| | | alt: 1, |
| | | url: img |
| | | }, |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | |
| | | // 关闭活动详情弹窗 |
| | |
| | | getEquipmentAll (params) { |
| | | getEquipmentAll({ ...params, deptId: this.userInfo.dept_id }).then(res => { |
| | | if (params.type == 0) { |
| | | // 警车 |
| | | carList = res.data.data |
| | | } else { |
| | | } else if (params.type == 1) { |
| | | // 摄像头 |
| | | cameraList = res.data.data |
| | | } else if (params.type == '2-1') { |
| | | // 公网-手台 |
| | | talkBackEquipmentPublicList = res.data.data |
| | | } else if (params.type == '2-2') { |
| | | // 专网-手台 |
| | | talkBackEquipmentList = res.data.data |
| | | } else { |
| | | //执法记录仪 |
| | | policeCarmeraList = res.data.data |
| | | } |
| | | }) |
| | | }, |
| | |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | // 警车 |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'activityCarLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | // 手台-公网 |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'activityTalkBackEquipmentPublicLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | // 手台-专网 |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'activityTalkBackEquipmentLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | // 执法记录仪 |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'activityPoliceCameraLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | arrowsListLayer.remove() |
| | | arrowsListLayer = null |
| | | |