|
@@ -51,7 +51,7 @@
|
|
|
<script>
|
|
|
import scjgContent from "../../complianceAnalysis/components/scjgContent.vue";
|
|
|
// import collRecursiveTree from "./collRecursiveTree.vue";
|
|
|
-import { GetFxjg } from "@/api/ghss/hgxfx.js";
|
|
|
+import { getyjjg } from "@/api/stxf/tdzz.js";
|
|
|
|
|
|
import parse from "wellknown";
|
|
|
let dataSourceList = {};
|
|
@@ -76,7 +76,43 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- echarts: [],
|
|
|
+ echarts: [
|
|
|
+ {
|
|
|
+ id: "QHBH",
|
|
|
+ label: "整治前后土地利用结构变化",
|
|
|
+ dataList: [],
|
|
|
+ iseyes: false,
|
|
|
+ isshow: true,
|
|
|
+ scxstyle: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "XZGD",
|
|
|
+ label: "新增耕地",
|
|
|
+ dataList: [],
|
|
|
+ iseyes: false,
|
|
|
+ isshow: true,
|
|
|
+ scxstyle: 3,
|
|
|
+ area: 0,
|
|
|
+ area2: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "SQSX",
|
|
|
+ label: "三线分析",
|
|
|
+ dataList: [],
|
|
|
+
|
|
|
+ iseyes: false,
|
|
|
+ isshow: true,
|
|
|
+ scxstyle: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "GHDK",
|
|
|
+ label: "详细规划分析",
|
|
|
+ dataList: [],
|
|
|
+ iseyes: false,
|
|
|
+ isshow: true,
|
|
|
+ scxstyle: 0,
|
|
|
+ },
|
|
|
+ ],
|
|
|
ruleForm: {
|
|
|
name: "",
|
|
|
xzmj: "",
|
|
@@ -100,65 +136,48 @@ export default {
|
|
|
},
|
|
|
initData() {
|
|
|
console.log("----", this.$props.scjgObj);
|
|
|
- this.echarts = [];
|
|
|
+ // 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.push({
|
|
|
- bsm: "2d3f76707b4949cf9d55fdc2a1e3f36f",
|
|
|
- children: [],
|
|
|
- dataList: [],
|
|
|
- jsf: 0,
|
|
|
- rwbsm: "61581601570e45739bb47737ddf7379b",
|
|
|
- scxbsm: "QHBH",
|
|
|
- scxname: "整治前后土地利用结构变化",
|
|
|
- scxstyle: 2,
|
|
|
+ getyjjg(this.$props.scjgObj.bsm).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let jdData = {
|
|
|
+ legend_data: ["整治前", "整治后", "变化率"],
|
|
|
+ legendmap: [{ type: "bar" }, { type: "bar" }, { type: "line" }],
|
|
|
+ yAxis: [{ name: "面积(m²)" }, { name: "变化面积(m²)" }],
|
|
|
+ // axisLabel:''
|
|
|
+ x_data: [],
|
|
|
+ params: {},
|
|
|
+ region: "",
|
|
|
+ result: [[], [], []],
|
|
|
+ };
|
|
|
+ res.data["3D"].map((ci) => {
|
|
|
+ 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);
|
|
|
});
|
|
|
- res.data.push({
|
|
|
- bsm: "2d3f76707b4949cf9d55fdc2a1e3f36f",
|
|
|
- children: [],
|
|
|
- dataList: [],
|
|
|
- jsf: 0,
|
|
|
- rwbsm: "61581601570e45739bb47737ddf7379b",
|
|
|
- scxbsm: "XZGD",
|
|
|
- scxname: "新增耕地",
|
|
|
- scxstyle: 3,
|
|
|
- area: 20,
|
|
|
- area2: 2,
|
|
|
+ this.setEchart(jdData, "QHBH");
|
|
|
+ res.data.SQSX.map((ci) => {
|
|
|
+ ci.name = ci.yzBsm;
|
|
|
+ ci.value = ci.sumvalue;
|
|
|
+ ci.geom = ci.geomvalue || "";
|
|
|
});
|
|
|
- res.data.forEach((e) => {
|
|
|
- let c = e.dataList || [];
|
|
|
- c.map((ci) => {
|
|
|
- ci.name = ci.yslx_name || ci.scxname;
|
|
|
- // ci.value = this.compute(ci.mj);
|
|
|
- ci.value = ci.mj;
|
|
|
- ci.geom = ci.geom || "";
|
|
|
- // ci.label = ci.mc_name;
|
|
|
- });
|
|
|
- this.echarts.push({
|
|
|
- id: e.scxbsm,
|
|
|
- label: e.scxname,
|
|
|
- dataList: e.dataList,
|
|
|
- lchildren: e.children || [],
|
|
|
- iseyes: false,
|
|
|
- isshow: false,
|
|
|
- scxstyle: e.scxstyle,
|
|
|
- });
|
|
|
- if (e.scxstyle == 0) this.setEchart(c, e.scxbsm);
|
|
|
- else if (e.scxstyle == 2) {
|
|
|
- let jdData = {
|
|
|
- legend_data: ["整治前", "整治后", "变化率"],
|
|
|
- legendmap: [{ type: "bar" }, { type: "bar" }, { type: "line" }],
|
|
|
- x_data: ["-sss-"],
|
|
|
- params: {},
|
|
|
- region: "",
|
|
|
- result: [[10], [1], [10]],
|
|
|
- };
|
|
|
- this.setEchart(jdData, e.scxbsm);
|
|
|
- }
|
|
|
- if (e.children) this.lForEach(e.children, "echart");
|
|
|
+ res.data.GHDK.map((ci) => {
|
|
|
+ ci.name = ci.groupvalue;
|
|
|
+ ci.value = ci.sumvalue;
|
|
|
+ ci.geom = ci.geomvalue || "";
|
|
|
});
|
|
|
+
|
|
|
+ this.echarts[0].dataList = res.data ["3D"];
|
|
|
+ this.echarts[1].dataList = res.data.GHDK;
|
|
|
+ this.echarts[1].area = 20;
|
|
|
+ this.echarts[1].area2 = 0;
|
|
|
+ this.echarts[2].dataList = res.data.SQSX;
|
|
|
+ this.echarts[3].dataList = res.data.GHDK;
|
|
|
+
|
|
|
+ this.setEchart(res.data.SQSX, "SQSX");
|
|
|
+ this.setEchart(res.data.GHDK, "GHDK");
|
|
|
this.$emit("updateParent", "loading", false);
|
|
|
}
|
|
|
});
|
|
@@ -232,6 +251,7 @@ export default {
|
|
|
},
|
|
|
setEchart(data, id, childid) {
|
|
|
this.$nextTick(() => {
|
|
|
+ console.log(id, this.$refs[`contentRef${id}`], "---");
|
|
|
let type = null;
|
|
|
if (!data.legend_data)
|
|
|
type = data.length <= 6 ? "horizontal" : "vertical";
|