| | |
| | | @mousedown.native="preventFocusLost" |
| | | ref="policeTree" |
| | | :filter-node-method="filterPoliceNode" |
| | | v-show="searchTreeShowFlag" |
| | | ></el-tree> |
| | | <div class="police-btn-box"> |
| | | <el-button @click="determine" v-show="!isChoosePoliceElementDisabled">确定</el-button> |
| | |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | title="是否删除该标绘" |
| | | title="修改标绘" |
| | | :modal="false" |
| | | :visible.sync="deletePlotVisible" |
| | | :visible.sync="editPlotVisible" |
| | | :close-on-click-modal="true" |
| | | class="delete-plot-box" |
| | | class="edit-plot-box" |
| | | > |
| | | <div> |
| | | <div class="value-name-box">选择标绘颜色:</div> |
| | | <div class="color-box"> |
| | | <div |
| | | class="red-color" |
| | | @click="changePlotColor('#FF0000')" |
| | | >{{ choosePlotColor == '#FF0000'?'√':'' }}</div> |
| | | <div |
| | | class="green-color" |
| | | @click="changePlotColor('#00FF00')" |
| | | >{{ choosePlotColor == '#00FF00'?'√':'' }}</div> |
| | | <div |
| | | class="blue-color" |
| | | @click="changePlotColor('#0000FF')" |
| | | >{{ choosePlotColor == '#0000FF'?'√':'' }}</div> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <el-button @click="savePlot">保存</el-button> |
| | | <el-button @click="editPlot">编辑</el-button> |
| | | <el-button @click="deletePlot">删除</el-button> |
| | | <el-button @click="deletePlotVisible = false">取消</el-button> |
| | | <el-button @click="editPlotVisible = false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | polygonName: '', |
| | | polygonPositionStr: '', |
| | | chooseColor: '#FF0000', |
| | | choosePlotColor: '#FF0000', |
| | | chooseLineData: {}, |
| | | lineWidth: 100, |
| | | linePosition: '', |
| | | isChoosePoliceElementDisabled: false, |
| | | isShowActivityEditBox: false, |
| | | deletePlotVisible: false, |
| | | editPlotVisible: false, |
| | | plotId: '', |
| | | polygonPosition: '', |
| | | cameraList: [], |
| | |
| | | searchPoliceTreeName: '', |
| | | searchPoliceTreeId: '', |
| | | searchTreeShowFlag: false, |
| | | plotOverlayData: null, |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | }, |
| | | |
| | | inputChange (e) { |
| | | // console.log(e) |
| | | if (this.searchActivity == '') { |
| | | this.isShowActivityClearBtn = false |
| | | } else { |
| | |
| | | |
| | | // 树形控件选中事件 |
| | | treeCheckClick (e1, e2) { |
| | | // console.log(e1, e2, 112233) |
| | | const that = this |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'activeHeatLayer', |
| | |
| | | |
| | | // 切换作战标绘 |
| | | switchArrowBtnChange (e) { |
| | | this.getSecurityPlotList(this.securityIdy, this.arrowBtnSwitch) |
| | | this.getSecurityPlotList(this.securityId, this.arrowBtnSwitch) |
| | | }, |
| | | |
| | | // 切换轨迹播放控件 |
| | |
| | | document.oncontextmenu = function () { |
| | | if (flag == true && poltType == 'billboard') { |
| | | if (policeType == 'policeman') { |
| | | this.searchPoliceTreeId = '' |
| | | this.searchPoliceTreeName = '' |
| | | that.policeChooseVisible = true |
| | | } else if (policeType == 'policecar') { |
| | | that.policeOption = that.policecarOption |
| | |
| | | if (this.policeChooseCarVisible == true) { |
| | | this.policeChooseCarVisible = false |
| | | this.addCarAndRange(this.policeType, position, this.showingSecurityId, type) |
| | | } else if (this.policeChooseCarVisible == true) { |
| | | } else if (this.policeChooseVisible == true) { |
| | | this.policeChooseVisible = false |
| | | this.addActivityPolice(this.searchPoliceTreeId, position, this.showingSecurityId, type) |
| | | } |
| | |
| | | if ('policemanId' in e.overlay.attrParams) { |
| | | this.policeIconId = e.overlay.attrParams.id |
| | | this.policeType = e.overlay.attrParams.policemanId |
| | | // let list = this.platFn(res.data.data).find(item => item.id == "1627542311989243905").name |
| | | let choosePoliceName = this.platFn(this.policeTreeData).find(item => item.id == e.overlay.attrParams.policemanId).name |
| | | this.searchPoliceTreeName = choosePoliceName |
| | | this.policeIconIsCreated = true |
| | | this.policeChooseVisible = true |
| | | } else if ('carId' in e.overlay.attrParams) { |
| | |
| | | // "font": "30px", |
| | | // }) |
| | | } |
| | | chooseArrow.attrParams = { 'id': item.id } |
| | | let color = '' |
| | | if (item.color == '') { |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 150) |
| | | } else { |
| | | let r = parseInt(item.color.slice(1, 3), 16) |
| | | let g = parseInt(item.color.slice(3, 5), 16) |
| | | let b = parseInt(item.color.slice(5, 7), 16) |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 150) |
| | | } |
| | | if (item.id == 202) { |
| | | console.log('item', item) |
| | | } |
| | | chooseArrow.attrParams = { 'id': item.id, 'color': item.color } |
| | | arrowsListLayer.addOverlay(chooseArrow) |
| | | chooseArrow.setStyle({ |
| | | "material": global.DC.Color.ORANGE.withAlpha(0.4), |
| | | "material": color, |
| | | }) |
| | | chooseArrow.on(global.DC.MouseEventType.DB_CLICK, this.reeditArrowDbClick) |
| | | // chooseArrow.on(global.DC.MouseEventType.DB_CLICK, this.reeditArrowDbClick) |
| | | chooseArrow.on(global.DC.MouseEventType.CLICK, this.reeditArrowClick) |
| | | }) |
| | | }) |
| | |
| | | }) |
| | | position = position.slice(0, position.length - 1) |
| | | drawArrowLayers.addOverlay(overlayData) |
| | | this.updateSecurityPlot(overlayData.attrParams.id, position) |
| | | this.updateSecurityPlot({ id: overlayData.attrParams.id, position: position }) |
| | | }) |
| | | }, |
| | | |
| | | // 单击。标绘箭头 |
| | | reeditArrowClick (e) { |
| | | this.plotOverlayData = e |
| | | this.choosePlotColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color : '#FF0000' |
| | | console.log('this.choosePlotColor', this.choosePlotColor, e.overlay.attrParams) |
| | | if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == this.activityDeptId) { |
| | | this.plotId = e.overlay.attrParams.id |
| | | this.deletePlotVisible = true |
| | | this.editPlotVisible = true |
| | | } |
| | | }, |
| | | |
| | | updateSecurityPlot (id, position, name) { |
| | | updateSecurityPlot(id, position, name).then(res => { |
| | | // 编辑标绘 |
| | | editPlot () { |
| | | this.editPlotVisible = false |
| | | this.reeditArrowDbClick(this.plotOverlayData) |
| | | }, |
| | | |
| | | // 保存标绘修改 |
| | | savePlot () { |
| | | this.updateSecurityPlot({ id: this.plotOverlayData.overlay.attrParams.id, color: this.choosePlotColor }) |
| | | this.editPlotVisible = false |
| | | }, |
| | | |
| | | updateSecurityPlot (params) { |
| | | updateSecurityPlot(params).then(res => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | message: '修改成功', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败' |
| | | message: '修改失败' |
| | | }) |
| | | } |
| | | this.getSecurityPlotList(this.showingSecurityId, this.arrowBtnSwitch) |
| | |
| | | this.chooseColor = color |
| | | }, |
| | | |
| | | // 改变标绘颜色 |
| | | changePlotColor (color) { |
| | | this.choosePlotColor = color |
| | | }, |
| | | |
| | | // 删除警车 |
| | | deleteActivityCar (id) { |
| | | deleteActivityCar(id).then(res => { |
| | |
| | | // 删除活动标绘 |
| | | deletePlot () { |
| | | this.deleteSecurityPlot(this.plotId) |
| | | this.deletePlotVisible = false |
| | | this.editPlotVisible = false |
| | | }, |
| | | |
| | | // 获取设备列表 |