|
@@ -79,7 +79,9 @@ export default {
|
|
initData() {
|
|
initData() {
|
|
this.modalForm = this.$objAssign(getInitQuestionModel(), this.question);
|
|
this.modalForm = this.$objAssign(getInitQuestionModel(), this.question);
|
|
this.initAnswer(this.question.quesAnswer);
|
|
this.initAnswer(this.question.quesAnswer);
|
|
- this.quesAnswer = this.modalForm.quesAnswer[0] || null;
|
|
|
|
|
|
+ this.quesAnswer = this.modalForm.quesAnswer[0] || {
|
|
|
|
+ sections: [],
|
|
|
|
+ };
|
|
},
|
|
},
|
|
initAnswer(answer) {
|
|
initAnswer(answer) {
|
|
let quesAnswer = [];
|
|
let quesAnswer = [];
|
|
@@ -92,7 +94,11 @@ export default {
|
|
}
|
|
}
|
|
if (this.checkAnswerFormatValid(quesAnswer)) {
|
|
if (this.checkAnswerFormatValid(quesAnswer)) {
|
|
this.modalForm.quesAnswer = quesAnswer.map((item) =>
|
|
this.modalForm.quesAnswer = quesAnswer.map((item) =>
|
|
- isAnEmptyRichText(item) ? null : item
|
|
|
|
|
|
+ isAnEmptyRichText(item)
|
|
|
|
+ ? {
|
|
|
|
+ sections: [],
|
|
|
|
+ }
|
|
|
|
+ : item
|
|
);
|
|
);
|
|
} else {
|
|
} else {
|
|
this.modalForm.quesAnswer = [];
|
|
this.modalForm.quesAnswer = [];
|