ソースを参照

dataId唯一ID

CzRger 1 年間 前
コミット
d8c8b77c4d
共有2 個のファイルを変更した12 個の追加12 個の削除を含む
  1. 5 5
      src/store/modules/gis.ts
  2. 7 7
      src/views/gis/business/enterprise/index.vue

+ 5 - 5
src/store/modules/gis.ts

@@ -298,7 +298,7 @@ const mutations = {
             if (item) {
               store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
                 wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
-                id: item.properties.elementId,
+                id: item.properties.dataId,
                 info: item.properties,
                 config: {
                   isAnalysis: true
@@ -343,14 +343,14 @@ const mutations = {
                     store.commit('gis/SET_GIS_PARAMS_QY_RESET')
                     store.commit('gis/SET_GIS_PARAMS_QY', {
                       wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
-                      id: item.properties.elementId,
+                      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.elementId,
+                      id: item.properties.dataId,
                       info: item.properties
                     })
                   }
@@ -718,7 +718,7 @@ const mutations = {
       notIds.push(`'${state.gisParams.qy.feature.getId()}'`)
     }
     if (notIds.length > 0) {
-      cql.push(`(elementId not in (${notIds.join(',')}))`)
+      cql.push(`(dataId not in (${notIds.join(',')}))`)
     }
     let vp: null | string = null
     if (state.gisParams.qy.analysisWKT) {
@@ -750,7 +750,7 @@ const mutations = {
         notIds.push(`'${state.gisParams.qy.feature.getId()}'`)
       }
       if (notIds.length > 0) {
-        cql.push(`(elementId not in (${notIds.join(',')}))`)
+        cql.push(`(dataId not in (${notIds.join(',')}))`)
       }
 
       const tileWMS = new source.TileWMS({

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

@@ -226,16 +226,16 @@ export default defineComponent({
       })
     }
     const handleClick = (item) => {
-      let elementId = ''
+      let dataId = ''
       switch (item.type_value) {
-        case 'lgszyjkscsb': elementId = `1-${item.id}`
+        case 'lgszyjkscsb': dataId = `1-${item.id}`
               break
-        case 'jgzzmgs': elementId = `2-${item.id}`
+        case 'jgzzmgs': dataId = `2-${item.id}`
               break
-        case 'lgsjkfzl': elementId = `3-${item.id}`
+        case 'lgsjkfzl': dataId = `3-${item.id}`
               break
       }
-      if (elementId === store.state.gis.gisParams.qy.feature?.getId()) {
+      if (dataId === store.state.gis.gisParams.qy.feature?.getId()) {
         store.state.gis.gisParams.qy.overlay.setPosition(store.state.gis.gisParams.qy.feature.getGeometry().getCoordinates())
         store.state.gis.map.getView().animate({
           center: store.state.gis.gisParams.qy.feature.getGeometry().getCoordinates(),
@@ -252,7 +252,7 @@ export default defineComponent({
             typename: 'mysqlGeo:lgsqy_typeValue1,mysqlGeo:lgsqy_typeValue2,mysqlGeo:lgsqy_typeValue3',
             srsName: 'EPSG:4326',
             outputFormat: 'application/json',
-            CQL_FILTER: `elementId = '${elementId}'`
+            CQL_FILTER: `dataId = '${dataId}'`
           }
         }).then(res => {
           const item = res.data.features?.[0]
@@ -260,7 +260,7 @@ export default defineComponent({
             store.commit('gis/SET_GIS_PARAMS_QY_RESET')
             store.commit('gis/SET_GIS_PARAMS_QY', {
               wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
-              id: item.properties.elementId,
+              id: item.properties.dataId,
               info: item.properties
             })
           } else {