|
@@ -89,7 +89,9 @@ export default {
|
|
|
const task = await this.taskInfo(item.taskid);
|
|
|
for (const question of task.data.question) {
|
|
|
const answer = item.answers.find(item => item.questionid === question._id);
|
|
|
- question.stuanswer = answer.answer;
|
|
|
+ if (answer) {
|
|
|
+ question.stuanswer = answer.answer;
|
|
|
+ }
|
|
|
}
|
|
|
this.$set(this, `task`, task.data);
|
|
|
console.log(task.data);
|
|
@@ -108,7 +110,6 @@ export default {
|
|
|
this.$toast('提交学生成绩成功');
|
|
|
this.display = 'list';
|
|
|
}
|
|
|
- console.log(this.uploadtask);
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|