liutao 4 dias atrás
pai
commit
45d6f2a001

+ 4 - 0
.gitignore

@@ -0,0 +1,4 @@
+jiaxing/landsite_agent_jx/__pycache__/xuanzhi_query.cpython-310.pyc
+CYZZ-master/cyzz/server/pom-xml-flattened
+nlp_tools.zip
+jiaxing/landsite_agent_jx/__pycache__/xuanzhi_query.cpython-310.pyc

+ 5 - 0
CYZZ-master/cyzz/server/pom-xml-flattened

@@ -36,6 +36,11 @@
       <artifactId>tess4j</artifactId>
       <version>5.12.0</version>
     </dependency>
+    <dependency>
+      <groupId>org.dromara.hutool</groupId>
+      <artifactId>hutool-all</artifactId>
+      <version>6.0.0-M21</version>
+    </dependency>
     <dependency>
       <groupId>com.squareup.okhttp3</groupId>
       <artifactId>okhttp</artifactId>

+ 0 - 46
CYZZ-master/cyzz/web_cyzz/public/config.js

@@ -16,53 +16,7 @@
       time: 12
     },
     server: 'http://localhost:8517',
-    // server_hgzt: 'http://121.40.148.47:8530/ilpes_st',
-    server_hgzt: 'http://121.40.148.47:8530/ilpes_st',
     znxz: '/nllm/#/industria-land-detail',
-    // znxz:'/nllm/#/land-use-page/policy-simulation',
-    // 引入的外部页面
-    iframePages: {
-      // 工业用地调查
-      survey: {
-        // 调查汇总
-        summary: 'http://121.40.148.47:8530/survey/#/branch/public/survey/summary',
-        // 地块调查
-        land: 'http://121.40.148.47:8530/survey/#/branch/public/survey/land',
-        // 企业调查
-        enterprise: 'http://121.40.148.47:8530/survey/#/branch/public/survey/land',
-        // 地企对应
-        relation: 'http://121.40.148.47:8530/survey/#/branch/public/survey/relation',
-      },
-      // 批后监管
-      supervise: {
-        summary: 'http://121.40.148.47:8530/supervise/#/phjg',//总体看板
-        jd: 'http://121.40.148.47:8530/supervise/#/phjg/jd', // 交地预警
-        wjd: 'http://121.40.148.47:8530/supervise/#/phjg/wjd', // 到期未交地
-        kg: 'http://121.40.148.47:8530/supervise/#/phjg/kg', // 开工预警
-        wkg: 'http://121.40.148.47:8530/supervise/#/phjg/wkg', // 到期未开工
-        jg: 'http://121.40.148.47:8530/supervise/#/phjg/jg', // 竣工预警
-        wjg: 'http://121.40.148.47:8530/supervise/#/phjg/wjg', // 到期未 竣工
-      },
-      //智能选址
-      znxzs: {
-        znxz: 'http://60.191.110.204:8510/#/znxz'
-      },
-      video: {
-        yjzx: 'http://60.191.110.206:48004/#/noheader/monitor-warning',
-        jgcx: 'http://60.191.110.206:48004/#/noheader/effect',
-        dzwl: 'http://60.191.110.206:48004/#/noheader/operations/camera-config'
-      },
-      zcbd: {
-        ai: 'http://121.40.148.47:8528/#/outer/ai-search',
-        zcbk: 'http://121.40.148.47:8528/#/outer/library',
-      },
-      dkpj: {
-        pjzb: 'http://121.40.148.47:8530/eval/#/pjzb',
-        pjmx: 'http://121.40.148.47:8530/eval/#/pjmx',
-        zhpj: 'http://121.40.148.47:8530/eval/#/zhpj',
-      }
-    },
-    // landUrl: '/arcserver-host/arcgis/rest/services/NRLLM/LAND_PUBLIC_SALE/MapServer',
     landUrl: '/arcserver-host/arcgis/rest/services/NRLLM/land_public_sale_n/MapServer',
     dxxzUrl: '/arcserver-host/arcgis/rest/services/NRLLM/DXXZ/MapServer',
     xzqUrl: '/arcserver-host/arcgis/rest/services/NRLLM/ZJXZQ/MapServer',

+ 0 - 123
CYZZ-master/cyzz/web_cyzz/public/config_djyc.js

@@ -1,123 +0,0 @@
-(function (global) {
-  global.AppGlobalConfig = {
-    system: {
-      // name: '产业空间智治云',
-      name: '地价预测',
-      copyright: '版权所有© 2024 浙江万维空间信息技术有限公司',
-    },
-    authToken: 'ZJUGIS-Authorization',
-    tk: 'f7c3163e305d6b2a4b6a14938b1932ae',
-    storage: {
-      encryption: true, // 是否加密
-      secretKey: 'yydjydhfyhfggd'
-    },
-
-    server: 'http://localhost:8517',
-    // server_hgzt: 'http://121.40.148.47:8530/ilpes_st',
-    server_hgzt: 'http://121.40.148.47:8530/ilpes_st',
-    znxz: '/nllm/#/industria-land-detail',
-    // znxz:'/nllm/#/land-use-page/policy-simulation',
-    // 引入的外部页面
-    iframePages: {
-      // 工业用地调查
-      survey: {
-        // 调查汇总
-        summary: 'http://121.40.148.47:8530/survey/#/branch/public/survey/summary',
-        // 地块调查
-        land: 'http://121.40.148.47:8530/survey/#/branch/public/survey/land',
-        // 企业调查
-        enterprise: 'http://121.40.148.47:8530/survey/#/branch/public/survey/land',
-        // 地企对应
-        relation: 'http://121.40.148.47:8530/survey/#/branch/public/survey/relation',
-      },
-      // 批后监管
-      supervise: {
-        summary: 'http://121.40.148.47:8530/supervise/#/phjg',//总体看板
-        jd: 'http://121.40.148.47:8530/supervise/#/phjg/jd', // 交地预警
-        wjd: 'http://121.40.148.47:8530/supervise/#/phjg/wjd', // 到期未交地
-        kg: 'http://121.40.148.47:8530/supervise/#/phjg/kg', // 开工预警
-        wkg: 'http://121.40.148.47:8530/supervise/#/phjg/wkg', // 到期未开工
-        jg: 'http://121.40.148.47:8530/supervise/#/phjg/jg', // 竣工预警
-        wjg: 'http://121.40.148.47:8530/supervise/#/phjg/wjg', // 到期未 竣工
-      },
-      //智能选址
-      znxzs: {
-        znxz: 'http://60.191.110.204:8510/#/znxz'
-      },
-      video: {
-        yjzx: 'http://60.191.110.206:48004/#/noheader/monitor-warning',
-        jgcx: 'http://60.191.110.206:48004/#/noheader/effect',
-        dzwl: 'http://60.191.110.206:48004/#/noheader/operations/camera-config'
-      },
-      zcbd: {
-        ai: 'http://121.40.148.47:8528/#/outer/ai-search',
-        zcbk: 'http://121.40.148.47:8528/#/outer/library',
-      },
-      dkpj: {
-        pjzb: 'http://121.40.148.47:8530/eval/#/pjzb',
-        pjmx: 'http://121.40.148.47:8530/eval/#/pjmx',
-        zhpj: 'http://121.40.148.47:8530/eval/#/zhpj',
-      }
-    },
-    // landUrl: '/arcserver-host/arcgis/rest/services/NRLLM/LAND_PUBLIC_SALE/MapServer',
-    landUrl: '/arcserver-host/arcgis/rest/services/NRLLM/land_public_sale_n/MapServer',
-    dxxzUrl: '/arcserver-host/arcgis/rest/services/NRLLM/DXXZ/MapServer',
-    xzqUrl: '/arcserver-host/arcgis/rest/services/NRLLM/ZJXZQ/MapServer',
-    zzUrl: '/arcserver-host/arcgis/rest/services/NRLLM/JZDJ_ZZ/MapServer',
-    gyUrl: '/arcserver-host/arcgis/rest/services/NRLLM/JZDJ_GY/MapServer',
-    syUrl: '/arcserver-host/arcgis/rest/services/NRLLM/JZDJ_SY/MapServer',
-    xzqGeoserverUrl: 'cyzz:xzq',
-    owsUrl:'https://zdzy.zrzyt.zj.gov.cn/geoserver/cyzz/ows',
-    owsLandUrl:'https://zdzy.zrzyt.zj.gov.cn/geoserver/sde/ows',
-    owsJzdjUrl: 'https://zdzy.zrzyt.zj.gov.cn/geoserver/cyzz/ows',
-    geoField:"wkb_geometry",
-    landGeoField: "shape",
-    jzdjGeoField: "geom",
-    priceField: 'je',
-    jzdjUrl: "cyzz:land_public_sale",
-    zzGeoserverUrl: 'cyzz:jzdj_zz',
-    gyGeoserverUrl: 'cyzz:jzdj_gy',
-    syGeoserverUrl: 'cyzz:jzdj_sy',
-    landGeoserverUrl:'sde:gdxminfo_all',
-    layerTreeConfig: [
-      {
-        name: '现状图层', layers: [
-          {
-            name: "影像图",
-            id: "image",
-            checked: true,
-            type: 'tdt',
-          },
-          {
-            name: "地形图",
-            id: "dxt",
-            checked: false,
-            type: 'tdt',
-          },
-          {
-            name: "土地供应",
-            id: "TDGY",
-            checked: true,
-            // type: 'dynamic',
-            // url: '/arcserver-host/arcgis/rest/services/NRLLM/LAND_PUBLIC_SALE/MapServer'
-            type: 'wms',
-            url: 'https://zdzy.zrzyt.zj.gov.cn/geoserver/sde/wms?service=WMS',
-            layername: 'sde:gdxminfo_all',
-             cql:"xzqdm like '%33%'"
-          },
-          {
-            name: "基准地价",
-            id: "JZDJ",
-            checked: true,
-            // type: 'dynamic',
-            // url: '/arcserver-host/arcgis/rest/services/NRLLM/LAND_PUBLIC_SALE/MapServer'
-            type: 'wms',
-            url: 'https://zdzy.zrzyt.zj.gov.cn/geoserver/cyzz/wms?service=WMS',
-            layername: 'cyzz:land_public_sale',
-             cql:"1=1"
-          }
-        ]
-      },
-    ],
-  };
-})(window)

+ 8 - 8
CYZZ-master/cyzz/web_cyzz/src/components/iframe-page/IframePage.vue

@@ -11,15 +11,15 @@
   })
 
   const getSrc = () => {
-    const { iframePages } = window.AppGlobalConfig;
-    if(props.keys && Array.isArray(props.keys)) {
-      let src = iframePages;
-      props.keys.forEach(key => {
-        src = src[key]
-      })
+    // const { iframePages } = window.AppGlobalConfig;
+    // if(props.keys && Array.isArray(props.keys)) {
+    //   let src = iframePages;
+    //   props.keys.forEach(key => {
+    //     src = src[key]
+    //   })
 
-      return src;
-    }
+    //   return src;
+    // }
 
     return  '';
   }

+ 189 - 68
CYZZ-master/cyzz/web_cyzz/src/views/land-use/PolicyCoordination.vue

@@ -614,7 +614,7 @@ import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
 import * as turf from '@turf/turf';
 import SettingPage from './SettingPage.vue';
 import wkt from 'terraformer-wkt-parser';
-import Proj from "proj4leaflet";
+import Proj from 'proj4leaflet';
 const showLayerControl = ref(false);
 const showLegend = ref(false);
 const pageRef = ref();
@@ -1660,6 +1660,111 @@ const updateXzxs = () => {
 };
 const initLineChart = () => {
   const myChart = echarts.init(document.getElementById('chart'));
+
+  // 对x轴年份和y轴数据做升序排序
+  let xData = form.value.chartData.xData.map(Number); // 转为数字,防止字符串排序错乱
+  let yData = form.value.chartData.yData;
+  // 组合成对象数组
+  let arr = xData.map((year, idx) => ({ year, value: yData[idx] }));
+  // 按年份升序排序
+  arr.sort((a, b) => a.year - b.year);
+  // 拆分回x和y
+  let sortedYears = arr.map((item) => item.year.toString());
+  let sortedPrices = arr.map((item) => item.value);
+
+  // 新增:判断是否有2025,分段画线
+  const idx2025 = sortedYears.indexOf('2025');
+  let series = [];
+  if (idx2025 > 0) {
+    // 前面正常线
+    series.push({
+      data: sortedPrices.slice(0, idx2025),
+      type: 'line',
+      lineStyle: { color: '#FF8537' },
+      label: { show: true, position: 'top', color: '#FF8537', fontSize: 14 },
+      symbol: 'circle',
+      symbolSize: 8,
+      // x轴数据对应
+      xAxisIndex: 0,
+      yAxisIndex: 0,
+    });
+    // 2024-2025虚线
+    series.push({
+      data: [sortedPrices[idx2025 - 1], sortedPrices[idx2025]],
+      type: 'line',
+      lineStyle: { color: '#FF8537', type: 'dashed' },
+      label: { show: true, position: 'top', color: '#FF8537', fontSize: 14 },
+      symbol: 'circle',
+      symbolSize: 8,
+      xAxisIndex: 0,
+      yAxisIndex: 0,
+      // 只显示2024和2025的x轴
+      // 通过自定义x轴数据实现
+      // 但ECharts会自动对齐x轴,需用dataset或补齐数据
+      // 这里用x轴数据覆盖
+      encode: { x: [idx2025 - 1, idx2025], y: [0, 1] },
+    });
+    // 重新设置x轴,防止虚线段错位
+    var option = {
+      tooltip: {
+        trigger: 'item'
+      },
+      color: '#FF8537',
+      grid: {
+        top: '15%',
+        bottom: '20%',
+        left: '15%',
+        right: '10%'
+      },
+      xAxis: {
+        type: 'category',
+        data: sortedYears,
+        axisTick: {
+          show: false
+        },
+        axisLine: {
+          show: false
+        },
+        axisLabel: {
+          color: '#333',
+          rotate: -45
+        }
+      },
+      yAxis: {
+        type: 'value',
+        axisLabel: {
+          color: '#999'
+        },
+        splitLine: {
+          color: '#E9EBF4'
+        }
+      },
+      series: [
+        // 前面实线
+        {
+          data: sortedPrices.slice(0, idx2025),
+          type: 'line',
+          lineStyle: { color: '#FF8537' },
+          label: { show: true, position: 'top', color: '#FF8537', fontSize: 14 },
+          symbol: 'circle',
+          symbolSize: 8,
+        },
+        // 2024-2025虚线
+        {
+          data: [null, ...Array(idx2025 - 2).fill(null), sortedPrices[idx2025 - 1], sortedPrices[idx2025]],
+          type: 'line',
+          lineStyle: { color: '#FF8537', type: 'dashed' },
+          label: { show: true, position: 'top', color: '#FF8537', fontSize: 14 },
+          symbol: 'circle',
+          symbolSize: 8,
+        }
+      ]
+    };
+    myChart.setOption(option);
+    return;
+  }
+
+  // 没有2025,正常线
   var option = {
     tooltip: {
       trigger: 'item'
@@ -1673,7 +1778,7 @@ const initLineChart = () => {
     },
     xAxis: {
       type: 'category',
-      data: form.value.chartData.xData,
+      data: sortedYears,
       axisTick: {
         show: false
       },
@@ -1696,8 +1801,12 @@ const initLineChart = () => {
     },
     series: [
       {
-        data: form.value.chartData.yData,
-        type: 'line'
+        data: sortedPrices,
+        type: 'line',
+        lineStyle: { color: '#FF8537' },
+        label: { show: true, position: 'top', color: '#FF8537', fontSize: 14 },
+        symbol: 'circle',
+        symbolSize: 8,
       }
     ]
   };
@@ -1743,6 +1852,19 @@ const getNewLineData = () => {
         xData: form.value.xData,
         yData: yData
       };
+      // 新增:如果选择的年份是2025年,xData和yData中加入2025和预测价格
+      if (form.value.formItem.year == '2025' || form.value.formItem.year == 2025) {
+        const predictYear = '2025';
+        const predictPrice =
+          form.value.result && form.value.result.pred_result
+            ? (form.value.result.pred_result * 10000).toFixed(2)
+            : '';
+        // 如果xData中没有2025,则添加
+        if (!form.value.xData.includes(predictYear)) {
+          form.value.xData.push(predictYear);
+          yData.push(predictPrice);
+        }
+      }
       nextTick(() => {
         initLineChart();
       });
@@ -2005,16 +2127,14 @@ const resetLandPanel = () => {
 };
 //供地geoserver
 const queryGDByGeoServerFeature = (geo) => {
-
   const currentYear = new Date().getFullYear();
   const preYear = currentYear - form.value.formItem.cksj;
   var start = preYear + '-01-01';
   var end = currentYear + '-12-31';
 
-
   // 1. 构造 GML Polygon
   const rings = geo.rings[0];
-  const posList = rings.map(pt => pt.join(' ')).join(' ');
+  const posList = rings.map((pt) => pt.join(' ')).join(' ');
 
   // 2. 构造 XML Filter
   const tdytmc = form.value.formItem.tdyt;
@@ -2075,72 +2195,73 @@ const queryGDByGeoServerFeature = (geo) => {
   } else if (!/outputFormat=/.test(url)) {
     url += '&outputFormat=application%2Fjson';
   }
-  axios.post(url, xml, {
-    headers: {
-      'Content-Type': 'text/xml'
-    },
-    transformRequest: [(data) => data]
-  })
-    .then(res => {
-    const data = res.data;
+  axios
+    .post(url, xml, {
+      headers: {
+        'Content-Type': 'text/xml'
+      },
+      transformRequest: [(data) => data]
+    })
+    .then((res) => {
+      const data = res.data;
       if (!data.features || data.features.length < 1) {
-      message.info('未叠加到符合条件的供地数据');
+        message.info('未叠加到符合条件的供地数据');
         if (markersLayers) markersLayers.clearLayers();
-      form.value.formItem.ycdj = '';
-      return;
-    }
+        form.value.formItem.ycdj = '';
+        return;
+      }
 
       // 调用 algorithm 进行后续处理
-        var attrs = [];
-    var origGeo = arcgisToGeoJSON(geo);
-    var center = turf.center(origGeo);
-    let pt = center.geometry.coordinates;
-    var orign = { geojson: origGeo, center: pt };
+      var attrs = [];
+      var origGeo = arcgisToGeoJSON(geo);
+      var center = turf.center(origGeo);
+      let pt = center.geometry.coordinates;
+      var orign = { geojson: origGeo, center: pt };
 
-    data.features.forEach((item) => {
-      var geojson = item.geometry;
-      if (geojson.geometries) {
-        geojson.geometries.forEach((it) => {
-          try {
-            var interGeo = turf.intersect(origGeo, it);
-            if (interGeo) {
-              var area = turf.area(turf.getGeom(interGeo)).toFixed(2);
-                attrs.push({ 
-                  area: area, 
-                  attributes: item.properties, 
-                  geo: interGeo, 
-                  center: turf.center(it).geometry.coordinates 
+      data.features.forEach((item) => {
+        var geojson = item.geometry;
+        if (geojson.geometries) {
+          geojson.geometries.forEach((it) => {
+            try {
+              var interGeo = turf.intersect(origGeo, it);
+              if (interGeo) {
+                var area = turf.area(turf.getGeom(interGeo)).toFixed(2);
+                attrs.push({
+                  area: area,
+                  attributes: item.properties,
+                  geo: interGeo,
+                  center: turf.center(it).geometry.coordinates
                 });
-            }
-          } catch (e) {
+              }
+            } catch (e) {
               console.error(e);
-          }
-        });
-      } else {
+            }
+          });
+        } else {
           try {
-        var interGeo = turf.intersect(origGeo, geojson);
-        if (interGeo) {
-          var area = turf.area(turf.getGeom(interGeo)).toFixed(2);
-              attrs.push({ 
-                area: area, 
-                attributes: item.properties, 
-                geo: interGeo, 
-                center: turf.center(geojson).geometry.coordinates 
+            var interGeo = turf.intersect(origGeo, geojson);
+            if (interGeo) {
+              var area = turf.area(turf.getGeom(interGeo)).toFixed(2);
+              attrs.push({
+                area: area,
+                attributes: item.properties,
+                geo: interGeo,
+                center: turf.center(geojson).geometry.coordinates
               });
             }
           } catch (e) {
             console.error(e);
+          }
         }
-      }
-    });
+      });
 
       //克里金插值
-    algorithm(orign, attrs);
+      algorithm(orign, attrs);
     })
-    .catch(error => {
+    .catch((error) => {
       message.error('供地数据查询失败');
       console.error(error);
-  });
+    });
 };
 const queryGDByGeoServerFeature1 = (geo) => {
   var cksj = null;
@@ -2213,13 +2334,13 @@ const queryGDByGeoServerFeature1 = (geo) => {
           }
         });
       } else {
-      var origGeo = arcgisToGeoJSON(geo);
-      var center = turf.center(geojson);
-      let pt = center.geometry.coordinates;
-      var interGeo = turf.intersect(origGeo, geojson);
-      if (interGeo) {
-        var area = turf.area(turf.getGeom(interGeo)).toFixed(2);
-        console.log(area);
+        var origGeo = arcgisToGeoJSON(geo);
+        var center = turf.center(geojson);
+        let pt = center.geometry.coordinates;
+        var interGeo = turf.intersect(origGeo, geojson);
+        if (interGeo) {
+          var area = turf.area(turf.getGeom(interGeo)).toFixed(2);
+          console.log(area);
           attrs.push({ area: area, attributes: item.properties, geo: interGeo, center: pt });
         }
       }
@@ -2561,12 +2682,12 @@ const handleAnalysisData = (data) => {
           for (var i = 0; i < item.result.length; i++) {
             var t = item.result[i];
             if (t.unit == 'km') {
-                if (t.center && t.center.indexOf(',') > -1) {
-                  zgdFlag = true;
-                  var pt = [];
-                  pt.push(t.center.split(',')[0]);
-                  pt.push(t.center.split(',')[1]);
-                  attrs.push({ attributes: t, center: pt });
+              if (t.center && t.center.indexOf(',') > -1) {
+                zgdFlag = true;
+                var pt = [];
+                pt.push(t.center.split(',')[0]);
+                pt.push(t.center.split(',')[1]);
+                attrs.push({ attributes: t, center: pt });
               }
             }
           }

BIN
jiaxing/landsite_agent_jx/__pycache__/xuanzhi_query.cpython-310.pyc