This commit is contained in:
zhaofang
2022-07-15 17:58:40 +08:00
parent 021425d7f6
commit ca8bbd9197

View File

@@ -37,7 +37,7 @@
</div>
<div class="re-list" v-if="canExam">
<p>历史记录</p>
<el-table :data="tableData" style="width: 100%">
<el-table :data="tableData" style="width: 100%" v-loading="loading">
<el-table-column prop="startTime" label="完成时间" width="180"></el-table-column>
<el-table-column prop="score" align="center" label="成绩">
<template slot-scope="scope">
@@ -235,6 +235,7 @@ import { formatSeconds } from '@/utils/datetime.js'
export default {
data() {
return {
loading:false,
toScoreTow,
examId:'',//考试的id
taskId:'',//考试任务的id
@@ -404,8 +405,10 @@ export default {
})
},
testAnswers(){ //获取当前考试的历史记录
this.loading = true;
apiTestPaper.myTestAnswers(this.examId).then(res=>{
if(res.status ==200) {
this.loading = false;
this.tableData = res.result;
let len=res.result.length;
let times=this.testPaper.times? this.testPaper.times:0;
@@ -414,6 +417,7 @@ export default {
this.tipText='已达到允许考试次数上限';
}
}else{
this.loading = false;
this.$message.error('加载考试记录失败');
}
})