mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
修改考试提交方式改为有返回值可再次点击点击
This commit is contained in:
@@ -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,
|
||||
@@ -538,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;//表已学习完,判断上级的章是否已完成
|
||||
@@ -599,9 +601,9 @@ export default {
|
||||
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.debouncedPresent = this.debounce(this.present, 500);
|
||||
},
|
||||
// created() {
|
||||
// this.debouncedPresent = this.debounce(this.present, 500);
|
||||
// },
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user