| | |
| | | let overlayObj = {} |
| | | let lineObjdata = null |
| | | let plotOverlayData = null |
| | | let policeOverlayData = null |
| | | let policecarOption = [] |
| | | let cameraList = [] |
| | | let carList = [] |
| | |
| | | |
| | | this.$refs.DRAWBTNBOX.removeDraw() |
| | | 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 }) |
| | |
| | | |
| | | // 地图绘制元素点击事件 |
| | | overlayTypeClick (e) { |
| | | console.log(e,336633); |
| | | if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == this.activityDeptId) { |
| | | this.isChoosePoliceElementDisabled = false |
| | | } 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) { |