|
@@ -1,6 +1,16 @@
|
|
|
<template>
|
|
|
<div class="xzjg">
|
|
|
- <div>项目名称:{{ rzMc }}</div>
|
|
|
+ <div>
|
|
|
+ <span class="xmmc">
|
|
|
+ 项目名称:
|
|
|
+ <span class="text">{{ rzMc}}</span>
|
|
|
+ </span>
|
|
|
+ <div
|
|
|
+ class="eicon"
|
|
|
+ :class="isshowAll ? 'eyes' : 'close_eyes'"
|
|
|
+ @click="allChange('all')"
|
|
|
+ ></div>
|
|
|
+ </div>
|
|
|
<div class="box-sizing" style="height: 47%; width: 100%">
|
|
|
<div class="title block-title">
|
|
|
意向地块 ({{ bgList ? bgList.length : 0 }})
|
|
@@ -140,6 +150,7 @@ export default {
|
|
|
tempdataSourcesId: null,
|
|
|
xzjgBSM: "",
|
|
|
itemObj: {},
|
|
|
+ isshowAll: false,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -155,12 +166,20 @@ export default {
|
|
|
this.xzjgObj.dks.forEach((item) => {
|
|
|
this.drawWktPloygon(item.geom, "#0000ff"); //item.dkbm
|
|
|
});
|
|
|
- this.drawWktPloygon(res.data.geom, "#ff0000"); //res.data.bsm
|
|
|
+ this.drawWktPloygon(res.data.geom, "#ff0000", 'all'); //res.data.bsm
|
|
|
} else {
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ allChange(id) {
|
|
|
+ this.isshowAll = !this.isshowAll;
|
|
|
+ if (dataSources[id]) {
|
|
|
+ dataSources[id].show = this.isshowAll;
|
|
|
+ } else {
|
|
|
+ this.loadGeoJSON(parse(this.tempObj.geom), "#ff0000", "all");
|
|
|
+ }
|
|
|
+ },
|
|
|
download() {
|
|
|
let dkIds = [];
|
|
|
if (this.bgList.length) {
|
|
@@ -241,7 +260,8 @@ export default {
|
|
|
|
|
|
// 加载GeoJSON数据
|
|
|
loadGeoJSON(geojson, yanse, id, height) {
|
|
|
- let fcolor = id
|
|
|
+ let fcolor =
|
|
|
+ id && id != "all"
|
|
|
? Cesium.Color.fromCssColorString(yanse)
|
|
|
: Cesium.Color.WHITE;
|
|
|
const dataSource = new Cesium.GeoJsonDataSource();
|
|
@@ -280,9 +300,9 @@ export default {
|
|
|
});
|
|
|
// viewer.zoomTo(data);
|
|
|
if (id) {
|
|
|
- this.tempdataSourcesId = id;
|
|
|
dataSources[id] = data;
|
|
|
}
|
|
|
+ if (id == "all") this.isshowAll = true;
|
|
|
});
|
|
|
},
|
|
|
addprogramme(e, item) {
|
|
@@ -354,8 +374,10 @@ export default {
|
|
|
this.bgList = [];
|
|
|
},
|
|
|
mapview(item) {
|
|
|
- if (!dataSources[item.id])
|
|
|
+ if (!dataSources[item.id]){
|
|
|
this.drawWktPloygon(item.geom, "#ff0000", item.id);
|
|
|
+ this.tempdataSourcesId = id;
|
|
|
+ }
|
|
|
},
|
|
|
pullUp(item, height) {
|
|
|
if (!dataSources[item.id])
|
|
@@ -429,6 +451,11 @@ export default {
|
|
|
box-sizing: border-box;
|
|
|
padding: 0px 10px;
|
|
|
|
|
|
+ .xmmc {
|
|
|
+ width: calc(100% - 60px);
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+
|
|
|
.blue {
|
|
|
color: #409eff;
|
|
|
}
|