mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 05:16:43 +08:00
Merge branch 'zcwy-0509-exam' into zcwy-master
# Conflicts: # src/components/Course/exam.vue
This commit is contained in:
@@ -72,7 +72,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="text-align: center; margin-bottom: 15px">
|
<div style="text-align: center; margin-bottom: 15px">
|
||||||
<el-button :disabled="curIndex==0" type="primary" @click="prevSub()">上一题</el-button>
|
<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>
|
<el-button :disabled="curIndex>=(total-1)" type="primary" @click="nextSub()">下一题</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -156,6 +156,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
thisTrue: true,
|
||||||
viewTest:[],
|
viewTest:[],
|
||||||
imageBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
imageBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||||
correctJudgment:correctJudgment,
|
correctJudgment:correctJudgment,
|
||||||
@@ -419,7 +420,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
present(){ //提交前处理
|
present(){ //提交前处理
|
||||||
console.log('ssss')
|
|
||||||
let $this=this;
|
let $this=this;
|
||||||
let score=this.countTest();
|
let score=this.countTest();
|
||||||
console.log('score='+score);
|
console.log('score='+score);
|
||||||
@@ -539,8 +539,9 @@ export default {
|
|||||||
var dateDiff = now.getTime() - this.startTime.getTime();//时间差的毫秒数
|
var dateDiff = now.getTime() - this.startTime.getTime();//时间差的毫秒数
|
||||||
var minutes=Math.floor(dateDiff/(1000))//计算相差秒数,分钟记录的太大,经常为0
|
var minutes=Math.floor(dateDiff/(1000))//计算相差秒数,分钟记录的太大,经常为0
|
||||||
postData.testDuration=minutes;
|
postData.testDuration=minutes;
|
||||||
|
this.thisTrue = false
|
||||||
apiStudy.saveExam(postData).then(res=>{
|
apiStudy.saveExam(postData).then(res=>{
|
||||||
|
this.thisTrue = true
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
this.records.push(res.result);
|
this.records.push(res.result);
|
||||||
this.content.status=9;//表已学习完,判断上级的章是否已完成
|
this.content.status=9;//表已学习完,判断上级的章是否已完成
|
||||||
@@ -600,9 +601,9 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
// created() {
|
||||||
this.debouncedPresent = this.throttle(this.present, 5000);
|
// this.debouncedPresent = this.debounce(this.present, 500);
|
||||||
},
|
// },
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user