소스 검색

前后对比

maxiaoxiao 6 달 전
부모
커밋
42737c5141
3개의 변경된 파일39개의 추가작업 그리고 29개의 파일을 삭제
  1. 19 13
      src/views/LandConsolidation/components/qhdb.vue
  2. 11 9
      src/views/LandConsolidation/components/sdgk.vue
  3. 9 7
      src/views/LandConsolidation/index.vue

+ 19 - 13
src/views/LandConsolidation/components/qhdb.vue

@@ -43,6 +43,7 @@
 import barAndLine from "@/views/cockpit/common/ThreeStackedBarAndLine.vue";
 import sankey from "@/components/echartsTemplate/sankey.vue";
 import { district } from "@/api/Idleland.js";
+import { QueryList } from "@/api/cockpitNew";
 export default {
   props: {},
   data() {
@@ -50,7 +51,8 @@ export default {
       jdData: {
         legend_data: ["整治前", "整治后", "变化率"],
         x_data: [],
-        // legendmap: [{ type: "bar" }, { type: "bar" }, { type: "line" }],
+        yAxis: [{ name: "面积(公顷)" }, { name: "变化率(%)" }],
+        legendmap: [{ type: "bar" }, { type: "bar" }, { type: "line" }],
         params: {},
         region: "",
       },
@@ -86,19 +88,20 @@ export default {
     },
     getData() {
       this.$emit("updateParent", "loading", true);
-      this.params = { districtCode: this.region };
-      this.GetDistrict();
+      this.Getqhdb();
     },
-    GetDistrict() {
+    Getqhdb() {
       this.jdData.x_data = [];
-      this.jdData.result = [[], [], [], []];
-      district(this.params).then((res) => {
+      this.jdData.result = [[], [], []];
+      QueryList({
+        jscType: "qytuzz_sdzl_tdlyqhdb_dlbh_sd",
+        id: this.region,
+      }).then((res) => {
         res.data.forEach((jdData) => {
-          this.jdData.x_data.push(jdData.districtName);
-          this.jdData.result[0].push(jdData.confirmAre.toFixed(2));
-          this.jdData.result[1].push(jdData.disposalArea.toFixed(2));
-          this.jdData.result[2].push((jdData.idleRate * 100).toFixed(2));
-          // this.jdData.result[3].push((jdData.disposalRate * 100).toFixed(2));
+          this.jdData.x_data.push(jdData.dlbmmc);
+          this.jdData.result[0].push(jdData.qtbdlmj.toFixed(2));
+          this.jdData.result[1].push(jdData.htbdlmj.toFixed(2));
+          this.jdData.result[2].push((jdData.bhl * 100).toFixed(2));
         });
         this.setEchart(this.jdData, 1);
         this.$emit("updateParent", "loading", false);
@@ -176,9 +179,12 @@ export default {
       background-size: 100% 100%;
     }
   }
-
+}
+</style>
+<style lang="scss" scoped>
+.qhdb {
   .echart {
-    width: 800px !important;
+    width: 810px !important;
     height: 260px !important;
   }
 }

+ 11 - 9
src/views/LandConsolidation/components/sdgk.vue

@@ -14,7 +14,7 @@
       <div class="echartTitle">
         <div class="block-title">整治项目</div>
       </div>
-      <pie unit="" class="pie_echart" ref="echartRef0"></pie>
+      <pie unit="" class="pie_echart" ref="echartRef0"></pie>
     </div>
     <div class="echars">
       <div class="echartTitle">
@@ -146,18 +146,20 @@ export default {
         id: this.region,
       });
       this.sdata = sdres.data;
-      let res = await QueryList({
+      let { data } = await QueryList({
         jscType: "jsc_stxf_ywfl_tdzz",
         id: this.region,
       });
-      let arr = [];
-      res.data.forEach((res) => {
-        arr.push({
-          name: res.zzlx,
-          value: res.xmsl,
-        });
+      let num = 0;
+      data.forEach((res) => {
+        res.name = res.zzlx;
+        res.value = res.xmsl;
+        num += res.xmsl;
       });
-      this.setEchart({ data: arr, type: '"horizontal"',title:{text:'整治项目',num:15} }, 0);
+      this.setEchart(
+        { data, type: '"horizontal"', title: { text: "整治项目", num } },
+        0
+      );
     },
     async Getxzxx() {
       let res = await QueryOne({

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

@@ -170,16 +170,18 @@ export default {
     },
     onClick(val) {
       this.activeIndex = val;
+      if (val != 0) this.$refs.sdgk.reset();
+      if (val == 0) {
+        this.$refs.sdgk.getData();
+        this.$refs.qhdb.getData();
+      }
+      // if (val == 1) this.$refs.qhdb.changeForm();
+      // if (val == 1) this.$refs.list.searchFun();
+      if (val == 2) this.$refs.xzgd.getData();
     },
   },
   watch: {
-    activeIndex(newValue) {
-      if (newValue != 0) this.$refs.sdgk.reset();
-      if (newValue == 0) this.$refs.sdgk.getData();
-      // if (newValue == "qhdb") this.$refs.qhdb.changeForm();
-      // if (newValue == 1) this.$refs.list.searchFun();
-      if (newValue == 2) this.$refs.xzgd.getData();
-    },
+    // activeIndex(val) {},
     computed_vectorData(newVal) {
       console.log(newVal, "newVal");
       newVal.forEach((res) => {