mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
经验值排名修改
This commit is contained in:
@@ -30,9 +30,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bar">
|
||||
<h6> {{current.total}}/{{current.endValue}}</h6>
|
||||
<h6> {{experience.data.total || experience.data.months || experience.data.years || experience.data.weeks}}/{{current.endValue}}</h6>
|
||||
<div class="exp-barbox">
|
||||
<el-progress :percentage="current.total*100/current.endValue" color="#387DF7"></el-progress>
|
||||
<el-progress :percentage="experience.data.total*100/current.endValue
|
||||
|| experience.data.months*100/current.endValue
|
||||
|| experience.data.years*100/current.endValue
|
||||
|| experience.data.weeks*100/current.endValue" color="#387DF7"></el-progress>
|
||||
</div>
|
||||
<div class="exp-barname">
|
||||
<span>{{current.start}}</span>
|
||||
@@ -43,8 +46,7 @@
|
||||
<div class="table-hear">
|
||||
<div style="margin-left:5px">排名</div>
|
||||
<div style="margin-left:5px">姓名</div>
|
||||
<div class="bm">学习时长</div>
|
||||
<!-- <div class="jy">经验值</div> -->
|
||||
<div class="bm">经验值</div>
|
||||
</div>
|
||||
<div style="height:450px;overflow-y:auto">
|
||||
<div class="table-hear" style="margin-top:40px;border-bottom: 1px solid #ddd;padding-bottom:20px" v-for="(ran,index) in experience.list" :key="ran.id">
|
||||
@@ -63,7 +65,10 @@
|
||||
|
||||
</div>
|
||||
<div class="jy tab-jy">
|
||||
<div style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.total}}</div>
|
||||
<div v-if="experience.field == 'total'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.total}}</div>
|
||||
<div v-if="experience.field == 'months'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.months}}</div>
|
||||
<div v-if="experience.field == 'years'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.years}}</div>
|
||||
<div v-if="experience.field == 'weeks'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.weeks}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -330,17 +335,15 @@ export default {
|
||||
if(res.result.currentUserRankingData.months == undefined){res.result.currentUserRankingData.months = 0;}
|
||||
if(res.result.currentUserRankingData.years == undefined){res.result.currentUserRankingData.years = 0;}
|
||||
this.experience.data = res.result.currentUserRankingData;
|
||||
|
||||
if(res.result.currentUserRankingData.total>=0) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.total);
|
||||
}
|
||||
if(res.result.currentUserRankingData.weeks>=0) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.weeks);
|
||||
}
|
||||
if(res.result.currentUserRankingData.months>=0) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.months);
|
||||
}
|
||||
if(res.result.currentUserRankingData.years>=0) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.years);
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.total);
|
||||
}else if(
|
||||
res.result.currentUserRankingData.weeks>=0) {this.current = this.experienceValue(res.result.currentUserRankingData.weeks);
|
||||
}else if(res.result.currentUserRankingData.months>=0) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.months);
|
||||
}else if(res.result.currentUserRankingData.years>=0) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.years);
|
||||
}
|
||||
}
|
||||
this.current.total=res.result.currentUserRankingData.total;//当前用户的经验值是固定的
|
||||
|
||||
Reference in New Issue
Block a user