| | |
| | | <!-- <div class="row-box"> |
| | | <div class="category">应急预案:</div> |
| | | <div class="category-value"> |
| | | <el-switch v-model="polylineSwitch" @change="switchChange" active-color="#13ce66" |
| | | <el-switch v-model="policeSwitch" @change="switchChange" active-color="#13ce66" |
| | | inactive-color="#ccc"></el-switch> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="category">警力资源:</div> |
| | | <div class="category-value"> |
| | | <el-switch |
| | | v-model="polylineSwitch" |
| | | v-model="policeSwitch" |
| | | @change="switchChange" |
| | | active-color="#13ce66" |
| | | inactive-color="#ccc" |
| | |
| | | }, |
| | | dialogVisible: false, |
| | | currentClickIndex: '', |
| | | polylineSwitch: false, |
| | | arrowBtnSwitch: false, |
| | | polylineBtnSwitch: false, |
| | | policeSwitch: true, |
| | | arrowBtnSwitch: true, |
| | | polylineBtnSwitch: true, |
| | | analyseInput: 100, |
| | | activityList: [], |
| | | activityDetails: {}, |
| | |
| | | }, |
| | | |
| | | // 获取活动警员分布信息 |
| | | getSecurityPoliceList (securityId) { |
| | | getSecurityPoliceList (securityId, pointShow) { |
| | | this.removeAll() |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'newDrawLayers', |
| | |
| | | incident: this.overlayTypeClick |
| | | }) |
| | | |
| | | } else if (item.type == 3) { |
| | | } else if (item.type == 3 && pointShow) { |
| | | let positionObj = this.convertBillboardPositionDate(item.position, 'policeman', item.id, item.policemanId) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'newDrawLayers', |
| | |
| | | }, |
| | | |
| | | // 获取活动警车分布信息 |
| | | getSecurityCarList (securityId) { |
| | | getSecurityCarList (securityId, pointShow, polylineShow) { |
| | | this.removeAll() |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'newCarDrawLayers', |
| | |
| | | }) |
| | | getSecurityCarList(securityId).then(res => { |
| | | res.data.data.forEach(item => { |
| | | if (item.type == 1) { |
| | | if (item.type == 1 && polylineShow) { |
| | | let positionNewArr = this.convertPolylineOrPolygonPositionDate(item.position, item.type) |
| | | this.$EventBus.$emit('layerPolylineAdd', { |
| | | layerName: 'newCarDrawLayers', |
| | |
| | | // incident: this.overlayTypeClick |
| | | }) |
| | | |
| | | } else if (item.type == 3) { |
| | | } else if (item.type == 3 && pointShow) { |
| | | let positionObj = this.convertBillboardPositionDate(item.position, 'policecar', item.id, item.carId) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'newCarDrawLayers', |
| | |
| | | // 修改活动警员 |
| | | updateActivityPolice (id, policemanId) { |
| | | updateActivityPolice(id, policemanId).then(res => { |
| | | this.getSecurityPoliceList(this.showingSecurityId) |
| | | this.getSecurityPoliceList(this.showingSecurityId, this.policeSwitch) |
| | | }) |
| | | }, |
| | | |
| | | // 修改活动警车 |
| | | updateActivityCar (id, carId) { |
| | | updateActivityCar(id, carId).then(res => { |
| | | this.getSecurityCarList(this.showingSecurityId) |
| | | this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch) |
| | | }) |
| | | }, |
| | | |
| | | // 活动添加警车和范围 |
| | | addCarAndRange (carId, position, securityId, type) { |
| | | addCarAndRange(carId, position, securityId, type).then(res => { |
| | | this.getSecurityCarList(securityId) |
| | | this.getSecurityCarList(securityId, this.policeSwitch, this.polylineBtnSwitch) |
| | | }) |
| | | }, |
| | | |
| | |
| | | // 活动添加警员 |
| | | addActivityPolice (policemanId, position, securityId, type) { |
| | | addActivityPolice(policemanId, position, securityId, type).then(res => { |
| | | this.getSecurityPoliceList(securityId) |
| | | this.getSecurityPoliceList(securityId, this.policeSwitch) |
| | | }) |
| | | }, |
| | | |
| | |
| | | layerName: 'newDrawLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | this.getSecurityPoliceList(item.id) |
| | | this.getSecurityCarList(item.id) |
| | | this.getSecurityPlotList(item.id) |
| | | 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.activityDetails = item |
| | | |
| | | this.polylineSwitch = false |
| | | |
| | | if (analyseLayer != null) { |
| | | analyseLayer.clear() |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 切换轨迹路线显示 |
| | | // 切换轨警力资源显示 |
| | | switchChange (e) { |
| | | this.getSecurityCarList(this.securityId, this.policeSwitch, this.polylineBtnSwitch) |
| | | this.getSecurityPoliceList(this.showingSecurityId, this.policeSwitch) |
| | | if (e == true) { |
| | | this.$EventBus.$emit('layerPolylineAdd', { |
| | | layerName: 'polylineLayer', |
| | |
| | | |
| | | // 切换作战标绘 |
| | | switchArrowBtnChange (e) { |
| | | |
| | | this.getSecurityPlotList(this.securityIdy, this.arrowBtnSwitch) |
| | | }, |
| | | |
| | | // 切换轨迹播放控件 |
| | | switchBtnChange (e) { |
| | | this.isTrackBtnShow = e |
| | | this.getSecurityCarList(this.securityId, this.policeSwitch, this.polylineBtnSwitch) |
| | | }, |
| | | |
| | | // 输入绘制线范围 |
| | |
| | | closeActivityDetails () { |
| | | this.dialogVisible = false |
| | | this.currentClickIndex = '' |
| | | this.polylineSwitch = false |
| | | analyseLayer.clear() |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polylineLayer', |
| | |
| | | // 保存活动标绘箭头 |
| | | addSecurityPlot (securityId, position, type) { |
| | | addSecurityPlot(securityId, position, type).then(res => { |
| | | this.getSecurityPlotList(securityId) |
| | | this.getSecurityPlotList(securityId, this.arrowBtnSwitch) |
| | | }) |
| | | }, |
| | | |
| | | // 获取活动标绘箭头列表 |
| | | getSecurityPlotList (securityId) { |
| | | getSecurityPlotList (securityId, arrowShow) { |
| | | arrowsListLayer.clear() |
| | | this.removeAllArrow() |
| | | if (!arrowShow) return |
| | | getSecurityPlotList(securityId).then(res => { |
| | | res.data.data.forEach(item => { |
| | | let position = item.position.slice(11, item.position.length - 1).replace(/,/g, ';').replace(/ /g, ',') |
| | |
| | | updateSecurityPlot (id, position) { |
| | | updateSecurityPlot(id, position).then(res => { |
| | | console.log(res, 222) |
| | | this.getSecurityPlotList(this.securityId) |
| | | this.getSecurityPlotList(this.securityId, this.arrowBtnSwitch) |
| | | }) |
| | | }, |
| | | |