Browse Source

找图找数前端

liutao 2 months ago
parent
commit
a3c09bad8f

+ 32 - 34
web_ui/src/views/industrial-land/AiIndustriaLandDetail.vue

@@ -541,33 +541,34 @@ export default {
 
       // this.showResult = true;
       // this.showQuery = true;
-      // this.xgdk = [
-      //   {
-      //     id: 1839,
-      //   },
-      //   {
-      //     id: 1843,
-      //   },
-      //   {
-      //     id: 1845,
-      //   },
-      // ];
       // // this.xgdk = [
       // //   {
-      // //     id: 7685,
+      // //     id: 1839,
       // //   },
       // //   {
-      // //     id: 37091,
+      // //     id: 1843,
       // //   },
       // //   {
-      // //     id: 40175,
+      // //     id: 1845,
       // //   },
       // // ];
+      // this.xgdk = [
+      //   {
+      //     id: 7685,
+      //   },
+      //   {
+      //     id: 37091,
+      //   },
+      //   {
+      //     id: 40175,
+      //   },
+      // ];
       // let that = this;
       // this.getDetailByIdList(this.xgdk, (data) => {
       //   this.xgdk = data;
+      //   this.addGdLayer(this.xgdk);
       // });
-      // this.addGdLayer(this.xgdk);
+
       // this.detailData = {
       //   id: 48668,
       //   dkid: "1895353609416212480",
@@ -624,23 +625,13 @@ export default {
         this.map.removeLayer(this.geoLayer);
         this.geoLayer = null;
       }
-      let that = this;
-      if (dklist && dklist.length) {
-        let idGroup = dklist.map((item) => item.id);
-        let sql = "(" + idGroup.join(",") + ")";
-        let queryGeometryUrl = window.ApplicationConfig.queryGeometryListUrl;
-        axios.get(queryGeometryUrl, { params: { items: sql } }).then((data) => {
-          if (data && data.data && data.data.length) {
-            let geojsonList = data.data.map((ele) => JSON.parse(ele.geom));
-            that.geoLayer = L.geoJSON(geojsonList, {
-              style: function (feature) {
-                return { color: "blue" };
-              },
-            });
-            that.geoLayer.addTo(that.map);
-          }
-        });
-      }
+      let geojsonList = dklist.map((ele) => wkt.parse(ele.geom));
+      this.geoLayer = L.geoJSON(geojsonList, {
+        style: function (feature) {
+          return { color: "blue" };
+        },
+      });
+      this.geoLayer.addTo(this.map);
     },
     toggleLayerControl() {
       this.showLayerControl = !this.showLayerControl;
@@ -1143,6 +1134,7 @@ export default {
               tdyt: ele.tdyt,
               dkmj: ele.dkmj.toFixed(2),
               center_wkt: ele.center_wkt,
+              geom: ele.geom,
               wzxx: "",
             };
             if (ele.center_wkt) {
@@ -1170,6 +1162,7 @@ export default {
               tdyt: `${ele.ydxz}(${ele.yddm})`,
               dkmj: (ele.pfmarea * 0.0015).toFixed(2),
               center_wkt: ele.center_wkt,
+              geom: ele.geom,
               wzxx: "",
             };
             let geojson = wkt.parse(ele.center_wkt);
@@ -1196,7 +1189,7 @@ export default {
       );
       let tlPromiseList = this.sendQueryList(["高铁"], unit, point);
       let gkPromiseList = this.sendQueryList(["港口"], unit, point);
-      let jcPromiseList = this.sendQueryList(["机场"], unit, point);
+      let jcPromiseList = this.sendQueryList(["国际机场"], unit, point);
       let gjPromiseList = this.sendQueryList(["公交站"], unit, point);
       let addressMsgList = [];
       Promise.all(gsPromiseList).then(function (posts) {
@@ -1323,6 +1316,11 @@ export default {
           (String(b.distance).indexOf("k") > -1 ? 1000 : 1);
         return distance - distance1;
       });
+      if ("高速" == type) {
+        featureResultsList.filter(
+          (item) => item.name != "出口" && item.name != "入口"
+        );
+      }
       return `距${type}(${featureResultsList[0].name})${featureResultsList[0].distance}`;
     },
     locationByGeojson(geojson, name) {
@@ -1959,7 +1957,7 @@ export default {
 
                   T.getDetailByIdList(dk, (data) => {
                     T.clearMark();
-                    // T.addGdLayer(data);
+                    T.addGdLayer(data);
                     T.xgdk = data;
                     T.showXgdkCenterPoint();
                     //todo 展开

+ 2 - 2
web_ui/src/views/znzt-land/AiZtzsDetail.vue

@@ -197,7 +197,7 @@
                     <div class="number">{{ i + 1 }}</div>
                     <div class="content">
                       <h3>
-                        {{ citem.name }}
+                        {{ citem.name }}|{{citem.id}}
                       </h3>
                       <p>
                         <span class="content-item"
@@ -2744,7 +2744,7 @@ export default {
   padding: 10px;
   background-color: #f8f9fd;
   border-radius: 8px;
-
+  cursor:pointer;
   .number {
     width: 30px;
     height: 30px;