@@ -51,17 +51,31 @@
-
-
+
+
@@ -70,6 +84,8 @@
@@ -89,7 +105,10 @@ export default {
return {
timeType: 'year',
currentDate: new Date(),
- dataForm: {},
+ dataForm: {
+ sortKey: '',
+ sortValue: ''
+ },
dataList: [],
tableHeight: null
}
@@ -135,6 +154,19 @@ export default {
}
this.getDataList()
},
+ handleSortChange({ prop, order }) {
+ this.dataForm.sortKey = prop
+ this.dataForm.sortValue = order
+ this.getDataList()
+ },
+ handleRefresh() {
+ this.dataForm.sortKey = ''
+ this.dataForm.sortValue = ''
+ this.$nextTick(() => {
+ this.$refs.dataTable.clearSort()
+ })
+ this.getDataList()
+ },
getDataList() {
const dateStr = this.timeType === 'year'
? this.currentDate.getFullYear().toString()
@@ -143,7 +175,9 @@ export default {
url: http.adornUrl('/master/statisticsBusiness/getCourseSaleInfoByCourseLabel'),
method: 'post',
data: http.adornData({
- date: dateStr
+ date: dateStr,
+ sortKey: this.dataForm.sortKey,
+ sortValue: this.dataForm.sortValue
})
}).then(({ data }) => {
if (data && data.code === 0) {
diff --git a/src/views/modules/statisticsBusiness/userStatistics/userStatisticsBase.vue b/src/views/modules/statisticsBusiness/userStatistics/userStatisticsBase.vue
index 835344c..5dc4b3f 100644
--- a/src/views/modules/statisticsBusiness/userStatistics/userStatisticsBase.vue
+++ b/src/views/modules/statisticsBusiness/userStatistics/userStatisticsBase.vue
@@ -21,8 +21,8 @@
-
-
+
+
{{ timePrefix }}登录人数
{{ summary.loginCount }}
@@ -30,7 +30,7 @@
{{ timePrefix }}注册人数
{{ summary.createCount }}
-
+
截止今日 近30天内活跃人数
{{ summary.userCountFor30Day }}
@@ -51,7 +51,7 @@
@@ -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) {