|
@@ -1,16 +1,21 @@
|
|
|
<template>
|
|
|
<div class="scjg">
|
|
|
- <div>
|
|
|
- <div class="downloadDiv">
|
|
|
+ <div class="downloadDiv">
|
|
|
+ <div>
|
|
|
<span class="xmmc">
|
|
|
项目名称:
|
|
|
<span class="text">{{ scjgObj.xmmc }}</span>
|
|
|
</span>
|
|
|
- <span class="export" @click="download">导出报告</span>
|
|
|
+ <div
|
|
|
+ class="eicon"
|
|
|
+ :class="isshowAll ? 'eyes' : 'close_eyes'"
|
|
|
+ @click="allChange('all')"
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
<div>
|
|
|
分析面积:
|
|
|
<span class="text">{{ compute(scjgObj.fxmj) }}亩</span>
|
|
|
+ <span class="export" @click="download">导出报告</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -88,10 +93,11 @@ export default {
|
|
|
tempdataSourcesId: null,
|
|
|
fileid: 1,
|
|
|
reflist: {},
|
|
|
+ isshowAll: true,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.initData();
|
|
|
+ // this.initData();
|
|
|
},
|
|
|
methods: {
|
|
|
compute(mj) {
|
|
@@ -103,6 +109,7 @@ export default {
|
|
|
initData() {
|
|
|
this.echarts = [];
|
|
|
this.$emit("updateParent", "loading", true);
|
|
|
+ this.addPolygon(this.$props.scjgObj.geom, "all", "#ff0000", true);
|
|
|
GetFxjg({ bsm: this.$props.scjgObj.bsm }).then((res) => {
|
|
|
if (res.success) {
|
|
|
res.data.forEach((e) => {
|
|
@@ -130,6 +137,14 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ allChange(id) {
|
|
|
+ this.isshowAll = !this.isshowAll;
|
|
|
+ if (dataSourceList[id]) {
|
|
|
+ dataSourceList[id].show = this.isshowAll;
|
|
|
+ } else {
|
|
|
+ this.addPolygon(this.$props.scjgObj.geom, "all", "#ff0000", true);
|
|
|
+ }
|
|
|
+ },
|
|
|
eyesChaneg(i) {
|
|
|
this.echarts[i].iseyes = !this.echarts[i].iseyes;
|
|
|
// if (i == 0 || i == 2) {
|
|
@@ -199,16 +214,17 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 加载GeoJSON数据
|
|
|
- addPolygon(geom, id, colors) {
|
|
|
+ addPolygon(geom, id, colors, fillreset) {
|
|
|
let geojson = parse(geom);
|
|
|
let _this = this;
|
|
|
// viewer.entities.removeAll();
|
|
|
let scolor = colors
|
|
|
? Cesium.Color.fromCssColorString(colors)
|
|
|
: Cesium.Color.RED;
|
|
|
- let fcolor = colors
|
|
|
- ? Cesium.Color.fromCssColorString(colors)
|
|
|
- : Cesium.Color.WHITE;
|
|
|
+ let fcolor =
|
|
|
+ colors && !fillreset
|
|
|
+ ? Cesium.Color.fromCssColorString(colors)
|
|
|
+ : Cesium.Color.WHITE;
|
|
|
|
|
|
let polygon = Cesium.GeoJsonDataSource.load(geojson, {
|
|
|
clampToGround: true,
|
|
@@ -279,21 +295,40 @@ export default {
|
|
|
padding-right: 10px;
|
|
|
line-height: 40px;
|
|
|
.downloadDiv {
|
|
|
+ position: relative;
|
|
|
.xmmc {
|
|
|
- width: calc(100% - 120px);
|
|
|
+ width: calc(100% - 60px);
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.export {
|
|
|
- width: 110px;
|
|
|
- height: 32px;
|
|
|
+ width: 95px;
|
|
|
+ height: 28px;
|
|
|
background: #0f7ac8;
|
|
|
text-align: center;
|
|
|
line-height: 32px;
|
|
|
display: inline-block;
|
|
|
+ position: absolute;
|
|
|
+ right: 2px;
|
|
|
+ bottom: 6px;
|
|
|
+ }
|
|
|
+ .text {
|
|
|
+ color: #cddeeb;
|
|
|
}
|
|
|
}
|
|
|
- .text {
|
|
|
- color: #cddeeb;
|
|
|
+
|
|
|
+ .eicon {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin-top: 10px;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ display: inline-block;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .eyes {
|
|
|
+ background-image: url("/static/images/ghzc/eyes.png");
|
|
|
+ }
|
|
|
+ .close_eyes {
|
|
|
+ background-image: url("/static/images/ghzc/close_eyes.png");
|
|
|
}
|
|
|
|
|
|
.echars {
|
|
@@ -311,18 +346,6 @@ export default {
|
|
|
.block-title {
|
|
|
width: calc(100% - 50px);
|
|
|
}
|
|
|
- .eicon {
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
- margin-top: 10px;
|
|
|
- background-size: 100% 100%;
|
|
|
- }
|
|
|
- .eyes {
|
|
|
- background-image: url("/static/images/ghzc/eyes.png");
|
|
|
- }
|
|
|
- .close_eyes {
|
|
|
- background-image: url("/static/images/ghzc/close_eyes.png");
|
|
|
- }
|
|
|
.eshow {
|
|
|
background-image: url("/static/images/ghzc/to_bottom.png");
|
|
|
}
|