mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-21 00:36:44 +08:00
提交
This commit is contained in:
@@ -56,13 +56,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bar">
|
||||
<h6> 300/600</h6>
|
||||
<div class="exp-barbox">
|
||||
<div class="exp-bar-cont"></div>
|
||||
<h6> {{current.total}}/{{current.endValue}}</h6>
|
||||
<div class="exp-barbox" v-if="current.percentage">
|
||||
<el-progress :percentage="current.percentage" color="#387DF7"></el-progress>
|
||||
<!-- <div class="exp-bar-cont"></div> -->
|
||||
</div>
|
||||
<div class="exp-barname">
|
||||
<span>LV1</span>
|
||||
<span>LV2</span>
|
||||
<span>{{current.start}}</span>
|
||||
<span>{{current.end}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-table" style="height:550px;overflow-y:auto">
|
||||
@@ -192,6 +193,7 @@
|
||||
import author from '@/components/Portal/authorInfo.vue';
|
||||
import apiUser from "@/api/system/user.js";
|
||||
import * as echarts from 'echarts'
|
||||
import {translate,experienceValue} from "@/utils/tools.js";
|
||||
export default{
|
||||
computed: {
|
||||
...mapGetters(['userInfo']),
|
||||
@@ -200,6 +202,9 @@
|
||||
components: {authorImg,author},
|
||||
data(){
|
||||
return{
|
||||
current:{},
|
||||
experienceValue,
|
||||
translate,
|
||||
cycle:'total',
|
||||
name:'累计',
|
||||
getUType,
|
||||
@@ -228,18 +233,7 @@
|
||||
this.getRanking();
|
||||
},
|
||||
methods:{
|
||||
translate(field) {
|
||||
let name = '';
|
||||
switch (field) {
|
||||
case 'total':name = '累计'; break;
|
||||
case 'weeks':name = '本周'; break;
|
||||
case 'months':name = '本月'; break;
|
||||
case 'years':name = '本年'; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
|
||||
handleCommand(e) {
|
||||
this.cycle = e;
|
||||
this.name = this.translate(e)
|
||||
@@ -254,15 +248,30 @@
|
||||
}
|
||||
apiStat.getRanking(data).then(res=>{
|
||||
if(res.status==200){
|
||||
res.result.currentUserRankingData.authorInfo={
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
if(res.result.currentUserRankingData) {
|
||||
res.result.currentUserRankingData.authorInfo={
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData])
|
||||
this.currentUserRankingData = res.result.currentUserRankingData;
|
||||
if(res.result.currentUserRankingData.total) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.total);
|
||||
}
|
||||
if(res.result.currentUserRankingData.weeks) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.weeks);
|
||||
}
|
||||
if(res.result.currentUserRankingData.months) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.months);
|
||||
}
|
||||
if(res.result.currentUserRankingData.years) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.years);
|
||||
}
|
||||
}
|
||||
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData])
|
||||
this.currentUserRankingData = res.result.currentUserRankingData;
|
||||
|
||||
const ids= [];
|
||||
res.result.rankingData.forEach(item=>{
|
||||
ids.push(item.aid)
|
||||
@@ -677,12 +686,15 @@
|
||||
.exp-barbox{
|
||||
width: 100%;
|
||||
height: 8px;
|
||||
background: #ECF1FE;
|
||||
// background: #ECF1FE;
|
||||
border-radius: 6px;
|
||||
margin-left: 25px;
|
||||
margin-top: 3px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
::v-deep .el-progress__text{
|
||||
display: none;
|
||||
}
|
||||
.exp-bar-cont{
|
||||
width: 230px;
|
||||
height: 6px;
|
||||
|
||||
@@ -31,13 +31,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bar">
|
||||
<h6> 300/600</h6>
|
||||
<h6> {{current.total}}/{{current.endValue}}</h6>
|
||||
<div class="exp-barbox">
|
||||
<div class="exp-bar-cont"></div>
|
||||
<el-progress :percentage="current.percentage" color="#387DF7"></el-progress>
|
||||
</div>
|
||||
<div class="exp-barname">
|
||||
<span>LV1</span>
|
||||
<span>LV2</span>
|
||||
<span>{{current.start}}</span>
|
||||
<span>{{current.end}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-table">
|
||||
@@ -247,6 +247,7 @@
|
||||
import apiStat from '@/api/phase2/stat.js';
|
||||
import { mapGetters } from 'vuex';
|
||||
import authorImg from '@/components/Portal/authorImg.vue';
|
||||
import {translate,experienceValue} from "@/utils/tools.js";
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters(['userInfo']),
|
||||
@@ -255,6 +256,9 @@ export default {
|
||||
components: {authorImg},
|
||||
data(){
|
||||
return{
|
||||
experienceValue,
|
||||
current:{},
|
||||
translate,
|
||||
experience:{
|
||||
field:'total',
|
||||
name:'累计',
|
||||
@@ -290,18 +294,6 @@ export default {
|
||||
this.getDays();
|
||||
},
|
||||
methods:{
|
||||
translate(field) {
|
||||
let name = '';
|
||||
switch (field) {
|
||||
case 'total':name = '累计'; break;
|
||||
case 'weeks':name = '本周'; break;
|
||||
case 'months':name = '本月'; break;
|
||||
case 'years':name = '本年'; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
experienceCommand(e) {
|
||||
this.experience.field = e;
|
||||
this.experience.name = this.translate(e)
|
||||
@@ -336,6 +328,18 @@ export default {
|
||||
}
|
||||
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData])
|
||||
this.experience.data = res.result.currentUserRankingData;
|
||||
if(res.result.currentUserRankingData.total) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.total);
|
||||
}
|
||||
if(res.result.currentUserRankingData.weeks) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.weeks);
|
||||
}
|
||||
if(res.result.currentUserRankingData.months) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.months);
|
||||
}
|
||||
if(res.result.currentUserRankingData.years) {
|
||||
this.current = this.experienceValue(res.result.currentUserRankingData.years);
|
||||
}
|
||||
}
|
||||
const ids= [];
|
||||
res.result.rankingData.forEach(item=>{
|
||||
@@ -619,12 +623,15 @@ export default {
|
||||
.exp-barbox{
|
||||
width: 100%;
|
||||
height: 8px;
|
||||
background: #ECF1FE;
|
||||
// background: #ECF1FE;
|
||||
border-radius: 6px;
|
||||
margin-left: 25px;
|
||||
margin-top: 3px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
::v-deep .el-progress__text{
|
||||
display: none;
|
||||
}
|
||||
.exp-bar-cont{
|
||||
width: 230px;
|
||||
height: 6px;
|
||||
|
||||
Reference in New Issue
Block a user