mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-24 18:22:53 +08:00
Merge branch 'stat' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into stat
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<div style="display: flex; justify-content: flex-start;padding:12px 20px 20px 22px" >
|
||||
<!--查询-->
|
||||
<div class="uc-center-page">我的考试</div>
|
||||
<div class="uc-center-page" style="margin-right:30px">我的考试</div>
|
||||
<div style="padding: 0px 0px">
|
||||
<el-select clearable v-model="status" placeholder="状态" style="width: 110px">
|
||||
<el-option label="未开始" :value="0"></el-option>
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="task-info">
|
||||
<div @click="jumpRouter(item)" v-html="$keywordActiveShow(item.testName,testName)" class="task-tit one-line-ellipsis">
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<!-- <div class="task-text">
|
||||
考试状态:
|
||||
<span v-if="item.status == 0">未开始</span>
|
||||
<span v-if="item.status == 1">进行中</span>
|
||||
@@ -34,9 +34,12 @@
|
||||
<span style="margin-left: 20px;" v-if="item.status == 9">
|
||||
分数:{{toScoreTow(item.score)}}
|
||||
</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="task-time">
|
||||
入场时间:<span>{{ item.startTime}}</span>
|
||||
<div><span style="color: #999999;">起止时间:</span> <span>{{ item.startTime}}至{{item.endTime}}</span></div>
|
||||
<div><span style="color: #999999;">时长:</span>{{item.testDuration}}分钟</div>
|
||||
<div><span style="color: #999999;">总分:</span>100分</div>
|
||||
<div><span style="color: #999999;">成绩:</span><span style="color: #366fff;" v-if="toScoreTow(item.score) > 0">{{toScoreTow(item.score)}}</span><span v-else>无</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="task-btns" >
|
||||
@@ -155,7 +158,7 @@
|
||||
// padding: 10px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
padding: 15px 0px;
|
||||
margin: 0 10px;
|
||||
margin: 10px 10px;
|
||||
.task-info{
|
||||
flex: 1;
|
||||
// padding: 0px 10px;
|
||||
@@ -174,6 +177,11 @@
|
||||
.task-time{
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
margin-top: 18px;
|
||||
display: flex;
|
||||
div{
|
||||
margin-right: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.task-btns {
|
||||
|
||||
@@ -538,6 +538,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dropdown-menu__item:not(.is-disabled):hover{
|
||||
background-color: #fff !important;
|
||||
color: #0059FF !important;
|
||||
}
|
||||
::v-deep.el-dropdown-menu {
|
||||
border: none !important;
|
||||
}
|
||||
.footer-btn{
|
||||
width: 140px;
|
||||
height: 40px;
|
||||
|
||||
@@ -122,10 +122,10 @@
|
||||
</div>
|
||||
<div class="myselftext">
|
||||
<div class="myranking">
|
||||
我的排名 : <span> {{learningDuration.data.rankingNo}}</span>
|
||||
我的排名 : <span> {{learningDurationTotalData.rankNo}}</span>
|
||||
</div>
|
||||
<div class="myexperience">
|
||||
我的学习时长: <span> {{learningDuration.data.total || learningDuration.data.months || learningDuration.data.years || learningDuration.data.weeks}}</span> h
|
||||
我的学习时长: <span> {{learningDurationTotalData.rankValue}}</span> h
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-table" style="margin-top:20px">
|
||||
@@ -206,10 +206,10 @@
|
||||
</div>
|
||||
<div class="myselftext">
|
||||
<div class="myranking">
|
||||
我的排名 : <span> {{learningDays.data.rankingNo}}</span>
|
||||
我的排名 : <span> {{learningDaysTotalData.rankNo}}</span>
|
||||
</div>
|
||||
<div class="myexperience">
|
||||
我的学习天数 : <span>{{learningDays.data.total || learningDays.data.months || learningDays.data.years || learningDays.data.weeks}}</span>
|
||||
我的学习天数 : <span>{{learningDaysTotalData.rankValue}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-table" style="margin-top:20px">
|
||||
@@ -310,6 +310,14 @@ export default {
|
||||
},
|
||||
list:[],
|
||||
},
|
||||
learningDurationTotalData:{
|
||||
rankNo:0, // 学习时长累计排名
|
||||
rankValue:0 // 累计学习时长
|
||||
},
|
||||
learningDaysTotalData:{
|
||||
rankNo:0, // 学习天数累计排名
|
||||
rankValue:0 // 累计学习天数
|
||||
},
|
||||
learningDays:{
|
||||
field:'total',
|
||||
name:'累计',
|
||||
@@ -390,79 +398,88 @@ export default {
|
||||
})
|
||||
},
|
||||
getDuration() {//学习时长
|
||||
let data = {
|
||||
aid:this.userInfo.aid,// #用户id
|
||||
statType:10, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||
field:this.learningDuration.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||
num:5,// #显示的条数
|
||||
}
|
||||
apiStat.getRanking(data).then(res=>{
|
||||
if(res.status==200){
|
||||
if(res.result.currentUserRankingData) {
|
||||
res.result.currentUserRankingData.authorInfo={
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData])
|
||||
this.learningDuration.data = res.result.currentUserRankingData;
|
||||
}
|
||||
let data = {
|
||||
aid:this.userInfo.aid,// #用户id
|
||||
statType:10, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||
field:this.learningDuration.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||
num:5,// #显示的条数
|
||||
}
|
||||
apiStat.getRanking(data).then(res=>{
|
||||
if(res.status==200){
|
||||
if(res.result.currentUserRankingData) {
|
||||
res.result.currentUserRankingData.authorInfo={
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData])
|
||||
this.learningDuration.data = res.result.currentUserRankingData;
|
||||
if(data.field == 'total'){
|
||||
this.learningDurationTotalData.rankNo = res.result.currentUserRankingData.rankingNo;
|
||||
this.learningDurationTotalData.rankValue = res.result.currentUserRankingData.total;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const ids= [];
|
||||
res.result.rankingData.forEach(item=>{
|
||||
ids.push(item.aid)
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
})
|
||||
this.getUserData(ids,res.result.rankingData)
|
||||
this.learningDuration.list = res.result.rankingData;
|
||||
}
|
||||
})
|
||||
const ids= [];
|
||||
res.result.rankingData.forEach(item=>{
|
||||
ids.push(item.aid)
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
})
|
||||
this.getUserData(ids,res.result.rankingData)
|
||||
this.learningDuration.list = res.result.rankingData;
|
||||
}
|
||||
})
|
||||
},
|
||||
getDays() {//学习天数
|
||||
let data = {
|
||||
aid:this.userInfo.aid,// #用户id
|
||||
statType:11, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||
field:this.learningDays.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||
num:5,// #显示的条数
|
||||
}
|
||||
apiStat.getRanking(data).then(res=>{
|
||||
if(res.status==200){
|
||||
if(res.result.currentUserRankingData) {
|
||||
res.result.currentUserRankingData.authorInfo={
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData]);
|
||||
this.learningDays.data = res.result.currentUserRankingData;
|
||||
}
|
||||
//学习天数
|
||||
getDays() {
|
||||
let data = {
|
||||
aid:this.userInfo.aid,// #用户id
|
||||
statType:11, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||
field:this.learningDays.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||
num:5,// #显示的条数
|
||||
}
|
||||
apiStat.getRanking(data).then(res=>{
|
||||
if(res.status==200){
|
||||
if(res.result.currentUserRankingData) {
|
||||
res.result.currentUserRankingData.authorInfo={
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData]);
|
||||
this.learningDays.data = res.result.currentUserRankingData;
|
||||
if(data.field == 'total'){
|
||||
this.learningDaysTotalData.rankNo = res.result.currentUserRankingData.rankingNo;
|
||||
this.learningDaysTotalData.rankValue = res.result.currentUserRankingData.total;
|
||||
}
|
||||
}
|
||||
|
||||
const ids= [];
|
||||
res.result.rankingData.forEach(item=>{
|
||||
ids.push(item.aid)
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
})
|
||||
this.getUserData(ids,res.result.rankingData)
|
||||
this.learningDays.list = res.result.rankingData;
|
||||
}
|
||||
})
|
||||
const ids= [];
|
||||
res.result.rankingData.forEach(item=>{
|
||||
ids.push(item.aid)
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
})
|
||||
this.getUserData(ids,res.result.rankingData)
|
||||
this.learningDays.list = res.result.rankingData;
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserData(ids,list) {
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
|
||||
Reference in New Issue
Block a user