| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-03-15 09:15:07 |
| | | * @LastEditTime: 2023-03-22 15:15:18 |
| | | * @FilePath: \srs-police-affairs\src\views\activity\index.vue |
| | | * @Description: 安保活 |
| | | * @Description: 电子沙盘 |
| | | * |
| | | * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved. |
| | | --> |
| | |
| | | <template> |
| | | <div class="activity-page container"> |
| | | <div v-show="boxShow" class="container-content"> |
| | | <div class="title">安保活动</div> |
| | | <div class="title">电子沙盘</div> |
| | | <div class="search-box"> |
| | | <div> |
| | | <div class="category">选择时间:</div> |
| | |
| | | </div> |
| | | |
| | | <div> |
| | | <div class="category">活动名称:</div> |
| | | <div class="category">名称:</div> |
| | | <div class="category-value search-activity"> |
| | | <input type="text" placeholder="请输入…" v-model="searchActivity" class="category-input" |
| | | @input="inputChange" /> |
| | |
| | | <div class="row-title">常规安保</div> |
| | | <div class="row-content"> |
| | | <div> |
| | | <div class="category">活动名称:</div> |
| | | <div class="category">名称:</div> |
| | | <div class="category-value">{{ item.name }}</div> |
| | | </div> |
| | | <div> |
| | |
| | | <div class="category-value">{{ item.number }}</div> |
| | | </div> |
| | | <div> |
| | | <div class="category">活动时间:</div> |
| | | <div class="category">时间:</div> |
| | | <div class="category-value">{{ item.startTime }} 至 {{ item.endTime }}</div> |
| | | </div> |
| | | <div> |
| | | <div class="category">活动详情:</div> |
| | | <div class="category">详情:</div> |
| | | <div class="category-value">{{ item.content }}</div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="value-name-box">预警范围:</div> |
| | | <div class="width-box"> |
| | | <div class="input-width-box"> |
| | | <input type="text" v-model="pointAreaWidth" placeholder="请输入..." /> |
| | | <input type="text" v-model="pointAreaWidth" placeholder="请输入..." /> |
| | | </div> |
| | | <div class="units">米</div> |
| | | </div> |
| | |
| | | id: 9, |
| | | label: '执法记录仪', |
| | | }] |
| | | },{ |
| | | }, { |
| | | id: 3, |
| | | label: '视频监控' |
| | | }, |
| | |
| | | }], |
| | | isNeedPolygonType: false, |
| | | plotPointPositionStr: '', |
| | | pointAreaWidth:100, |
| | | dataTreeCheckedNodes:[], |
| | | pointAreaWidth: 100, |
| | | dataTreeCheckedNodes: [], |
| | | } |
| | | }, |
| | | |
| | |
| | | this.getSecurityList(this.currentPage, this.pagesize) |
| | | |
| | | //摄像头 |
| | | this.getEquipmentAll({ type: 1},'') |
| | | this.getEquipmentAll({ type: 1 }, '') |
| | | //警车 |
| | | this.getEquipmentAll({ type: 0},''); |
| | | this.getEquipmentAll({ type: 0 }, '') |
| | | //手台-公网 |
| | | this.getEquipmentAll({ type: "2-1" },''); |
| | | this.getEquipmentAll({ type: "2-1" }, '') |
| | | //手台-专网 |
| | | this.getEquipmentAll({ type: "2-2" },''); |
| | | this.getEquipmentAll({ type: "2-2" }, '') |
| | | //执法记录仪 |
| | | this.getEquipmentAll({ type: 3 },'') |
| | | this.getEquipmentAll({ type: 3 }, '') |
| | | |
| | | }, |
| | | |
| | |
| | | this.getSecurityList(this.currentPage, this.pagesize, this.activityType, this.searchActivity, startTime, endTime) |
| | | }, |
| | | |
| | | // 获取活动列表 |
| | | // 获取列表 |
| | | getSecurityList (current, size, type, name, startTime, endTime) { |
| | | this.loading() |
| | | var deptId = "" |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 添加活动图标 |
| | | // 添加图标 |
| | | addActivityPoint () { |
| | | this.activityList.forEach(item => { |
| | | let positionObj = this.convertBillboardPositionDate(item, 'activity') |
| | |
| | | }, |
| | | |
| | | /** |
| | | * @description: 点击活动列表活动 |
| | | * @description: 点击列表 |
| | | * @param {*} item |
| | | * @param {*} index |
| | | * @return {*} |
| | |
| | | |
| | | this.showingSecurityId = item.id |
| | | |
| | | // 加载当前活动面 |
| | | // 加载当前面 |
| | | if (item.activityArea && item.activityArea.length > 0) { |
| | | let polyGonData = item.activityArea.slice(11, item.activityArea.length - 1) |
| | | polyGonData = polyGonData.replace(/,/g, ";") |
| | |
| | | }) |
| | | } |
| | | |
| | | // 警员警车列表根据活动deptid筛选 |
| | | // 警员警车列表根据deptid筛选 |
| | | // 获取树状警员数据 |
| | | console.log('item',item.deptId,item); |
| | | this.getPolicemanTree({deptId:item.deptId}) |
| | | |
| | | this.getCarList({deptId:item.deptId}) |
| | | console.log('item', item.deptId, item) |
| | | this.getPolicemanTree({ deptId: item.deptId }) |
| | | |
| | | this.getCarList({ deptId: item.deptId }) |
| | | |
| | | // 警力资源 |
| | | this.getSecurityPoliceList(item.id, this.policeSwitch) |
| | |
| | | this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch, 'line') |
| | | }, |
| | | |
| | | // 获取活动标绘箭头列表 |
| | | // 获取标绘箭头列表 |
| | | getSecurityPlotList (securityId, arrowShow, showType) { |
| | | arrowsListLayer.clear() |
| | | this.$refs.DRAWBTNBOX.removeDrawArrow() |
| | |
| | | iconImgName = 'icon3' |
| | | } |
| | | position = position.split(';')[0].split(',') |
| | | let pointPosition = new global.DC.Position(Number(position[0]), Number(position[1]),4) |
| | | let pointPosition = new global.DC.Position(Number(position[0]), Number(position[1]), 4) |
| | | position = new global.DC.Position(Number(position[0]), Number(position[1]), 4.5) |
| | | chooseArrow = new global.DC.Billboard(position, `/img/icon/${iconImgName}.png`) |
| | | chooseArrow.size = item.type == 6 ? [24, 24] : [32, 32] |
| | |
| | | label.attrParams = { 'id': item.id, item } |
| | | this.$refs.DRAWBTNBOX.lableAllEvent(label) |
| | | label.setStyle({ |
| | | 'fillColor':color, |
| | | 'fillColor': color, |
| | | "font": `${item.width}px sans-serif`, |
| | | }) |
| | | arrowsListLayer.addOverlay(label) |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 获取活动警员分布信息 |
| | | // 获取警员分布信息 |
| | | getSecurityPoliceList (securityId, pointShow) { |
| | | this.$refs.DRAWBTNBOX.removeDraw() |
| | | |
| | |
| | | this.isHaveLine = res.data.data.some(item => { |
| | | return item.type == 1 |
| | | }) |
| | | |
| | | |
| | | type == 'car' && pointShow && this.addMapCarAndPersonLayers( |
| | | res.data.data.filter(item => item.type == 3), |
| | | 'policecar', |
| | |
| | | // circle.setStyle({ |
| | | // "material": global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 100), //颜色 |
| | | // }) |
| | | |
| | | |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: mapLayer, |
| | | type: 'billboard', |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 活动添加警车和范围 |
| | | // carId警车id, position坐标, securityId活动id, type线面类型,width缓存范围,color范围颜色 |
| | | // 添加警车和范围 |
| | | // carId警车id, position坐标, securityIdid, type线面类型,width缓存范围,color范围颜色 |
| | | addCarAndRange (params) { |
| | | addCarAndRange(params).then(res => { |
| | | if (res.data.success) { |
| | | this.$refs.DRAWBTNBOX.addNewPolice(res.data.data,'policecar',params.type) |
| | | this.$refs.DRAWBTNBOX.addNewPolice(res.data.data, 'policecar', params.type) |
| | | this.$message({ |
| | | message: '添加成功', |
| | | type: 'success' |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 活动添加警员 |
| | | // policemanId警车id, position坐标, securityId活动id, type线面类型 |
| | | // 添加警员 |
| | | // policemanId警车id, position坐标, securityIdid, type线面类型 |
| | | addActivityPolice (params) { |
| | | addActivityPolice(params).then(res => { |
| | | if (res.data.success) { |
| | |
| | | |
| | | // 树形控件选中事件 |
| | | treeCheckClick (e1, e2) { |
| | | // 没有选中活动就不展示实时图标 |
| | | // 没有选中就不展示实时图标 |
| | | const that = this |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'activeHeatLayer', |
| | |
| | | } |
| | | this.dataTreeCheckedNodes = e2.checkedNodes |
| | | this.eachDataTreeCheckedNodes(this.dataTreeCheckedNodes) |
| | | |
| | | |
| | | }, |
| | | |
| | | // 遍历树数据实时图标 |
| | | eachDataTreeCheckedNodes(data){ |
| | | eachDataTreeCheckedNodes (data) { |
| | | // 清除定时器 |
| | | if(realPoliceTimer != {}) { |
| | | for(let item in realPoliceTimer) { |
| | | console.log(`定时器realPoliceTimer[${item}]关闭了`); |
| | | if (realPoliceTimer != {}) { |
| | | for (let item in realPoliceTimer) { |
| | | console.log(`定时器realPoliceTimer[${item}]关闭了`) |
| | | clearInterval(realPoliceTimer[item]) |
| | | } |
| | | } |
| | | if(data != []){ |
| | | data.some(item => { |
| | | return item.label == '视频监控' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/camera.png', '',cameraList, 'activityCameraLayers') : this.clearLayerIconForMap('activityCameraLayers'); |
| | | if (data != []) { |
| | | data.some(item => { |
| | | return item.label == '视频监控' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/camera.png', '', cameraList, 'activityCameraLayers') : this.clearLayerIconForMap('activityCameraLayers') |
| | | |
| | | data.some(item => { |
| | | return item.label == '警车' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/real-car.png','/img/icon/real-car-ok.png', carList, 'activityCarLayers') : this.clearLayerIconForMap('activityCarLayers'); |
| | | data.some(item => { |
| | | return item.label == '警车' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/real-car.png', '/img/icon/real-car-ok.png', carList, 'activityCarLayers') : this.clearLayerIconForMap('activityCarLayers') |
| | | |
| | | data.some(item => { |
| | | return item.label == '公网' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/real-public-recorder.png','/img/icon/real-public-recorder-ok.png', talkBackEquipmentPublicList, 'activityTalkBackEquipmentPublicLayers') : this.clearLayerIconForMap('activityTalkBackEquipmentPublicLayers'); |
| | | data.some(item => { |
| | | return item.label == '公网' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/real-public-recorder.png', '/img/icon/real-public-recorder-ok.png', talkBackEquipmentPublicList, 'activityTalkBackEquipmentPublicLayers') : this.clearLayerIconForMap('activityTalkBackEquipmentPublicLayers') |
| | | |
| | | data.some(item => { |
| | | return item.label == '专网' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/real-recorder.png','/img/icon/real-recorder-ok.png', talkBackEquipmentList, 'activityTalkBackEquipmentLayers') : this.clearLayerIconForMap('activityTalkBackEquipmentLayers'); |
| | | data.some(item => { |
| | | return item.label == '专网' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/real-recorder.png', '/img/icon/real-recorder-ok.png', talkBackEquipmentList, 'activityTalkBackEquipmentLayers') : this.clearLayerIconForMap('activityTalkBackEquipmentLayers') |
| | | |
| | | data.some(item => { |
| | | return item.label == '执法记录仪' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/real-phone.png', '/img/icon/real-phone-ok.png',policeCarmeraList, 'activityPoliceCameraLayers') : this.clearLayerIconForMap('activityPoliceCameraLayers'); |
| | | data.some(item => { |
| | | return item.label == '执法记录仪' |
| | | }) ? this.iconImageShowOrHidden('/img/icon/real-phone.png', '/img/icon/real-phone-ok.png', policeCarmeraList, 'activityPoliceCameraLayers') : this.clearLayerIconForMap('activityPoliceCameraLayers') |
| | | } |
| | | }, |
| | | |
| | |
| | | * 清除当前图层数据 |
| | | * @param {*} layerName 图层名称 |
| | | */ |
| | | clearLayerIconForMap(layerName) { |
| | | clearLayerIconForMap (layerName) { |
| | | realPoliceTimer[layerName] && clearInterval(realPoliceTimer[layerName]) |
| | | console.log(`定时器realPoliceTimer[${layerName}]关闭了`); |
| | | console.log(`定时器realPoliceTimer[${layerName}]关闭了`) |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: layerName, |
| | | type: 'VectorLayer' |
| | |
| | | * @param {*} data 传入的数据(摄像头,手台等集合数据) |
| | | * @param {*} layerName 选中图层名称 |
| | | */ |
| | | iconImageShowOrHidden(img, imgOk, data, layerName, isChooseSecurity) { |
| | | if(this.showingSecurityId && !isChooseSecurity) { |
| | | iconImageShowOrHidden (img, imgOk, data, layerName, isChooseSecurity) { |
| | | if (this.showingSecurityId && !isChooseSecurity) { |
| | | // 实时图标刷新时间间隔 |
| | | let refreshTime = 60000 |
| | | this.searchRealResources(layerName) |
| | | realPoliceTimer[layerName] = setInterval(()=> this.searchRealResources(layerName),refreshTime) |
| | | realPoliceTimer[layerName] = setInterval(() => this.searchRealResources(layerName), refreshTime) |
| | | } else { |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: layerName, |
| | | type: 'VectorLayer' |
| | | layerName: layerName, |
| | | type: 'VectorLayer' |
| | | }) |
| | | 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: item.clockStatus == 0 ? img:imgOk |
| | | }, |
| | | }) |
| | | } |
| | | }) |
| | | 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: item.clockStatus == 0 ? img : imgOk |
| | | }, |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // 关闭活动详情弹窗 |
| | | // 关闭详情弹窗 |
| | | closeActivityDetails () { |
| | | this.dialogVisible = false |
| | | this.polylineBtnSwitch = false |
| | |
| | | }, |
| | | |
| | | // 定时查找实时警力资源 |
| | | searchRealResources(layerName){ |
| | | console.log(`定时器realPoliceTimer[${layerName}]开启了`); |
| | | searchRealResources (layerName) { |
| | | console.log(`定时器realPoliceTimer[${layerName}]开启了`) |
| | | let type = '' |
| | | if(layerName == 'activityCarLayers') { |
| | | if (layerName == 'activityCarLayers') { |
| | | type = 0 |
| | | }else if (layerName == 'activityTalkBackEquipmentPublicLayers'){ |
| | | } else if (layerName == 'activityTalkBackEquipmentPublicLayers') { |
| | | type = '2-1' |
| | | }else if (layerName == 'activityTalkBackEquipmentLayers'){ |
| | | } else if (layerName == 'activityTalkBackEquipmentLayers') { |
| | | type = '2-2' |
| | | }else if (layerName == 'activityPoliceCameraLayers'){ |
| | | } else if (layerName == 'activityPoliceCameraLayers') { |
| | | type = 3 |
| | | } |
| | | this.getEquipmentAll({ type: type ,query:this.showingSecurityId },layerName); |
| | | this.getEquipmentAll({ type: type, query: this.showingSecurityId }, layerName) |
| | | }, |
| | | |
| | | // 大小重置 |
| | |
| | | message: '范围必须为正整数', |
| | | type: 'warning' |
| | | }) |
| | | }else { |
| | | } else { |
| | | this.policeChooseCarVisible = false |
| | | this.addCarAndRange({ |
| | | carId: this.policeType, |
| | |
| | | securityId: this.showingSecurityId, |
| | | type: type, |
| | | color: this.chooseCarColor, |
| | | width:this.pointAreaWidth |
| | | width: this.pointAreaWidth |
| | | }) |
| | | this.policeIconIsCreated = false |
| | | } |
| | |
| | | message: '请选择警员', |
| | | type: 'warning' |
| | | }) |
| | | }else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) { |
| | | } else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) { |
| | | this.$message({ |
| | | message: '范围必须为正整数', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.policeChooseVisible = false |
| | | this.addActivityPolice({ policemanId: this.searchPoliceTreeId, position: position, securityId: this.showingSecurityId, type: type, color: this.choosePoliceColor ,width:this.pointAreaWidth}) |
| | | this.addActivityPolice({ policemanId: this.searchPoliceTreeId, position: position, securityId: this.showingSecurityId, type: type, color: this.choosePoliceColor, width: this.pointAreaWidth }) |
| | | this.policeIconIsCreated = false |
| | | } |
| | | } |
| | | } else { |
| | | if (this.policeChooseVisible == true) { |
| | | if (this.searchPoliceTreeId == ''|| this.searchPoliceTreeName == '') { |
| | | if (this.searchPoliceTreeId == '' || this.searchPoliceTreeName == '') { |
| | | this.$message({ |
| | | message: '请在列表中选择警员', |
| | | type: 'warning' |
| | |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.$refs.DRAWBTNBOX.updateActivityPolice({ id: this.policeIconId, policemanId: this.searchPoliceTreeId, color: this.choosePoliceColor,width:this.pointAreaWidth },policeOverlayData.overlay) |
| | | this.policeChooseVisible = false |
| | | this.$refs.DRAWBTNBOX.updateActivityPolice({ id: this.policeIconId, policemanId: this.searchPoliceTreeId, color: this.choosePoliceColor, width: this.pointAreaWidth }, policeOverlayData.overlay) |
| | | this.policeChooseVisible = false |
| | | } |
| | | } else if (this.policeChooseCarVisible == true) { |
| | | if (this.policeType == '') { |
| | |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, carId: this.policeType, color: this.chooseCarColor,width:this.pointAreaWidth },policeOverlayData.overlay) |
| | | this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, carId: this.policeType, color: this.chooseCarColor, width: this.pointAreaWidth }, policeOverlayData.overlay) |
| | | this.policeChooseCarVisible = false |
| | | } |
| | | } |
| | |
| | | if ('policemanId' in e.overlay.attrParams.data) { |
| | | this.policeIconId = e.overlay.attrParams.data.id |
| | | this.policeType = e.overlay.attrParams.data.policemanId |
| | | this.pointAreaWidth = e.overlay.attrParams.data.width != '-1' ? e.overlay.attrParams.data.width :100 |
| | | this.pointAreaWidth = e.overlay.attrParams.data.width != '-1' ? e.overlay.attrParams.data.width : 100 |
| | | this.choosePoliceColor = e.overlay.attrParams.data.color != '' ? e.overlay.attrParams.data.color : '#FF0000' |
| | | let choosePoliceName = this.platFn(this.policeTreeData).find(item => item.id == e.overlay.attrParams.data.policemanId).name |
| | | this.searchPoliceTreeId = e.overlay.attrParams.data.policemanId |
| | |
| | | this.policeOption = policecarOption |
| | | this.policeIconId = e.overlay.attrParams.data.id |
| | | this.policeType = e.overlay.attrParams.data.carId |
| | | this.pointAreaWidth = e.overlay.attrParams.data.width != '-1' ? e.overlay.attrParams.data.width :100 |
| | | this.pointAreaWidth = e.overlay.attrParams.data.width != '-1' ? e.overlay.attrParams.data.width : 100 |
| | | this.chooseCarColor = e.overlay.attrParams.data.color != '' ? e.overlay.attrParams.data.color : '#FF0000' |
| | | this.policeIconIsCreated = true |
| | | this.policeChooseCarVisible = true |
| | |
| | | this.chooseColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color : '#1CA085' |
| | | this.policeIconId = e.overlay.attrParams.id |
| | | |
| | | policeOverlayData = e |
| | | policeOverlayData = e |
| | | |
| | | curLinePosition = e.overlay.attrParams.linePositionStr |
| | | curLinePolygonPosition = e.overlay.attrParams.polygonPositionStr |
| | |
| | | } |
| | | }, |
| | | |
| | | // 保存活动标绘箭头 |
| | | // securityId活动id, position坐标, type标绘类型, name多边形名称,color标绘颜色,aera_type多边形类型 |
| | | // 保存标绘箭头 |
| | | // securityIdid, position坐标, type标绘类型, name多边形名称,color标绘颜色,aera_type多边形类型 |
| | | addSecurityPlot (params) { |
| | | addSecurityPlot(params).then(res => { |
| | | if (res.data.success) { |
| | |
| | | |
| | | // 保存巡逻路线信息 |
| | | saveLineInfo () { |
| | | this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, color: this.chooseColor, width: this.lineWidth },policeOverlayData.overlay) |
| | | this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, color: this.chooseColor, width: this.lineWidth }, policeOverlayData.overlay) |
| | | this.lineEditVisible = false |
| | | }, |
| | | |
| | |
| | | type: 'success' |
| | | }) |
| | | policeOverlayData.overlay.remove() |
| | | if(type == 'car' && 'pointOverlayData' in policeOverlayData.overlay.attrParams){ |
| | | if (type == 'car' && 'pointOverlayData' in policeOverlayData.overlay.attrParams) { |
| | | policeOverlayData.overlay.attrParams.pointOverlayData.remove() |
| | | } |
| | | if(type == 'line' && 'lineObj' in policeOverlayData.overlay.attrParams){ |
| | | if (type == 'line' && 'lineObj' in policeOverlayData.overlay.attrParams) { |
| | | policeOverlayData.overlay.attrParams.lineObj.remove() |
| | | } |
| | | } else { |
| | |
| | | deleteActivityPolice(id).then(res => { |
| | | if (res.data.success) { |
| | | policeOverlayData.overlay.remove() |
| | | if('pointOverlayData' in policeOverlayData.overlay.attrParams){ |
| | | if ('pointOverlayData' in policeOverlayData.overlay.attrParams) { |
| | | policeOverlayData.overlay.attrParams.pointOverlayData.remove() |
| | | } |
| | | this.$message({ |
| | |
| | | this.lineEditVisible = false |
| | | }, |
| | | |
| | | // 删除活动标绘接口 |
| | | // 删除标绘接口 |
| | | deleteSecurityPlot (id) { |
| | | deleteSecurityPlot(id).then(res => { |
| | | if (res.data.success) { |
| | | plotOverlayData!=null && plotOverlayData.overlay!=null && plotOverlayData.overlay.remove() |
| | | if (plotOverlayData!=null && plotOverlayData.overlay!=null&&'pointOverlayData' in plotOverlayData.overlay.attrParams) { |
| | | plotOverlayData != null && plotOverlayData.overlay != null && plotOverlayData.overlay.remove() |
| | | if (plotOverlayData != null && plotOverlayData.overlay != null && 'pointOverlayData' in plotOverlayData.overlay.attrParams) { |
| | | plotOverlayData.overlay.attrParams.pointOverlayData.remove() |
| | | } |
| | | this.$message({ |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 删除活动标绘 |
| | | // 删除标绘 |
| | | deletePlot () { |
| | | this.deleteSecurityPlot(this.plotId) |
| | | this.editPlotVisible = false |
| | | }, |
| | | |
| | | // 获取设备列表 |
| | | getEquipmentAll (params,layerName) { |
| | | getEquipmentAll (params, layerName) { |
| | | getEquipmentAll({ ...params, deptId: this.userInfo.dept_id }).then(res => { |
| | | if (params.type == 0) { |
| | | //警车 |
| | | carList = res.data.data |
| | | if(layerName){ |
| | | this.iconImageShowOrHidden('/img/icon/real-car.png','/img/icon/real-car-ok.png',carList, layerName,true) |
| | | if (layerName) { |
| | | this.iconImageShowOrHidden('/img/icon/real-car.png', '/img/icon/real-car-ok.png', carList, layerName, true) |
| | | } |
| | | } else if (params.type == 1) { |
| | | //摄像头 |
| | |
| | | } else if (params.type == '2-1') { |
| | | //公网-手台 |
| | | talkBackEquipmentPublicList = res.data.data |
| | | if(layerName){ |
| | | this.iconImageShowOrHidden('/img/icon/real-public-recorder.png','/img/icon/real-public-recorder-ok.png', talkBackEquipmentPublicList, layerName,true) |
| | | if (layerName) { |
| | | this.iconImageShowOrHidden('/img/icon/real-public-recorder.png', '/img/icon/real-public-recorder-ok.png', talkBackEquipmentPublicList, layerName, true) |
| | | } |
| | | } else if (params.type == '2-2') { |
| | | //专网-手台 |
| | | talkBackEquipmentList = res.data.data |
| | | if(layerName){ |
| | | this.iconImageShowOrHidden('/img/icon/real-phone.png','/img/icon/real-phone-ok.png', talkBackEquipmentList, layerName,true) |
| | | if (layerName) { |
| | | this.iconImageShowOrHidden('/img/icon/real-phone.png', '/img/icon/real-phone-ok.png', talkBackEquipmentList, layerName, true) |
| | | } |
| | | } else { |
| | | //执法记录仪 |
| | | policeCarmeraList = res.data.data |
| | | if(layerName){ |
| | | this.iconImageShowOrHidden('/img/icon/real-recorder.png', '/img/icon/real-recorder-ok.png', policeCarmeraList, layerName,true) |
| | | if (layerName) { |
| | | this.iconImageShowOrHidden('/img/icon/real-recorder.png', '/img/icon/real-recorder-ok.png', policeCarmeraList, layerName, true) |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | }, |
| | | |
| | | beforeDestroy() { |
| | | beforeDestroy () { |
| | | // 清除定时器 |
| | | if(realPoliceTimer != {}) { |
| | | for(let item in realPoliceTimer) { |
| | | console.log(`定时器realPoliceTimer[${item}]关闭了`); |
| | | if (realPoliceTimer != {}) { |
| | | for (let item in realPoliceTimer) { |
| | | console.log(`定时器realPoliceTimer[${item}]关闭了`) |
| | | clearInterval(realPoliceTimer[item]) |
| | | } |
| | | } |