mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
提交
This commit is contained in:
@@ -37,7 +37,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="re-list" v-if="canExam">
|
<div class="re-list" v-if="canExam">
|
||||||
<p>历史记录</p>
|
<p>历史记录</p>
|
||||||
<el-table :data="tableData" style="width: 100%" v-loading="loading">
|
<div style="height:300px" v-if="loading == 1" v-loading="loading == 1">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<el-table :data="tableData" style="width: 100%" v-if="loading == 2">
|
||||||
<el-table-column prop="startTime" label="完成时间" width="180"></el-table-column>
|
<el-table-column prop="startTime" label="完成时间" width="180"></el-table-column>
|
||||||
<el-table-column prop="score" align="center" label="成绩">
|
<el-table-column prop="score" align="center" label="成绩">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -235,7 +238,7 @@ import { formatSeconds } from '@/utils/datetime.js'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading:false,
|
loading:0,
|
||||||
toScoreTow,
|
toScoreTow,
|
||||||
examId:'',//考试的id
|
examId:'',//考试的id
|
||||||
taskId:'',//考试任务的id
|
taskId:'',//考试任务的id
|
||||||
@@ -405,10 +408,10 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
testAnswers(){ //获取当前考试的历史记录
|
testAnswers(){ //获取当前考试的历史记录
|
||||||
this.loading = true;
|
this.loading = 1;
|
||||||
apiTestPaper.myTestAnswers(this.examId).then(res=>{
|
apiTestPaper.myTestAnswers(this.examId).then(res=>{
|
||||||
if(res.status ==200) {
|
if(res.status ==200) {
|
||||||
this.loading = false;
|
this.loading = 2;
|
||||||
this.tableData = res.result;
|
this.tableData = res.result;
|
||||||
let len=res.result.length;
|
let len=res.result.length;
|
||||||
let times=this.testPaper.times? this.testPaper.times:0;
|
let times=this.testPaper.times? this.testPaper.times:0;
|
||||||
@@ -417,7 +420,7 @@ export default {
|
|||||||
this.tipText='已达到允许考试次数上限';
|
this.tipText='已达到允许考试次数上限';
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.loading = false;
|
this.loading = 2;
|
||||||
this.$message.error('加载考试记录失败');
|
this.$message.error('加载考试记录失败');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user