| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-03-06 11:29:13 |
| | | * @LastEditTime: 2023-03-06 14:56:01 |
| | | * @FilePath: \srs-police-affairs\src\views\activity\index.vue |
| | | * @Description: 安保活动 |
| | | * |
| | |
| | | <ul> |
| | | <li> |
| | | <!-- <el-button |
| | | ></el-button>--> |
| | | ></el-button>--> |
| | | <button @click="draw('polyline', 'policecar')" title="巡逻路线"> |
| | | <img src="../../../public/img/icon/route1.png" style="height:100%" /> |
| | | </button> |
| | |
| | | import { getEquipmentAll } from '@/api/home/index.js' |
| | | import flvjs from 'flv.js' |
| | | |
| | | let analyseLayer = null |
| | | let analysePolygon = null |
| | | let drawLayers = null |
| | | let drawArrowLayers = null |
| | | let polylineAreaLayer = null |
| | |
| | | policeSwitch: true, |
| | | arrowBtnSwitch: true, |
| | | polylineBtnSwitch: false, |
| | | analyseInput: 100, |
| | | activityList: [], |
| | | activityDetails: {}, |
| | | boxShow: true, |
| | |
| | | mounted () { |
| | | this.$parent.$parent.resize('400px', true) |
| | | this.$nextTick(() => { |
| | | if (analyseLayer == null) { |
| | | analyseLayer = new global.DC.VectorLayer('analyseLayer') |
| | | global.viewer.addLayer(analyseLayer) |
| | | } |
| | | |
| | | if (drawLayers == null) { |
| | | drawLayers = new global.DC.VectorLayer('drawLayers') |
| | | global.viewer.addLayer(drawLayers) |
| | |
| | | |
| | | }, |
| | | |
| | | // 点击活动列表活动 |
| | | /** |
| | | * @description: 点击活动列表活动 |
| | | * @param {*} item |
| | | * @param {*} index |
| | | * @return {*} |
| | | */ |
| | | activityListClick (item, index) { |
| | | if (this.currentClickIndex !== '' && this.currentClickIndex == index) { |
| | | return |
| | | } |
| | | |
| | | this.removeAll() |
| | | this.removeAllArrow() |
| | | arrowsListLayer.clear() |
| | | this.showingSecurityId = item.id |
| | | arrowsListLayer != null && arrowsListLayer.clear() |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'newDrawLayers', |
| | | type: 'VectorLayer' |
| | |
| | | layerName: 'polygonLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'monitoringLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polylineLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | 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, ";") |
| | |
| | | }) |
| | | } |
| | | |
| | | // 警力资源 |
| | | this.getSecurityPoliceList(item.id, this.policeSwitch) |
| | | this.getSecurityCarList(item.id, this.policeSwitch, this.polylineBtnSwitch) |
| | | // 作战标绘 |
| | | this.getSecurityPlotList(item.id, this.arrowBtnSwitch) |
| | | if (this.currentClickIndex !== '' && this.currentClickIndex == index) { |
| | | return |
| | | } |
| | | this.analyseInput = 100 |
| | | // 巡逻路线 |
| | | this.getSecurityCarList(item.id, this.policeSwitch, this.polylineBtnSwitch) |
| | | |
| | | this.activityDetails = item |
| | | |
| | | if (analyseLayer != null) { |
| | | analyseLayer.clear() |
| | | } |
| | | |
| | | let positionObj = this.convertBillboardPositionDate(item, 'activity') |
| | | |
| | | let point = new global.DC.Point(`${positionObj.lng}, ${positionObj.lat}`) |
| | | analyseLayer.addOverlay(point) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polylineLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.dialogVisible = true |
| | | if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == item.deptId) { |
| | | this.isShowActivityEditBox = true |
| | | } else { |
| | |
| | | siteWd: positionObj.lat, |
| | | siteGd: 1500 |
| | | }) |
| | | |
| | | this.dialogVisible = true |
| | | }, |
| | | |
| | | // 切换轨警力资源显示 |
| | |
| | | this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch) |
| | | }, |
| | | |
| | | // 输入绘制线范围 |
| | | analyseChange (e) { |
| | | analyseLayer.removeOverlay(analysePolygon) |
| | | let coords = global.DC.GeoTools.pointBuffer(`${this.activityDetails.lng}, ${this.activityDetails.lat}`, e) |
| | | analysePolygon = new global.DC.Polygon(coords) |
| | | analysePolygon.setStyle({ |
| | | material: global.DC.Color.RED.withAlpha(0.4) |
| | | }) |
| | | analyseLayer.addOverlay(analysePolygon) |
| | | }, |
| | | |
| | | // 分页页码变化事件 |
| | | handleCurrentChange: function (currentPage) { |
| | | this.currentPage = currentPage |
| | |
| | | this.isTrackBtnShow = false |
| | | this.closeVideo() |
| | | this.currentClickIndex = '' |
| | | analyseLayer.clear() |
| | | arrowsListLayer.clear() |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polylineLayer', |
| | |
| | | |
| | | // 删除所有地图绘制元素 |
| | | removeAll () { |
| | | drawLayers.clear() |
| | | drawLayers != null && drawLayers.clear() |
| | | }, |
| | | |
| | | /** |
| | | * @description: 箭头 |
| | | * @return {*} |
| | | */ |
| | | removeAllArrow () { |
| | | drawArrowLayers != null && drawArrowLayers.clear() |
| | | }, |
| | | |
| | | drawArrow (type, iconType) { |
| | |
| | | }) |
| | | } |
| | | }, { material: global.DC.Color.RED }) |
| | | } |
| | | }, |
| | | |
| | | removeAllArrow () { |
| | | if (drawArrowLayers != null) { |
| | | drawArrowLayers.clear() |
| | | } |
| | | }, |
| | | |
| | |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | analyseLayer.remove() |
| | | arrowsListLayer.remove() |
| | | lineLayer.remove() |
| | | if (pointCircleManLayer != null) { |