소스 검색

地质灾害预案下载bug、实体上图加查询功能

maxiaoxiao 4 달 전
부모
커밋
6a91c9a721
2개의 변경된 파일23개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      src/views/geologyDisaster/details.vue
  2. 22 2
      src/views/geologyDisaster/index.vue

+ 1 - 1
src/views/geologyDisaster/details.vue

@@ -170,7 +170,7 @@ export default {
     },
     download(row) {
       if (!row.path) {
-        this.$Message.error('应急预案文件路径为空,无法下载!');
+        this.$message.error('应急预案文件路径为空,无法下载!');
         return;
       }
       window.open(`${window.axiosURI}/file/upload/attachment${row.path}`);

+ 22 - 2
src/views/geologyDisaster/index.vue

@@ -36,6 +36,7 @@ import Details from "./details.vue";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
 import { TableHeader } from "./config";
 import { loadGeoJSON, removeGeoJSON, getHight } from "@/utils/MapHelper/help.js";
+import * as pick_cockpit_vector from "@/components/Query/clickQuery/pick_cockpit_vector.js";
 let geoSources = {};
 export default {
   components: {
@@ -69,11 +70,17 @@ export default {
       tempdataLayerId: "",
     };
   },
+  computed: {
+    computed_vectorData() {
+      return store.state.vectorData;
+    },
+  },
   mounted() {
     this.$nextTick(() => {
       this.reset();
       this.getServer()
       // this.searchFun();
+      pick_cockpit_vector.init_handler();
     })
 
 
@@ -94,7 +101,6 @@ export default {
 
     },
     addTerrain(LayerURL) {
-      this.searchFun();
       viewer.terrainProvider = new Cesium.CesiumTerrainProvider({
         url: LayerURL,
         isSct: true,
@@ -104,8 +110,10 @@ export default {
       // this.bus.$emit("setDepthAgainst", true);
       viewer.terrainProvider.readyPromise.then(() => {
         console.error('地形加载成功: ');
+        this.searchFun();
       }).otherwise((error) => {
         console.error('地形加载失败: ', error);
+        this.searchFun();
       });
     },
     hideTerrain() {
@@ -139,6 +147,9 @@ export default {
           loadGeoJSON(geom, "#facd91", { isfly: false, point: 'landslide' }, (data) => {
             geoSources[item.bsm] = data;
             data.name = "dzzh";
+            data.entities.values.forEach((entity) => {
+                entity.properties = {type: "图斑上图",bsm:item.bsm};
+              });
           });
         })
 
@@ -171,6 +182,7 @@ export default {
       removeGeoJSON("dzzh");
       removeGeoJSON("dzzhhig");
       this.hideTerrain()
+      pick_cockpit_vector.clear_data(); //矢量拾取清除
     },
     detail(row) {
       this.$refs.detailModal.handleView(row);
@@ -194,9 +206,17 @@ export default {
         geoSources[oldVal] = null;
       }
     },
+    computed_vectorData(newVal) {
+      newVal.forEach((res) => {
+        if (res.name == "bsm") {
+          this.detail({ bsm: res.value }, false);
+          pick_cockpit_vector.init_handler();
+        }
+      });
+    },
   },
   beforeDestroy() {
-    removeGeoJSON("dzzh");
+    this.reset();
     // removeGeoJSON("dzzhhig");
   },
 };