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