Parcourir la source

统计页面修改

Guos il y a 1 semaine
Parent
commit
6b2c67e1ca
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      src/views/his/statistics/comprehensiveStatistics.vue

+ 5 - 1
src/views/his/statistics/comprehensiveStatistics.vue

@@ -85,7 +85,7 @@
 
     <!-- 数据表格 -->
     <div class="table-section">
-      <el-table :data="paginatedTableData" border style="width: 100%" height="600">
+      <el-table v-loading="loading" :data="paginatedTableData" border style="width: 100%" height="600">
         <!-- 添加时间列 -->
         <el-table-column prop="statisticsTime" label="统计时间" width="180">
           <template slot-scope="scope">
@@ -156,6 +156,7 @@ import { getStatisticsData, getSearchUserInfo, getSearchCompanyInfo, getSearchDe
 export default {
   data() {
     return {
+      loading: false,
       lastQueryDimension: null, // 记录上次查询的维度
       companyList: [],
       deptList: [], // 原始部门数据
@@ -369,6 +370,7 @@ export default {
     },
 
     fetchStatisticsData() {
+      this.loading = true; // 开始请求时设置 loading 为 true
       // 构造请求参数对象
       const params = {
         dimension: this.queryParams.dimension,
@@ -394,6 +396,8 @@ export default {
       }).catch(error => {
         console.error('统计数据加载失败:', error);
         this.$message.error('统计数据加载失败');
+      }).finally(() => {
+        this.loading = false; // 请求完成后设置 loading 为 false
       });
     },