| | |
| | | import mapConfig from '../../conf/MapConfig' |
| | | import config from '../../conf/MapConfig' |
| | | |
| | | const state = { |
| | | currentCorp: null, |
| | |
| | | selectedServiceLayer: '', // 使用过滤器时,被打开的WMS服务的CODE |
| | | serviceLayerFilters: {}, // 服务图层控制过滤配置 |
| | | checkedLayers: {}, // 选中图层对象 |
| | | mapConfig: mapConfig |
| | | // 图层数据,图层对象 |
| | | layers: { |
| | | sewers: [] |
| | | }, |
| | | // 原始后台JSON数据 |
| | | datas: { |
| | | sewers: [] |
| | | }, |
| | | topic: { |
| | | currentTopic: '', |
| | | topicCheckedList: [] |
| | | }, |
| | | config: config, |
| | | serviceLayers: config.mapConfig.Layers |
| | | } |
| | | const mutations = { |
| | | setMapObj (state, map) { |
| | | state.map = map |
| | | }, |
| | | // 设置污雨水图层数据 |
| | | addSewersLayers (state, sewersLayers) { |
| | | state.layers.sewers.push(sewersLayers) |
| | | }, |
| | | clearSewersLayers (state, SewersLayers) { |
| | | state.layers.sewers = [] |
| | | }, |
| | | addSewersDatas (state, sewersDatas) { |
| | | state.datas.sewers.push(sewersDatas) |
| | | }, |
| | | clearSewersDatas (state, sewersDatas) { |
| | | state.datas.sewers = [] |
| | | }, |
| | | setBasemapHelper (state, layerHelper) { |
| | | state.basemapHelper = layerHelper |
| | |
| | | }, |
| | | toggleServiceLayerFilter (state) { |
| | | state.showServiceLayerFilter = !state.showServiceLayerFilter |
| | | }, |
| | | setTopic (state, obj) { |
| | | state.topic.topicCheckedList = obj |
| | | } |
| | | } |
| | | const actions = { |
| | | |
| | | } |
| | | const actions = {} |
| | | export default { |
| | | state, |
| | | mutations, |