Merge branch 'zcwy-0509-exam' into zcwy-master

# Conflicts:
#	src/components/Course/exam.vue
This commit is contained in:
zhangsir
2024-05-13 15:54:38 +08:00

View File

@@ -72,7 +72,7 @@
</div>
<div style="text-align: center; margin-bottom: 15px">
<el-button :disabled="curIndex==0" type="primary" @click="prevSub()">上一题</el-button>
<el-button type="success" icon="el-icon-check" @click="debouncedPresent"> </el-button>
<el-button type="success" icon="el-icon-check" :disabled="!thisTrue" @click="present()"> </el-button>
<el-button :disabled="curIndex>=(total-1)" type="primary" @click="nextSub()">下一题</el-button>
</div>
</div>
@@ -156,6 +156,7 @@ export default {
},
data() {
return {
thisTrue: true,
viewTest:[],
imageBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
correctJudgment:correctJudgment,
@@ -419,7 +420,6 @@ export default {
};
},
present(){ //提交前处理
console.log('ssss')
let $this=this;
let score=this.countTest();
console.log('score='+score);
@@ -539,8 +539,9 @@ export default {
var dateDiff = now.getTime() - this.startTime.getTime();//时间差的毫秒数
var minutes=Math.floor(dateDiff/(1000))//计算相差秒数分钟记录的太大经常为0
postData.testDuration=minutes;
this.thisTrue = false
apiStudy.saveExam(postData).then(res=>{
this.thisTrue = true
if(res.status == 200) {
this.records.push(res.result);
this.content.status=9;//表已学习完,判断上级的章是否已完成
@@ -600,9 +601,9 @@ export default {
},
},
created() {
this.debouncedPresent = this.throttle(this.present, 5000);
},
// created() {
// this.debouncedPresent = this.debounce(this.present, 500);
// },
}
</script>