Bläddra i källkod

检测图斑城市分布接口联调

maxiaoxiao 5 månader sedan
förälder
incheckning
7c74fd90ca

+ 21 - 1
src/views/farmlandProtection/components/jclxqk.vue

@@ -16,7 +16,7 @@
         placeholder="行政区"
         :props="{ checkStrictly: true, expandTrigger: 'hover' }"
         clearable
-        v-model="xzqTreeValue"
+        v-model="region"
       ></el-cascader>
       <el-select v-model="monitorVal" placeholder="请选择">
         <el-option
@@ -99,12 +99,14 @@
 <script>
 import Statistics from "./statistics";
 import { GetXzqhTree } from "@/api/map";
+import { QueryOne, QueryList } from "@/api/cockpitNew";
 export default {
   components: {
     Statistics,
   },
   data() {
     return {
+      region:'4602',
       xzqTreeData: [], //申请范围
       tab: 1,
       options: [
@@ -202,6 +204,7 @@ export default {
   mounted() {
     this.initEcharts();
     this.getXzqTreeData();
+    this.GetCityList()
   },
   methods: {
     getXzqTreeData() {
@@ -218,6 +221,23 @@ export default {
         }
       });
     },
+    async GetCityList() {
+      this.cityList = [];
+      let flres = await QueryList({
+        jscType: "t_gdbh_jctb_qxfl",
+        id: this.region,
+        val0: "2024-02-17 00:00:00",
+        val1: "2024-12-31 23:59:59",
+      });
+      flres.data.forEach((fl) => {
+        this.cityList.push({
+          name: fl.xzqmc,
+          number: fl.jcgs,
+          area: fl.jcmj,
+          unit: "km²",
+        });
+      });
+    },
     initEcharts(payload) {
       console.log(payload);
       this.myChart = echarts.init(this.$refs.echars_pie);

+ 39 - 40
src/views/farmlandProtection/gdzl/index.vue

@@ -142,6 +142,7 @@ import bar from "@/components/echartsTemplate/bar.vue";
 import Statistics from "../components/statistics.vue";
 import { overview, district, reason } from "@/api/Idleland.js";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
+import { GetJctbDate, DeleteGdbh } from "@/api/ghss/gdbhadd.js";
 import { legends } from "../config.js";
 import { loadGeoJSON } from "@/utils/MapHelper/help.js";
 export default {
@@ -203,44 +204,7 @@ export default {
         yData: [[-10, 10, 10, 10]],
         legend: [""],
       },
-      cityList: [
-        {
-          name: "天涯区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "崖州区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "海棠区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "吉阳区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "吉阳区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "吉阳区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-      ],
+      cityList: [],
     };
   },
   components: {
@@ -249,6 +213,7 @@ export default {
   },
   mounted() {
     this.getYear();
+    this.GetData();
     this.typeList = [{ label: "耕地" }, ...legends];
   },
   methods: {
@@ -263,6 +228,12 @@ export default {
         this.yearList.push({ value: i, label: i + "年" });
       }
     },
+    GetData() {
+      GetJctbDate().then((res) => {
+        this.xzdata = res.data;
+        this.$emit("updateParent", "loading", false);
+      });
+    },
     regionChange(region) {
       this.region = region;
       this.getData();
@@ -271,15 +242,25 @@ export default {
       this.$emit("updateParent", "loading", true);
       this.Getzzxm();
       this.Getxzxx();
-
       this.Getkjxx();
+      this.GetCityList();
     },
     async Getzzxm() {
       let sdres = await QueryOne({
-        jscType: "qytuzz_sdzl_sdqk",
+        jscType: "t_gdbh_jctb_tbzl",
         id: this.region,
+        val0: "2024-02-17 00:00:00",
+        val1: "2024-12-31 23:59:59",
+        val2: "",
       });
       this.sdata = sdres.data;
+      let lxres = await QueryList({
+        jscType: "t_gdbh_jctb_jclx",
+        id: this.region,
+      });
+
+      console.log(lxres, "lx");
+
       let { data } = await QueryList({
         jscType: "jsc_stxf_ywfl_tdzz",
         id: this.region,
@@ -292,6 +273,7 @@ export default {
       });
       this.setEchart(this.eData, 0);
     },
+
     async Getxzxx() {
       let res = await QueryOne({
         jscType: `qytuzz_sdzl_xzxx_${this.tab}`,
@@ -300,6 +282,23 @@ export default {
       this.xzdata = res.data;
       this.$emit("updateParent", "loading", false);
     },
+    async GetCityList() {
+      this.cityList = [];
+      let flres = await QueryList({
+        jscType: "t_gdbh_jctb_qxfl",
+        id: this.region,
+        val0: "2024-02-17 00:00:00",
+        val1: "2024-12-31 23:59:59",
+      });
+      flres.data.forEach((fl) => {
+        this.cityList.push({
+          name: fl.xzqmc,
+          number: fl.jcgs,
+          area: fl.jcmj,
+          unit: "km²",
+        });
+      });
+    },
 
     async Getkjxx() {
       let res = await QueryList({

+ 2 - 4
src/views/farmlandProtection/indexNew.vue

@@ -115,11 +115,9 @@ export default {
       if (val != 0) this.$refs.gdzl.reset();
       if (val == 0) {
         this.$refs.gdzl.regionChange(this.xzqh);
-        this.$refs.qhdb.regionChange(this.xzqh);
-        this.$refs.organize.regionChange(this.xzqh);
       }
-      if (val == 1) this.$refs.list.regionChange(this.xzqh);
-      if (val == 2) this.$refs.xzgd.getData();
+      if (val == 1) this.$refs.gdzl.regionChange(this.xzqh);
+      // if (val == 2) this.$refs.xzgd.getData();
     },
   },
   watch: {