gis.ts 574 B

12345678910111213141516171819202122232425262728293031323334353637
  1. const state = {
  2. menuRootName: '9cd5fbf9-35fd-4fb2-8c24-1f871afd67be',
  3. map: null,
  4. activeQyId: null,
  5. gisLayer: null,
  6. gisSource: null
  7. }
  8. const getters = {
  9. }
  10. const mutations = {
  11. SET_GIS_MAP(state, map) {
  12. state.map = map
  13. },
  14. SET_ACTIVE_QY_ID(state, id) {
  15. state.activeQyId = id
  16. }
  17. }
  18. const actions = {
  19. LOAD_GIS_MAP({ commit }: any, map: any) {
  20. commit('SET_GIS_MAP', map)
  21. },
  22. LOAD_ACTIVE_QY_ID({ commit }: any, id: any) {
  23. commit('SET_ACTIVE_QY_ID', id)
  24. },
  25. }
  26. export default {
  27. namespaced: true,
  28. state,
  29. getters,
  30. mutations,
  31. actions
  32. }