|
@@ -32,7 +32,7 @@
|
|
|
v-show="eitem.isshow"
|
|
|
class="echart"
|
|
|
:class="`echart${i}`"
|
|
|
- @echartClick="echartClick"
|
|
|
+ @echartClick="(name, iseyes)=>echartClick(name, iseyes,i)"
|
|
|
:ref="`echartRef`"
|
|
|
></pie>
|
|
|
</div>
|
|
@@ -46,7 +46,18 @@
|
|
|
<script>
|
|
|
import pie from "@/components/echartsTemplate/pie.vue";
|
|
|
import hgxfx from "../../../../static/data/ghss/data.js";
|
|
|
-let colors = ["#62ADED", "#DFE15A", "#6EDC8D"];
|
|
|
+let colors = [
|
|
|
+ "#62ADED",
|
|
|
+ "#DFE15A",
|
|
|
+ "#6EDC8D",
|
|
|
+ "#00A42E",
|
|
|
+ "#F9B447",
|
|
|
+ "#7F4FE5",
|
|
|
+ "#FF6969",
|
|
|
+ "#27CED9",
|
|
|
+ "#DF56F5",
|
|
|
+ "#DCFFAF",
|
|
|
+];
|
|
|
export default {
|
|
|
components: { pie },
|
|
|
props: {
|
|
@@ -63,29 +74,33 @@ export default {
|
|
|
fileList: [],
|
|
|
},
|
|
|
dataSources: {},
|
|
|
+ fileid: 1,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- hgxfx.treeData.forEach((e) => {
|
|
|
- if (e.label == "控制性详细规划") e.label = "详细规划分析";
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ initData(){
|
|
|
+ this.fileid = this.$props.scjgObj.xmmc == '东岸卓越城项目合规性分析'? 1 : 2
|
|
|
+ hgxfx.jgtreeData.forEach((e) => {
|
|
|
+ // if (e.label == "控制性详细规划") e.label = "详细规划分析";
|
|
|
this.echarts.push({ ...e, iseyes: false, isshow: false });
|
|
|
});
|
|
|
this.setEchart1();
|
|
|
this.setEchart2();
|
|
|
// this.setEchart3();
|
|
|
this.setEchart4();
|
|
|
- },
|
|
|
- methods: {
|
|
|
+ },
|
|
|
eyesChaneg(i) {
|
|
|
this.echarts[i].iseyes = !this.echarts[i].iseyes;
|
|
|
- if (i == 0 || i == 2) {
|
|
|
- this.changeDataSources(this.echarts[i]);
|
|
|
- } else {
|
|
|
+ // if (i == 0 || i == 2) {
|
|
|
+ // this.changeDataSources(this.echarts[i]);
|
|
|
+ // } else {
|
|
|
let iseyes = this.echarts[i].iseyes;
|
|
|
this.echarts[i].children.forEach((child, ci) => {
|
|
|
this.changeDataSources({ ...child, iseyes }, colors[ci]);
|
|
|
});
|
|
|
- }
|
|
|
+ // }
|
|
|
// emit("eyesChaneg");
|
|
|
},
|
|
|
changeDataSources({ label, id, iseyes }, color) {
|
|
@@ -93,9 +108,9 @@ export default {
|
|
|
this.dataSources[id].show = iseyes;
|
|
|
} else this.addPolygon(label, id, color);
|
|
|
},
|
|
|
- echartClick(name, iseyes) {
|
|
|
- if (this.echarts[1].iseyes) {
|
|
|
- let click = this.echarts[1].children.filter((c) => c.label == name);
|
|
|
+ echartClick(name, iseyes,index) {
|
|
|
+ if (this.echarts[index].iseyes) {
|
|
|
+ let click = this.echarts[index].children.filter((c) => c.label == name);
|
|
|
if (click.length > 0)
|
|
|
this.changeDataSources({
|
|
|
label: click[0].label,
|
|
@@ -147,7 +162,7 @@ export default {
|
|
|
: Cesium.Color.WHITE;
|
|
|
|
|
|
let polygon = Cesium.GeoJsonDataSource.load(
|
|
|
- `/static/data/ghss/${label}.geojson`,
|
|
|
+ `/static/data/ghss/${ this.fileid}/${id + label}.geojson`,
|
|
|
{
|
|
|
clampToGround: true,
|
|
|
stroke: scolor,
|
|
@@ -190,7 +205,11 @@ export default {
|
|
|
// });
|
|
|
// }
|
|
|
// );
|
|
|
- watch: {},
|
|
|
+ watch: {
|
|
|
+ scjgObj(newValue){
|
|
|
+ this.initData()
|
|
|
+ }
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|