浏览代码

提交报表导出的loading

Lijy 10 月之前
父节点
当前提交
94b64a039a
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

+ 6 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -217,7 +217,7 @@
       </div>
       <!-- <p :style="ins == 9 ? 'float: right;margin-right: 25px;width:20%' : 'float: right;margin-right: 25px;width:10%'" > -->
       <p :style="`${ins == 9 || ins == 14 || ins == 21 ? 'width: 20%' : 'width: 10%'}`" class="tableRightBtn">
-        <el-button type="primary" @click="exportExcel" size="mini">{{ $t('reporderived') }}</el-button>
+        <el-button type="primary" :loading="exportReportLoading" @click="exportExcel" size="mini">{{ $t('reporderived') }}</el-button>
         <el-button type="primary" @click="fillAll" size="mini" v-if="ins == 14">{{ $t('quanBuBuZu') }}</el-button>
         <el-button type="primary" @click="exportExcelByQuarter" size="mini" v-if="ins == 9 && user.companyId == 876">{{ $t('an-ji-du-dao-chu') }}</el-button>
         <el-button type="primary" @click="setWarning" size="mini" v-if="ins == 21">{{ $t('sheZhiYuJing') }}</el-button>
@@ -1968,7 +1968,8 @@ export default {
       groupConsumptionTimer: null,
       tabsType: 'all',
       tabParams: {},
-      groupTaskKey: 1
+      groupTaskKey: 1,
+      exportReportLoading: false
     };
   },
   computed: {},
@@ -2638,6 +2639,7 @@ export default {
           this.userId ? sl.userId = this.userId : ''
           dept ? sl.deptId = dept : ''
         } else if(this.ins == 24) {
+          this.exportReportLoading = true
           if(this.tabsType == 'all') {
             fName = this.$t('fenZuHaoYongJinDuBiao') + '.xlsx'
             url = "/project/exportGroupExpendProcessList"
@@ -2687,6 +2689,7 @@ export default {
         }
           this.http.post(url, sl,
             res => {
+                this.exportReportLoading = false
                 if (res.code == "ok") {
                     var filePath = res.data;
                     const a = document.createElement('a'); // 创建a标签
@@ -2702,6 +2705,7 @@ export default {
                 }
             },
             error => {
+                this.exportReportLoading = false
                 this.$message({
                     message: error,
                     type: "error"