|
@@ -15,9 +15,10 @@
|
|
|
<div class="icon">
|
|
|
<div class="icon_zxkg"></div>
|
|
|
</div>
|
|
|
- <div class="text">
|
|
|
+ <div class="text" @click="draw_vector">
|
|
|
<p>报建数量</p>
|
|
|
<span>{{ left_value == 'csbj' ? sdata.sj_number : 0 }}</span>个
|
|
|
+ <i style="pointer-events:all" :class="{ 'el-icon-view-switch': icon_switch, 'el-icon-view': true }"></i>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="item">
|
|
@@ -39,12 +40,15 @@
|
|
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
import { QueryOne, QueryList } from "../../api/cockpitNew";
|
|
|
import Title from './common/Title.vue';
|
|
|
+import * as wellknown from "wellknown";
|
|
|
|
|
|
export default {
|
|
|
components: { Title },
|
|
|
data() {
|
|
|
return {
|
|
|
sdata: {},
|
|
|
+ icon_switch: false,
|
|
|
+
|
|
|
left_value: 'csbj',
|
|
|
options: [
|
|
|
{ value: "csbj", label: "城市报建" },
|
|
@@ -372,7 +376,70 @@ export default {
|
|
|
};
|
|
|
myChart.setOption(option);
|
|
|
},
|
|
|
+ draw_vector() {
|
|
|
+
|
|
|
+ },
|
|
|
+ draw_vector_tdgy_gy_jd() {
|
|
|
+ this.vector_data.forEach((res) => {
|
|
|
+ console.log('res: ', res);
|
|
|
+ // res.type = '保健项目'
|
|
|
+ if (res.geom) {
|
|
|
+ res.geom.coordinates.forEach((res_coordinates) => {
|
|
|
+ console.log('res_coordinates: ', res_coordinates);
|
|
|
+ // let arrayt = [];
|
|
|
+ // if (res_coordinates.length == 1) {
|
|
|
+ // arrayt = res_coordinates[0]
|
|
|
+ // } else {
|
|
|
+ // arrayt = res_coordinates
|
|
|
+ // }
|
|
|
+
|
|
|
+ // const twoDArray = arrayt;
|
|
|
+ // const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
|
|
|
+
|
|
|
+ // this.bjxu_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'),
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ async init_vector(params) {
|
|
|
+ const that = this;
|
|
|
+ let obj = {
|
|
|
+ jscType: 'jsc_bjxm_csbj_zbmx',
|
|
|
+ beginTime: store.state.cockpit_date[0],
|
|
|
+ endTime: store.state.cockpit_date[1],
|
|
|
+ id: params ? params.id : '4602'
|
|
|
+ };
|
|
|
+ let data = await QueryList(obj);
|
|
|
+ data.data.map((res) => {
|
|
|
+ if (res.geom) {
|
|
|
+ res.geom = wellknown.parse(res.geom.split(";")[1]);
|
|
|
+ }
|
|
|
|
|
|
+ })
|
|
|
+ this.vector_data = data.data;
|
|
|
+
|
|
|
+ this.draw_vector_tdgy_gy_jd();
|
|
|
+ }
|
|
|
},
|
|
|
beforeCreate() { }, //生命周期 - 创建之前
|
|
|
created() { }, //生命周期 - 创建完成(可以访问当前this实例)
|
|
@@ -381,6 +448,13 @@ export default {
|
|
|
this.$nextTick((res) => {
|
|
|
this.init_info()
|
|
|
this.init_bjxm_echart_info();
|
|
|
+
|
|
|
+ this.init_vector();
|
|
|
+
|
|
|
+ this.bjxu_entity = new Cesium.CustomDataSource("bjxu_entity");
|
|
|
+ viewer.dataSources.add(this.bjxu_entity);
|
|
|
+ this.bjxu_entity.show = true
|
|
|
+
|
|
|
})
|
|
|
}, //生命周期 - 挂在完成
|
|
|
beforeUpdate() { }, //生命周期 - 更新之前
|