| | |
| | | |
| | | <script> |
| | | |
| | | import { getAEDkList, getParkList, getComeList, getSceneList, getWayList, getTagList } from '@/api/pc/leftNav/index' |
| | | import { getLifeList, getMonitorList, getSceneList, getWayList, getTagList } from '@/api/pc/leftNav/index' |
| | | |
| | | export default { |
| | | name: 'leftNav', |
| | |
| | | checked: '/img/leftnav/scene-checked.png', |
| | | layer: 'sceneLayer' |
| | | }, |
| | | // { |
| | | // flag: false, |
| | | // label: '监控', |
| | | // img: '/img/leftnav/monitor.png', |
| | | // normal: '/img/leftnav/monitor.png', |
| | | // checked: '/img/leftnav/monitor-checked.png', |
| | | // layer: 'sceneLayer' |
| | | // }, |
| | | { |
| | | flag: false, |
| | | label: '监控', |
| | | img: '/img/leftnav/monitor.png', |
| | | normal: '/img/leftnav/monitor.png', |
| | | checked: '/img/leftnav/monitor-checked.png', |
| | | layer: 'monitorLayer' |
| | | }, |
| | | // { |
| | | // flag: false, |
| | | // label: '活动', |
| | |
| | | tagLayer: null, |
| | | wayLayer: null, |
| | | sceneLayer: null, |
| | | monitorLayer: null, |
| | | activityLayer: null, |
| | | aedLayer: null, |
| | | parkLayer: null, |
| | |
| | | viewer.addLayer(this.wayLayer) |
| | | this.sceneLayer = new this.DC.VectorLayer('sceneLayer') |
| | | viewer.addLayer(this.sceneLayer) |
| | | |
| | | this.monitorLayer = new this.DC.VectorLayer('monitorLayer') |
| | | viewer.addLayer(this.monitorLayer) |
| | | this.aedLayer = new this.DC.VectorLayer('aedLayer') |
| | | viewer.addLayer(this.aedLayer) |
| | | |
| | | this.parkLayer = new this.DC.HtmlLayer('parkLayer') |
| | | viewer.addLayer(this.parkLayer) |
| | | this.comeLayer = new this.DC.VectorLayer('comeLayer') |
| | |
| | | this.wayLayer.show = false |
| | | }) |
| | | |
| | | getMonitorList().then(res => { |
| | | res.data.data.forEach(item => { |
| | | const billboard = new this.DC.Billboard(new that.DC.Position(Number(item.jd), Number(item.wd), 0), '/img/leftnav/map-monitor.png') |
| | | billboard.size = [20, 20] |
| | | this.monitorLayer.addOverlay(billboard) |
| | | }) |
| | | this.monitorLayer.show = false |
| | | }) |
| | | |
| | | getSceneList().then(res => { |
| | | res.data.data.forEach(item => { |
| | | const billboard = new this.DC.Billboard(new that.DC.Position(Number(item.jd), Number(item.wd), 0), '/img/leftnav/map-panorama.png') |
| | |
| | | this.sceneLayer.show = false |
| | | }) |
| | | |
| | | getAEDkList().then(res => { |
| | | getLifeList({ lifetype: 9 }).then(res => { |
| | | res.data.data.forEach(item => { |
| | | const label = new this.DC.Label(new that.DC.Position(Number(item.jd), Number(item.wd), 0), item.mechanismname) |
| | | label.setStyle({ |
| | |
| | | this.aedLayer.show = false |
| | | }) |
| | | |
| | | getParkList().then(res => { |
| | | getLifeList({ lifetype: 11 }).then(res => { |
| | | res.data.data.forEach(item => { |
| | | const divIcon = new this.DC.DivIcon( |
| | | new that.DC.Position(Number(item.jd), Number(item.wd), 0), |
| | |
| | | this.parkLayer.show = false |
| | | }) |
| | | |
| | | getComeList().then(res => { |
| | | getLifeList({ lifetype: 12 }).then(res => { |
| | | res.data.data.forEach(item => { |
| | | const label = new that.DC.Label(new that.DC.Position(Number(item.jd), Number(item.wd), 0), item.mechanismname) |
| | | label.setStyle({ |
| | |
| | | }) |
| | | this.comeLayer.show = false |
| | | }) |
| | | |
| | | this.tagLayer.show = false |
| | | this.wayLayer.show = false |
| | | this.sceneLayer.show = false |
| | | } |
| | | } |
| | | } |