| | |
| | | </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> |
| | | </div> |
| | | <div class="line area"> |
| | | <div class="value-name-box">选择预警范围:</div> |
| | | <div> |
| | | <div class="value-name-box">预警范围:</div> |
| | | <div class="width-box"> |
| | | <div class="input-width-box"> |
| | | <input type="text" v-model="pointAreaWidth" placeholder="请输入..." /> |
| | | <input type="text" v-model="pointAreaWidth" placeholder="请输入..." /> |
| | | </div> |
| | | <div class="units">米</div> |
| | | </div> |
| | |
| | | let b = parseInt(item.color.slice(5, 7), 16) |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255) |
| | | } |
| | | console.log('item',item); |
| | | point.attrParams = positionObj |
| | | curLayer.addOverlay(point) |
| | | point.setStyle({ |
| | |
| | | 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 |