|
@@ -140,6 +140,11 @@ export default {
|
|
|
return {
|
|
|
wordShow: true,
|
|
|
noFont: ["~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "/"],
|
|
|
+ userAnswer: {
|
|
|
+ recordList: [],
|
|
|
+ input: [],
|
|
|
+ judge: [],
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -152,6 +157,11 @@ export default {
|
|
|
handleChangeTab() {
|
|
|
this.wordShow = !this.wordShow;
|
|
|
},
|
|
|
+ initAnswer() {
|
|
|
+ this.curQue.list.forEach((item, index) => {
|
|
|
+ item.article;
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {},
|
|
@@ -159,14 +169,16 @@ export default {
|
|
|
mounted() {
|
|
|
console.log("对话答题预览");
|
|
|
console.log(this.curQue);
|
|
|
+
|
|
|
if (this.curQue) {
|
|
|
- let BookAnswer = [];
|
|
|
- this.curQue.list.forEach((item) => {
|
|
|
- let answer = [];
|
|
|
- BookAnswer.push(answer);
|
|
|
- });
|
|
|
- this.$set(this.curQue, "Bookanswer", BookAnswer);
|
|
|
- console.log(this.curQue);
|
|
|
+ if (!this.curQue.Bookanswer) {
|
|
|
+ let BookAnswer = [];
|
|
|
+ this.curQue.list.forEach((item) => {
|
|
|
+ let userAnswer = JSON.parse(JSON.stringify(this.userAnswer));
|
|
|
+ BookAnswer.push(userAnswer);
|
|
|
+ });
|
|
|
+ this.$set(this.curQue, "Bookanswer", BookAnswer);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
beforeCreate() {}, //生命周期 - 创建之前
|