| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-show="dialogVisible" class="draw-btn-box"> |
| | | <div v-show="dialogVisible&&isShowActivityEditBox" class="draw-btn-box"> |
| | | <div class="left"> |
| | | <h3>预案布置</h3> |
| | | <div> |
| | |
| | | class="choose-police-box" |
| | | > |
| | | <div> |
| | | <el-select size="small" v-model="policeType" placeholder="请选择"> |
| | | <el-select |
| | | size="small" |
| | | v-model="policeType" |
| | | placeholder="请选择" |
| | | :disabled="isChoosePoliceElementDisabled" |
| | | > |
| | | <el-option |
| | | v-for="item in policeOption" |
| | | :key="item.value" |
| | |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | <el-button @click="determine">确定</el-button> |
| | | <el-button @click="cancel">取消</el-button> |
| | | <el-button @click="deletePoliceElement" v-show="isdeleteBtnShow">删除</el-button> |
| | | <el-button @click="determine" v-show="!isChoosePoliceElementDisabled">确定</el-button> |
| | | <el-button @click="cancel" v-show="!isChoosePoliceElementDisabled">取消</el-button> |
| | | <el-button @click="deletePoliceElement" v-show="isPoliceElementDeleteBtnShow">删除</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | <div> |
| | | <el-button @click="watchVideo">查看视频</el-button> |
| | | <el-button @click="saveLineInfo">保存</el-button> |
| | | <el-button @click="deleteLine">删除</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | <el-button @click="savePolygonInfo">保存</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | title="是否删除该标绘" |
| | | :modal="false" |
| | | :visible.sync="deletePlotVisible" |
| | | :close-on-click-modal="true" |
| | | class="delete-plot-box" |
| | | > |
| | | <div> |
| | | <el-button @click="deletePlot">删除</el-button> |
| | | <el-button @click="deletePlotVisible = false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getSecurityList, getPoliceList, getCarList, addCarAndRange, addActivityPolice, getSecurityPoliceList, getSecurityCarList, updateActivityPolice, updateActivityCar, getServiceDictionary, getActivityType, addSecurityPlot, getSecurityPlotList, updateSecurityPlot, deleteActivityCar, deleteActivityPolice } from '@/api/activity/index.js' |
| | | import { getSecurityList, getPoliceList, getCarList, addCarAndRange, addActivityPolice, getSecurityPoliceList, getSecurityCarList, updateActivityPolice, updateActivityCar, getServiceDictionary, getActivityType, addSecurityPlot, getSecurityPlotList, updateSecurityPlot, deleteActivityCar, deleteActivityPolice, deleteSecurityPlot } from '@/api/activity/index.js' |
| | | import { getSearchExtensively } from '@/api/dept/index.js' |
| | | import { getRegionList, getDevices } from '@/api/video/index.js' |
| | | import flvjs from 'flv.js' |
| | |
| | | chooseLineData: {}, |
| | | lineWidth: 100, |
| | | linePosition: '', |
| | | isdeleteBtnShow: true, |
| | | isPoliceElementDeleteBtnShow: true, |
| | | isChoosePoliceElementDisabled: false, |
| | | isShowActivityEditBox: false, |
| | | deletePlotVisible: false, |
| | | plotId: '', |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | }) |
| | | |
| | | } else if (item.type == 3 && pointShow) { |
| | | console.log(item, 363636) |
| | | let positionObj = this.convertBillboardPositionDate(item.position, 'policeman', item.id, item.policemanId, item.deptId) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'newDrawLayers', |
| | |
| | | }) |
| | | |
| | | } else if (item.type == 3 && pointShow) { |
| | | let positionObj = this.convertBillboardPositionDate(item.position, 'policecar', item.id, item.carId) |
| | | let positionObj = this.convertBillboardPositionDate(item.position, 'policecar', item.id, item.carId, item.deptId) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'newCarDrawLayers', |
| | | type: 'billboard', |
| | |
| | | } else if (iconName == 'policeman') { |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 100, url: '/img/icon/police-people.png', id: plotId, policemanId: policeId, deptId: deptId } |
| | | } else if (iconName == 'policecar') { |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 100, url: '/img/icon/car.png', id: plotId, carId: policeId } |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 100, url: '/img/icon/car.png', id: plotId, carId: policeId, deptId: deptId } |
| | | } |
| | | return positionObj |
| | | }, |
| | |
| | | }) |
| | | |
| | | this.dialogVisible = true |
| | | if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == item.deptId) { |
| | | this.isShowActivityEditBox = true |
| | | } else { |
| | | this.isShowActivityEditBox = false |
| | | } |
| | | this.activityDeptId = item.deptId |
| | | |
| | | this.currentClickIndex = index |
| | | |
| | |
| | | that.policeChooseTitle = '选择警车' |
| | | that.policeOption = that.policecarOption |
| | | } |
| | | that.isdeleteBtnShow = false |
| | | that.isPoliceElementDeleteBtnShow = false |
| | | that.policeChooseVisible = true |
| | | flag = false |
| | | } else if (flag == true && poltType == 'polyline') { |
| | |
| | | |
| | | // 地图绘制元素点击事件 |
| | | overlayTypeClick (e) { |
| | | this.isdeleteBtnShow = true |
| | | this.policeIconIsCreated = true |
| | | if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == this.activityDeptId) { |
| | | this.isPoliceElementDeleteBtnShow = true |
| | | this.isChoosePoliceElementDisabled = false |
| | | } else { |
| | | this.isPoliceElementDeleteBtnShow = false |
| | | this.isChoosePoliceElementDisabled = true |
| | | } |
| | | if ('policemanId' in e.overlay.attrParams) { |
| | | this.policeChooseTitle = '选择警员' |
| | | this.policeOption = this.policemanOption |
| | |
| | | this.chooseColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color : '#FF0000' |
| | | this.policeIconId = e.overlay.attrParams.id |
| | | this.linePosition = e.overlay.attrParams.positionStr |
| | | console.log(11, e, e.overlay.attrParams.id) |
| | | if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == this.activityDeptId) { |
| | | this.lineEditVisible = true |
| | | } else { |
| | | this.lineEditVisible = false |
| | | } |
| | | }, |
| | | |
| | | // 保存活动标绘箭头 |
| | |
| | | "material": global.DC.Color.ORANGE.withAlpha(0.4), |
| | | }) |
| | | chooseArrow.on(global.DC.MouseEventType.DB_CLICK, this.reeditArrowDbClick) |
| | | chooseArrow.on(global.DC.MouseEventType.CLICK, this.reeditArrowClick) |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 单击。标绘箭头 |
| | | reeditArrowClick (e) { |
| | | if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == this.activityDeptId) { |
| | | this.plotId = e.overlay.attrParams.id |
| | | this.deletePlotVisible = true |
| | | } |
| | | }, |
| | | |
| | | updateSecurityPlot (id, position, name) { |
| | | updateSecurityPlot(id, position, name).then(res => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败' |
| | | }) |
| | | } |
| | | this.getSecurityPlotList(this.showingSecurityId, this.arrowBtnSwitch) |
| | | }) |
| | | }, |
| | |
| | | // 删除警车 |
| | | deleteActivityCar (id) { |
| | | deleteActivityCar(id).then(res => { |
| | | console.log(res, 1111) |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: '删除成功', |
| | |
| | | this.policeChooseVisible = false |
| | | }, |
| | | |
| | | // 删除巡逻路线 |
| | | deleteLine () { |
| | | this.deleteActivityCar(this.policeIconId) |
| | | this.lineEditVisible = false |
| | | }, |
| | | |
| | | // 删除活动标绘接口 |
| | | deleteSecurityPlot (id) { |
| | | deleteSecurityPlot(id).then(res => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败' |
| | | }) |
| | | } |
| | | this.getSecurityPlotList(this.showingSecurityId, this.arrowBtnSwitch) |
| | | }) |
| | | }, |
| | | |
| | | // 删除活动标绘 |
| | | deletePlot () { |
| | | this.deleteSecurityPlot(this.plotId) |
| | | this.deletePlotVisible = false |
| | | }, |
| | | |
| | | }, |
| | | |
| | | computed: { |