feat(统计业务): 课程统计添加排序;用户统计修改数据卡片显示;

- 更新课程统计和标签统计页面,添加自定义排序功能
- 实现刷新按钮,重置排序状态并重新获取数据
- 优化数据请求,支持排序参数的传递
- 更新用户统计页面,调整显示逻辑以提升用户体验
This commit is contained in:
2026-04-09 16:52:36 +08:00
parent 3e1b8917a8
commit b71a4464e7
3 changed files with 78 additions and 17 deletions

View File

@@ -21,8 +21,8 @@
</el-form>
</div>
<div class="summary-section">
<div class="summary-card">
<div v-if="mode !== 'null'" class="summary-section">
<div v-if="showLoginAnd30DaySummary" class="summary-card">
<div class="summary-card__label">{{ timePrefix }}登录人数</div>
<div class="summary-card__value">{{ summary.loginCount }}</div>
</div>
@@ -30,7 +30,7 @@
<div class="summary-card__label">{{ timePrefix }}注册人数</div>
<div class="summary-card__value">{{ summary.createCount }}</div>
</div>
<div class="summary-card">
<div v-if="showLoginAnd30DaySummary" class="summary-card">
<div class="summary-card__label">截止今日 近30天内活跃人数</div>
<div class="summary-card__value">{{ summary.userCountFor30Day }}</div>
</div>
@@ -51,7 +51,7 @@
<el-table
:data="tableData"
border
:height="mode !== 'null' ? 470 : 520"
:height="mode !== 'null' ? 470 : 640"
:header-cell-style="{ textAlign: 'center', padding: '6px 0' }"
:cell-style="{ textAlign: 'center', padding: '6px 0' }"
>
@@ -172,11 +172,14 @@ export default {
return this.displayFormat
},
timePrefix() {
// if (this.mode === 'day') return '当日'
// if (this.mode === 'month') return '当月'
// if (this.mode === 'year') return '当年'
if (this.mode === 'day') return '当日'
if (this.mode === 'month') return '当月'
if (this.mode === 'year') return '当年'
return '当日'
},
showLoginAnd30DaySummary() {
return this.mode === 'day'
},
pickerOptions() {
return {
disabledDate(time) {