| | |
| | | * @LastEditTime: 2022-11-29 10:16:01 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | | * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved. |
| | | * |
| | | * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved. |
| | | --> |
| | | |
| | | <template> |
| | |
| | | |
| | | <el-dialog :title="panoramaTitle" :modal="true" :visible.sync="panoramaVisible" |
| | | :before-close="panoramaBeforeClose" :close-on-click-modal="true" class="panorama-details-box"> |
| | | <iframe src="http://vr.jxpskj.com/JXSFKZQJ/QJ/" style="width: 100%; height: 100%;" frameborder="0"></iframe> |
| | | <!-- <iframe src="http://vr.jxpskj.com/JXSFKZQJ/QJ/" style="width: 100%; height: 100%;" frameborder="0"></iframe>--> |
| | | <iframe :src="panoramaVrUrl" style="width: 100%; height: 100%;" frameborder="0"/> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :title="activityTitle" :modal="true" :visible.sync="activityVisible" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getPanoramaList} from "@/api/panorama"; |
| | | |
| | | let cylinderLayer = null |
| | | let circleLayer = null |
| | | let treeData = [ |
| | |
| | | import underwayArr from '@/assets/data/activitysData/underway.js' |
| | | import realtimeArr from '@/assets/data/policeSituationArr/realtimeArr.js' |
| | | import policeSituationHistoryArr from '@/assets/data/policeSituationArr/historyArr.js' |
| | | import {getPoliceStationList} from "@/api/dept"; |
| | | import {convertStringToList} from "@/utils/geometryStringTool"; |
| | | |
| | | export default { |
| | | data () { |
| | |
| | | dialogTitle: '', |
| | | dialogVisible: false, |
| | | panoramaTitle: '', |
| | | panoramaVrUrl:'', |
| | | activityTitle: '', |
| | | equimentTitle: '', |
| | | keyPersonTitle: '', |
| | |
| | | this.phoneList = phoneList |
| | | this.monitoringList = monitoringList |
| | | this.houseList = houseList |
| | | this.areaOptionData = areaOptionData |
| | | this.policeStationOptions = policeStationOptions |
| | | this.housingDate = housingDate |
| | | // this.areaOptionData = areaOptionData |
| | | // this.policeStationOptions = policeStationOptions |
| | | // this.housingDate = housingDate |
| | | //获取派出所责任区小区数据 |
| | | this.getPoliceStationList() |
| | | this.historyArr = historyArr |
| | | this.underwayArr = underwayArr |
| | | this.policeSituationRealtimeArr = realtimeArr |
| | | this.policeSituationHistoryArr = policeSituationHistoryArr |
| | | this.getPanoramaList(); |
| | | }, |
| | | |
| | | mounted () { |
| | | this.$nextTick(() => { |
| | | this.$nextTick(() => { |
| | | this.initPoliceStationLayer() |
| | | circleLayer = new global.DC.VectorLayer('circleLayer') |
| | | global.viewer.addLayer(circleLayer) |
| | |
| | | // }} |
| | | |
| | | window.addEventListener('resize', this.setDomStyle) |
| | | }, |
| | | |
| | | watch:{ |
| | | "policeStationOptions":{ |
| | | handler(newVal){ |
| | | this.$nextTick(() => { |
| | | this.initPoliceStationLayer() |
| | | circleLayer = new global.DC.VectorLayer('circleLayer') |
| | | global.viewer.addLayer(circleLayer) |
| | | |
| | | document.querySelector('.dc-container .dc-zoom-controller').classList.add('homebottom') |
| | | document.querySelector('.dc-container .dc-location-bar').classList.add('homebottom') |
| | | document.querySelector('.screen-full-btn').classList.add('homebottom') |
| | | document.querySelector('.image-switch-icon-btn').classList.add('iconbottom') |
| | | document.querySelector('.image-switch-img-btn').classList.add('imgbottom') |
| | | this.setDomStyle() |
| | | }) |
| | | // axios.get('/user/getUserList').then((res) => { |
| | | // console.log(res, 999) |
| | | // }} |
| | | |
| | | window.addEventListener('resize', this.setDomStyle) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | |
| | | panoramaSiteClick (e) { |
| | | this.panoramaTitle = e.overlay.attrParams.name |
| | | this.panoramaVrUrl = e.overlay.attrParams.vrUrl |
| | | this.panoramaVisible = true |
| | | }, |
| | | |
| | |
| | | this.policeSituationTimeType = type |
| | | }, |
| | | |
| | | /** |
| | | * 获取所有全景数据 |
| | | */ |
| | | getPanoramaList(){ |
| | | getPanoramaList().then(res=>{ |
| | | if (res.data.code == 200){ |
| | | let data = res.data.data |
| | | data.forEach(e=>{ |
| | | e.lng = e.longitude |
| | | e.lat = e.latitude |
| | | e.alt = 100 |
| | | e.url = '/img/icon/map-panorama.png' |
| | | }) |
| | | this.panoramaList = data |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * 获取派出所和责任区数据 |
| | | */ |
| | | getPoliceStationList(){ |
| | | getPoliceStationList().then(res=>{ |
| | | if (res.data.code == 200){ |
| | | let data = res.data.data |
| | | data.forEach(policeStation=>{ |
| | | //派出所数据匹配 |
| | | policeStation.policeStationName= policeStation.deptName |
| | | policeStation.policeStationId = policeStation.id |
| | | policeStation.position = convertStringToList(policeStation.positionString) |
| | | if (policeStation.children&&policeStation.children.length>0){ |
| | | //责任区数据匹配 |
| | | policeStation.areaCheckOptions = policeStation.children |
| | | policeStation.areaCheckOptions.forEach(child=>{ |
| | | child.policeStationId = child.parentId |
| | | child.areaCheckId = child.id |
| | | child.areaCheckName = child.deptName |
| | | child.position = convertStringToList(child.positionString) |
| | | //小区数据匹配 |
| | | if (child.housingArr && child.housingArr.length>0){ |
| | | child.housingArr.forEach(community=>{ |
| | | community.policeStationId =policeStation.id |
| | | community.areaCheckId = child.id |
| | | community.housingsId=community.id |
| | | community.housingsName = community.name |
| | | community.position = convertStringToList(community.position) |
| | | }) |
| | | child.housingArr.unshift({housingsName: '全部'}) |
| | | } |
| | | }) |
| | | policeStation.areaCheckOptions.unshift({areaCheckName: '全部'}) |
| | | policeStation.areaOptionArr = policeStation.areaCheckOptions |
| | | } |
| | | }) |
| | | |
| | | data.unshift({policeStationName: '全部'}) |
| | | this.policeStationOptions = data |
| | | this.areaOptionData = data |
| | | this.housingDate = data |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | |
| | | destroyed () { |