Przeglądaj źródła

智能选址前端修改

liutao 3 miesięcy temu
rodzic
commit
e7a6b758c7

+ 6 - 5
web_ui/src/views/industrial-land/AiIndustriaLandDetail.vue

@@ -396,7 +396,6 @@ export default {
       layers: [],
       showResult: false,
       showDetail: false,
-      zoomLevel: 8,
       zhuiwen: false,
       dkGeo: null,
       dkGeoJson: null,
@@ -896,10 +895,10 @@ export default {
           item.checked = false;
         }
       });
-      let myCenter = new L.LatLng(this.latitude, this.longitude); // 设置地图中心
+      // let myCenter = new L.LatLng(this.latitude, this.longitude); // 设置地图中心
       this.map = L.map(this.id, {
-        center: myCenter,
-        zoom: this.zoomLevel,
+        zoom:window.ApplicationConfig.mapOptions["zoom"],
+        center: window.ApplicationConfig.mapOptions["center"],
         zoomControl: false,
         crs: CRS_4490,
         attributionControl: false, //去掉右下角的logo
@@ -969,10 +968,12 @@ export default {
       this.switchMapLayer(zjzj);
 
       //定位浙江省
-      this.location(polygons);
+      // this.location(polygons);
       //默认加载供地图层
       var gd = this.layers[0].layers[0];
       this.switchMapLayer(gd);
+      console.log('center:'+this.map.getCenter());
+      console.log('zoom:'+this.map.getZoom());
     },
     //属性识别
     mapClick(e) {

+ 11 - 4
web_ui/static/config.js

@@ -2,8 +2,9 @@
   window.ApplicationConfig = {
     serverURL: "/server",
     //subscribeUrl: 'http://ai.zjugis.com:8511/subscribe/',
-     //subscribeUrl: 'http://localhost:8511/subscribe/',
-     subscribeUrl: '/agentai/subscribe/',
+    subscribeUrl: 'http://localhost:8511/subscribe/',
+    //  subscribeUrl: 'http://10.10.9.143:8511/subscribe/',
+    //  subscribeUrl: '/agentai/subscribe/',
     // subscribeUrl: 'http://192.168.0.145:8511/subscribe/',
     // zcbdUrl: 'http://ai.zjugis.com:8510/policy/#/home',
     // fgbdUrl: 'http://ai.zjugis.com:8510/policy/#/regulation',
@@ -20,6 +21,10 @@
     xzqUrl: 'http://60.191.110.204:6080/arcgis/rest/services/sde/ZJXZQ/MapServer',
     geoserverUrl: '/geoserver-host/geoserver/sde/ows',
     gdLayerName: 'sde%3Aecgap_klyzy',
+    mapOptions: {
+      zoom: 10,
+      center: [29.877637, 119.533452]
+    },
     aiAgent: [
       'plan_dispatcher',
       'summary',
@@ -64,8 +69,10 @@
             id: "GD",
             checked: true,
             type: 'geoserver',
-            url: 'https://zdzy.zrzyt.zj.gov.cn/geoserver/sde/wms',
-            layername: 'sde:ecgap_klyzy'
+            //url: 'https://zdzy.zrzyt.zj.gov.cn/geoserver/sde/wms',
+            //layername: 'sde:ecgap_klyzy'
+            url: 'http://60.191.110.204:8515/geoserver/nrllm/wms',
+            layername: 'nrllm:ecgap_klyzy'
           }
         ]
       }