暂存
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user