Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/srs-police-affairs
| | |
| | | } |
| | | |
| | | /** |
| | | * 活动删除警车 |
| | | * @param {*} ids 数据唯一标识 |
| | | * @returns |
| | | */ |
| | | export const deleteActivityCar = (ids) => { |
| | | return request({ |
| | | url: `/api/securityManageCar/securityManageCar/remove`, |
| | | method: 'post', |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 活动添加警员 |
| | | * @param {*} policemanId 警员ID |
| | | * @param {*} position 坐标 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 活动删除警员 |
| | | * @param {*} ids 数据唯一标识 |
| | | * @returns |
| | | */ |
| | | export const deleteActivityPolice = (ids) => { |
| | | return request({ |
| | | url: `/api/securityManage/securityManage/remove`, |
| | | method: 'post', |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 活动修改警员 |
| | | * @param {*} policemanId 警员ID |
| | | * @param {*} id 数据唯一标识 |
| | |
| | | // global.viewer.addTerrain(terrain) |
| | | |
| | | // 内网 |
| | | that.switchImg() |
| | | // that.switchImg() |
| | | |
| | | // 外网 |
| | | global.viewer.imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({ |
| | | url: 'http://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c', |
| | | subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'], |
| | | format: 'image/jpeg', |
| | | show: true, |
| | | maximumLevel: 18 |
| | | }) |
| | | ) |
| | | // global.viewer.imageryLayers.addImageryProvider( |
| | | // new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({ |
| | | // url: 'http://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c', |
| | | // subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'], |
| | | // format: 'image/jpeg', |
| | | // show: true, |
| | | // maximumLevel: 18 |
| | | // }) |
| | | // ) |
| | | |
| | | // 设置地图初始位置,角度等 |
| | | global.viewer.camera.setView({ |
| | |
| | | .el-dialog__body { |
| | | .el-button { |
| | | padding: 0; |
| | | background-color: #409eff; |
| | | background-color: rgba(8, 56, 185, 0.9); |
| | | border: 1px solid rgba(8, 56, 185, 0.9); |
| | | color: #fff; |
| | | width: 60px; |
| | | height: 30px; |
| | | text-align: center; |
| | | margin-top: 40px; |
| | | } |
| | | } |
| | | |
| | | .el-button:hover { |
| | | background-color: #409EFF; |
| | | } |
| | | } |
| | | } |
| | |
| | | .el-dialog__body { |
| | | .el-button { |
| | | padding: 0; |
| | | background-color: #409eff; |
| | | background-color: rgba(8, 56, 185, 0.9); |
| | | border: 1px solid rgba(8, 56, 185, 0.9); |
| | | color: #fff; |
| | | width: 60px; |
| | | height: 30px; |
| | |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .el-button:hover { |
| | | background-color: #409EFF; |
| | | } |
| | | |
| | | &>div { |
| | | display: flex; |
| | | justify-content: center; |
| | |
| | | width: countSizeVw(60, 1920); |
| | | height: countSizeVh(30); |
| | | margin-top: countSizeVh(40); |
| | | background-color: rgba(8, 56, 185, 0.9); |
| | | border: countSizeVh(1) solid rgba(8, 56, 185, 0.9); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | .edit-line-box { |
| | | .el-dialog { |
| | | width: countSizeVw(300, 1920); |
| | | height: countSizeVh(190); |
| | | |
| | | .el-dialog__body { |
| | | .el-button { |
| | | width: countSizeVw(60, 1920); |
| | | height: countSizeVh(30); |
| | | margin-top: countSizeVh(10); |
| | | } |
| | | |
| | | |
| | | &>div { |
| | | margin-bottom: countSizeVh(10); |
| | | } |
| | | |
| | | .input-width-box { |
| | | input { |
| | | width: countSizeVw(140, 1920); |
| | | height: countSizeVh(28); |
| | | border-radius: countSizeVh(4); |
| | | padding-left: countSizeVw(15, 1920); |
| | | } |
| | | |
| | | } |
| | | |
| | | .value-name-box { |
| | | height: countSizeVh(32); |
| | | line-height: countSizeVh(32); |
| | | } |
| | | |
| | | .color-box { |
| | | width: countSizeVw(140, 1920); |
| | | height: countSizeVh(32); |
| | | padding: countSizeVh(6); |
| | | |
| | | |
| | | &>div { |
| | | width: countSizeVw(20, 1920); |
| | | height: countSizeVh(20); |
| | | line-height: countSizeVh(20); |
| | | border: countSizeVh(1) solid #409EFF; |
| | | margin-right: countSizeVw(10, 1920); |
| | | } |
| | | |
| | | &>div:hover { |
| | | border: countSizeVh(1) solid #eee; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .add-polygon-box { |
| | | .el-dialog { |
| | | width: countSizeVw(300, 1920); |
| | | height: countSizeVh(140); |
| | | |
| | | .el-dialog__body { |
| | | .el-button { |
| | | width: countSizeVw(60, 1920); |
| | | height: countSizeVh(30); |
| | | margin-top: countSizeVh(10); |
| | | } |
| | | |
| | | &>div { |
| | | margin-bottom: countSizeVh(10); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .flexible-btn { |
| | |
| | | </el-select> |
| | | <el-button @click="determine">确定</el-button> |
| | | <el-button @click="cancel">取消</el-button> |
| | | <el-button @click="deletePoliceElement" v-show="isdeleteBtnShow">删除</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getSecurityList, getPoliceList, getCarList, addCarAndRange, addActivityPolice, getSecurityPoliceList, getSecurityCarList, updateActivityPolice, updateActivityCar, getServiceDictionary, getActivityType, addSecurityPlot, getSecurityPlotList, updateSecurityPlot } from '@/api/activity/index.js' |
| | | import { getSecurityList, getPoliceList, getCarList, addCarAndRange, addActivityPolice, getSecurityPoliceList, getSecurityCarList, updateActivityPolice, updateActivityCar, getServiceDictionary, getActivityType, addSecurityPlot, getSecurityPlotList, updateSecurityPlot, deleteActivityCar, deleteActivityPolice } 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' |
| | |
| | | polygonAddVisible: false, |
| | | polygonName: '', |
| | | polygonPositionStr: '', |
| | | optionColors: [ |
| | | global.DC.Namespace.Cesium.Color.fromBytes(199, 237, 204, 400), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(250, 249, 222, 400), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(255, 242, 226, 400), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(220, 226, 241, 400), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(233, 235, 254, 400), |
| | | ], |
| | | chooseColor: '#FF0000', |
| | | chooseLineData: {}, |
| | | lineWidth: 100, |
| | | linePosition: '', |
| | | isdeleteBtnShow: true, |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | }) |
| | | |
| | | } else if (item.type == 3 && pointShow) { |
| | | let positionObj = this.convertBillboardPositionDate(item.position, 'policeman', item.id, item.policemanId) |
| | | console.log(item, 363636) |
| | | let positionObj = this.convertBillboardPositionDate(item.position, 'policeman', item.id, item.policemanId, item.deptId) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'newDrawLayers', |
| | | type: 'billboard', |
| | |
| | | this.isHaveLine = res.data.data.some(item => { |
| | | return item.type == 1 |
| | | }) |
| | | // let count = 0 |
| | | res.data.data.forEach(item => { |
| | | if (item.type == 1 && polylineShow) { |
| | | let positionNewArr = this.convertPolylineOrPolygonPositionDate(item.position, item.type) |
| | | item.positionStr = positionNewArr |
| | | // count++ |
| | | // if (count == 1) { |
| | | // if (tc) { |
| | | // tc.clear() |
| | | // } |
| | | // tc = new global.DC.TrackController(global.viewer) |
| | | // track = new global.DC.Track(positionNewArr, 15) |
| | | // track.setModel('/model/qiche.gltf', { |
| | | // scale: 0.5 |
| | | // }) |
| | | // tc.addTrack(track) |
| | | let coords = global.DC.GeoTools.polylineBuffer(positionNewArr, item.width != -1 ? item.width : 100) |
| | | let polygon = new global.DC.Polygon(coords) |
| | | let color = '' |
| | |
| | | polygon._positions.forEach(item => { |
| | | position += item._lng + ',' + item._lat + ';' |
| | | }) |
| | | // polygon.setStyle({ |
| | | // material: color |
| | | // }) |
| | | // polylineAreaLayer.addOverlay(polygon) |
| | | // polylineAreaLayer.attrParams = item |
| | | // polylineAreaLayer.on(global.DC.MouseEventType.CLICK, this.lineOverlayTypeClick) |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'newCarDrawLayers', |
| | | positions: position, |
| | |
| | | material: global.DC.Color.RED.withAlpha(0.8), |
| | | width: 3, |
| | | params: item, |
| | | // incident: this.lineOverlayTypeClick |
| | | }) |
| | | } else if (item.type == 2) { |
| | | let positionNewArr = this.convertPolylineOrPolygonPositionDate(item.position, item.type) |
| | |
| | | id: item.id, |
| | | carId: item.carId |
| | | }, |
| | | // incident: this.overlayTypeClick |
| | | }) |
| | | |
| | | } else if (item.type == 3 && pointShow) { |
| | |
| | | // 活动添加警车和范围 |
| | | addCarAndRange (carId, position, securityId, type) { |
| | | addCarAndRange(carId, position, securityId, type).then(res => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: '添加成功', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: '添加失败' |
| | | }) |
| | | } |
| | | this.getSecurityCarList(securityId, this.policeSwitch, this.polylineBtnSwitch) |
| | | }) |
| | | }, |
| | |
| | | // 活动添加警员 |
| | | addActivityPolice (policemanId, position, securityId, type) { |
| | | addActivityPolice(policemanId, position, securityId, type).then(res => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: '添加成功', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: '添加失败' |
| | | }) |
| | | } |
| | | this.getSecurityPoliceList(securityId, this.policeSwitch) |
| | | }) |
| | | }, |
| | | |
| | | // 转换 点 坐标数据 |
| | | convertBillboardPositionDate (data, iconName, plotId, policeId) { |
| | | convertBillboardPositionDate (data, iconName, plotId, policeId, deptId) { |
| | | let positionStr = data |
| | | positionStr = data.slice(6, positionStr.length - 1) |
| | | let positionArr = positionStr.split(" ") |
| | |
| | | if (iconName == 'activity') { |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 100, url: '/img/icon/activity.png' } |
| | | } else if (iconName == 'policeman') { |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 100, url: '/img/icon/police-people.png', id: plotId, policemanId: policeId } |
| | | 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 } |
| | | } |
| | |
| | | that.policeChooseTitle = '选择警车' |
| | | that.policeOption = that.policecarOption |
| | | } |
| | | that.isdeleteBtnShow = false |
| | | that.policeChooseVisible = true |
| | | flag = false |
| | | } else if (flag == true && poltType == 'polyline') { |
| | |
| | | |
| | | // 地图绘制元素点击事件 |
| | | overlayTypeClick (e) { |
| | | this.isdeleteBtnShow = true |
| | | this.policeIconIsCreated = true |
| | | if ('policemanId' in e.overlay.attrParams) { |
| | | this.policeChooseTitle = '选择警员' |
| | |
| | | this.chooseColor = color |
| | | }, |
| | | |
| | | // 删除警车 |
| | | deleteActivityCar (id) { |
| | | deleteActivityCar(id).then(res => { |
| | | console.log(res, 1111) |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败' |
| | | }) |
| | | } |
| | | this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch) |
| | | }) |
| | | }, |
| | | |
| | | // 删除警员 |
| | | deleteActivityPolice (id) { |
| | | deleteActivityPolice(id).then(res => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败' |
| | | }) |
| | | } |
| | | this.getSecurityPoliceList(this.showingSecurityId, this.policeSwitch) |
| | | }) |
| | | }, |
| | | |
| | | // 点击删除 |
| | | deletePoliceElement () { |
| | | if (this.policeChooseTitle == '选择警员') { |
| | | this.deleteActivityPolice(this.policeIconId) |
| | | } else if (this.policeChooseTitle == '选择警车') { |
| | | this.deleteActivityCar(this.policeIconId) |
| | | } |
| | | this.policeChooseVisible = false |
| | | }, |
| | | |
| | | }, |
| | | |
| | |
| | | let nameArr = [] |
| | | let countArr = [] |
| | | res.data.data.data.forEach(item => { |
| | | nameArr.push(item.name.replace('派出', '')) |
| | | nameArr.push(item.name.replace('派出', '').replace('居民委员会', '')) |
| | | countArr.push({ value: item.count, id: item.id }) |
| | | }) |
| | | landData = [nameArr, countArr] |
| | |
| | | */ |
| | | currentChangeHandle (current, currentNode) { |
| | | if (current.hasChildren == true) return |
| | | |
| | | this.filterText = '' |
| | | this.prop = current.name |
| | | |
| | | this.getResidentialQuartersInfo(current.id, '361102') |
| | | this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', current.id, '1|3') |
| | | this.getVillageInfo(current.id) |
| | | |
| | | circleLayer.clear() |
| | | circleLayer.remove() |
| | |
| | | </div> |
| | | </div> |
| | | <div class="item video1" v-show="isShowVideo.video1"> |
| | | <div class="close" @click="isShowVideo.video1 = false"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | <div class="select" v-show="isShowSelect.video1"> |
| | | <el-select |
| | | size="small" |
| | |
| | | </div> |
| | | </div> |
| | | <div class="item video2" v-show="isShowVideo.video2"> |
| | | <div class="close" @click="isShowVideo.video2 = false"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | <div class="select" v-show="isShowSelect.video2"> |
| | | <el-select |
| | | size="small" |
| | |
| | | </div> |
| | | </div> |
| | | <div class="item video3" v-show="isShowVideo.video3"> |
| | | <div class="close" @click="isShowVideo.video3 = false"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | <div class="select" v-show="isShowSelect.video3"> |
| | | <el-select |
| | | size="small" |
| | |
| | | </div> |
| | | </div> |
| | | <div class="item video4" v-show="isShowVideo.video4"> |
| | | <div class="close" @click="isShowVideo.video4 = false"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | <div class="select" v-show="isShowSelect.video4"> |
| | | <el-select |
| | | size="small" |
| | |
| | | </div> |
| | | </div> |
| | | <div class="item video5" v-show="isShowVideo.video5"> |
| | | <div class="close" @click="isShowVideo.video5 = false"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | <div class="select" v-show="isShowSelect.video5"> |
| | | <el-select |
| | | size="small" |
| | |
| | | </div> |
| | | </div> |
| | | <div class="item video6" v-show="isShowVideo.video6"> |
| | | <div class="close" @click="isShowVideo.video6 = false"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | <div class="select" v-show="isShowSelect.video6"> |
| | | <el-select |
| | | size="small" |
| | |
| | | </div> |
| | | </div> |
| | | <div class="item video7" v-show="isShowVideo.video7"> |
| | | <div class="close" @click="isShowVideo.video7 = false"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | <div class="select" v-show="isShowSelect.video7"> |
| | | <el-select |
| | | size="small" |
| | |
| | | </div> |
| | | </div> |
| | | <div class="item video8" v-show="isShowVideo.video8"> |
| | | <div class="close" @click="isShowVideo.video8 = false"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | <div class="select" v-show="isShowSelect.video8"> |
| | | <el-select |
| | | size="small" |
| | |
| | | handleCurrentChange: function (currentPage) { |
| | | this.currentPage = currentPage |
| | | this.getRegionSaveList(this.currentPage, this.pagesize, this.userInfo.dept_id) |
| | | |
| | | }, |
| | | |
| | | // getVideoList (current, size) { |
| | |
| | | let lat = item.split(' ')[1] |
| | | positionNewStr += lng + ',' + lat + ';' |
| | | }) |
| | | getRegionList(1, 15, positionNewStr).then(res => { |
| | | getRegionList(1, 150, positionNewStr).then(res => { |
| | | let monitorData = res.data.data.list |
| | | console.log(res.data.data.list, 123) |
| | | this.monitoringList = res.data.data.list |
| | |
| | | monitorData.forEach((item, index) => { |
| | | let flvUrl = '' |
| | | |
| | | if (item.status == 0) return |
| | | this.getDevices(item.channelId).then(res => { |
| | | flvUrl = res |
| | | |
| | |
| | | width: calc((1920 - 400) / 4 / 1920 * 100vw); |
| | | height: calc((1080 - 60) / 3 / 1080 * 100vh); |
| | | |
| | | .close { |
| | | position: absolute; |
| | | top: 3%; |
| | | left: 45%; |
| | | width: 100%; |
| | | z-index: 999; |
| | | color: #fff; |
| | | font-size: 22px; |
| | | cursor: pointer; |
| | | } |
| | | .close:hover { |
| | | background-color: #65b1ff; |
| | | } |
| | | |
| | | .select { |
| | | position: absolute; |
| | | top: 6%; |