Browse Source

mutations换到actions,避免循环引入store

CzRger 1 year ago
parent
commit
ab3fe156ad

+ 1 - 1
src/components/easyMap/func/measure.ts

@@ -35,7 +35,7 @@ const typeMapper = new Map([
  */
 export default function Measure (map, typeSelect) {
     if (!measureTooltipElement && !store.state.gis.isTooling) {
-        store.commit('gis/SET_IS_TOOLING', true)
+        store.dispatch('gis/LOAD_IS_TOOLING', true)
         let _source
         const realLayer = map.getLayers().getArray().filter(v => v.get(layerFlag[0]) === layerFlag[1])
         if (realLayer[0]) {

+ 298 - 296
src/store/modules/gis.ts

@@ -11,7 +11,6 @@ import JqStyle from "@/views/gis/map-info/style/jq";
 import LgStyle from "@/views/gis/map-info/style/lg";
 import CzwStyle from "@/views/gis/map-info/style/czw";
 import HczStyle from "@/views/gis/map-info/style/hcz";
-import store from "@/store";
 import axios from "axios";
 import {formatPosition} from "@/utils/easyMap";
 import * as turf from "@turf/turf";
@@ -139,289 +138,300 @@ const getters = {
 }
 
 const mutations = {
-  SET_IS_TOOLING(state, flag) {
-    state.isTooling = flag
-  },
-  SET_VIDEO_PARAMS(state, data) {
-    const { show, name = null, code = null } = data
-    state.videoParams = { show, name, code }
-  },
-  SET_GIS_MAP(state, {map, defaultDom, qyDom}) {
-    state.map = map
-    state.s = new source.Vector()
-    state.l = new layer.Vector({
-      source: state.s,
-      zIndex: 99999,
-      style: new style.Style({ //图层样式
-        fill: new style.Fill({
-          color: 'rgba(46,129,255,0.15)' //填充颜色
-        }),
-        stroke: new style.Stroke({
-          color: '#2E81FF',  //边框颜色
-          width: 2,   // 边框宽度
-          lineDash: [10, 10]
-        }),
-        image: new style.Circle({
-          radius: 5,
-          fill: new style.Fill({
-            color: '#ffcc33'
-          })
-        })
-      })
-    })
-    state.map.addLayer(state.l)
-
+}
 
-    state.element.layer = new layer.Tile({
-      zIndex: 10,
-    })
-    state.map.addLayer(state.element.layer)
-    // 基本要素
-    state.gisParams.default.source = new source.Vector()
-    state.gisParams.default.layer = new layer.Vector({
-      zIndex: 40,
-      source: state.gisParams.default.source,
-    })
-    state.gisParams.default.layer.set('layerName', 'gisDefault')
-    state.map.addLayer(state.gisParams.default.layer)
-    state.gisParams.default.overlay = new ol.Overlay({
-      id: 'gisDefaultDom',
-      element: defaultDom.ref_dom,
-      autoPan: false,
-      offset: [0, -60],
-      positioning: 'bottom-center',
-      stopEvent: true,
-      autoPanAnimation: {
-        duration: 250
-      }
-    })
-    state.map.addOverlay(state.gisParams.default.overlay)
-    // 企业要素
-    state.gisParams.qy.source = new source.Vector()
-    state.gisParams.qy.layer = new layer.Vector({
-      zIndex: 50,
-      source: state.gisParams.qy.source,
-    })
-    state.gisParams.qy.layer.set('layerName', 'gisQy')
-    state.map.addLayer(state.gisParams.qy.layer)
-    state.gisParams.qy.overlay = new ol.Overlay({
-      id: 'gisQyDom',
-      element: qyDom.ref_dom,
-      autoPan: false,
-      offset: [0, -60],
-      positioning: 'bottom-center',
-      stopEvent: true,
-      autoPanAnimation: {
-        duration: 250
-      }
-    })
-    state.map.addOverlay(state.gisParams.qy.overlay)
-    // 企业-周边设备
-    state.gisParams.qy.analysisSource = new source.Vector()
-    state.gisParams.qy.analysisLayer = new layer.Vector({
-      zIndex: 20,
-      source: state.gisParams.qy.analysisSource,
-      style: [
-        new style.Style({
-          stroke: new style.Stroke({
-            color: '#2860F1',
-            width: 2,
-            lineDash: [10, 10]
-          }),
+const actions = {
+  // commit
+  // dispatch
+  // getters
+  // rootGetters
+  // rootState
+  // state
+  LOAD_GIS_MAP({state, dispatch, getters}: any, {map, defaultDom, qyDom}: any) {
+    if (!state.map) {
+      state.map = map
+      state.s = new source.Vector()
+      state.l = new layer.Vector({
+        source: state.s,
+        zIndex: 99999,
+        style: new style.Style({ //图层样式
           fill: new style.Fill({
-            color: 'rgba(20, 129, 241, 0.1)',
-          }),
-        })
-      ]
-    });
-    state.gisParams.qy.analysisCircle = new ol.Feature()
-    state.gisParams.qy.analysisCircle.set(featureTypeKey, 'qyAnalysisCircle')
-    state.map.addLayer(state.gisParams.qy.analysisLayer)
-    state.gisParams.qy.analysisDeviceLayer = new layer.Tile({
-      zIndex: 30
-    })
-    state.map.addLayer(state.gisParams.qy.analysisDeviceLayer)
-    // 周边分析
-    state.analysis.source = new source.Vector()
-    state.analysis.layer = new layer.Vector({
-      zIndex: 20,
-      source: state.analysis.source,
-      style: [
-        new style.Style({
-          image: new style.Icon({
-            src: PointIcon,
-            displacement: [0, 24]
+            color: 'rgba(46,129,255,0.15)' //填充颜色
           }),
           stroke: new style.Stroke({
-            color: '#2860F1',
-            width: 2,
+            color: '#2E81FF',  //边框颜色
+            width: 2,   // 边框宽度
             lineDash: [10, 10]
           }),
-          fill: new style.Fill({
-            color: 'rgba(20, 129, 241, 0.1)',
-          }),
+          image: new style.Circle({
+            radius: 5,
+            fill: new style.Fill({
+              color: '#ffcc33'
+            })
+          })
         })
-      ]
-    });
-    state.analysis.layer.set('layerName', 'analysisDrawViewsLayer')
-    state.analysis.feature = new ol.Feature()
-    state.analysis.feature.set(featureTypeKey, 'analysisCircle')
-    state.map.addLayer(state.analysis.layer)
-    state.analysis.deviceLayer = new layer.Tile({
-      zIndex: 30
-    })
-    state.map.addLayer(state.analysis.deviceLayer)
-    const clickQy = (e, feat) => {
-      if (state.gisParams.qy.overlay.getPosition() === undefined) {
-        state.gisParams.qy.overlay.setPosition(state.gisParams.qy.feature.getGeometry().getCoordinates())
-      } else {
-        state.gisParams.qy.overlay.setPosition(undefined)
-      }
-    }
-    const clickDefault = (e, feat) => {
-      if (state.gisParams.default.overlay.getPosition() === undefined) {
-        state.gisParams.default.overlay.setPosition(state.gisParams.default.feature.getGeometry().getCoordinates())
-      } else {
-        state.gisParams.default.overlay.setPosition(undefined)
-      }
-    }
-    const clickQyAnalysisCircle = (e, feat) => {
-      const viewResolution = e.map.getView().getResolution()
-      const url = state.gisParams.qy.analysisDeviceLayer.getSource().getFeatureInfoUrl(e.coordinate, viewResolution, 'EPSG:4326', {
-        'INFO_FORMAT': 'application/json',
-        'FEATURE_COUNT': 10000
       })
-      if (url) {
-        axios.get(url).then(res => {
-          if (res.status === 200) {
-            const item = res.data?.features?.[res.data?.features?.length - 1]
-            if (item) {
-              store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
-                wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
-                id: item.properties.dataId,
-                info: item.properties,
-                config: {
-                  isAnalysis: true
-                }
-              })
-            }
-          }
-        })
+      state.map.addLayer(state.l)
+
+
+      state.element.layer = new layer.Tile({
+        zIndex: 10,
+      })
+      state.map.addLayer(state.element.layer)
+      // 基本要素
+      state.gisParams.default.source = new source.Vector()
+      state.gisParams.default.layer = new layer.Vector({
+        zIndex: 40,
+        source: state.gisParams.default.source,
+      })
+      state.gisParams.default.layer.set('layerName', 'gisDefault')
+      state.map.addLayer(state.gisParams.default.layer)
+      state.gisParams.default.overlay = new ol.Overlay({
+        id: 'gisDefaultDom',
+        element: defaultDom.ref_dom,
+        autoPan: false,
+        offset: [0, -60],
+        positioning: 'bottom-center',
+        stopEvent: true,
+        autoPanAnimation: {
+          duration: 250
+        }
+      })
+      state.map.addOverlay(state.gisParams.default.overlay)
+      // 企业要素
+      state.gisParams.qy.source = new source.Vector()
+      state.gisParams.qy.layer = new layer.Vector({
+        zIndex: 50,
+        source: state.gisParams.qy.source,
+      })
+      state.gisParams.qy.layer.set('layerName', 'gisQy')
+      state.map.addLayer(state.gisParams.qy.layer)
+      state.gisParams.qy.overlay = new ol.Overlay({
+        id: 'gisQyDom',
+        element: qyDom.ref_dom,
+        autoPan: false,
+        offset: [0, -60],
+        positioning: 'bottom-center',
+        stopEvent: true,
+        autoPanAnimation: {
+          duration: 250
+        }
+      })
+      state.map.addOverlay(state.gisParams.qy.overlay)
+      // 企业-周边设备
+      state.gisParams.qy.analysisSource = new source.Vector()
+      state.gisParams.qy.analysisLayer = new layer.Vector({
+        zIndex: 20,
+        source: state.gisParams.qy.analysisSource,
+        style: [
+          new style.Style({
+            stroke: new style.Stroke({
+              color: '#2860F1',
+              width: 2,
+              lineDash: [10, 10]
+            }),
+            fill: new style.Fill({
+              color: 'rgba(20, 129, 241, 0.1)',
+            }),
+          })
+        ]
+      });
+      state.gisParams.qy.analysisCircle = new ol.Feature()
+      state.gisParams.qy.analysisCircle.set(featureTypeKey, 'qyAnalysisCircle')
+      state.map.addLayer(state.gisParams.qy.analysisLayer)
+      state.gisParams.qy.analysisDeviceLayer = new layer.Tile({
+        zIndex: 30
+      })
+      state.map.addLayer(state.gisParams.qy.analysisDeviceLayer)
+      // 周边分析
+      state.analysis.source = new source.Vector()
+      state.analysis.layer = new layer.Vector({
+        zIndex: 20,
+        source: state.analysis.source,
+        style: [
+          new style.Style({
+            image: new style.Icon({
+              src: PointIcon,
+              displacement: [0, 24]
+            }),
+            stroke: new style.Stroke({
+              color: '#2860F1',
+              width: 2,
+              lineDash: [10, 10]
+            }),
+            fill: new style.Fill({
+              color: 'rgba(20, 129, 241, 0.1)',
+            }),
+          })
+        ]
+      });
+      state.analysis.layer.set('layerName', 'analysisDrawViewsLayer')
+      state.analysis.feature = new ol.Feature()
+      state.analysis.feature.set(featureTypeKey, 'analysisCircle')
+      state.map.addLayer(state.analysis.layer)
+      state.analysis.deviceLayer = new layer.Tile({
+        zIndex: 30
+      })
+      state.map.addLayer(state.analysis.deviceLayer)
+      const clickQy = (e, feat) => {
+        if (state.gisParams.qy.overlay.getPosition() === undefined) {
+          state.gisParams.qy.overlay.setPosition(state.gisParams.qy.feature.getGeometry().getCoordinates())
+        } else {
+          state.gisParams.qy.overlay.setPosition(undefined)
+        }
       }
-    }
-    const handleTileClick = async (e) => {
-      let continueFlag = true
-      if (state.gisParams.qy.analysisWKT && continueFlag) {
+      const clickDefault = (e, feat) => {
+        if (state.gisParams.default.overlay.getPosition() === undefined) {
+          state.gisParams.default.overlay.setPosition(state.gisParams.default.feature.getGeometry().getCoordinates())
+        } else {
+          state.gisParams.default.overlay.setPosition(undefined)
+        }
+      }
+      const clickQyAnalysisCircle = (e, feat) => {
         const viewResolution = e.map.getView().getResolution()
         const url = state.gisParams.qy.analysisDeviceLayer.getSource().getFeatureInfoUrl(e.coordinate, viewResolution, 'EPSG:4326', {
           'INFO_FORMAT': 'application/json',
           'FEATURE_COUNT': 10000
         })
         if (url) {
-          await axios.get(url).then(res => {
+          axios.get(url).then(res => {
             if (res.status === 200) {
               const item = res.data?.features?.[res.data?.features?.length - 1]
               if (item) {
-                continueFlag = false
-                console.log(item)
-                if (['gal', 'shl', 'myl'].includes(item.properties.typeValue)) {
-                  store.commit('gis/SET_GIS_PARAMS_DEFAULT_RESET')
-                  store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
-                    wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
-                    id: item.properties.dataId,
-                    info: item.properties
-                  })
-                }
+                dispatch('LOAD_GIS_PARAMS_DEFAULT_SB', {
+                  wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
+                  id: item.properties.dataId,
+                  info: item.properties,
+                  config: {
+                    isAnalysis: true
+                  }
+                })
               }
             }
           })
         }
       }
-      if (state.analysis.wkt && continueFlag) {
-        const viewResolution = e.map.getView().getResolution()
-        const url = state.analysis.deviceLayer.getSource().getFeatureInfoUrl(e.coordinate, viewResolution, 'EPSG:4326', {
-          'INFO_FORMAT': 'application/json',
-          'FEATURE_COUNT': 10000
-        })
-        if (url) {
-          await axios.get(url).then(res => {
-            if (res.status === 200) {
-              const item = res.data?.features?.[res.data?.features?.length - 1]
-              if (item) {
-                console.log(item)
-                continueFlag = true
-                if (['gal', 'shl', 'myl'].includes(item.properties.typeValue)) {
-                  store.commit('gis/SET_GIS_PARAMS_DEFAULT_RESET')
-                  store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
-                    wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
-                    id: item.properties.dataId,
-                    info: item.properties
-                  })
+      const handleTileClick = async (e) => {
+        let continueFlag = true
+        if (state.gisParams.qy.analysisWKT && continueFlag) {
+          const viewResolution = e.map.getView().getResolution()
+          const url = state.gisParams.qy.analysisDeviceLayer.getSource().getFeatureInfoUrl(e.coordinate, viewResolution, 'EPSG:4326', {
+            'INFO_FORMAT': 'application/json',
+            'FEATURE_COUNT': 10000
+          })
+          if (url) {
+            await axios.get(url).then(res => {
+              if (res.status === 200) {
+                const item = res.data?.features?.[res.data?.features?.length - 1]
+                if (item) {
+                  continueFlag = false
+                  console.log(item)
+                  if (['gal', 'shl', 'myl'].includes(item.properties.typeValue)) {
+                    dispatch('LOAD_GIS_PARAMS_DEFAULT_RESET')
+                    dispatch('LOAD_GIS_PARAMS_DEFAULT_SB', {
+                      wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
+                      id: item.properties.dataId,
+                      info: item.properties
+                    })
+                  }
                 }
               }
-            }
-          })
+            })
+          }
         }
-      }
-      if (store.getters['gis/elementActiveArr'].length > 0 && continueFlag) {
-        const viewResolution = e.map.getView().getResolution()
-        const url = state.element.layer.getSource().getFeatureInfoUrl(e.coordinate, viewResolution, 'EPSG:4326', {
-          'INFO_FORMAT': 'application/json',
-          'FEATURE_COUNT': 10000
-        })
-        if (url) {
-          await axios.get(url).then(res => {
-            if (res.status === 200) {
-              const item = res.data?.features?.[res.data?.features?.length - 1]
-              if (item) {
-                console.log(item)
-                continueFlag = true
-                if (['lgszyjkscsb', 'jgzzmgs', 'lgsjkyfl'].includes(item.properties.typeValue)) {
-                  store.commit('gis/SET_GIS_PARAMS_QY_RESET')
-                  store.commit('gis/SET_GIS_PARAMS_QY', {
-                    wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
-                    id: item.properties.dataId,
-                    info: item.properties
-                  })
-                } else if (['gal', 'shl', 'myl'].includes(item.properties.typeValue)) {
-                  store.commit('gis/SET_GIS_PARAMS_DEFAULT_RESET')
-                  store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
-                    wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
-                    id: item.properties.dataId,
-                    info: item.properties
-                  })
+        if (state.analysis.wkt && continueFlag) {
+          const viewResolution = e.map.getView().getResolution()
+          const url = state.analysis.deviceLayer.getSource().getFeatureInfoUrl(e.coordinate, viewResolution, 'EPSG:4326', {
+            'INFO_FORMAT': 'application/json',
+            'FEATURE_COUNT': 10000
+          })
+          if (url) {
+            await axios.get(url).then(res => {
+              if (res.status === 200) {
+                const item = res.data?.features?.[res.data?.features?.length - 1]
+                if (item) {
+                  console.log(item)
+                  continueFlag = true
+                  if (['gal', 'shl', 'myl'].includes(item.properties.typeValue)) {
+                    dispatch('LOAD_GIS_PARAMS_DEFAULT_RESET')
+                    dispatch('LOAD_GIS_PARAMS_DEFAULT_SB', {
+                      wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
+                      id: item.properties.dataId,
+                      info: item.properties
+                    })
+                  }
                 }
               }
-            }
+            })
+          }
+        }
+        if (getters['elementActiveArr'].length > 0 && continueFlag) {
+          const viewResolution = e.map.getView().getResolution()
+          const url = state.element.layer.getSource().getFeatureInfoUrl(e.coordinate, viewResolution, 'EPSG:4326', {
+            'INFO_FORMAT': 'application/json',
+            'FEATURE_COUNT': 10000
           })
+          if (url) {
+            await axios.get(url).then(res => {
+              if (res.status === 200) {
+                const item = res.data?.features?.[res.data?.features?.length - 1]
+                if (item) {
+                  console.log(item)
+                  continueFlag = true
+                  if (['lgszyjkscsb', 'jgzzmgs', 'lgsjkyfl'].includes(item.properties.typeValue)) {
+                    dispatch('LOAD_GIS_PARAMS_QY_RESET')
+                    dispatch('LOAD_GIS_PARAMS_QY', {
+                      wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
+                      id: item.properties.dataId,
+                      info: item.properties
+                    })
+                  } else if (['gal', 'shl', 'myl'].includes(item.properties.typeValue)) {
+                    dispatch('LOAD_GIS_PARAMS_DEFAULT_RESET')
+                    dispatch('LOAD_GIS_PARAMS_DEFAULT_SB', {
+                      wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
+                      id: item.properties.dataId,
+                      info: item.properties
+                    })
+                  }
+                }
+              }
+            })
+          }
         }
       }
-    }
-    state.map.on('singleclick', e => {
-      let isFeature = false
-      e.map.forEachFeatureAtPixel(e.pixel, (feature) => {
-        if (!isFeature) {
-          isFeature = true
-          switch (feature.get(featureTypeKey)) {
-            case 'qy': clickQy(e, feature)
-              break
-            case 'sb': clickDefault(e, feature)
-              break
-            case 'qyAnalysisCircle': isFeature = false
-              break
-            case 'analysisCircle': isFeature = false
-              break
+      state.map.on('singleclick', e => {
+        let isFeature = false
+        e.map.forEachFeatureAtPixel(e.pixel, (feature) => {
+          if (!isFeature) {
+            isFeature = true
+            switch (feature.get(featureTypeKey)) {
+              case 'qy': clickQy(e, feature)
+                break
+              case 'sb': clickDefault(e, feature)
+                break
+              case 'qyAnalysisCircle': isFeature = false
+                break
+              case 'analysisCircle': isFeature = false
+                break
+            }
           }
+        }, {
+          hitTolerance: 0,
+        });
+        if (!isFeature) {
+          handleTileClick(e)
         }
-      }, {
-        hitTolerance: 0,
-      });
-      if (!isFeature) {
-        handleTileClick(e)
-      }
-    })
+      })
+    }
   },
-  SET_GIS_PARAMS_QY(state, {wkt, id, info, config = {}}: any) {
+  LOAD_IS_TOOLING({state}: any, flag) {
+    state.isTooling = flag
+  },
+  LOAD_VIDEO_PARAMS({state}: any, data) {
+    const { show, name = null, code = null } = data
+    state.videoParams = { show, name, code }
+  },
+  LOAD_GIS_PARAMS_QY({state, dispatch}: any, {wkt, id, info, config = {}}: any) {
     const {
       isAnalysis = false
     } = config
@@ -484,13 +494,13 @@ const mutations = {
           center: newFeat.getGeometry().getCoordinates(),
           zoom: state.gisParams.autoZoom,
         });
-        store.commit('gis/SET_GIS_ELEMENT')
+        dispatch('LOAD_GIS_ELEMENT')
       } catch (e) {
         console.log('异常数据:', wkt, info, e)
       }
     }
   },
-  SET_GIS_PARAMS_QY_RESET(state) {
+  LOAD_GIS_PARAMS_QY_RESET({state, dispatch}: any) {
     if (state.gisParams.qy.layer) {
       state.gisParams.qy.source.clear()
       state.gisParams.qy.type = ''
@@ -503,14 +513,14 @@ const mutations = {
       state.gisParams.qy.analysisWKT = ''
       state.gisParams.default.feature?.set('isAnalysis', false)
       state.gisParams.default.feature?.get('resetStyle')()
-      store.commit('gis/SET_GIS_ELEMENT')
+      dispatch('LOAD_GIS_ELEMENT')
     }
   },
-  SET_GIS_PARAMS_QY_ANALYSIS(state) {
+  LOAD_GIS_PARAMS_QY_ANALYSIS({state, rootState, dispatch}: any) {
     if (state.gisParams.qy.analysisDeviceLayer) {
       state.gisParams.qy.analysisWKT = formatPosition.cpnTwpn(state.gisParams.qy.analysisCircle.getGeometry().getCoordinates())
-      store.commit('gis/SET_GIS_ELEMENT')
-      store.commit('gis/SET_GIS_QY_ANALYSIS_ELEMENT')
+      dispatch('LOAD_GIS_ELEMENT')
+      dispatch('LOAD_GIS_QY_ANALYSIS_ELEMENT')
       state.gisParams.qy.info['5'].tableData = []
       state.gisParams.qy.info['5'].loading = true
       axios({
@@ -520,7 +530,7 @@ const mutations = {
           service: 'WFS',
           version: '1.0.0',
           request: 'GetFeature',
-          typename: store.state.dictionary.elementTypeList.filter(v => v.dictType === 'sb').map(v => v.geoType).join(','),
+          typename: rootState.dictionary.elementTypeList.filter(v => v.dictType === 'sb').map(v => v.geoType).join(','),
           srsName: 'EPSG:4326',
           outputFormat: 'application/json',
           CQL_FILTER: `INTERSECTS(location, ${state.gisParams.qy.analysisWKT})`
@@ -530,11 +540,11 @@ const mutations = {
           let type = ''
           switch (v.properties.typeValue) {
             case 'gal': type = '公安类'
-                  break
+              break
             case 'myl': type = '民用类'
-                  break
+              break
             case 'shl': type = '社会类'
-                  break
+              break
           }
           return {
             name: v.properties.name,
@@ -548,7 +558,7 @@ const mutations = {
       })
     }
   },
-  SET_GIS_PARAMS_DEFAULT_SB(state, {wkt, id, info, config = {}}: any) {
+  LOAD_GIS_PARAMS_DEFAULT_SB({state, dispatch}: any, {wkt, id, info, config = {}}: any) {
     let {
       isAnalysis = null
     } = config
@@ -603,18 +613,18 @@ const mutations = {
           center: newFeat.getGeometry().getCoordinates(),
           zoom: state.gisParams.autoZoom,
         });
-        store.commit('gis/SET_GIS_ELEMENT')
+        dispatch('LOAD_GIS_ELEMENT')
         if (state.gisParams.qy.analysisWKT) {
-          store.commit('gis/SET_GIS_QY_ANALYSIS_ELEMENT')
+          dispatch('LOAD_GIS_QY_ANALYSIS_ELEMENT')
         } else if (state.analysis.wkt) {
-          store.commit('gis/SET_GIS_ANALYSIS_ELEMENT')
+          dispatch('LOAD_GIS_ANALYSIS_ELEMENT')
         }
       } catch (e) {
         console.log('异常数据:', wkt, info, e)
       }
     }
   },
-  SET_GIS_PARAMS_DEFAULT_JQ(state, {wkt, id, info, config = {}}: any) {
+  LOAD_GIS_PARAMS_DEFAULT_JQ({state, dispatch}: any, {wkt, id, info, config = {}}: any) {
     const {
       isAnalysis = false
     } = config
@@ -648,13 +658,13 @@ const mutations = {
           center: newFeat.getGeometry().getCoordinates(),
           zoom: state.gisParams.autoZoom,
         });
-        store.commit('gis/SET_GIS_ELEMENT')
+        dispatch('LOAD_GIS_ELEMENT')
       } catch (e) {
         console.log('异常数据:', wkt, info, e)
       }
     }
   },
-  SET_GIS_PARAMS_DEFAULT_LG(state, {wkt, id, info, config = {}}: any) {
+  LOAD_GIS_PARAMS_DEFAULT_LG({state, dispatch}: any, {wkt, id, info, config = {}}: any) {
     const {
       isAnalysis = false
     } = config
@@ -688,13 +698,13 @@ const mutations = {
           center: newFeat.getGeometry().getCoordinates(),
           zoom: state.gisParams.autoZoom,
         });
-        store.commit('gis/SET_GIS_ELEMENT')
+        dispatch('LOAD_GIS_ELEMENT')
       } catch (e) {
         console.log('异常数据:', wkt, info, e)
       }
     }
   },
-  SET_GIS_PARAMS_DEFAULT_CZW(state, {wkt, id, info, config = {}}: any) {
+  LOAD_GIS_PARAMS_DEFAULT_CZW({state, dispatch}: any, {wkt, id, info, config = {}}: any) {
     const {
       isAnalysis = false
     } = config
@@ -728,13 +738,13 @@ const mutations = {
           center: newFeat.getGeometry().getCoordinates(),
           zoom: state.gisParams.autoZoom,
         });
-        store.commit('gis/SET_GIS_ELEMENT')
+        dispatch('LOAD_GIS_ELEMENT')
       } catch (e) {
         console.log('异常数据:', wkt, info, e)
       }
     }
   },
-  SET_GIS_PARAMS_DEFAULT_HCZ(state, {wkt, id, info, config = {}}: any) {
+  LOAD_GIS_PARAMS_DEFAULT_HCZ({state, dispatch}: any, {wkt, id, info, config = {}}: any) {
     const {
       isAnalysis = false
     } = config
@@ -768,25 +778,25 @@ const mutations = {
           center: newFeat.getGeometry().getCoordinates(),
           zoom: state.gisParams.autoZoom,
         });
-        store.commit('gis/SET_GIS_ELEMENT')
+        dispatch('LOAD_GIS_ELEMENT')
       } catch (e) {
         console.log('异常数据:', wkt, info, e)
       }
     }
   },
-  SET_GIS_PARAMS_DEFAULT_RESET(state) {
+  LOAD_GIS_PARAMS_DEFAULT_RESET({state, dispatch}: any) {
     if (state.gisParams.default.layer) {
       state.gisParams.default.source.clear()
       state.gisParams.default.type = ''
       state.gisParams.default.info = {}
       state.gisParams.default.overlay.setPosition(undefined)
       state.gisParams.default.feature = null
-      store.commit('gis/SET_GIS_ELEMENT')
+      dispatch('LOAD_GIS_ELEMENT')
     }
   },
-  SET_GIS_ELEMENT(state, activeArr: any = []) {
+  LOAD_GIS_ELEMENT({state, dispatch, getters, rootState}: any, activeArr: any = []) {
     const cql: any = ["(geoType = 2)"]
-    cql.push(`(typeValue in (${store.getters['gis/elementActiveArr'].length > 0 ? store.getters['gis/elementActiveArr'].map(v => `'${v.value}'`).join(',') : -1}))`)
+    cql.push(`(typeValue in (${getters['elementActiveArr'].length > 0 ? getters['elementActiveArr'].map(v => `'${v.value}'`).join(',') : -1}))`)
     const notIds: Array<string> = []
     if (state.gisParams.default.feature) {
       notIds.push(`'${state.gisParams.default.feature.getId()}'`)
@@ -805,7 +815,7 @@ const mutations = {
       vp = `locationValue:${formatWkt(state.analysis.wkt)}`
     }
     const tileWMS = new source.TileWMS({
-      url: `/${store.state.app.apiProxy.geoserverApi}/geoserver/mysqlGeo/wms`,
+      url: `/${rootState.app.apiProxy.geoserverApi}/geoserver/mysqlGeo/wms`,
       params: {
         'FORMAT': 'image/png8',
         'VERSION': '1.1.1',
@@ -818,7 +828,7 @@ const mutations = {
     })
     state.element.layer.setSource(tileWMS)
   },
-  SET_GIS_QY_ANALYSIS_ELEMENT(state) {
+  LOAD_GIS_QY_ANALYSIS_ELEMENT({state, dispatch, rootState}: any) {
     if (state.gisParams.qy.analysisWKT) {
       const cql: any = ["(geoType = 1)", "(typeValue in ('gal', 'shl', 'myl'))"]
       const notIds: Array<string> = []
@@ -830,7 +840,7 @@ const mutations = {
       }
 
       const tileWMS = new source.TileWMS({
-        url: `/${store.state.app.apiProxy.geoserverApi}/geoserver/mysqlGeo/wms`,
+        url: `/${rootState.app.apiProxy.geoserverApi}/geoserver/mysqlGeo/wms`,
         params: {
           'FORMAT': 'image/png8',
           'VERSION': '1.1.1',
@@ -844,7 +854,7 @@ const mutations = {
       state.gisParams.qy.analysisDeviceLayer.setSource(tileWMS)
     }
   },
-  SET_GIS_ANALYSIS_ELEMENT(state) {
+  LOAD_GIS_ANALYSIS_ELEMENT({state, dispatch, rootState}: any) {
     if (state.analysis.wkt) {
       const cql: any = ["(geoType = 1)", "(typeValue in ('gal', 'shl', 'myl'))"]
       const notIds: Array<string> = []
@@ -855,7 +865,7 @@ const mutations = {
         cql.push(`(dataId not in (${notIds.join(',')}))`)
       }
       const tileWMS = new source.TileWMS({
-        url: `/${store.state.app.apiProxy.geoserverApi}/geoserver/mysqlGeo/wms`,
+        url: `/${rootState.app.apiProxy.geoserverApi}/geoserver/mysqlGeo/wms`,
         params: {
           'FORMAT': 'image/png8',
           'VERSION': '1.1.1',
@@ -869,10 +879,10 @@ const mutations = {
       state.analysis.deviceLayer.setSource(tileWMS)
     }
   },
-  SET_GIS_ANALYSIS(state, {wkt, center}) {
+  LOAD_GIS_ANALYSIS({state, dispatch, rootGetters, rootState}: any, {wkt, center}) {
     state.analysis.wkt = wkt
-    store.commit('gis/SET_GIS_ELEMENT')
-    store.commit('gis/SET_GIS_ANALYSIS_ELEMENT')
+    dispatch('LOAD_GIS_ELEMENT')
+    dispatch('LOAD_GIS_ANALYSIS_ELEMENT')
     state.analysis.power = []
     state.analysis.device = []
     state.analysis.loading = true
@@ -885,7 +895,7 @@ const mutations = {
         service: 'WFS',
         version: '1.0.0',
         request: 'GetFeature',
-        typename: store.state.dictionary.elementTypeList.filter(v => v.dictType === 'sb').map(v => v.geoType).join(','),
+        typename: rootState.dictionary.elementTypeList.filter(v => v.dictType === 'sb').map(v => v.geoType).join(','),
         srsName: 'EPSG:4326',
         outputFormat: 'application/json',
         CQL_FILTER: `INTERSECTS(location, ${wkt})`
@@ -898,7 +908,7 @@ const mutations = {
           deviceArr.push({
             name: v.properties.name,
             status: v.properties.online === '1' ? '在线' : '离线',
-            type: store.getters['dictionary/elementTypeMap'].get(v.properties.typeValue),
+            type: rootGetters['dictionary/elementTypeMap'].get(v.properties.typeValue),
             distanceValue: turf.distance(center, [Number(v.geometry.coordinates[0]), Number(v.geometry.coordinates[1])], {units: 'kilometers'}).toFixed(3),
             distance: turf.distance(center, [Number(v.geometry.coordinates[0]), Number(v.geometry.coordinates[1])], {units: 'kilometers'}).toFixed(2) + 'km'
           })
@@ -910,7 +920,7 @@ const mutations = {
       state.analysis.loading = false
     })
   },
-  SET_GIS_ANALYSIS_RESET(state) {
+  LOAD_GIS_ANALYSIS_RESET({state, dispatch}: any) {
     state.analysis.wkt = ''
     state.analysis.power = []
     state.analysis.device = []
@@ -918,18 +928,10 @@ const mutations = {
     state.analysis.deviceLayer.setSource(null)
     state.gisParams.default.feature?.set('isAnalysis', false)
     state.gisParams.default.feature?.get('resetStyle')()
-    store.commit('gis/SET_GIS_ELEMENT')
+    dispatch('LOAD_GIS_ELEMENT')
   }
 }
 
-const actions = {
-  LOAD_GIS_MAP({ commit }: any, {map, defaultDom, qyDom}: any) {
-    if (!state.map) {
-      commit('SET_GIS_MAP', {map, defaultDom, qyDom})
-    }
-  },
-}
-
 export default {
   namespaced: true,
   state,

+ 1 - 1
src/views/gis/business/common/business-main.vue

@@ -45,7 +45,7 @@ export default defineComponent({
       expend: true
     })
     const toIndex = () => {
-      store.commit('gis/SET_GIS_ELEMENT', ['lgszyjkscsb', 'jgzzmgs', 'lgsjkyfl', 'galsb', 'shlsb', 'mylsb'])
+      store.dispatch('gis/LOAD_GIS_ELEMENT', ['lgszyjkscsb', 'jgzzmgs', 'lgsjkyfl', 'galsb', 'shlsb', 'mylsb'])
       router.push('/gis/index')
     }
     onMounted(() => {

+ 3 - 3
src/views/gis/business/enterprise/index.vue

@@ -244,8 +244,8 @@ export default defineComponent({
         }).then(res => {
           const item = res.data.features?.[0]
           if (item) {
-            store.commit('gis/SET_GIS_PARAMS_QY_RESET')
-            store.commit('gis/SET_GIS_PARAMS_QY', {
+            store.dispatch('gis/LOAD_GIS_PARAMS_QY_RESET')
+            store.dispatch('gis/LOAD_GIS_PARAMS_QY', {
               wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
               id: item.properties.dataId,
               info: item.properties
@@ -263,7 +263,7 @@ export default defineComponent({
     })
     onActivated(() => {
       nextTick(() => {
-        store.commit('gis/SET_GIS_ELEMENT', ['lgszyjkscsb', 'jgzzmgs', 'lgsjkyfl'])
+        store.dispatch('gis/LOAD_GIS_ELEMENT', ['lgszyjkscsb', 'jgzzmgs', 'lgsjkyfl'])
       })
     })
     return {

+ 20 - 20
src/views/gis/layout/index.vue

@@ -50,15 +50,15 @@
     <div class="gis-content">
       <RouterViewCom/>
     </div>
-    <VideoPlayKedaCom v-if="$store.state.gis.videoParams.show" v-model:layout="videoLayout" :form="$store.state.gis.videoParams" @close="$store.commit('gis/SET_VIDEO_PARAMS', {show: false})"/>
-<!--    <div class="mockButtons">-->
-<!--      <el-button @click="mockSB1">模拟设备1</el-button>-->
-<!--      <el-button @click="mockSB2">模拟设备2</el-button><br/>-->
-<!--      <el-button @click="mockJQ1">模拟景区1</el-button><br/>-->
-<!--      <el-button @click="mockLG1">模拟旅馆1</el-button><br/>-->
-<!--      <el-button @click="mockCZW1">模拟出租屋1</el-button><br/>-->
-<!--      <el-button @click="mockHCZ1">模拟火车站1</el-button>-->
-<!--    </div>-->
+    <VideoPlayKedaCom v-if="$store.state.gis.videoParams.show" v-model:layout="videoLayout" :form="$store.state.gis.videoParams" @close="$store.dispatch('gis/LOAD_VIDEO_PARAMS', {show: false})"/>
+    <div class="mockButtons">
+      <el-button @click="mockSB1">模拟设备1</el-button>
+      <el-button @click="mockSB2">模拟设备2</el-button><br/>
+      <el-button @click="mockJQ1">模拟景区1</el-button><br/>
+      <el-button @click="mockLG1">模拟旅馆1</el-button><br/>
+      <el-button @click="mockCZW1">模拟出租屋1</el-button><br/>
+      <el-button @click="mockHCZ1">模拟火车站1</el-button>
+    </div>
   </div>
   <GisDefaultDom ref="ref_gisDefault"/>
   <GisQyDom ref="ref_gisQy"/>
@@ -156,7 +156,7 @@ export default defineComponent({
         qyDom: ref_gisQy.value,
       })
       state.mapFunc = func
-      store.commit('gis/SET_GIS_ELEMENT')
+      store.dispatch('gis/LOAD_GIS_ELEMENT')
     }
     const menuCpt = computed(() => {
       return router.options.routes.filter(v => v.name === store.state.gis.menuRootName)[0].children?.filter(v => !v.meta.noMenu)
@@ -213,8 +213,8 @@ export default defineComponent({
       switch (val.featureType) {
         case 'qy': {
           console.log(1)
-          store.commit('gis/SET_GIS_PARAMS_QY_RESET')
-          store.commit('gis/SET_GIS_PARAMS_QY', {
+          store.dispatch('gis/LOAD_GIS_PARAMS_QY_RESET')
+          store.dispatch('gis/LOAD_GIS_PARAMS_QY', {
             wkt: val.wkt,
             id: val.id,
             info: val.info
@@ -222,8 +222,8 @@ export default defineComponent({
         } break
         case 'sb': {
           console.log(2)
-          store.commit('gis/SET_GIS_PARAMS_DEFAULT_RESET')
-          store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
+          store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_RESET')
+          store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_SB', {
             wkt: val.wkt,
             id: val.id,
             info: val.info
@@ -248,7 +248,7 @@ export default defineComponent({
       }
     }
     const mockSB1 = () => {
-      store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
+      store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_SB', {
         type: 'sb',
         wkt: 'POINT(110.73667031084902 19.011386491828695)',
         id: 1,
@@ -273,7 +273,7 @@ export default defineComponent({
       })
     }
     const mockSB2 = () => {
-      store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
+      store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_SB', {
         type: 'sb',
         wkt: 'POINT(110.95227700030215 19.027865984016195)',
         id: 1,
@@ -298,7 +298,7 @@ export default defineComponent({
       })
     }
     const mockJQ1 = () => {
-      store.commit('gis/SET_GIS_PARAMS_DEFAULT_JQ', {
+      store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_JQ', {
         type: 'jq',
         wkt: 'POINT(110.74277601017481 18.85289817214939)',
         id: 1,
@@ -310,7 +310,7 @@ export default defineComponent({
       })
     }
     const mockLG1 = () => {
-      store.commit('gis/SET_GIS_PARAMS_DEFAULT_LG', {
+      store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_LG', {
         type: 'lg',
         wkt: 'POINT(110.74277601017481 18.85289817214939)',
         id: 1,
@@ -321,7 +321,7 @@ export default defineComponent({
       })
     }
     const mockCZW1 = () => {
-      store.commit('gis/SET_GIS_PARAMS_DEFAULT_CZW', {
+      store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_CZW', {
         type: 'czw',
         wkt: 'POINT(110.74277601017481 18.85289817214939)',
         id: 1,
@@ -332,7 +332,7 @@ export default defineComponent({
       })
     }
     const mockHCZ1 = () => {
-      store.commit('gis/SET_GIS_PARAMS_DEFAULT_HCZ', {
+      store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_HCZ', {
         type: 'hcz',
         wkt: 'POINT(110.74277601017481 18.85289817214939)',
         id: 1,

+ 2 - 2
src/views/gis/layout/tools/analysis.vue

@@ -276,7 +276,7 @@ export default defineComponent({
       state.cusTransfer.result.isInit = true
       state.cusTransfer.result.power.pageNum = 1
       state.cusTransfer.result.device.pageNum = 1
-      store.commit('gis/SET_GIS_ANALYSIS', {
+      store.dispatch('gis/LOAD_GIS_ANALYSIS', {
         center: state.cusTransfer.draw.center,
         wkt: state.cusTransfer.draw.wkt
       })
@@ -348,7 +348,7 @@ export default defineComponent({
       if (state.cusTransfer.analysisDraw) {
         props.map.removeInteraction(state.cusTransfer.analysisDraw);
       }
-      store.commit('gis/SET_GIS_ANALYSIS_RESET')
+      store.dispatch('gis/LOAD_GIS_ANALYSIS_RESET')
     })
     return {
       ...toRefs(state),

+ 2 - 2
src/views/gis/layout/tools/element.vue

@@ -85,7 +85,7 @@ export default defineComponent({
           s.active = flag
         })
       })
-      store.commit('gis/SET_GIS_ELEMENT')
+      store.dispatch('gis/LOAD_GIS_ELEMENT')
       emit('update:transfer', state.cusTransfer)
     }
     const switchItemActive = (item) => {
@@ -103,7 +103,7 @@ export default defineComponent({
           }
         })
       })
-      store.commit('gis/SET_GIS_ELEMENT')
+      store.dispatch('gis/LOAD_GIS_ELEMENT')
       emit('update:transfer', state.cusTransfer)
     }
     onMounted(() => {

+ 2 - 2
src/views/gis/layout/tools/tool-draw.ts

@@ -166,7 +166,7 @@ export const draw = (map, obj) => {
             }
         }
         if (!toolDrawTooltipElement && !store.state.gis.isTooling) {
-            store.commit('gis/SET_IS_TOOLING', true)
+            store.dispatch('gis/LOAD_IS_TOOLING', true)
             // reset()
             let _source
             const realLayer = map.getLayers().getArray().filter(v => v.get(layerFlag[0]) === layerFlag[1])
@@ -350,7 +350,7 @@ export const draw = (map, obj) => {
                         featEnd.set('isInit', true)
                         featEnd.set(layerFlag[0], layerFlag[1])
                         featEnd.setId(v4())
-                        store.commit('gis/SET_IS_TOOLING', false)
+                        store.dispatch('gis/LOAD_IS_TOOLING', false)
                     }
                     draw.on('drawend', drawendHandle);
                 }

+ 1 - 1
src/views/gis/layout/tools/tool.vue

@@ -97,7 +97,7 @@ export default defineComponent({
       }
     }
     onMounted(() => {
-      store.commit('gis/SET_IS_TOOLING', false)
+      store.dispatch('gis/LOAD_IS_TOOLING', false)
       const id = 'toolOverlay'
       if (props.map?.getOverlayById(id)) {
         state.closeOverlay = props.map?.getOverlayById(id)

+ 1 - 1
src/views/gis/map-info/overlay/default/czw.vue

@@ -3,7 +3,7 @@
     <div class="czw-info-head">
       <img src="./dom-icon-czw.png" alt=""/>出租屋
     </div>
-    <div class="czw-info-close __hover" @click="$store.commit('gis/SET_GIS_PARAMS_DEFAULT_RESET')">
+    <div class="czw-info-close __hover" @click="$store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_RESET')">
       <img src="@/components/easyMap/images/close.png" alt=""/>
     </div>
     <div class="czw-main">

+ 1 - 1
src/views/gis/map-info/overlay/default/hcz.vue

@@ -3,7 +3,7 @@
     <div class="hcz-info-head">
       <img src="./dom-icon-hcz.png" alt=""/>火车站
     </div>
-    <div class="hcz-info-close __hover" @click="$store.commit('gis/SET_GIS_PARAMS_DEFAULT_RESET')">
+    <div class="hcz-info-close __hover" @click="$store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_RESET')">
       <img src="@/components/easyMap/images/close.png" alt=""/>
     </div>
     <div class="hcz-main">

+ 1 - 1
src/views/gis/map-info/overlay/default/jq.vue

@@ -3,7 +3,7 @@
     <div class="jq-info-head">
       <img src="./dom-icon-jq.png" alt=""/>景区
     </div>
-    <div class="jq-info-close __hover" @click="$store.commit('gis/SET_GIS_PARAMS_DEFAULT_RESET')">
+    <div class="jq-info-close __hover" @click="$store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_RESET')">
       <img src="@/components/easyMap/images/close.png" alt=""/>
     </div>
     <div class="jq-main">

+ 1 - 1
src/views/gis/map-info/overlay/default/lg.vue

@@ -3,7 +3,7 @@
     <div class="lg-info-head">
       <img src="./dom-icon-lg.png" alt=""/>旅馆
     </div>
-    <div class="lg-info-close __hover" @click="$store.commit('gis/SET_GIS_PARAMS_DEFAULT_RESET')">
+    <div class="lg-info-close __hover" @click="$store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_RESET')">
       <img src="@/components/easyMap/images/close.png" alt=""/>
     </div>
     <div class="lg-main">

+ 2 - 2
src/views/gis/map-info/overlay/default/sb.vue

@@ -3,7 +3,7 @@
     <div class="sb-info-head">
       <img src="./dom-icon-sb.png" alt=""/>设备
     </div>
-    <div class="sb-info-close __hover" @click="$store.commit('gis/SET_GIS_PARAMS_DEFAULT_RESET')">
+    <div class="sb-info-close __hover" @click="$store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_RESET')">
       <img src="@/components/easyMap/images/close.png" alt=""/>
     </div>
     <div class="sb-main">
@@ -15,7 +15,7 @@
         <div class="sb-item-label">状态:</div>
         <div class="sb-item-value">{{$store.state.gis.gisParams.default.info?.online === '1' ? '在线' : '离线'}}</div>
       </div>
-      <div class="play-button __hover" @click="$store.commit('gis/SET_VIDEO_PARAMS', {
+      <div class="play-button __hover" @click="$store.dispatch('gis/LOAD_VIDEO_PARAMS', {
         show: true,
         name: $store.state.gis.gisParams.default.info?.name,
         code: $store.state.gis.gisParams.default.info?.deviceid

+ 2 - 2
src/views/gis/map-info/overlay/qy/index.vue

@@ -8,7 +8,7 @@
       <div class="qy-main-head">
         <div class="qy-main-head-tips">【企业】</div>
         <div class="qy-main-head-name">{{ qyInfoCpt.name }}</div>
-        <SvgIcon class="__hover" name="close_4" size="14" color="#8FFFFF" @click="$store.commit('gis/SET_GIS_PARAMS_QY_RESET')"/>
+        <SvgIcon class="__hover" name="close_4" size="14" color="#8FFFFF" @click="$store.dispatch('gis/LOAD_GIS_PARAMS_QY_RESET')"/>
       </div>
       <div class="qy-main-tab">
         <template v-for="item in [
@@ -125,7 +125,7 @@ export default defineComponent({
           store.state.gis.gisParams.qy.analysisSource.clear()
           store.state.gis.gisParams.qy.analysisSource.addFeature(store.state.gis.gisParams.qy.analysisCircle)
           setCircle()
-          store.commit('gis/SET_GIS_PARAMS_QY_ANALYSIS')
+          store.dispatch('gis/LOAD_GIS_PARAMS_QY_ANALYSIS')
         }
       }
     }