Forráskód Böngészése

信创地图迁移

songxy 1 éve
szülő
commit
11c0047c31

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 131 - 313
BJYSYBZ_C/public/config.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 314 - 130
WEB-VIEW/public/config copy.js


+ 48 - 86
WEB-VIEW/public/config.js

@@ -1,5 +1,6 @@
 window.ApplicationConfig = {
-  baseUrl: "https://zlzd.zrzyt.zj.gov.cn/app215/ybz-api/",
+  // baseUrl: "https://zlzd.zrzyt.zj.gov.cn/app215/ybz-api/",
+  baseUrl: '/ybzBjServer',
   mapLayerConfig: {
     use: "innerNet",
     projection: {
@@ -69,18 +70,28 @@ window.ApplicationConfig = {
                   name: "市级行政区",
                   enabled: true,
                   visible: false,
-                  serverType: "dynamic",
+                  serverType: "wms",
+                  params: {
+                    version: '1.1.1',
+                    layers: 'sde:sjxzq',
+                  },
                   url:
-                    "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/zp/XZQ_SJ/MapServer"
+                    "https://zlzd.zrzyt.zj.gov.cn/geoserver/sde/wms",
+                  queryUrl: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/sde',
                 },
                 {
                   id: "xzqh-x-search",
                   name: "县级行政区",
                   enabled: true,
                   visible: false,
-                  serverType: "dynamic",
+                  serverType: "wms",
+                  params: {
+                    version: '1.1.1',
+                    layers: 'sde:xjxzq',
+                  },
                   url:
-                    "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/zp/XZQ_XJ/MapServer"
+                    "https://zlzd.zrzyt.zj.gov.cn/geoserver/sde/wms",
+                  queryUrl: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/sde',
                 },
                 {
                   id: "xzqh-x",
@@ -585,7 +596,7 @@ window.ApplicationConfig = {
                   "1": "1 = 1"
                 }
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/ZDZY/SDHY/MapServer",
+              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/zlzd/SDHY/MapServer",
               legend: {
                 title: "行业类别",
                 defs: {
@@ -1312,7 +1323,7 @@ window.ApplicationConfig = {
               params: {
                 layers: "show:0"
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer2/arcgis/rest/services/ZDZY/ZDZY_KGDK_GYYD/MapServer",
+              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer2/arcgis/rest/services/zlzd/zlzd_KGDK_GYYD/MapServer",
               legend: {
                 title: "潜力资源",
                 defs: {
@@ -1332,7 +1343,7 @@ window.ApplicationConfig = {
               params: {
                 layers: "show:0"
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer2/arcgis/rest/services/ZDZY/ZDZY_PEWG_WGYY/MapServer",
+              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer2/arcgis/rest/services/zlzd/zlzd_PEWG_WGYY/MapServer",
               legend: {
                 title: "批而未供",
                 defs: {
@@ -1414,7 +1425,7 @@ window.ApplicationConfig = {
               params: {
                 layers: "show:0,1"
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer2/arcgis/rest/services/ZDZY/dcqtb_2022/MapServer",
+              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer2/arcgis/rest/services/zlzd/dcqtb_2022/MapServer",
               legend: {
                 title: "低效用地",
                 defs: {
@@ -1748,7 +1759,7 @@ window.ApplicationConfig = {
                   "1": "1=1"
                 }
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer3/arcgis/rest/services/ZDZY/TDGY2022/MapServer",
+              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer3/arcgis/rest/services/zlzd/TDGY2022/MapServer",
               legend: {
                 title: "供地",
                 defs: {
@@ -1772,7 +1783,7 @@ window.ApplicationConfig = {
                   "1": "tdyt like '06%'"
                 }
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer3/arcgis/rest/services/ZDZY/TDGY2022/MapServer",
+              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer3/arcgis/rest/services/zlzd/TDGY2022/MapServer",
               legend: {
                 title: "工业用地",
                 defs: {
@@ -2209,16 +2220,19 @@ window.ApplicationConfig = {
                 }
               }
             },
+            
             {
               id: "bj-dkgl",
               name: "滨江地块管理",
               enabled: true,
               visible: false,
-              serverType: "dynamic",
+              serverType: 'wms',
               params: {
-                layers: "show:0"
+                version: '1.1.1',
+                layers: 'sde:bjwkfly2000',
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJ_DKGL/MapServer",
+              url: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/sde/wms',
+              queryUrl: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/sde',
               legend: {
                 title: "管地单位",
                 defs: {
@@ -2290,11 +2304,13 @@ window.ApplicationConfig = {
               name: "滨江小镇",
               enabled: true,
               visible: false,
-              serverType: "dynamic",
+              serverType: 'wms',
               params: {
-                layers: "show:0,1"
+                version: '1.1.1',
+                layers: 'ysybz:特色小镇',
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJXZ/MapServer",
+              url: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/ysybz/wms',
+              queryUrl: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/ysybz',
               legend: {
                 title: "滨江小镇",
                 defs: {
@@ -2310,11 +2326,13 @@ window.ApplicationConfig = {
               name: "滨江生态保护红线",
               enabled: true,
               visible: false,
-              serverType: "dynamic",
+              serverType: 'wms',
               params: {
-                layers: "show:0,1"
+                version: '1.1.1',
+                layers: 'ysybz:bjstbhhx',
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJSQSX/MapServer",
+              url: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/ysybz/wms',
+              queryUrl: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/ysybz',
               legend: {
                 title: "滨江生态保护红线",
                 defs: {
@@ -2330,11 +2348,13 @@ window.ApplicationConfig = {
               name: "滨江城镇开发边界",
               enabled: true,
               visible: false,
-              serverType: "dynamic",
+              serverType: 'wms',
               params: {
-                layers: "show:2,3"
+                version: '1.1.1',
+                layers: 'ysybz:bjczkfbj_1',
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJSQSX/MapServer",
+              url: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/ysybz/wms',
+              queryUrl: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/ysybz',
               legend: {
                 title: "滨江城镇开发边界",
                 defs: {
@@ -2350,11 +2370,13 @@ window.ApplicationConfig = {
               name: "滨江城镇开发边界外",
               enabled: true,
               visible: false,
-              serverType: "dynamic",
+              serverType: 'wms',
               params: {
-                layers: "show:0,1"
+                version: '1.1.1',
+                layers: 'ysybz:kfbjw',
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJ_KFBJW/MapServer",
+              url: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/ysybz/wms',
+              queryUrl: 'https://zlzd.zrzyt.zj.gov.cn/geoserver/ysybz',
               legend: {
                 title: "滨江城镇开发边界外",
                 defs: {
@@ -2365,66 +2387,6 @@ window.ApplicationConfig = {
                 }
               }
             },
-            {
-              id: "bj-ld",
-              name: "滨江林地",
-              enabled: true,
-              visible: false,
-              serverType: "dynamic",
-              params: {
-                layers: "show:0,1"
-              },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJLD/MapServer",
-              legend: {
-                title: "滨江林地",
-                defs: {
-                  滨江林地: {
-                    color: "#64AF64",
-                    query: {}
-                  },
-                }
-              }
-            },
-            {
-              id: "bj-gd",
-              name: "滨江耕地",
-              enabled: true,
-              visible: false,
-              serverType: "dynamic",
-              params: {
-                layers: "show:0,1"
-              },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJGD/MapServer",
-              legend: {
-                title: "滨江耕地",
-                defs: {
-                  滨江耕地: {
-                    color: "#F5F8DC",
-                    query: {}
-                  },
-                }
-              }
-            },
-            {
-              id: "bj-lsyd",
-              name: "滨江临时用地",
-              enabled: true,
-              visible: false,
-              serverType: "dynamic",
-              params: {
-                layers: "show:0,1"
-              },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJLSYD/MapServer",
-              legend: {
-                title: "滨江临时用地",
-                defs: {
-                  滨江临时用地: {
-                    color: "#9999FF",
-                    query: {}
-                  },
-                }
-              }
-            },
           ]
         }
       ]

+ 5 - 6
WEB-VIEW/public/config_dev.js

@@ -359,14 +359,13 @@ window.ApplicationConfig = {
               name: "滨江区行政区",
               enabled: true,
               visible: false,
-              serverType: "dynamic",
+              serverType: 'wms',
               params: {
-                layers: "show:0",
-                layerDefs: {
-                  0: "xzqdm like '330108%'"
-                }
+                version: '1.1.1',
+                layers: 'sde:xzq',
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJXZQ/MapServer",
+              url: 'https://zdzy.zrzyt.zj.gov.cn/geoserver/sde/wms',
+              queryUrl: 'https://zdzy.zrzyt.zj.gov.cn/geoserver/sde',
             },
             {
               id: "bjq-gd",

+ 0 - 21
WEB-VIEW/src/views/components/BigScreenMap/TABLE_COMP_MAPPING.js

@@ -284,26 +284,5 @@ const TABLE_COMP_MAPPING = {
     layerField: "id", // 图层query标识
     outFields: "dksyh,szx,szxz,sjydmj,tdqlr,ss2022,mjss2022,sjsf_after,mjss_after"
   },
-  'bj-gd': {
-    // 图层id
-    tableName: "", // 表名(业务表名,查详情使用)
-    field: "id", // 业务表标识
-    layerField: "id", // 图层query标识
-    outFields: "dlmc,bsm,mj"
-  },
-  'bj-ld': {
-    // 图层id
-    tableName: "", // 表名(业务表名,查详情使用)
-    field: "id", // 业务表标识
-    layerField: "id", // 图层query标识
-    outFields: "dlmc,bsm,tbmj"
-  },
-  'bj-lsyd': {
-    // 图层id
-    tableName: "", // 表名(业务表名,查详情使用)
-    field: "id", // 业务表标识
-    layerField: "id", // 图层query标识
-    outFields: "objectid,xh,xmmc,spmj,jsdw"
-  },
 };
 export default TABLE_COMP_MAPPING;

+ 66 - 52
WEB-VIEW/src/views/components/BigScreenMap/index.vue

@@ -864,41 +864,46 @@ export default {
         }
       }
     },
-    async locationFeatureWhere(layerId, where, setting, isFit) {
+    async locationFeatureWhere(layerId, where, setting) {
       this.spinShow = true;
       const layerById = this.$refs.configLayer.getLayerConfigById(layerId);
-      await arcgisQuery(
-        `${layerById.url}/${this.layerIndex}/query`,
-        {
-          outSR: getSrid(this.map),
-          where,
-          ...setting,
-        },
-        true,
-      ).then(({ features }) => {
-        let feature = features[0];
-        const geometry = feature.getGeometry();
-        const wkt = WkxGeometry.parseGeoJSON(
-          new GeoJSON().writeGeometryObject(geometry),
-        ).toWkt();
-        feature.set('wkt', wkt);
-        this.feature = feature;
-        console.log(isFit);
-        console.log(geometry);
-        console.log(geometry.getExtent());
-        // if (isFit) {
-        setTimeout(() => {
-          let [width, height] = this.map.getSize();
-          width = Math.ceil(width / 5);
-          height = Math.ceil(height / 5);
-          this.map.getView().fit(geometry.getExtent(), {
-            padding: [height, width, height + 340, width],
-            duration: 500,
-            maxZoom: 18,
-          });
-        }, 500);
-        // }
-      });
+      if (layerById.serverType === 'wms') {
+        await GeoServerQuery(`${layerById.queryUrl}`, {
+          typeName: layerById.params.layers,
+          cql_filter: where
+        }, true).then(({ features }) => {
+          this.feature = features[0]
+        })
+      } else {
+        await arcgisQuery(
+          `${layerById.url}/${this.layerIndex}/query`,
+          {
+            outSR: getSrid(this.map),
+            where,
+            ...setting,
+          },
+          true
+        ).then(({ features }) => {
+          let feature = features[0];
+          this.feature = feature;
+        });
+      }
+      const geometry = this.feature.getGeometry();
+      const wkt = WkxGeometry.parseGeoJSON(
+        new GeoJSON().writeGeometryObject(geometry)
+      ).toWkt();
+      this.feature.set("wkt", wkt);
+      setTimeout(() => {
+        let [width, height] = this.map.getSize();
+        width = Math.ceil(width / 5);
+        height = Math.ceil(height / 5);
+        this.map.getView().fit(geometry.getExtent(), {
+          padding: [height, width, height + 340, width],
+          duration: 500,
+          maxZoom: 18,
+        });
+      }, 500);
+
       this.spinShow = false;
     },
     async locationMaskFeatureHttp(
@@ -952,19 +957,34 @@ export default {
         return;
       }
       this.spinShow = true;
-      await arcgisQuery(
-        `${layerById.url}/0/query`,
-        {
-          outSR: getSrid(this.map),
-          where,
-        },
-        false,
-      ).then((resp) => {
-        const { features } = resp;
-        let json = { type: 'FeatureCollection', features: [] };
-        json.features.push(convertRingsToGeoJSON(features[0].geometry.rings));
-        MapUtils.drawShade(this.map, json);
-      });
+      
+      if (layerById.serverType === 'wms') {
+        await GeoServerQuery(`${layerById.queryUrl}`, {
+          typeName: layerById.params.layers,
+          cql_filter: where
+        }, false).then((resp) => {
+          const { features } = resp;
+          const json = { type: 'FeatureCollection', features: [] };
+          json.features.push(
+            features[0].geometry
+          );
+          MapUtils.drawShade(this.map, json);
+        })
+      } else { 
+        await arcgisQuery(
+          `${layerById.url}/0/query`,
+          {
+            outSR: getSrid(this.map),
+            where,
+          },
+          false,
+        ).then((resp) => {
+          const { features } = resp;
+          let json = { type: 'FeatureCollection', features: [] };
+          json.features.push(convertRingsToGeoJSON(features[0].geometry.rings));
+          MapUtils.drawShade(this.map, json);
+        });
+      }
       this.spinShow = false;
     },
     mapLoaded(map) {
@@ -1509,11 +1529,6 @@ export default {
       this.enabledLayersConfig = enabledLayersConfig;
     },
     async pickServerFeature(e) {
-      console.log(
-        this.visibleLayerId,
-        typeof this.visibleLayerId,
-        'typeof this.visibleLayerId',
-      );
       let tempLayerIds = this.visibleLayerIds.filter(
         (it) =>
           it !== 'xzqh-s' &&
@@ -1729,7 +1744,6 @@ export default {
           'areaList',
           features.flat().map((i) => i.attributes.FULLNAME.substr(3)),
         );
-        console.log(drawFeature, features, 'Promise all resp');
         this.drawFeature = drawFeature;
       });
     },

+ 1 - 1
WEB-VIEW/src/webview.vue

@@ -129,7 +129,7 @@ export default {
       // uni.webView.navigateBack();
     },
     cardBoxClick(item, index) {
-      let dksyh = item.dksyh;
+      const dksyh = item.dksyh;
       this.currentIndex = index;
       this.$vm.$emit('location-feature-where', {
         layerId: 'bj-dkgl',

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott