| | |
| | | @cell-click="rowClick" |
| | | > |
| | | <el-table-column prop="name" label="设备名称" min-width="50%"></el-table-column> |
| | | <el-table-column prop="manufacturer" label="设备类型" min-width="50%"></el-table-column> |
| | | <el-table-column prop="manufacture" label="设备类型" min-width="50%"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="pages"> |
| | |
| | | <script> |
| | | import EntityDraw from "@/utils/EntityDraw.js" |
| | | import { listQuery, accurateSearch } from "@/utils/search.js" |
| | | import monitoringList from '@/assets/data/monitoring.js' |
| | | import { getVideoList, getDevices, getRegionList } from '@/api/video/index.js' |
| | | import flvjs from 'flv.js' |
| | | |
| | |
| | | currentPage: 1, |
| | | pagesize: 13, |
| | | monitoringList: [], |
| | | monitoringSaveList: [], |
| | | dialogTitle: '', |
| | | dialogVisible: false, |
| | | searchValue: '', |
| | |
| | | getVideoList () { |
| | | getVideoList(1, 10).then(res => { |
| | | this.monitoringList = res.data.data.list |
| | | this.monitoringSaveList = res.data.data.list |
| | | console.log(111, this.monitoringSaveList) |
| | | this.initMonitoringIcon() |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | |
| | | dialogBeforeClose () { |
| | | // this.$refs.videoElement.pause() |
| | | this.dialogVisible = false |
| | | }, |
| | | |
| | |
| | | if (this.searchValue == '') { |
| | | this.searchValBoxShow = false |
| | | this.searchArray = [] |
| | | this.monitoringList = monitoringList |
| | | this.monitoringList = this.monitoringSaveList |
| | | } else { |
| | | this.searchArray = listQuery(monitoringList, this.searchValue, 'name') |
| | | this.searchArray = listQuery(this.monitoringSaveList, this.searchValue, 'name') |
| | | this.searchValBoxShow = true |
| | | } |
| | | }, |
| | | |
| | | searchClick () { |
| | | this.searchValBoxShow = false |
| | | this.monitoringList = accurateSearch(monitoringList, this.searchValue, 'name') |
| | | this.monitoringList = accurateSearch(this.monitoringSaveList, this.searchValue, 'name') |
| | | }, |
| | | |
| | | searchVlaClick (item) { |
| | |
| | | } |
| | | const that = this |
| | | graphicLayer.activate(type, (lastEventData) => { |
| | | console.log('数据更新', JSON.stringify(lastEventData)) |
| | | this.getRegionList(JSON.stringify(lastEventData)) |
| | | console.log('数据更新', lastEventData) |
| | | this.getRegionList(type, JSON.stringify(lastEventData)) |
| | | }) |
| | | |
| | | }, |
| | | |
| | | removeDrawLayer () { |
| | | this.inputpopup = false |
| | | this.monitoringList = this.monitoringSaveList |
| | | graphicLayer.clearLayer() |
| | | }, |
| | | |
| | |
| | | setRegion (range) { |
| | | graphicLayer.addPolyLineGon(range, (lastEventData) => { |
| | | console.log('数据更新', JSON.stringify(lastEventData)) |
| | | this.getRegionList('polyline', JSON.stringify(lastEventData)) |
| | | }) |
| | | }, |
| | | |
| | |
| | | this.inputpopup = false |
| | | }, |
| | | |
| | | getRegionList (data) { |
| | | const chinaSouth = '77.100744,34.645318;136.443312,46.379954;116.241876,12.205314;77.100744,34.645318;'//范围内有两个监控 |
| | | getRegionList (type, data) { |
| | | let positionStr = '' |
| | | JSON.parse(data).forEach(item => { |
| | | positionStr = positionStr + item.lng + ',' + item.lat + ';' |
| | | }) |
| | | positionStr = positionStr + JSON.parse(data)[0].lng + ',' + JSON.parse(data)[0].lat + ';' |
| | | // console.log(11111, positionStr) |
| | | if (type == 'polyline') { |
| | | JSON.parse(data).forEach(item => { |
| | | positionStr = positionStr + item[0] + ',' + item[1] + ';' |
| | | }) |
| | | } else { |
| | | JSON.parse(data).forEach(item => { |
| | | positionStr = positionStr + item.lng + ',' + item.lat + ';' |
| | | }) |
| | | positionStr = positionStr + JSON.parse(data)[0].lng + ',' + JSON.parse(data)[0].lat + ';' |
| | | } |
| | | getRegionList(1, 15, positionStr).then(res => { |
| | | console.log('1111111', res) |
| | | console.log('1111111', res.data.data.list) |
| | | this.monitoringList = res.data.data.list |
| | | }) |
| | | } |
| | | }, |