This commit is contained in:
parent
236fd6f667
commit
a5e0ce127e
|
|
@ -225,7 +225,14 @@
|
||||||
</span>
|
</span>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<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>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -420,6 +427,20 @@ export default {
|
||||||
scoringRete = 0
|
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 = {
|
const params = {
|
||||||
userId: this.opt.userId,
|
userId: this.opt.userId,
|
||||||
taskId: this.opt.taskId,
|
taskId: this.opt.taskId,
|
||||||
|
|
@ -428,17 +449,33 @@ export default {
|
||||||
id: this.opt.examPaperId,
|
id: this.opt.examPaperId,
|
||||||
score: this.score,
|
score: this.score,
|
||||||
answerTime: this.answerTime,
|
answerTime: this.answerTime,
|
||||||
answerList: this.questionList,
|
|
||||||
scoringRete: scoringRete,
|
scoringRete: scoringRete,
|
||||||
scoreRate: scoringRete,
|
scoreRate: scoringRete,
|
||||||
selectAnswerList: this.questionList,
|
// selectAnswerList: this.questionList,
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ handleSubmit ~ params:', params)
|
console.log('🚀 ~ handleSubmit ~ params:', params)
|
||||||
let res = {}
|
let res = {}
|
||||||
if (this.opt.isStudyTask) {
|
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)
|
const res = await updateQuestionAnswer(params)
|
||||||
console.log('🚀 ~ openDialog2 ~ 提交:', res)
|
console.log('🚀 ~ openDialog2 ~ 提交:', res)
|
||||||
} else {
|
} else {
|
||||||
|
params.answerList = this.questionList.map(e => {
|
||||||
|
return {
|
||||||
|
questionId: e.questionId,
|
||||||
|
selectAnswer: e.selectAnswer,
|
||||||
|
correctAnswer: e.correctAnswer,
|
||||||
|
scorePerQuestion: e.scorePerQuestion,
|
||||||
|
}
|
||||||
|
})
|
||||||
res = await webSubmitAnswer(params)
|
res = await webSubmitAnswer(params)
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ handleSubmit ~ 提交:', res)
|
console.log('🚀 ~ handleSubmit ~ 提交:', res)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.keyWord"
|
v-model="queryParams.keyWord"
|
||||||
placeholder="请输入关键字"
|
placeholder="请输入关键字"
|
||||||
clearable v-no-whitespace
|
clearable
|
||||||
|
v-no-whitespace
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue