5 files modified
9 files added
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取警员树形列表 |
| | | * @param {*} params |
| | | * @returns |
| | | */ |
| | | export const getPolicemanTree = (params) => { |
| | | return request({ |
| | | url: `/api/policeman/policeman/getPolicemanTree`, |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 活动添加警车和范围 |
| | | * @param {*} carId 警车ID |
| | | * @param {*} position 坐标 |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 获得数据地图搜索场所 |
| | | * @param {*} deptId 区域id |
| | | * @returns |
| | | */ |
| | | export const getSearchInfo = (deptId, search) => { |
| | | return request({ |
| | | url: `/api/policeStationInfo/policeStationInfo/getSearchInfo`, |
| | | method: 'get', |
| | | params: { |
| | | deptId, |
| | | search |
| | | } |
| | | }) |
| | | } |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 320px; |
| | | height: 300px; |
| | | top: 50%; |
| | | left: 50% !important; |
| | | transform: translate(-50%, -50%); |
| | | |
| | | .el-dialog__body { |
| | | &>div { |
| | | overflow: hidden; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .el-button { |
| | | padding: 0; |
| | | 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: 16px; |
| | | } |
| | | } |
| | | |
| | | .el-button:hover { |
| | | background-color: #409EFF; |
| | | } |
| | | |
| | | .el-select .el-input.is-disabled .el-input__inner { |
| | | background-color: rgba(8, 56, 185, 0.9); |
| | | } |
| | | |
| | | .el-tree { |
| | | height: 100px; |
| | | overflow-y: scroll; |
| | | position: absolute; |
| | | right: -10px; |
| | | top: 46px; |
| | | width: 100%; |
| | | } |
| | | |
| | | .el-input { |
| | | position: absolute; |
| | | width: calc(100% - 20px); |
| | | font-size: 14px; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | |
| | | .police-btn-box { |
| | | position: absolute; |
| | | top: 126px; |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .choose-policeCar-box { |
| | | .el-dialog { |
| | | margin: 0 !important; |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 320px; |
| | | height: 200px; |
| | | top: 50%; |
| | | left: 50% !important; |
| | |
| | | .el-select .el-input.is-disabled .el-input__inner { |
| | | background-color: rgba(8, 56, 185, 0.9); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | .input-width-box { |
| | | input { |
| | | outline: none; |
| | | width: 140px; |
| | | width: 80px; |
| | | height: 28px; |
| | | background-color: rgba(8, 56, 185, 0.5); |
| | | border: none; |
| | |
| | | .value-name-box { |
| | | height: 32px; |
| | | line-height: 32px; |
| | | width: 120px; |
| | | } |
| | | |
| | | .color-box { |
| | |
| | | } |
| | | |
| | | .units { |
| | | width: 20px; |
| | | width: 60px; |
| | | height: 26px; |
| | | text-align: left; |
| | | padding-left: 10px; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | .el-dialog { |
| | | width: countSizeVw(320, 1920); |
| | | height: countSizeVh(200); |
| | | height: countSizeVh(240); |
| | | } |
| | | |
| | | .el-dialog .el-dialog__body .el-button { |
| | | width: countSizeVw(60, 1920); |
| | | height: countSizeVh(30); |
| | | margin-top: countSizeVh(16); |
| | | border: countSizeVh(1) solid rgba(8, 56, 185, 0.9); |
| | | } |
| | | |
| | | .el-dialog .el-dialog__body .el-button:hover { |
| | | background-color: #409EFF; |
| | | } |
| | | |
| | | .el-tree { |
| | | height: countSizeVh(100); |
| | | right: -countSizeVw(10, 1920); |
| | | top: countSizeVh(46); |
| | | } |
| | | |
| | | .el-input { |
| | | width: calc(100% - countSizeVw(20, 1920)); |
| | | } |
| | | |
| | | .police-btn-box { |
| | | top: countSizeVh(126); |
| | | } |
| | | } |
| | | |
| | | .choose-policeCar-box { |
| | | .el-dialog__header span { |
| | | font-size: countSizeVh(18); |
| | | } |
| | | |
| | | .el-dialog .el-dialog__body { |
| | | font-size: countSizeVh(16); |
| | | } |
| | | |
| | | .el-dialog__header button { |
| | | font-size: countSizeVh(18); |
| | | right: countSizeVw(10, 1920); |
| | | } |
| | | |
| | | .el-dialog { |
| | | width: countSizeVw(320, 1920); |
| | | height: countSizeVh(160); |
| | | } |
| | | |
| | | .el-dialog .el-dialog__body .el-button { |
| | |
| | | .el-dialog .el-dialog__body .el-button:hover { |
| | | background-color: #409EFF; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | .edit-line-box { |
| | |
| | | |
| | | .input-width-box { |
| | | input { |
| | | width: countSizeVw(140, 1920); |
| | | width: countSizeVw(80, 1920); |
| | | height: countSizeVh(28); |
| | | border-radius: countSizeVh(4); |
| | | padding-left: countSizeVw(15, 1920); |
| | |
| | | } |
| | | |
| | | .units { |
| | | width: countSizeVw(20, 1920); |
| | | width: countSizeVw(60, 1920); |
| | | height: countSizeVh(26); |
| | | padding-left: countSizeVw(10, 1920) |
| | | } |
| | | |
| | | } |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="isHaveMonitor.video5"> |
| | | <video |
| | | id="videoElement5" |
| | | autoplay |
| | |
| | | style="object-fit: fill" |
| | | ></video> |
| | | </div> |
| | | <div class="no-video" v-show="!isHaveMonitor.video5">暂无数据</div> |
| | | <div class="no-video" v-show="!isHaveMonitor.video5">设备离线</div> |
| | | </div> |
| | | <div class="item video6" v-show="videoShow"> |
| | | <div class="select" v-show="isShowSelect.video6"> |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="isHaveMonitor.video6"> |
| | | <video |
| | | id="videoElement6" |
| | | autoplay |
| | |
| | | style="object-fit: fill" |
| | | ></video> |
| | | </div> |
| | | <div class="no-video" v-show="!isHaveMonitor.video6">暂无数据</div> |
| | | <div class="no-video" v-show="!isHaveMonitor.video6">设备离线</div> |
| | | </div> |
| | | <div class="item video7" v-show="videoShow"> |
| | | <div class="select" v-show="isShowSelect.video7"> |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="isHaveMonitor.video7"> |
| | | <video |
| | | id="videoElement7" |
| | | autoplay |
| | |
| | | style="object-fit: fill" |
| | | ></video> |
| | | </div> |
| | | <div class="no-video" v-show="!isHaveMonitor.video7">暂无数据</div> |
| | | <div class="no-video" v-show="!isHaveMonitor.video7">设备离线</div> |
| | | </div> |
| | | <div class="item video8" v-show="videoShow"> |
| | | <div class="select" v-show="isShowSelect.video8"> |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="isHaveMonitor.video8"> |
| | | <video |
| | | id="videoElement8" |
| | | autoplay |
| | |
| | | style="object-fit: fill" |
| | | ></video> |
| | | </div> |
| | | <div class="no-video" v-show="!isHaveMonitor.video8">暂无数据</div> |
| | | <div class="no-video" v-show="!isHaveMonitor.video8">设备离线</div> |
| | | </div> |
| | | <div class="deleteVideo" v-show="videoShow" @click="videoShow = false">关闭</div> |
| | | |
| | | <el-dialog |
| | | :title="policeChooseTitle" |
| | | :title="policeChooseCarTitle" |
| | | :modal="false" |
| | | :visible.sync="policeChooseVisible" |
| | | :before-close="policeChooseBeforeClose" |
| | | :visible.sync="policeChooseCarVisible" |
| | | :before-close="policeChooseCarBeforeClose" |
| | | :close-on-click-modal="true" |
| | | class="choose-police-box" |
| | | class="choose-policeCar-box" |
| | | > |
| | | <div> |
| | | <el-select |
| | |
| | | </el-select> |
| | | <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> |
| | | <el-button @click="deletePoliceElement" v-show="!isChoosePoliceElementDisabled">删除</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | :title="policeChooseTitle" |
| | | :modal="false" |
| | | :visible.sync="policeChooseVisible" |
| | | :before-close="policeChooseBeforeClose" |
| | | :close-on-click-modal="true" |
| | | class="choose-police-box" |
| | | > |
| | | <div> |
| | | <el-input |
| | | ref="searchTreeInput" |
| | | v-model="searchPoliceTreeName" |
| | | @input="searchInputTree" |
| | | @focus="searchTreeShowFlag = true" |
| | | @blur="searchTreeShowFlag = false" |
| | | placeholder="请选择警员" |
| | | style="cursor: pointer;" |
| | | ></el-input> |
| | | <el-tree |
| | | :data="policeTreeData" |
| | | :props="policeDefaultProps" |
| | | @node-click="handlePoliceNodeClick" |
| | | @mousedown.native="preventFocusLost" |
| | | ref="policeTree" |
| | | :filter-node-method="filterPoliceNode" |
| | | ></el-tree> |
| | | <div class="police-btn-box"> |
| | | <el-button @click="determine" v-show="!isChoosePoliceElementDisabled">确定</el-button> |
| | | <el-button @click="cancel" v-show="!isChoosePoliceElementDisabled">取消</el-button> |
| | | <el-button |
| | | @click="deletePoliceElement" |
| | | v-show="!isChoosePoliceElementDisabled" |
| | | >删除</el-button> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | @click="changeLineColor('#0000FF')" |
| | | >{{ chooseColor == '#0000FF'?'√':'' }}</div> |
| | | </div> |
| | | <div class="units"></div> |
| | | </div> |
| | | <div> |
| | | <el-button @click="watchVideo">查看视频</el-button> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getSecurityList, getPoliceList, getCarList, addCarAndRange, addActivityPolice, getSecurityPoliceList, getSecurityCarList, updateActivityPolice, updateActivityCar, getServiceDictionary, getActivityType, addSecurityPlot, getSecurityPlotList, updateSecurityPlot, deleteActivityCar, deleteActivityPolice, deleteSecurityPlot } from '@/api/activity/index.js' |
| | | import { getSecurityList, getPoliceList, getCarList, addCarAndRange, addActivityPolice, getSecurityPoliceList, getSecurityCarList, updateActivityPolice, updateActivityCar, getServiceDictionary, getActivityType, addSecurityPlot, getSecurityPlotList, updateSecurityPlot, deleteActivityCar, deleteActivityPolice, deleteSecurityPlot, getSearchInfo, getPolicemanTree } from '@/api/activity/index.js' |
| | | import { getSearchExtensively } from '@/api/dept/index.js' |
| | | import { getRegionList, getDevices } from '@/api/video/index.js' |
| | | import { getEquipmentAll } from '@/api/home/index.js' |
| | | import flvjs from 'flv.js' |
| | | |
| | | let analyseLayer = null |
| | |
| | | let loading = null |
| | | |
| | | export default { |
| | | inject: ['userInfo'], |
| | | |
| | | data () { |
| | | return { |
| | | currentPage: 1, |
| | |
| | | }, { |
| | | id: 3, |
| | | label: '视频监控' |
| | | }, { |
| | | id: 4, |
| | | label: '治安重点场所', |
| | | children: [{ |
| | | id: 10, |
| | | label: '卡点', |
| | | lng: 116.029703, |
| | | lat: 28.683435, |
| | | alt: 100, |
| | | }, |
| | | { |
| | | id: 11, |
| | | label: '电警点', |
| | | lng: 115.022703, |
| | | lat: 28.682435, |
| | | alt: 100, |
| | | }, |
| | | { |
| | | id: 12, |
| | | label: '岗亭', |
| | | lng: 116.028002, |
| | | lat: 28.681302, |
| | | alt: 100, |
| | | }] |
| | | }, { |
| | | id: 5, |
| | | label: '重点单位', |
| | | children: [{ |
| | | id: 13, |
| | | label: '大中型商超', |
| | | lng: 116.023293, |
| | | lat: 28.680986, |
| | | alt: 100, |
| | | }, |
| | | { |
| | | id: 14, |
| | | label: '幼儿园', |
| | | lng: 116.0275001, |
| | | lat: 28.679361, |
| | | alt: 100, |
| | | }, |
| | | { |
| | | id: 15, |
| | | label: '政府事业单位', |
| | | lng: 116.024398, |
| | | lat: 28.678066, |
| | | alt: 100, |
| | | }, |
| | | { |
| | | id: 16, |
| | | label: '机场', |
| | | lng: 116.0268529, |
| | | lat: 28.6829572, |
| | | alt: 100, |
| | | }, |
| | | { |
| | | id: 17, |
| | | label: '银行', |
| | | lng: 116.025595, |
| | | lat: 28.681225, |
| | | alt: 100, |
| | | }] |
| | | }, |
| | | { |
| | | id: 6, |
| | | label: '特殊场所', |
| | | children: [{ |
| | | id: 18, |
| | | label: '印刷店', |
| | | lng: 116.020370, |
| | | lat: 28.680075, |
| | | alt: 100, |
| | | }, |
| | | { |
| | | id: 19, |
| | | label: '废旧金属收购', |
| | | lng: 116.030054, |
| | | lat: 28.683692, |
| | | alt: 100, |
| | | }, |
| | | { |
| | | id: 20, |
| | | label: '开锁店', |
| | | lng: 116.022703, |
| | | lat: 28.679435, |
| | | alt: 100, |
| | | }, |
| | | { |
| | | id: 21, |
| | | label: '酒店', |
| | | lng: 115.028703, |
| | | lat: 28.684435, |
| | | alt: 100, |
| | | }] |
| | | }] |
| | | // { |
| | | // id: 5, |
| | | // label: '重点单位', |
| | | // children: [{ |
| | | // id: 13, |
| | | // label: '大中型商超', |
| | | // lng: 116.023293, |
| | | // lat: 28.680986, |
| | | // alt: 100, |
| | | // }, |
| | | // { |
| | | // id: 14, |
| | | // label: '幼儿园', |
| | | // lng: 116.0275001, |
| | | // lat: 28.679361, |
| | | // alt: 100, |
| | | // }, |
| | | // { |
| | | // id: 15, |
| | | // label: '政府机关', |
| | | // lng: 116.024398, |
| | | // lat: 28.678066, |
| | | // alt: 100, |
| | | // }, |
| | | // { |
| | | // id: 16, |
| | | // label: '机场', |
| | | // lng: 116.0268529, |
| | | // lat: 28.6829572, |
| | | // alt: 100, |
| | | // }, |
| | | // { |
| | | // id: 17, |
| | | // label: '银行', |
| | | // lng: 116.025595, |
| | | // lat: 28.681225, |
| | | // alt: 100, |
| | | // }] |
| | | // }, |
| | | // { |
| | | // id: 6, |
| | | // label: '特殊场所', |
| | | // children: [{ |
| | | // id: 18, |
| | | // label: '印刷店', |
| | | // lng: 116.020370, |
| | | // lat: 28.680075, |
| | | // alt: 100, |
| | | // }, |
| | | // { |
| | | // id: 19, |
| | | // label: '废旧金属收购', |
| | | // lng: 116.030054, |
| | | // lat: 28.683692, |
| | | // alt: 100, |
| | | // }, |
| | | // { |
| | | // id: 20, |
| | | // label: '开锁店', |
| | | // lng: 116.022703, |
| | | // lat: 28.679435, |
| | | // alt: 100, |
| | | // }, |
| | | // { |
| | | // id: 21, |
| | | // label: '酒店', |
| | | // lng: 115.028703, |
| | | // lat: 28.684435, |
| | | // alt: 100, |
| | | // }] |
| | | // } |
| | | ] |
| | | }], |
| | | defaultProps: { |
| | | children: 'children', |
| | |
| | | activityDetails: {}, |
| | | boxShow: true, |
| | | policeChooseTitle: '选择警员', |
| | | policeChooseCarTitle: '选择警车', |
| | | policeChooseVisible: false, |
| | | policeChooseCarVisible: false, |
| | | overlayObj: {}, |
| | | isTrackBtnShow: false, |
| | | showingSecurityId: '', |
| | |
| | | chooseLineData: {}, |
| | | lineWidth: 100, |
| | | linePosition: '', |
| | | isPoliceElementDeleteBtnShow: true, |
| | | isChoosePoliceElementDisabled: false, |
| | | isShowActivityEditBox: false, |
| | | deletePlotVisible: false, |
| | | plotId: '', |
| | | polygonPosition: '', |
| | | cameraList: [], |
| | | policeTreeData: [], |
| | | policeDefaultProps: { |
| | | children: 'children', |
| | | label: 'name' |
| | | }, |
| | | searchPoliceTreeName: '', |
| | | searchPoliceTreeId: '', |
| | | searchTreeShowFlag: false, |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | |
| | | this.getPoliceList() |
| | | |
| | | // 获取树状警员数据 |
| | | this.getPolicemanTree() |
| | | |
| | | this.getCarList() |
| | | |
| | | this.getSecurityList(this.currentPage, this.pagesize) |
| | | |
| | | this.getEquipmentAll({ type: 1 }) |
| | | |
| | | }, |
| | | mounted () { |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 获取树状警员列表 |
| | | getPolicemanTree () { |
| | | getPolicemanTree().then(res => { |
| | | this.policeTreeData = res.data.data |
| | | console.log(res.data.data, 121212) |
| | | }) |
| | | }, |
| | | |
| | | getActivityType () { |
| | | getServiceDictionary().then(response => { |
| | | const activityType = response.data.data.records.filter(item => item.code == "securityType") |
| | |
| | | list.push(new global.DC.Position(lng, lat)) |
| | | } |
| | | return list |
| | | }, |
| | | |
| | | /** |
| | | * @description: 禁用鼠标点击树结构的时候input失去焦点 |
| | | * @param {*} event |
| | | * @return {*} |
| | | */ |
| | | preventFocusLost (event) { |
| | | event.preventDefault() |
| | | }, |
| | | |
| | | inputChange (e) { |
| | |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | // 扁平化树状数据 |
| | | platFn (list) { |
| | | let res = [] |
| | | res = list.concat(...list.map(item => { |
| | | if (item.children instanceof Array && item.children.length > 0) { |
| | | return this.platFn(item.children) |
| | | } |
| | | return null |
| | | }).filter(o => o instanceof Array && o.length > 0)) |
| | | return res |
| | | }, |
| | | |
| | | // 获取活动警车分布信息 |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 点击选择警员 |
| | | handlePoliceNodeClick (current) { |
| | | if (current.hasChildren == true) return |
| | | console.log(current, 1111) |
| | | this.searchPoliceTreeName = current.name |
| | | this.searchPoliceTreeId = current.id |
| | | this.searchTreeShowFlag = false |
| | | this.$refs.searchTreeInput.blur() |
| | | }, |
| | | |
| | | // 获取警车列表,生成下拉数据 |
| | | getCarList () { |
| | | getCarList().then(res => { |
| | |
| | | let positionArr = positionStr.split(" ") |
| | | let positionObj = {} |
| | | if (iconName == 'activity') { |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 100, url: '/img/icon/activity.png' } |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0, 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, deptId: deptId } |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0, 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, deptId: deptId } |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0, url: '/img/icon/car.png', id: plotId, carId: policeId, deptId: deptId } |
| | | } |
| | | return positionObj |
| | | }, |
| | |
| | | |
| | | // 树形控件选中事件 |
| | | treeCheckClick (e1, e2) { |
| | | // console.log(e1, e2, 112233) |
| | | const that = this |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'activeHeatLayer', |
| | |
| | | type: 'VectorLayer' |
| | | }) |
| | | e2.checkedNodes.forEach(item => { |
| | | if (item.lng) { |
| | | item.url = '/img/icon/position.png' |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'activeLayer', |
| | | type: "billboard", |
| | | params: item |
| | | }) |
| | | if (item.id != 1 && item.id != 2 && item.id != 3 && item.id != 7 && item.id != 8 && item.id != 9 && item.lng) { |
| | | if (item.label == '大中型商超') { |
| | | this.getSearchInfo(this.userInfo.dept_id, '大中型商超', 'supermarket') |
| | | } if (item.label == '幼儿园') { |
| | | this.getSearchInfo(this.userInfo.dept_id, '幼儿园', 'kindergarten') |
| | | } else if (item.label == '政府机关') { |
| | | this.getSearchInfo(this.userInfo.dept_id, '政府机关', 'Government') |
| | | } else if (item.label == '机场') { |
| | | this.getSearchInfo(this.userInfo.dept_id, '机场', 'airport') |
| | | } else if (item.label == '银行') { |
| | | this.getSearchInfo(this.userInfo.dept_id, '银行', 'bank') |
| | | } else if (item.label == '印刷店') { |
| | | this.getSearchInfo(this.userInfo.dept_id, '印刷店', 'printing') |
| | | } else if (item.label == '废旧金属收购') { |
| | | this.getSearchInfo(this.userInfo.dept_id, '废旧金属收购', 'metal') |
| | | } else if (item.label == '开锁店') { |
| | | this.getSearchInfo(this.userInfo.dept_id, '开锁店', 'lockpick-shop') |
| | | } else if (item.label == '酒店') { |
| | | this.getSearchInfo(this.userInfo.dept_id, '酒店', 'hotel') |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | if (e2.checkedNodes.some(item => { |
| | | return item.label == '视频监控' |
| | | })) { |
| | | if (this.cameraList.length > 0) { |
| | | this.cameraList.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'activityCameraLayers', |
| | | type: "billboard", |
| | | // layerType: 'ClusterLayer', |
| | | params: { |
| | | ...item, |
| | | lng: item.longitude, |
| | | lat: item.latitude, |
| | | alt: 100, |
| | | url: '/img/icon/camera.png' |
| | | }, |
| | | // incident: this.siteClick |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'activityCameraLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | |
| | | // 点击活动列表活动 |
| | |
| | | this.overlayObj = overlay |
| | | document.oncontextmenu = function () { |
| | | if (flag == true && poltType == 'billboard') { |
| | | console.log('poltType == billboard', policeType) |
| | | if (policeType == 'policeman') { |
| | | that.policeChooseTitle = '选择警员' |
| | | that.policeOption = that.policemanOption |
| | | that.policeChooseVisible = true |
| | | } else if (policeType == 'policecar') { |
| | | that.policeChooseTitle = '选择警车' |
| | | that.policeOption = that.policecarOption |
| | | that.policeChooseCarVisible = true |
| | | } |
| | | that.isPoliceElementDeleteBtnShow = false |
| | | that.policeChooseVisible = true |
| | | flag = false |
| | | } else if (flag == true && poltType == 'polyline') { |
| | | let position = '' |
| | |
| | | play () { |
| | | // polylineAreaLayer.show = true |
| | | tc.play() |
| | | this.view('1', -20, 100) |
| | | this.view('1', -20, 400) |
| | | }, |
| | | |
| | | // 暂停播放轨迹 |
| | |
| | | cancel () { |
| | | this.policeIconIsCreated = false |
| | | this.policeChooseVisible = false |
| | | this.policeChooseCarVisible = false |
| | | this.overlayObj2 = {} |
| | | this.removeAll() |
| | | }, |
| | |
| | | // 选择警员关闭 |
| | | policeChooseBeforeClose () { |
| | | this.policeChooseVisible = false |
| | | this.policeIconIsCreated = false |
| | | this.removeAll() |
| | | }, |
| | | |
| | | // 选择警车关闭 |
| | | policeChooseCarBeforeClose () { |
| | | this.policeChooseCarVisible = false |
| | | this.policeIconIsCreated = false |
| | | this.removeAll() |
| | | }, |
| | |
| | | position += this.overlayObj._positions[0]._lng + ' ' + this.overlayObj._positions[0]._lat + ',' |
| | | position = position.slice(0, position.length - 1) |
| | | } |
| | | if (this.overlayObj.policeType == 'policeman') { |
| | | this.addActivityPolice(this.policeType, position, this.showingSecurityId, type) |
| | | } else if (this.overlayObj.policeType == 'policecar') { |
| | | if (this.policeChooseCarVisible == true) { |
| | | this.policeChooseCarVisible = false |
| | | this.addCarAndRange(this.policeType, position, this.showingSecurityId, type) |
| | | } else if (this.policeChooseCarVisible == true) { |
| | | this.policeChooseVisible = false |
| | | this.addActivityPolice(this.searchPoliceTreeId, position, this.showingSecurityId, type) |
| | | } |
| | | this.policeChooseVisible = false |
| | | this.policeIconIsCreated = false |
| | | } else { |
| | | if (this.policeChooseTitle == '选择警员') { |
| | | this.updateActivityPolice(this.policeIconId, this.policeType) |
| | | } else if (this.policeChooseTitle == '选择警车') { |
| | | if (this.policeChooseVisible == true) { |
| | | this.updateActivityPolice(this.policeIconId, this.searchPoliceTreeId) |
| | | this.policeChooseVisible = false |
| | | } else if (this.policeChooseCarVisible == true) { |
| | | this.updateActivityCar(this.policeIconId, this.policeType) |
| | | this.policeChooseCarVisible = false |
| | | } |
| | | this.policeChooseVisible = false |
| | | this.policeIconIsCreated = false |
| | | } |
| | | }, |
| | |
| | | // 地图绘制元素点击事件 |
| | | overlayTypeClick (e) { |
| | | 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.policeIconId = e.overlay.attrParams.id |
| | | this.policeType = e.overlay.attrParams.policemanId |
| | | console.log(e.overlay.attrParams, 9999) |
| | | // let list = this.platFn(res.data.data).find(item => item.id == "1627542311989243905").name |
| | | this.policeIconIsCreated = true |
| | | this.policeChooseVisible = true |
| | | } else if ('carId' in e.overlay.attrParams) { |
| | | this.policeChooseTitle = '选择警车' |
| | | this.policeOption = this.policecarOption |
| | | this.policeIconId = e.overlay.attrParams.id |
| | | this.policeType = e.overlay.attrParams.carId |
| | | this.policeChooseVisible = true |
| | | this.policeIconIsCreated = true |
| | | this.policeChooseCarVisible = true |
| | | } |
| | | }, |
| | | |
| | |
| | | getSearchExtensively (ak, region, query) { |
| | | getSearchExtensively(ak, region, query).then(res => { |
| | | this.searchExtensivelyArray = res.data.result |
| | | }) |
| | | }, |
| | | |
| | | // 搜索数据地图对应场所 |
| | | getSearchInfo (deptId, search, iconType) { |
| | | getSearchInfo(deptId, search).then(res => { |
| | | res.data.data.forEach(item => { |
| | | let itemData = JSON.parse(item) |
| | | itemData.result.forEach(item => { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'activityCameraLayers', |
| | | type: "billboard", |
| | | params: { |
| | | ...item, |
| | | lng: item.location.lng, |
| | | lat: item.location.lat, |
| | | alt: 0, |
| | | url: `/img/icon/${iconType}.png` |
| | | }, |
| | | }) |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | |
| | | |
| | | // 点击删除 |
| | | deletePoliceElement () { |
| | | if (this.policeChooseTitle == '选择警员') { |
| | | if (this.policeChooseVisible == true) { |
| | | this.deleteActivityPolice(this.policeIconId) |
| | | } else if (this.policeChooseTitle == '选择警车') { |
| | | this.policeChooseVisible = false |
| | | } else if (this.policeChooseCarVisible == true) { |
| | | this.deleteActivityCar(this.policeIconId) |
| | | this.policeChooseCarVisible = false |
| | | } |
| | | this.policeChooseVisible = false |
| | | }, |
| | | |
| | | // 删除巡逻路线 |
| | |
| | | this.deletePlotVisible = false |
| | | }, |
| | | |
| | | // 获取设备列表 |
| | | getEquipmentAll (params) { |
| | | getEquipmentAll({ ...params, deptId: this.userInfo.dept_id }).then(res => { |
| | | if (params.type == 0) { |
| | | this.carList = res.data.data |
| | | } else { |
| | | this.cameraList = res.data.data |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 过滤警员搜索框 |
| | | filterPoliceNode (value, data) { |
| | | if (!value) return true |
| | | return data.name.indexOf(value) !== -1 |
| | | }, |
| | | |
| | | }, |
| | | |
| | | computed: { |
| | |
| | | return this.isHavePoliceCar || this.isHavePoliceMan |
| | | } |
| | | |
| | | }, |
| | | |
| | | watch: { |
| | | searchPoliceTreeName (val) { |
| | | this.$refs.policeTree.filter(val) |
| | | } |
| | | }, |
| | | |
| | | |
| | |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'activityCameraLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | analyseLayer.clear() |
| | | arrowsListLayer.clear() |
| | | |
| | |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="!isShowOutline.video1"> |
| | | <video |
| | | id="videoElement1" |
| | | autoplay |
| | |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="!isShowOutline.video2"> |
| | | <video |
| | | id="videoElement2" |
| | | autoplay |
| | |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="!isShowOutline.video3"> |
| | | <video |
| | | id="videoElement3" |
| | | autoplay |
| | |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="!isShowOutline.video4"> |
| | | <video |
| | | id="videoElement4" |
| | | autoplay |
| | |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="!isShowOutline.video5"> |
| | | <video |
| | | id="videoElement5" |
| | | autoplay |
| | |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="!isShowOutline.video6"> |
| | | <video |
| | | id="videoElement6" |
| | | autoplay |
| | |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="!isShowOutline.video7"> |
| | | <video |
| | | id="videoElement7" |
| | | autoplay |
| | |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div class="video"> |
| | | <div class="video" v-show="!isShowOutline.video8"> |
| | | <video |
| | | id="videoElement8" |
| | | autoplay |
| | |
| | | |
| | | rowClick (row) { |
| | | if (this.saveRangeID == row.id) { |
| | | this.monitorOption.forEach((item, index) => { |
| | | if (index < 8) { |
| | | this.isShowVideo[`video${index + 1}`] = !this.isShowVideo[`video${index + 1}`] |
| | | } |
| | | }) |
| | | let noShowVideo = { |
| | | video1: false, |
| | | video2: false, |
| | | video3: false, |
| | | video4: false, |
| | | video5: false, |
| | | video6: false, |
| | | video7: false, |
| | | video8: false |
| | | } |
| | | if (JSON.stringify(noShowVideo) != JSON.stringify(this.isShowVideo)) { |
| | | this.monitorOption.forEach((item, index) => { |
| | | if (index < 8) { |
| | | this.isShowVideo[`video${index + 1}`] = false |
| | | } |
| | | }) |
| | | } else { |
| | | this.monitorOption.forEach((item, index) => { |
| | | if (index < 8) { |
| | | this.isShowVideo[`video${index + 1}`] = true |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } else { |
| | | this.isShowVideo = { |
| | | video1: false, |
| | |
| | | document.querySelector('.video6').classList.add('new-video146-left') |
| | | document.querySelector('.video7').classList.add('new-video7-left') |
| | | document.querySelector('.video8').classList.add('new-video8-left') |
| | | document.querySelector('.deleteVideo').classList.add('deleteVideo-new-left') |
| | | } else { |
| | | let videoList = document.querySelectorAll('.item') |
| | | videoList.forEach(item => { |
| | |
| | | document.querySelector('.video6').classList.remove('new-video146-left') |
| | | document.querySelector('.video7').classList.remove('new-video7-left') |
| | | document.querySelector('.video8').classList.remove('new-video8-left') |
| | | document.querySelector('.deleteVideo').classList.remove('deleteVideo-new-left') |
| | | } |
| | | }, |
| | | |