Przeglądaj źródła

检测类型情况数据筛选

lkk 5 miesięcy temu
rodzic
commit
2121e8d8eb
1 zmienionych plików z 10 dodań i 2 usunięć
  1. 10 2
      src/views/farmlandProtection/components/jclxqk.vue

+ 10 - 2
src/views/farmlandProtection/components/jclxqk.vue

@@ -81,7 +81,7 @@
             v-model="tab"
             placeholder="请选择"
             :popper-append-to-body="true"
-            @change="GetInfo()"
+            @change="GetInfo"
           >
             <el-option
               v-for="item in options"
@@ -156,6 +156,10 @@ export default {
     this.getData();
   },
   methods: {
+    GetInfo(val) {
+      this.tab = val;
+      this.initEcharts()
+    },
     regionChange(region) {
       if (region.length && region.length > 1) {
         this.region = region[1];
@@ -256,7 +260,11 @@ export default {
       if (jclxres.data.length) {
         jclxres.data.forEach((item) => {
           names.push(item.dict_value);
-          values.push(item.jcmj);
+          if (this.tab == 1) {
+            values.push(item.jcgs)
+          } else {
+            values.push(item.jcmj);
+          }
         });
       }
       let option = {