Procházet zdrojové kódy

新增下载数据loading

yuanmingze před 1 dnem
rodič
revize
d0b7d11c9b
2 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. binární
      dist.zip
  2. 5 0
      src/views/servicePackageMonitoring/riskEventAudit/index.vue

binární
dist.zip


+ 5 - 0
src/views/servicePackageMonitoring/riskEventAudit/index.vue

@@ -50,6 +50,7 @@
               :type="exportDetailDisabled ? 'info' : 'primary'"
               v-if="exportDetailShow"
               :disabled="exportDetailDisabled"
+              :loading="exportLoading"
               size="small"
               @click="downInfo"
               >{{ exportBtnText }}</el-button
@@ -139,6 +140,7 @@ export default {
   data() {
     return {
       exportDialogVisible: false,
+      exportLoading: false,
       exportUrl: '',
       exportForm: {
         startDate: ''
@@ -491,6 +493,7 @@ export default {
 
     async downInfo() {
       try {
+        this.exportLoading = true;
         // 拼接日期,格式为 年/月
         const dateStr = dayjs().format('YYYY-MM');
         const fileName = `监督任务数据${dateStr}.xlsx`;
@@ -516,8 +519,10 @@ export default {
 
         // 释放内存
         URL.revokeObjectURL(link.href);
+        this.exportLoading = false;
       } catch (err) {
         console.error('下载出错:', err);
+        this.exportLoading = false;
       }
     },
     handleExportDialogClose() {