|
@@ -13,7 +13,7 @@
|
|
|
class="height-100-50 max-width"
|
|
|
style="border: 1px solid #e8e8e8"
|
|
|
>
|
|
|
- <!-- {{ xzjgObj }} -->
|
|
|
+ <!-- {{ xzjgObj }} -->
|
|
|
<el-collapse accordion v-model="activeNames">
|
|
|
<el-collapse-item
|
|
|
:name="'gb' + index1"
|
|
@@ -22,7 +22,9 @@
|
|
|
>
|
|
|
<template slot="title">
|
|
|
<!-- 地块编号B_P_123 -->
|
|
|
- 地块编号{{ item1.properties.dkbm }} ({{ item1.properties.ydmj.toFixed(0) }})
|
|
|
+ 地块编号{{ item1.properties.dkbm }} ({{
|
|
|
+ item1.properties.ydmj.toFixed(0)
|
|
|
+ }})
|
|
|
<span class="tools">
|
|
|
<i
|
|
|
class="header-icon el-icon-place"
|
|
@@ -39,7 +41,11 @@
|
|
|
<span>{{ item1.properties.kzxxgydmc }}</span>
|
|
|
<span>{{ item1.properties.ydmj.toFixed(2) }}平方米</span>
|
|
|
</p>
|
|
|
- <p>基准地标价:<span style="color: #02a7f0">77.44万元</span></p>
|
|
|
+ <p>
|
|
|
+ 基准地标价:<span style="color: #02a7f0"
|
|
|
+ >{{ item1.properties.landPrice }}万元</span
|
|
|
+ >
|
|
|
+ </p>
|
|
|
</div>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
@@ -48,7 +54,9 @@
|
|
|
<div class="box-sizing padding-bottom-60" style="height: 35%; width: 100%">
|
|
|
<div class="title height-50 flex-box align-center">
|
|
|
<span class="block-title"
|
|
|
- >备选地块({{ xzjgObj.features ? xzjgObj.features.length : 0 }})</span
|
|
|
+ >备选地块({{
|
|
|
+ xzjgObj.features ? xzjgObj.features.length : 0
|
|
|
+ }})</span
|
|
|
>
|
|
|
</div>
|
|
|
<el-scrollbar
|
|
@@ -63,7 +71,9 @@
|
|
|
>
|
|
|
<template slot="title">
|
|
|
<!-- 地块编号B_P_123 -->
|
|
|
- 地块编号{{ item.properties.dkbm }} ({{ item.properties.ydmj.toFixed(0) }})
|
|
|
+ 地块编号{{ item.properties.dkbm }} ({{
|
|
|
+ item.properties.ydmj.toFixed(0)
|
|
|
+ }})
|
|
|
<span class="tools">
|
|
|
<i class="header-icon el-icon-place" @click="mapview(item)"></i>
|
|
|
<i
|
|
@@ -77,7 +87,11 @@
|
|
|
<span>{{ item.properties.kzxxgydmc }}</span>
|
|
|
<span>{{ item.properties.ydmj.toFixed(2) }}平方米</span>
|
|
|
</p>
|
|
|
- <p>基准地标价:<span style="color: #02a7f0">77.44万元</span></p>
|
|
|
+ <p>
|
|
|
+ 基准地标价:<span style="color: #02a7f0"
|
|
|
+ >{{ item.properties.landPrice }}万元</span
|
|
|
+ >
|
|
|
+ </p>
|
|
|
</div>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
@@ -189,94 +203,36 @@ export default {
|
|
|
zip: "/file/statics/shape/辅助选址报告/6d39b2d4307b46e2a4cf6f8c68a30c31/111_1676448756708.zip",
|
|
|
},
|
|
|
geoJsonEntities: null,
|
|
|
- xzjgObj:ghjgData,
|
|
|
- tempObj:ghjgData,
|
|
|
+ xzjgObj: ghjgData,
|
|
|
+ tempObj: ghjgData,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
console.log(drawData, "drawData", ghjgData);
|
|
|
- this.init_hyqy();
|
|
|
- this.addGeoJson();
|
|
|
+ this.addPolygon("规划结果", "ghjg");
|
|
|
+ this.addPolygon("draw", "draw");
|
|
|
},
|
|
|
methods: {
|
|
|
- addGeoJson() {
|
|
|
- // viewer.dataSources.add(
|
|
|
- // Cesium.GeoJsonDataSource.load("static/data/规划结果.json", {
|
|
|
- // stroke: Cesium.Color.BLUE,
|
|
|
- // fill: Cesium.Color.WHITE.withAlpha(0.3), //注意:颜色必须大写,即不能为blue
|
|
|
- // strokeWidth: 5,
|
|
|
- // })
|
|
|
- // );
|
|
|
-
|
|
|
- // 加载GeoJSON数据
|
|
|
- var geoJsonDataSource = new Cesium.GeoJsonDataSource();
|
|
|
- geoJsonDataSource
|
|
|
- .load("static/data/规划结果.json", {
|
|
|
+ // 加载GeoJSON数据
|
|
|
+ addPolygon(label, id) {
|
|
|
+ let _this = this;
|
|
|
+ let polygon = Cesium.GeoJsonDataSource.load(
|
|
|
+ `static/data/${label}.geojson`,
|
|
|
+ {
|
|
|
+ clampToGround: true,
|
|
|
stroke: Cesium.Color.BLUE,
|
|
|
fill: Cesium.Color.WHITE.withAlpha(0.3), //注意:颜色必须大写,即不能为blue
|
|
|
strokeWidth: 5,
|
|
|
- })
|
|
|
- .then((data) => {
|
|
|
- this.geoJsonEntities = data;
|
|
|
- // 将加载的GeoJSON实体添加到Cesium Viewer
|
|
|
- viewer.dataSources.add(geoJsonDataSource);
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- init_hyqy() {
|
|
|
- const that = this;
|
|
|
- drawData.features.forEach((res) => {
|
|
|
- let obj = {
|
|
|
- type: "cockpit",
|
|
|
- // 'name': res.properties.name,
|
|
|
- // 'centroid': res.properties.centroid,
|
|
|
- // 'adcode': res.properties.adcode,
|
|
|
- name: "ceshi",
|
|
|
- };
|
|
|
- const twoDArray = res.geometry.coordinates[0];
|
|
|
- const oneDArray = twoDArray.reduce(
|
|
|
- (accumulator, currentValue) => accumulator.concat(currentValue),
|
|
|
- []
|
|
|
- );
|
|
|
-
|
|
|
- viewer.entities.add({
|
|
|
- // position: Cesium.Cartesian3.fromDegrees(res.properties.centroid[0], res.properties.centroid[1], 500),
|
|
|
- properties: obj,
|
|
|
- name: "ceshi",
|
|
|
- polygon: {
|
|
|
- // zIndex: 1,
|
|
|
- hierarchy: {
|
|
|
- positions: Cesium.Cartesian3.fromDegreesArray(oneDArray),
|
|
|
- },
|
|
|
- // outline: false,
|
|
|
- // material: Cesium.Color.fromCssColorString('#FF0000'),
|
|
|
- material: Cesium.Color.WHITE.withAlpha(0.3),
|
|
|
- height: 100,
|
|
|
- // extrudedHeight: 350,
|
|
|
- outline: true,
|
|
|
- outlineWidth: 5,
|
|
|
- // outlineColor : Cesium.Color.BLACK
|
|
|
- outlineColor: Cesium.Color.fromCssColorString("#FF0000"),
|
|
|
- },
|
|
|
- });
|
|
|
-
|
|
|
- // 设置视图中心点和高度
|
|
|
- viewer.camera.flyTo({
|
|
|
- destination: Cesium.Cartesian3.fromDegrees(
|
|
|
- 109.431774698027056,
|
|
|
- 18.308104945636849,
|
|
|
- 20000
|
|
|
- ), // 设置中心点经纬度和高度
|
|
|
- // orientation: {
|
|
|
- // heading: Cesium.Math.toRadians(0), // 设置相机的朝向角度
|
|
|
- // pitch: Cesium.Math.toRadians(-90), // 设置相机的俯仰角度
|
|
|
- // roll: 0 // 设置相机的滚动角度
|
|
|
- // },
|
|
|
- duration: 3, // 设置飞行时间,单位为秒
|
|
|
- });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ polygon.then(function (dataSource) {
|
|
|
+ // dataSource.id = id;
|
|
|
+ // 将数据源添加到Cesium Viewer
|
|
|
+ viewer.dataSources.add(dataSource);
|
|
|
+ viewer.zoomTo(dataSource);
|
|
|
+ _this.dataSources[id] = dataSource;
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
addprogramme(e, item) {
|
|
|
e.stopPropagation();
|
|
|
const list = this.bgList.filter((item1) => {
|
|
@@ -311,7 +267,21 @@ export default {
|
|
|
this.bgList = [];
|
|
|
},
|
|
|
mapview(item) {
|
|
|
+ // e.stopPropagation()
|
|
|
console.log(item, "=====");
|
|
|
+ console.log(item.geometry.coordinates[0][0][0][0],'item.geometry.coordinates[0][0]');
|
|
|
+ viewer.camera.flyTo({
|
|
|
+ destination: Cesium.Cartesian3.fromDegrees(
|
|
|
+ item.geometry.coordinates[0][0][0][0],
|
|
|
+ item.geometry.coordinates[0][0][0][1],
|
|
|
+ 15000.0
|
|
|
+ ),
|
|
|
+ orientation: {
|
|
|
+ heading: Cesium.Math.toRadians(20.0),
|
|
|
+ pitch: Cesium.Math.toRadians(-35.0),
|
|
|
+ roll: 0.0,
|
|
|
+ },
|
|
|
+ });
|
|
|
},
|
|
|
submit() {
|
|
|
console.log("生成报告");
|
|
@@ -321,17 +291,19 @@ export default {
|
|
|
window.open(this.model.zip, "_blank");
|
|
|
},
|
|
|
|
|
|
- loadJgMap() {
|
|
|
- },
|
|
|
+ loadJgMap() {},
|
|
|
|
|
|
loadJg(bsm) {
|
|
|
-console.log(bsm,'bsm');
|
|
|
+ console.log(bsm, "bsm");
|
|
|
},
|
|
|
|
|
|
initData() {
|
|
|
this.model = this.rwObj;
|
|
|
this.bgList = this.tempObj.items.filter(
|
|
|
- (item) => !this.xzjgObj.features.some((ele) => ele.properties.dkbm === item.properties.dkbm)
|
|
|
+ (item) =>
|
|
|
+ !this.xzjgObj.features.some(
|
|
|
+ (ele) => ele.properties.dkbm === item.properties.dkbm
|
|
|
+ )
|
|
|
);
|
|
|
this.bgList.sort(function (a, b) {
|
|
|
return parseInt(a.yxfa) - parseInt(b.yxfa);
|
|
@@ -348,11 +320,7 @@ console.log(bsm,'bsm');
|
|
|
},
|
|
|
|
|
|
beforeDestroy() {
|
|
|
-// console.log(888888888,this.geoJsonEntities);
|
|
|
-// // 移除加载的GeoJSON实体
|
|
|
-// // this.geoJsonEntities.forEach((entity) => {
|
|
|
-// viewer.entities.remove(this.geoJsonEntities);
|
|
|
-// // });
|
|
|
+ viewer.dataSources.removeAll();
|
|
|
},
|
|
|
};
|
|
|
</script>
|