|
@@ -134,7 +134,7 @@ import pie3d from "../../components/echartsTemplate/3dPie.vue";
|
|
|
import DialWatch from './common/DialWatch.vue';
|
|
|
import Graph3D from './common/Graph3D.vue';
|
|
|
import parse from "wellknown";
|
|
|
-
|
|
|
+import * as tdsy from "./js/tdsy";
|
|
|
export default {
|
|
|
components: { pie3d, DialWatch, Graph3D },
|
|
|
data() {
|
|
@@ -845,39 +845,52 @@ export default {
|
|
|
let arrayt = [];
|
|
|
if (res_coordinates.length == 1) {
|
|
|
arrayt = res_coordinates[0]
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
arrayt = res_coordinates
|
|
|
}
|
|
|
|
|
|
const twoDArray = arrayt;
|
|
|
const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
|
|
|
|
|
|
- this.gy_jd_entity.entities.add({
|
|
|
- // position: Cesium.Cartesian3.fromDegrees(res_coordinates[0], res_coordinates[1], 0),
|
|
|
- properties: res,
|
|
|
- name: "国有建设用地完成项目",
|
|
|
- polygon: {
|
|
|
- zIndex: 1,
|
|
|
- hierarchy: {
|
|
|
- positions: Cesium.Cartesian3.fromDegreesArrayHeights(oneDArray),
|
|
|
- },
|
|
|
- // outline: false,
|
|
|
- // material: Cesium.Color.fromCssColorString(xzqh_color),
|
|
|
-
|
|
|
- height: 5,
|
|
|
- extrudedHeight: 0,
|
|
|
- outline: true,
|
|
|
- // outlineColor : Cesium.Color.BLACK
|
|
|
- outlineColor: Cesium.Color.fromCssColorString('#55A1E3'),
|
|
|
- }
|
|
|
- })
|
|
|
+ // this.gy_jd_entity.entities.add({
|
|
|
+ // // position: Cesium.Cartesian3.fromDegrees(res_coordinates[0], res_coordinates[1], 0),
|
|
|
+ // properties: res,
|
|
|
+ // name: "国有建设用地完成项目",
|
|
|
+ // polygon: {
|
|
|
+ // zIndex: 1,
|
|
|
+ // hierarchy: {
|
|
|
+ // positions: Cesium.Cartesian3.fromDegreesArrayHeights(oneDArray),
|
|
|
+ // },
|
|
|
+ // // outline: false,
|
|
|
+ // // material: Cesium.Color.fromCssColorString(xzqh_color),
|
|
|
+
|
|
|
+ // height: 5,
|
|
|
+ // extrudedHeight: 0,
|
|
|
+ // outline: true,
|
|
|
+ // // outlineColor : Cesium.Color.BLACK
|
|
|
+ // outlineColor: Cesium.Color.fromCssColorString('#55A1E3'),
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+
|
|
|
+ tdsy.add(res, oneDArray);
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
switch_vector_tdgy_gy_jd(flag) {
|
|
|
- this.gy_jd_entity.show = flag
|
|
|
- console.log('flag: ', flag);
|
|
|
+ // this.gy_jd_entity.show = flag
|
|
|
+ // console.log('flag: ', flag);
|
|
|
+
|
|
|
+ tdsy.hidden(flag);
|
|
|
+ // if (flag) {
|
|
|
+ // tdsy.add();
|
|
|
+ // this.draw_vector_tdgy_gy_jd();
|
|
|
+
|
|
|
+ // } else {
|
|
|
+ // tdsy.hidden(false);
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
},
|
|
|
async init_vector(params) {
|
|
|
const that = this;
|
|
@@ -893,8 +906,7 @@ export default {
|
|
|
|
|
|
})
|
|
|
this.vector_data = data.data;
|
|
|
-
|
|
|
- this.draw_vector_tdgy_gy_jd();
|
|
|
+ this.draw_vector_tdgy_gy_jd()
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -913,9 +925,12 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
- this.gy_jd_entity = new Cesium.CustomDataSource("gy_jd_entity");
|
|
|
- viewer.dataSources.add(this.gy_jd_entity);
|
|
|
- this.gy_jd_entity.show = false
|
|
|
+ // this.gy_jd_entity = new Cesium.CustomDataSource("gy_jd_entity");
|
|
|
+ // viewer.dataSources.add(this.gy_jd_entity);
|
|
|
+ // this.gy_jd_entity.show = false
|
|
|
+
|
|
|
+ tdsy.init(viewer);
|
|
|
+
|
|
|
|
|
|
});
|
|
|
},
|