Browse Source

整治预检

maxiaoxiao 6 months ago
parent
commit
3291419f11

+ 36 - 2
src/api/stxf/tdzz.js

@@ -12,6 +12,7 @@ export function getXm(id) {
         method: 'get',
     })
 }
+// 新增耕地
 export function getXzgdlist(params) {
     return request({
         url: `/apply/qytdzz/xzgd/list`,
@@ -47,13 +48,46 @@ export function getXzgdlyx(params) {
         params
     })
 }
+// 整治预检
+export function addyj(data) {
+    return request({
+        url: `/apply/qytdzz/tdzzyj`,
+        method: 'post',
+        data
+    })
+}
+
+export function getyjlist(params) {
+    return request({
+        url: `/apply/qytdzz/tdzzyj/list`,
+        method: 'get',
+        params
+    })
+}
+export function deleteyj(bsm) {
+    return request({
+        url: `/apply/qytdzz/tdzzyj/${bsm}`,
+        method: 'delete',
+    })
+}
+export function getyjjg(bsm) {
+    return request({
+        url: `/apply/qytdzz/tdzzyj/${bsm}`,
+        method: 'get',
+    })
+}
 // export function getXzgdlist(params) {
 //     return request({
-//         url: `/apply/qytdzz/xzgd/list`,
+//         url: `/apply/qytdzz/tdzzyj`,
+//         method: 'get',
+//         params
+//     })
+// } export function getXzgdlist(params) {
+//     return request({
+//         url: `/apply/qytdzz/tdzzyj`,
 //         method: 'get',
 //         params
 //     })
 // }
 
 
-

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

@@ -27,7 +27,7 @@
 </template>
 
 <script>
-import { Add } from "@/api/ghss/hgxfx.js";
+import { addyj } from "@/api/stxf/tdzz.js";
 import { Message, MessageBox } from "element-ui";
 import range from "@/components/mapView/range.vue"; ///mapview/range
 import moment from "moment";
@@ -95,7 +95,7 @@ export default {
             type: "warning",
           }).then(() => {
             this.$emit("updateParent", "loading", true);
-            Add({ ...this.ruleForm }).then((res) => {
+            addyj({ ...this.ruleForm }).then((res) => {
               if (res.success) {
                 this.$emit("updateParent", "nowObj", this.ruleForm);
                 this.$emit("updateParent", "rzBsm", res.message);

+ 76 - 56
src/views/LandConsolidation/components/fxjg.vue

@@ -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";

+ 3 - 1
src/views/LandConsolidation/components/preCheck.vue

@@ -58,11 +58,13 @@ export default {
   methods: {
     changeData(name, updata) {
       this[name] = updata;
+      if (name == "rzBsm" || name == "nowObj")
+        this.$emit("updateParent", name, updata);
     },
   },
   watch: {
     activeTabs(newValue) {
-      console.log("----",newValue)
+      console.log("----", newValue);
       if (newValue != "check") this.$refs.check.reset();
       if (newValue != "lsju") this.$refs.lsju.reset();
       if (newValue != "fxjg") this.$refs.fxjg.reset();

+ 2 - 2
src/views/LandConsolidation/components/xzgd.vue

@@ -71,8 +71,8 @@ export default {
       activeTabs: "gdzl",
       sdata: {},
       sdlist: [
-        { name: "新增耕地面积", prop: "area_number", unit: "公顷" },
-        { name: "新增耕地面积", prop: "area_number", unit: "亩" },
+        { name: "新增耕地面积", prop: "area_number_gq", unit: "公顷" },
+        { name: "新增耕地面积", prop: "area_number_m", unit: "亩" },
         { name: "新增耕地地块数", prop: "count_number", unit: "个" },
       ],
       // tab: 0,

+ 9 - 0
src/views/LandConsolidation/index.vue

@@ -93,6 +93,11 @@
     </div>
     <Details ref="detailModal" @goxzgd="goxzgd"></Details>
     <Contrast ref="contrastModal" v-if="iscontrast"></Contrast>
+    <RzDtails
+      :rzBsm="rzBsm"
+      :rzMc="nowObj.xmmc"
+      @updateParent="changeData"
+    ></RzDtails>
     <!-- <iframe
       v-if="drawer"
       type="module"
@@ -122,6 +127,7 @@ import Xzgd from "./components/xzgd.vue";
 import Details from "./components/details.vue";
 import Contrast from "./components/contrast.vue";
 import { legends } from "./components/config.js";
+import RzDtails from "../complianceAnalysis/components/rzDtails.vue";
 import * as pick_cockpit_vector from "@/components/Query/clickQuery/pick_cockpit_vector.js";
 export default {
   name: "LandConsolidation",
@@ -135,6 +141,7 @@ export default {
     Organize,
     Xzgd,
     Contrast,
+    RzDtails,
   },
   data() {
     return {
@@ -158,6 +165,8 @@ export default {
       activeIndex: 0,
       legends: legends,
       iscontrast: false,
+      rzBsm: "",
+      nowObj: {}, //当前点击对象
     };
   },
   computed: {