Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
| | |
| | | |
| | | SET_ACTIVITYPOLICEPOPUP (state, activityPolicePopup) { |
| | | state.activityPolicePopup = activityPolicePopup |
| | | // console.log('isshowPopup', activityPolicePopup) |
| | | }, |
| | | |
| | | SET_ACTIVITYPOLICEPOPUPDATA (state, activityPolicePopupData) { |
| | |
| | | |
| | | global.viewer.tooltip.enable = true |
| | | |
| | | // this.policeType = '' // ? |
| | | |
| | | plot && plot.draw(poltType, overlay => { |
| | | if (isAddLabel) return |
| | | |
| | | if (poltType == 'billboard' && policeType == 'policeman') { |
| | | overlay.icon = '/img/icon/man3.png' |
| | | } else if (poltType == 'billboard' && policeType == 'policecar') { |
| | | overlay.icon = '/img/car3.png' |
| | | overlay.icon = '/img/icon/car3.png' |
| | | } |
| | | |
| | | if (overlay) { |
| | |
| | | } else if (policeType == 'policecar') { |
| | | that.$emit('setPoliceOption') |
| | | that.$parent.chooseCarColor = '#FF0000' |
| | | that.$parent.policeType = '' |
| | | that.$parent.policeChooseCarVisible = true |
| | | } |
| | | flag = false |
| | |
| | | |
| | | // 删除所有地图绘制元素 |
| | | removeDraw () { |
| | | addPoliceIconOverlayData!= null && !addPoliceIconOverlayData.attrParams && addPoliceIconOverlayData.remove() |
| | | }, |
| | | |
| | | clearDraw(){ |
| | | drawLayers != null && drawLayers.clear() |
| | | }, |
| | | |
| | | removeDrawArrow () { |
| | | // drawArrowLayers != null && drawArrowLayers.clear() |
| | | addPlotOverlayData != null && addPlotOverlayData.remove() |
| | | labelOverLayerID = [] |
| | | }, |
| | | |
| | | clearDrawArrow() { |
| | | drawArrowLayers != null && drawArrowLayers.clear() |
| | | }, |
| | | |
| | | // 编辑标绘位置 |
| | |
| | | |
| | | addNewPolice(data,type){ |
| | | let positionObj = this.$parent.convertBillboardPositionDate(data, type) |
| | | let positionArr = data.position.slice(12, data.position.length - 2).split(',')[0].split(' ') |
| | | let positionArr = data.position.slice(7, data.position.length - 2).split(',')[0].split(' ') |
| | | let position = new global.DC.Position(Number(positionArr[0]), Number(positionArr[1])) |
| | | let point = new global.DC.Point(position) |
| | | let color = '' |
| | |
| | | let b = parseInt(data.color.slice(5, 7), 16) |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255) |
| | | } |
| | | console.log(positionObj,position,point,999); |
| | | point.attrParams = positionObj |
| | | drawLayers.addOverlay(point) |
| | | point.setStyle({ |
| | | "color": global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 150), //颜色 |
| | | "color": color, //颜色 |
| | | "outlineColor": color, //边框颜色 |
| | | "outlineWidth": 0, //边框大小, |
| | | "pixelSize": 82, |
| | | "pixelSize": 32, |
| | | }) |
| | | point.on(global.DC.MouseEventType.CLICK, this.$parent.overlayTypeClick) |
| | | // point.on(global.DC.MouseEventType.CLICK, this.$parent.overlayTypeClick) |
| | | point.on(global.DC.MouseEventType.MOUSE_OVER, this.$parent.pointMouseOver) |
| | | point.on(global.DC.MouseEventType.MOUSE_OUT, this.$parent.pointMouseOut) |
| | | addPoliceIconOverlayData.attrParams = positionObj |
| | | addPoliceIconOverlayData.attrParams.pointOverlayData = point |
| | | addPoliceIconOverlayData.position = { |
| | | lng: Number(positionArr[0]), |
| | | lat: Number(positionArr[1]), |
| | | alt: 0.5, |
| | | } |
| | | addPoliceIconOverlayData.on(global.DC.MouseEventType.CLICK, this.$parent.overlayTypeClick) |
| | | addPoliceIconOverlayData.on(global.DC.MouseEventType.MOUSE_OVER, this.$parent.pointMouseOver) |
| | | // addPoliceIconOverlayData.on(global.DC.MouseEventType.MOUSE_OVER, this.$parent.pointMouseOver) |
| | | addPoliceIconOverlayData.on(global.DC.MouseEventType.MOUSE_OUT, this.$parent.pointMouseOut) |
| | | }, |
| | | |
| | |
| | | let overlayObj = {} |
| | | let lineObjdata = null |
| | | let plotOverlayData = null |
| | | let policeOverlayData = null |
| | | let policecarOption = [] |
| | | let cameraList = [] |
| | | let carList = [] |
| | |
| | | this.polylineBtnSwitch = false |
| | | |
| | | this.$refs.DRAWBTNBOX.removeDraw() |
| | | this.$refs.DRAWBTNBOX.removeDrawArrow() |
| | | |
| | | this.$refs.DRAWBTNBOX.clearDrawArrow() |
| | | this.$refs.DRAWBTNBOX.clearDraw() |
| | | arrowsListLayer != null && arrowsListLayer.clear() |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | |
| | | "outlineWidth": 0, //边框大小, |
| | | "pixelSize": 32, |
| | | }) |
| | | point.on(global.DC.MouseEventType.CLICK, this.overlayTypeClick) |
| | | // point.on(global.DC.MouseEventType.CLICK, this.overlayTypeClick) |
| | | point.on(global.DC.MouseEventType.MOUSE_OVER, this.pointMouseOver) |
| | | point.on(global.DC.MouseEventType.MOUSE_OUT, this.pointMouseOut) |
| | | positionObj.pointOverlayData = point |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: mapLayer, |
| | | type: 'billboard', |
| | |
| | | addCarAndRange (params) { |
| | | addCarAndRange(params).then(res => { |
| | | if (res.data.success) { |
| | | this.$refs.DRAWBTNBOX.addNewPolice(res.data.data,'policeman') |
| | | this.$message({ |
| | | message: '添加成功', |
| | | type: 'success' |
| | |
| | | type: 'error' |
| | | }) |
| | | } |
| | | this.getSecurityCarList(params.securityId, this.policeSwitch, this.polylineBtnSwitch, params.type == 1 ? 'line' : 'car') |
| | | // this.getSecurityCarList(params.securityId, this.policeSwitch, this.polylineBtnSwitch, params.type == 1 ? 'line' : 'car') |
| | | }) |
| | | }, |
| | | |
| | |
| | | policeChooseBeforeClose () { |
| | | this.policeChooseVisible = false |
| | | this.policeIconIsCreated = false |
| | | // this.$refs.DRAWBTNBOX.removeDraw() |
| | | this.$refs.DRAWBTNBOX.removeDraw() |
| | | }, |
| | | |
| | | // 选择警车关闭 |
| | | policeChooseCarBeforeClose () { |
| | | this.policeChooseCarVisible = false |
| | | this.policeIconIsCreated = false |
| | | // this.$refs.DRAWBTNBOX.removeDraw() |
| | | this.$refs.DRAWBTNBOX.removeDraw() |
| | | }, |
| | | |
| | | // 选择警员确认按钮 |
| | |
| | | this.addActivityPolice({ policemanId: this.searchPoliceTreeId, position: position, securityId: this.showingSecurityId, type: type, color: this.choosePoliceColor }) |
| | | this.policeIconIsCreated = false |
| | | } |
| | | |
| | | } |
| | | |
| | | } else { |
| | | if (this.policeChooseVisible == true) { |
| | | this.updateActivityPolice({ id: this.policeIconId, policemanId: this.searchPoliceTreeId, color: this.choosePoliceColor }) |
| | |
| | | } else { |
| | | this.isChoosePoliceElementDisabled = true |
| | | } |
| | | |
| | | policeOverlayData = e |
| | | |
| | | if ('policemanId' in e.overlay.attrParams.data) { |
| | | this.policeIconId = e.overlay.attrParams.data.id |
| | | this.policeType = e.overlay.attrParams.data.policemanId |
| | |
| | | deleteActivityCar (id, type) { |
| | | deleteActivityCar(id).then(res => { |
| | | if (res.data.success) { |
| | | policeOverlayData.overlay.remove() |
| | | if('pointOverlayData' in policeOverlayData.overlay.attrParams){ |
| | | policeOverlayData.overlay.attrParams.pointOverlayData.remove() |
| | | } |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | |
| | | type: 'error' |
| | | }) |
| | | } |
| | | this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch, type) |
| | | // this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch, type) |
| | | }) |
| | | }, |
| | | |
| | |
| | | deleteActivityPolice (id) { |
| | | deleteActivityPolice(id).then(res => { |
| | | if (res.data.success) { |
| | | policeOverlayData.overlay.remove() |
| | | if('pointOverlayData' in policeOverlayData.overlay.attrParams){ |
| | | policeOverlayData.overlay.attrParams.pointOverlayData.remove() |
| | | } |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | |
| | | type: 'error' |
| | | }) |
| | | } |
| | | this.getSecurityPoliceList(this.showingSecurityId, this.policeSwitch) |
| | | // this.getSecurityPoliceList(this.showingSecurityId, this.policeSwitch) |
| | | }) |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | watch: { |
| | | searchPoliceTreeName (val) { |
| | | this.$refs.policeTree.filter(val) |
| | | }, |
| | | // searchPoliceTreeName (val) { |
| | | // this.$refs.policeTree.filter(val) |
| | | // }, |
| | | |
| | | policeChooseVisible (val) { |
| | | if (val) { |