|
|
@@ -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");
|
|
|
},
|
|
|
};
|