| | |
| | | </el-color-picker> |
| | | </div> |
| | | </div> |
| | | <div class="line area"> |
| | | <div class="value-name-box">预警范围:</div> |
| | | <div class="width-box"> |
| | | <div class="input-width-box"> |
| | | <input type="text" v-model="pointAreaWidth" placeholder="请输入..." /> |
| | | </div> |
| | | <div class="units">米</div> |
| | | </div> |
| | | </div> |
| | | <el-button @click="determine" v-show="!isChoosePoliceElementDisabled">确定</el-button> |
| | | <el-button @click="deletePoliceElement" |
| | | v-show="!isChoosePoliceElementDisabled && policeIconIsCreated">删除</el-button> |
| | |
| | | <div class="pick-color-box"> |
| | | <el-color-picker v-model="choosePoliceColor" :predefine="predefineColors" size="small"> |
| | | </el-color-picker> |
| | | </div> |
| | | </div> |
| | | <div class="line area"> |
| | | <div class="value-name-box">预警范围:</div> |
| | | <div class="width-box"> |
| | | <div class="input-width-box"> |
| | | <input type="text" v-model="pointAreaWidth" placeholder="请输入..." /> |
| | | </div> |
| | | <div class="units">米</div> |
| | | </div> |
| | | </div> |
| | | <div class="police-btn-box"> |
| | |
| | | }], |
| | | isNeedPolygonType: false, |
| | | plotPointPositionStr: '', |
| | | pointAreaWidth:100, |
| | | } |
| | | }, |
| | | |
| | |
| | | point.on(global.DC.MouseEventType.MOUSE_OVER, this.pointMouseOver) |
| | | point.on(global.DC.MouseEventType.MOUSE_OUT, this.pointMouseOut) |
| | | positionObj.pointOverlayData = point |
| | | |
| | | // 预警范围先不显示 |
| | | // let circle = new global.DC.Circle(position, item.width != -1 ? item.width : 100) |
| | | // curLayer.addOverlay(circle) |
| | | // circle.setStyle({ |
| | | // "material": global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 100), //颜色 |
| | | // }) |
| | | |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: mapLayer, |
| | | type: 'billboard', |
| | |
| | | message: '请选择警车', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | } else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) { |
| | | this.$message({ |
| | | message: '范围必须为正整数', |
| | | type: 'warning' |
| | | }) |
| | | }else { |
| | | this.policeChooseCarVisible = false |
| | | this.addCarAndRange({ |
| | | carId: this.policeType, |
| | | position: position, |
| | | securityId: this.showingSecurityId, |
| | | type: type, |
| | | color: this.chooseCarColor |
| | | color: this.chooseCarColor, |
| | | width:this.pointAreaWidth |
| | | }) |
| | | this.policeIconIsCreated = false |
| | | } |
| | |
| | | message: '请选择警员', |
| | | type: 'warning' |
| | | }) |
| | | }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 }) |
| | | 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) { |
| | | this.$refs.DRAWBTNBOX.updateActivityPolice({ id: this.policeIconId, policemanId: this.searchPoliceTreeId, color: this.choosePoliceColor },policeOverlayData.overlay) |
| | | this.policeChooseVisible = false |
| | | if (this.searchPoliceTreeId == ''|| this.searchPoliceTreeName == '') { |
| | | this.$message({ |
| | | message: '请在列表中选择警员', |
| | | type: 'warning' |
| | | }) |
| | | } else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) { |
| | | this.$message({ |
| | | message: '范围必须为正整数', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | 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) { |
| | | this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, carId: this.policeType, color: this.chooseCarColor },policeOverlayData.overlay) |
| | | this.policeChooseCarVisible = false |
| | | if (this.policeType == '') { |
| | | this.$message({ |
| | | message: '请选择警车', |
| | | type: 'warning' |
| | | }) |
| | | } else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) { |
| | | this.$message({ |
| | | message: '范围必须为正整数', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, carId: this.policeType, color: this.chooseCarColor,width:this.pointAreaWidth },policeOverlayData.overlay) |
| | | this.policeChooseCarVisible = false |
| | | } |
| | | } |
| | | this.policeIconIsCreated = 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.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.searchPoliceTreeName = choosePoliceName |
| | | this.policeIconIsCreated = true |
| | | this.policeChooseVisible = true |
| | |
| | | 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.chooseCarColor = e.overlay.attrParams.data.color != '' ? e.overlay.attrParams.data.color : '#FF0000' |
| | | this.policeIconIsCreated = true |
| | | this.policeChooseCarVisible = true |