maxiaoxiao 6 months ago
parent
commit
d1b7c377d0

+ 1 - 1
src/views/LandConsolidation/components/check.vue

@@ -98,7 +98,7 @@ export default {
             addyj({ ...this.ruleForm }).then((res) => {
               if (res.success) {
                 this.$emit("updateParent", "nowObj", this.ruleForm);
-                this.$emit("updateParent", "rzBsm", res.message);
+                this.$emit("updateParent", "rzBsm", res.data);
                 this.reset();
               } else {
                 Message.warning(res.message);

+ 34 - 2
src/views/LandConsolidation/components/config.js

@@ -257,8 +257,6 @@ export const tbInfos = [
     { flag: 'value', value: 'xzgdlyxm', span: 14 },
   ]],
 ]
-
-
 // 新增耕地详情
 export const xzgdInfos = [
   { name: '图斑编号', value: 'tbbh' },
@@ -289,5 +287,39 @@ export const xzgdInfos = [
   { name: '新增耕地来源项目', value: 'xzgdlyxm' },
 ]
 
+export const jslist = [{
+  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,
+},]
 
 

+ 24 - 52
src/views/LandConsolidation/components/fxjg.vue

@@ -33,6 +33,8 @@
           @click="eitem.isshow = !eitem.isshow"
         ></div>
       </div>
+      <div>{{ i == 1 ? eitem : "" }}</div>
+
       <scjgContent
         :ref="`contentRef${eitem.id}`"
         v-show="eitem.isshow"
@@ -52,7 +54,7 @@
 import scjgContent from "../../complianceAnalysis/components/scjgContent.vue";
 // import collRecursiveTree from "./collRecursiveTree.vue";
 import { getyjjg } from "@/api/stxf/tdzz.js";
-
+import {jslist} from "./config.js";
 import parse from "wellknown";
 let dataSourceList = {};
 let colors = [
@@ -76,43 +78,7 @@ export default {
   },
   data() {
     return {
-      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,
-        },
-      ],
+      echarts: [],
       ruleForm: {
         name: "",
         xzmj: "",
@@ -156,26 +122,24 @@ export default {
             jdData.result[0].push(ci.zzq_area);
             jdData.result[1].push(ci.zzh_area);
             jdData.result[2].push(ci.ce_area);
+            // zzh_geom
           });
           this.setEchart(jdData, "QHBH");
           res.data.SQSX.map((ci) => {
             ci.name = ci.yzBsm;
             ci.value = ci.sumvalue;
-            ci.geom = ci.geomvalue || "";
           });
           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.echarts[0].dataList = res.data["3D"];
+          this.echarts[1].dataList = res.data.XZGD || [{}];
+          this.echarts[2].dataList = res.data.SQSX || [];
+          this.echarts[3].dataList = res.data.GHDK || [];
+          this.$set(this, "echarts", this.echarts);
+          // console.log(this., "this.echarts");
           this.setEchart(res.data.SQSX, "SQSX");
           this.setEchart(res.data.GHDK, "GHDK");
           this.$emit("updateParent", "loading", false);
@@ -198,9 +162,10 @@ export default {
       let iseyes = this.echarts[i].iseyes;
       if (this.echarts[i].dataList)
         this.echarts[i].dataList.forEach((child, ci) => {
+          console.log(child, "child");
           this.changeDataSources({ ...child, iseyes }, colors[ci]);
         });
-      this.lForEach(this.echarts[i].lchildren, "sources", iseyes);
+      // this.lForEach(this.echarts[i].lchildren, "sources", iseyes);
       // }
       // emit("eyesChaneg");
     },
@@ -232,14 +197,15 @@ export default {
         }
       });
     },
-    changeDataSources({ geom, id, iseyes, iszoom }, color) {
+    changeDataSources({ geomvalue, id, iseyes, iszoom }, color) {
+      console.log(geomvalue, id, iseyes, iszoom, color);
       if (iszoom) {
-        this.zoomTo(id, geom);
+        this.zoomTo(id, geomvalue);
       } else if (dataSourceList[id]) {
         dataSourceList[id].show = iseyes;
         this.tempdataSourcesId = null;
-      } else if (geom) {
-        this.addPolygon(geom, id, color);
+      } else if (geomvalue) {
+        this.addPolygon(geomvalue, id, color);
       }
     },
     zoomTo(id, geom) {
@@ -322,6 +288,12 @@ export default {
     reset() {
       if (Object.keys(dataSourceList).length) viewer.dataSources.removeAll();
       dataSourceList = {};
+      this.sertlist();
+    },
+    sertlist() {
+      this.echarts = [
+       
+      ];
     },
   },
 

+ 7 - 3
src/views/complianceAnalysis/components/scjgContent.vue

@@ -35,11 +35,15 @@
     <div v-else-if="litem.scxstyle == 3" class="xzgdcontent">
       <div class="item">
         <p>新增耕地地块</p>
-        <span class="cvalue">{{ (litem.area || 0).toFixed(2) }} </span>
+        <span class="cvalue"
+          >{{ (litem.dataList[0].countvalue || 0).toFixed(2) }}
+        </span>
       </div>
       <div class="item">
-        <p>新增耕地面积(平方米</p>
-        <span class="cvalue">{{ (litem.area2 || 0).toFixed(2) }} </span>
+        <p>新增耕地面积(平方米)</p>
+        <span class="cvalue"
+          >{{ (litem.dataList[0].sumvalue || 0).toFixed(2) }}
+        </span>
       </div>
     </div>
   </div>