Browse Source

清单详情跳转图斑取消聚焦视角到箭头位置

maxiaoxiao 1 week ago
parent
commit
a9e7f3bea0

+ 1 - 1
src/views/farmlandProtection/components/hcxx.vue

@@ -213,7 +213,7 @@ export default {
       // });
       // });
 
 
       // 聚焦视角到箭头位置
       // 聚焦视角到箭头位置
-      viewer.zoomTo(arrowEntity);
+      // viewer.zoomTo(arrowEntity);
     },
     },
     ceshi(id, evtName) {
     ceshi(id, evtName) {
       let aaa = viewer.entities.getById("jt" + id);
       let aaa = viewer.entities.getById("jt" + id);

+ 14 - 1
src/views/farmlandProtection/components/tbqd.vue

@@ -140,7 +140,7 @@ import * as wellknown from "wellknown";
 import * as turf from "@turf/turf";
 import * as turf from "@turf/turf";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
 import { loadGeoJSON } from "@/utils/MapHelper/help.js";
 import { loadGeoJSON } from "@/utils/MapHelper/help.js";
-import { JctbList, getJctbInfo } from "@/api/ghss/jctb.js";
+import { JctbList, envelope, getJctbInfo } from "@/api/ghss/jctb.js";
 let layerSources = {};
 let layerSources = {};
 export default {
 export default {
   props: {
   props: {
@@ -185,6 +185,18 @@ export default {
       JctbList(obj).then((res) => {
       JctbList(obj).then((res) => {
         this.tableData = res.rows;
         this.tableData = res.rows;
         this.total = res.total;
         this.total = res.total;
+        let ewkt = [];
+        res.rows.forEach((item) => {
+          ewkt.push(item.geom);
+          if (item.geom) loadGeoJSON(item.geom, "#55A1E3", {});
+        });
+        envelope({ ewkt }).then((res) => {
+          loadGeoJSON(res.data, "#55A1E3", {
+            isfly: true,
+            fill_a: 0.01,
+            sw: 0.001,
+          });
+        });
       });
       });
     },
     },
     handleClick(item) {
     handleClick(item) {
@@ -210,6 +222,7 @@ export default {
       }
       }
     },
     },
     handleDetails(row) {
     handleDetails(row) {
+      this.handleClick(row);
       this.$emit("updateParent", "isShowTb", true);
       this.$emit("updateParent", "isShowTb", true);
       getJctbInfo(row.id).then((res) => {
       getJctbInfo(row.id).then((res) => {
         if (res.code == 200) {
         if (res.code == 200) {