|
@@ -104,7 +104,7 @@ export default {
|
|
|
console.log("----", this.$props.scjgObj);
|
|
|
this.echarts = [];
|
|
|
this.$emit("updateParent", "loading", true);
|
|
|
- this.addPolygon(this.$props.scjgObj.geom, "all", "#ff0000","#ffffff");
|
|
|
+ this.addPolygon(this.$props.scjgObj.geom, "all", "#ff0000", "#ffffff");
|
|
|
getyjjg(this.$props.scjgObj.bsm).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
let jdData = {
|
|
@@ -117,12 +117,27 @@ export default {
|
|
|
region: "",
|
|
|
result: [[], [], []],
|
|
|
};
|
|
|
- res.data["3D"].map((ci) => {
|
|
|
+ res.data["3D"].map((ci, i) => {
|
|
|
jdData.x_data.push(ci.key);
|
|
|
jdData.result[0].push(ci.zzq_area);
|
|
|
jdData.result[1].push(ci.zzh_area);
|
|
|
jdData.result[2].push(ci.ce_area);
|
|
|
// zzh_geom
|
|
|
+ ci.name = ci.key;
|
|
|
+ ci.geoms = [
|
|
|
+ {
|
|
|
+ id: `zzq_${i}`,
|
|
|
+ geomvalue: ci.zzq_geom || "",
|
|
|
+ sc: colors[i],
|
|
|
+ fc: "#186bb8",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: `zzh_${i}`,
|
|
|
+ geomvalue: ci.zzh_geom || "",
|
|
|
+ sc: colors[i],
|
|
|
+ fc: "#4ee1ac",
|
|
|
+ },
|
|
|
+ ];
|
|
|
});
|
|
|
res.data.XZGD.map((ci, i) => {
|
|
|
ci.id = "XZGD" + i;
|
|
@@ -157,7 +172,7 @@ export default {
|
|
|
if (dataSourceList[id]) {
|
|
|
dataSourceList[id].show = this.isshowAll;
|
|
|
} else {
|
|
|
- this.addPolygon(this.$props.scjgObj.geom, "all", "#ff0000","#ffffff");
|
|
|
+ this.addPolygon(this.$props.scjgObj.geom, "all", "#ff0000", "#ffffff");
|
|
|
}
|
|
|
},
|
|
|
eyesChaneg(i) {
|
|
@@ -169,16 +184,9 @@ export default {
|
|
|
if (this.echarts[i].dataList)
|
|
|
this.echarts[i].dataList.forEach((child, ci) => {
|
|
|
if (this.echarts[i].scxstyle == 2) {
|
|
|
- this.changeDataSources(
|
|
|
- { id: `zzq_${ci}`, iseyes, geomvalue: child.zzq_geom },
|
|
|
- colors[ci],
|
|
|
- "#186bb8"
|
|
|
- );
|
|
|
- this.changeDataSources(
|
|
|
- { id: `zzh_${ci}`, iseyes, geomvalue: child.zzh_geom },
|
|
|
- colors[ci],
|
|
|
- "#4ee1ac"
|
|
|
- );
|
|
|
+ let gi = child.geoms;
|
|
|
+ this.changeDataSources({ ...gi[0], iseyes }, colors[ci], gi[0].fc);
|
|
|
+ this.changeDataSources({ ...gi[1], iseyes }, colors[ci], gi[1].fc);
|
|
|
} else this.changeDataSources({ ...child, iseyes }, colors[ci]);
|
|
|
});
|
|
|
// this.lForEach(this.echarts[i].lchildren, "sources", iseyes);
|
|
@@ -214,7 +222,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
changeDataSources({ geomvalue, id, iseyes, iszoom }, color, fcolor) {
|
|
|
- console.log(geomvalue, id, iseyes, iszoom, color);
|
|
|
+ console.log(id, iseyes, iszoom, color, fcolor);
|
|
|
if (iszoom) {
|
|
|
this.zoomTo(id, geomvalue);
|
|
|
} else if (dataSourceList[id]) {
|
|
@@ -233,7 +241,7 @@ export default {
|
|
|
},
|
|
|
setEchart(data, id, childid) {
|
|
|
this.$nextTick(() => {
|
|
|
- console.log(id, this.$refs[`contentRef${id}`], "---");
|
|
|
+ // console.log(id, this.$refs[`contentRef${id}`], "---");
|
|
|
let type = null;
|
|
|
if (!data.legend_data)
|
|
|
type = data.length <= 6 ? "horizontal" : "vertical";
|