Kaynağa Gözat

禅道bug修复

jingshuyong 11 ay önce
ebeveyn
işleme
0b8c3ea68a

+ 19 - 5
src/views/ledgerAssets/boat/components/boat-list.vue

@@ -1,6 +1,11 @@
 <template>
   <div>
-    <boat-search @search="reload" :networkCounts="networkCounts"> </boat-search>
+    <boat-search
+      @search="reload"
+      ref="searchRef"
+      :networkCounts="networkCounts"
+    >
+    </boat-search>
     <!-- 数据表格 -->
     <ele-pro-table
       ref="table"
@@ -30,6 +35,7 @@
           icon="el-icon-download"
           class="ele-btn-icon"
           @click="btnExport"
+          :loading="loading"
         >
           导出
         </el-button>
@@ -272,7 +278,8 @@
             minWidth: 100,
             fixed: 'right'
           }
-        ]
+        ],
+        loading: false
       };
     },
     computed: {
@@ -372,6 +379,7 @@
           categoryLevelId: this.categoryId,
           rootCategoryLevelId: this.rootId
         };
+        this.loading = true;
         // downloadCategory(params, '舟皿台账导出数据');
         axios({
           url: `${API_BASE_URL}/main/asset/page/export`,
@@ -381,9 +389,15 @@
             Authorization: getToken()
           },
           data: params
-        }).then((res) => {
-          download(res.data, '舟皿台账导出数据');
-        });
+        })
+          .then((res) => {
+            this.loading = false;
+            download(res.data, '舟皿台账导出数据');
+            this.$message.success('操作成功');
+          })
+          .catch((err) => {
+             this.loading = false;
+          });
       }
     },
     watch: {