maxiaoxiao 8 months ago
parent
commit
a4c112e5ce
1 changed files with 12 additions and 15 deletions
  1. 12 15
      src/views/farmlandProtection/gdzl/index.vue

+ 12 - 15
src/views/farmlandProtection/gdzl/index.vue

@@ -135,7 +135,7 @@
               <div class="text">
               <div class="text">
                 <p>{{ bh.name }}</p>
                 <p>{{ bh.name }}</p>
                 <span class="cvalue">
                 <span class="cvalue">
-                  {{ (bhdata[bh.prop || bhprops[nowunit]] || 0).toFixed(2) }}
+                  {{ (bhdata[bh.prop || uprops[nowunit]] || 0).toFixed(2) }}
                 </span>
                 </span>
                 <span class="unit">{{ unitList[nowunit].unit }}</span>
                 <span class="unit">{{ unitList[nowunit].unit }}</span>
               </div>
               </div>
@@ -206,7 +206,7 @@ export default {
       ],
       ],
       nowyear: "",
       nowyear: "",
       uprops: ["mj_qm", "mj", "mj_m"],
       uprops: ["mj_qm", "mj", "mj_m"],
-      bhprops: ["d1_mj_qm", "d1_mj", "mj_m"],
+      // bhprops: ["d1_mj_qm", "d1_mj", "mj_m"],
       yearList: [],
       yearList: [],
       typeList: [],
       typeList: [],
       tab: "2023",
       tab: "2023",
@@ -410,20 +410,17 @@ export default {
     GetLnbhqk() {
     GetLnbhqk() {
       this.eData.xData = [];
       this.eData.xData = [];
       this.eData.yData = [[]];
       this.eData.yData = [[]];
+      let parms = { year: this.nowyear, xzqhdm: this.region, dlbm: this.dlbm };
       if (!this.$props.pageType) {
       if (!this.$props.pageType) {
-        GetGdLnbhqk({ xzqhdm: this.region, year: this.nowyear }).then(
-          ({ data }) => {
-            this.lnbndata = data;
-            this.setLnbh(data);
-          }
-        );
+        GetGdLnbhqk(parms).then(({ data }) => {
+          this.lnbndata = data;
+          this.setLnbh(data);
+        });
       } else {
       } else {
-        GetYjjbntLnbhqk({ xzqhdm: this.region, year: this.nowyear }).then(
-          ({ data }) => {
-            this.lnbndata = data;
-            this.setLnbh(data);
-          }
-        );
+        GetYjjbntLnbhqk(parms).then(({ data }) => {
+          this.lnbndata = data;
+          this.setLnbh(data);
+        });
       }
       }
     },
     },
     setLnbh(data) {
     setLnbh(data) {
@@ -432,7 +429,7 @@ export default {
       this.eData.yData = [[]];
       this.eData.yData = [[]];
       data.forEach((res) => {
       data.forEach((res) => {
         this.eData.xData.push(res.year);
         this.eData.xData.push(res.year);
-        this.eData.yData[0].push(res[this.bhprops[this.nowunit]]);
+        this.eData.yData[0].push(res[this.uprops[this.nowunit]]);
       });
       });
 
 
       this.setEchart(this.eData, 0);
       this.setEchart(this.eData, 0);