Selaa lähdekoodia

土地整治前后对比

maxiaoxiao 6 kuukautta sitten
vanhempi
commit
cdbeeeadf8
1 muutettua tiedostoa jossa 8 lisäystä ja 6 poistoa
  1. 8 6
      src/views/LandConsolidation/components/qhdb.vue

+ 8 - 6
src/views/LandConsolidation/components/qhdb.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="qhdb">
+  <div class="qhdb" v-loading="loading">
     <div class="tdTitle">整治前后土地利用结构对比</div>
     <div class="contrast" @click="contrast">空间对比</div>
     <div class="selectTab">
@@ -21,7 +21,7 @@
         v-model="tab"
         placeholder="请选择"
         :popper-append-to-body="false"
-        @change="Getqhdb"
+        @change="getData"
       >
         <el-option
           v-for="item in options"
@@ -42,12 +42,12 @@
 <script>
 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() {
     return {
+      loading: false,
       jdData: {
         legend_data: ["整治前", "整治后", "变化率"],
         x_data: [],
@@ -85,7 +85,8 @@ export default {
       this.getData();
     },
     getData() {
-      this.$emit("updateParent", "loading", true);
+      this.loading = true;
+      // this.$emit("updateParent", "loading", true);
       if (this.tab1 == 0) {
         this.Getqhdb();
       } else this.Getlinks();
@@ -104,7 +105,7 @@ export default {
           this.jdData.result[2].push(jdData.bhl.toFixed(2));
         });
         this.setEchart(this.jdData, 1);
-        this.$emit("updateParent", "loading", false);
+        this.loading = false;
       });
     },
     Getlinks() {
@@ -129,7 +130,7 @@ export default {
         });
 
         this.setEchart(data, 2, links);
-        this.$emit("updateParent", "loading", false);
+        this.loading = false;
       });
     },
     changeCharts(e) {},
@@ -157,6 +158,7 @@ export default {
     border-radius: 5px;
     padding: 0 5px;
     cursor: pointer;
+    
   }
 
   .selectTab {