This commit is contained in:
@fawn-nine
2024-09-26 15:43:57 +08:00
parent 86a1f754c2
commit b2221666e1
13 changed files with 132 additions and 73 deletions

View File

@@ -115,6 +115,7 @@
<script>
import $http from '@/config/requestConfig.js';
import debounce from "@/common/debounce.js";
import {
mapState,mapMutations
} from "vuex";
@@ -300,6 +301,7 @@
},
// 获取交卷数据
sumitAnswer() {
debounce(async () => {
let that = this
that.wantSubmit = true
// this.noAnswerList = await this.getNoAnswerList()
@@ -319,10 +321,13 @@
}else{
that.sumbitPaper()
}
},300)
},
// q请求提交试卷
sumbitPaper(ids) {
uni.showLoading({
title:'正在交卷'
})
let that = this
$http.request({
url: "common/classExam/submitExamPaper",
@@ -335,7 +340,7 @@
},
})
.then(res => {
// uni.hideLoading()
uni.hideLoading()
if (res.code == 0) {
console.log('交卷结果',res);
uni.showToast({
@@ -392,6 +397,7 @@
this.haveAnswerList = this.gethaveAnswerList()
},
showNextQuestion() {
debounce(async () => {
// 下一题
this.curIndex1++
// this.curQuestion.answerIds = []
@@ -402,8 +408,10 @@
// console.log('+++++++++++++++', this.testPaper, );
this.noAnswerList = this.getNoAnswerList()
this.haveAnswerList = this.gethaveAnswerList()
},300)
},
clickOption(item, index) {
// debounce(async () => {
console.log('item', item, index, this.curIndex1);
if (this.curQuestion.type == 0) {
this.questionList[this.curIndex1].answerIds = [item.id]
@@ -431,6 +439,7 @@
console.log('this.testPaper.',this.noAnswerList,this.haveAnswerList);
this.saveQuestAnswer(this.examId,this.curIndex1+1,this.curQuestion.answerIds.join(','))
console.log('noAnswerList', this.noAnswerList)
// },300)
},
setDesc() {
const letterArr = []