| | |
| | | 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 () { |
| | |
| | | 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 |
| | |
| | | }, |
| | | |
| | | 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: { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * 获取派出所和责任区数据 |
| | | */ |
| | | 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 |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | |