mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
时长天数排行榜区分当前和累计
This commit is contained in:
@@ -117,6 +117,7 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="total">累计</el-dropdown-item>
|
||||
<el-dropdown-item command="now">当前</el-dropdown-item>
|
||||
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
|
||||
<el-dropdown-item command="months">本月</el-dropdown-item>
|
||||
<el-dropdown-item command="years">本年</el-dropdown-item> -->
|
||||
@@ -126,10 +127,10 @@
|
||||
</div>
|
||||
<div class="myselftext">
|
||||
<div class="myranking">
|
||||
当前排名 : <span> {{learningDurationTotalData.rankNo}}</span>
|
||||
{{isStudyTime ? '当前' : '累计'}}排名 : <span> {{learningDurationTotalData.rankNo}}</span>
|
||||
</div>
|
||||
<div class="myexperience">
|
||||
累计学习时长: <span> {{formatSecondToHour(learningDurationTotalData.rankValue)}}</span> h
|
||||
{{isStudyTime ? '当前' : '累计'}}学习时长: <span> {{formatSecondToHour(learningDurationTotalData.rankValue)}}</span> h
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-table" style="margin-top:20px;">
|
||||
@@ -205,6 +206,7 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="total">累计</el-dropdown-item>
|
||||
<el-dropdown-item command="now">当前</el-dropdown-item>
|
||||
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
|
||||
<el-dropdown-item command="months">本月</el-dropdown-item>
|
||||
<el-dropdown-item command="years">本年</el-dropdown-item> -->
|
||||
@@ -214,10 +216,10 @@
|
||||
</div>
|
||||
<div class="myselftext">
|
||||
<div class="myranking">
|
||||
当前排名 : <span> {{learningDaysTotalData.rankNo}}</span>
|
||||
{{isStudyDay ? '当前' : '累计'}}排名 : <span> {{learningDaysTotalData.rankNo}}</span>
|
||||
</div>
|
||||
<div class="myexperience">
|
||||
累计学习天数 : <span>{{learningDaysTotalData.rankValue}}</span>
|
||||
{{isStudyDay ? '当前' : '累计'}}学习天数 : <span>{{learningDaysTotalData.rankValue}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-table" style="margin-top:20px;">
|
||||
@@ -343,6 +345,8 @@ export default {
|
||||
list:[],
|
||||
},
|
||||
isNow: false,
|
||||
isStudyTime: false,
|
||||
isStudyDay: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -361,12 +365,14 @@ export default {
|
||||
},
|
||||
// 学习时长(下拉框事件)
|
||||
durationCommand(e) {
|
||||
this.isStudyTime = false
|
||||
this.learningDuration.field = e;
|
||||
this.learningDuration.name = this.translate(e)
|
||||
this.getDuration();
|
||||
},
|
||||
// 学习天数(下拉框事件)
|
||||
daysCommand(e) {
|
||||
this.isStudyDay = false
|
||||
this.learningDays.field = e;
|
||||
this.learningDays.name = this.translate(e)
|
||||
this.getDays();
|
||||
@@ -427,6 +433,12 @@ export default {
|
||||
field:this.learningDuration.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||
num:5,// #显示的条数
|
||||
}
|
||||
if(data.field == 'now'){
|
||||
data.statType = 12
|
||||
data.field = 'total'
|
||||
this.experience.field = 'total'
|
||||
this.isStudyTime = true
|
||||
}
|
||||
apiStat.getRanking(data).then(res=>{
|
||||
if(res.status==200){
|
||||
if(res.result.currentUserRankingData) {
|
||||
@@ -470,6 +482,12 @@ export default {
|
||||
field:this.learningDays.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||
num:5,// #显示的条数
|
||||
}
|
||||
if(data.field == 'now'){
|
||||
data.statType = 13
|
||||
data.field = 'total'
|
||||
this.experience.field = 'total'
|
||||
this.isStudyDay = true
|
||||
}
|
||||
apiStat.getRanking(data).then(res=>{
|
||||
if(res.status==200){
|
||||
if(res.result.currentUserRankingData) {
|
||||
|
||||
Reference in New Issue
Block a user