This commit is contained in:
BianLzhaoMin 2025-10-15 16:44:56 +08:00
parent 236fd6f667
commit a5e0ce127e
2 changed files with 42 additions and 4 deletions

View File

@ -225,7 +225,14 @@
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" v-loading.fullscreen.lock="fullscreenLoading" @click="handleSubmit" v-preventReClick="5000"> </el-button>
<el-button
type="primary"
v-loading.fullscreen.lock="fullscreenLoading"
@click="handleSubmit"
v-preventReClick="5000"
>
</el-button>
</span>
</el-dialog>
</div>
@ -420,6 +427,20 @@ export default {
scoringRete = 0
}
// const params = {
// userId: this.opt.userId,
// taskId: this.opt.taskId,
// type: this.opt.type,
// examPaperId: this.opt.examPaperId,
// id: this.opt.examPaperId,
// score: this.score,
// answerTime: this.answerTime,
// answerList: this.questionList,
// scoringRete: scoringRete,
// scoreRate: scoringRete,
// selectAnswerList: this.questionList,
// }
const params = {
userId: this.opt.userId,
taskId: this.opt.taskId,
@ -428,17 +449,33 @@ export default {
id: this.opt.examPaperId,
score: this.score,
answerTime: this.answerTime,
answerList: this.questionList,
scoringRete: scoringRete,
scoreRate: scoringRete,
selectAnswerList: this.questionList,
// selectAnswerList: this.questionList,
}
console.log('🚀 ~ handleSubmit ~ params:', params)
let res = {}
if (this.opt.isStudyTask) {
params.selectAnswerList = this.questionList.map(e => {
return {
questionId: e.questionId,
selectAnswer: e.selectAnswer,
correctAnswer: e.correctAnswer,
scorePerQuestion: e.scorePerQuestion,
}
})
const res = await updateQuestionAnswer(params)
console.log('🚀 ~ openDialog2 ~ 提交:', res)
} else {
params.answerList = this.questionList.map(e => {
return {
questionId: e.questionId,
selectAnswer: e.selectAnswer,
correctAnswer: e.correctAnswer,
scorePerQuestion: e.scorePerQuestion,
}
})
res = await webSubmitAnswer(params)
}
console.log('🚀 ~ handleSubmit ~ 提交:', res)

View File

@ -7,7 +7,8 @@
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable v-no-whitespace
clearable
v-no-whitespace
@keyup.enter.native="handleQuery"
/>
</el-form-item>