|
@@ -263,16 +263,6 @@
|
|
|
<template v-if="itemss.type == 'recordHZ_inputPY_chs'">
|
|
|
<TextInputRecord
|
|
|
:cur-que="itemss.data"
|
|
|
- :Bookanswer="
|
|
|
- answerData.length > 0 &&
|
|
|
- answerData[index].table_list &&
|
|
|
- answerData[index].table_list.length > 0 &&
|
|
|
- answerData[index].table_list[indexs].length > 0 &&
|
|
|
- answerData[index].table_list[indexs][indexss].data
|
|
|
- ? answerData[index].table_list[indexs][indexss].data
|
|
|
- .Bookanswer
|
|
|
- : []
|
|
|
- "
|
|
|
:theme-color="themeColor"
|
|
|
v-if="refresh"
|
|
|
/>
|
|
@@ -527,6 +517,7 @@ export default {
|
|
|
"themeColor",
|
|
|
"isShowTitle",
|
|
|
"bookAnswerContent",
|
|
|
+ "taskModel",
|
|
|
],
|
|
|
data() {
|
|
|
return {
|
|
@@ -610,10 +601,6 @@ export default {
|
|
|
this.seekCurrentTree(item);
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- if (_this.bookAnswerContent) {
|
|
|
- _this.answerData = JSON.parse(_this.bookAnswerContent);
|
|
|
- }
|
|
|
},
|
|
|
beforeCreate() {}, // 生命周期 - 创建之前
|
|
|
beforeMount() {}, // 生命周期 - 挂载之前
|
|
@@ -676,9 +663,9 @@ export default {
|
|
|
// });
|
|
|
// }
|
|
|
_this.cur = _this.contextData;
|
|
|
- _this.cur.cur_fn_data.forEach((item) => {
|
|
|
- item.table_list.forEach((items) => {
|
|
|
- items.forEach((itemss) => {
|
|
|
+ _this.cur.cur_fn_data.forEach((item, index) => {
|
|
|
+ item.table_list.forEach((items, indexs) => {
|
|
|
+ items.forEach((itemss, indexss) => {
|
|
|
if (itemss.data && itemss.data.type == "NewWord_chs") {
|
|
|
_this.NNPENewWordList = _this.NNPENewWordList.concat(
|
|
|
itemss.data.option
|
|
@@ -688,6 +675,19 @@ export default {
|
|
|
itemss.data.option
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
+ if (_this.TaskModel == "lookAnswer" && _this.bookAnswerContent) {
|
|
|
+ let answerData = JSON.parse(_this.bookAnswerContent);
|
|
|
+ itemss.data.Bookanswer =
|
|
|
+ answerData.length > 0 &&
|
|
|
+ answerData[index].table_list &&
|
|
|
+ answerData[index].table_list.length > 0 &&
|
|
|
+ answerData[index].table_list[indexs].length > 0 &&
|
|
|
+ answerData[index].table_list[indexs][indexss].data
|
|
|
+ ? answerData[index].table_list[indexs][indexss].data
|
|
|
+ .Bookanswer
|
|
|
+ : [];
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
});
|
|
@@ -767,8 +767,31 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
saveAnswer() {
|
|
|
- // console.log(JSON.parse(JSON.stringify(this.contextData)));
|
|
|
- return JSON.parse(JSON.stringify(this.contextData));
|
|
|
+ let contextData = JSON.parse(JSON.stringify(this.contextData));
|
|
|
+ console.log(contextData);
|
|
|
+ let result = [];
|
|
|
+ contextData.cur_fn_data.forEach((item, index) => {
|
|
|
+ result[index] = {
|
|
|
+ table_list: [],
|
|
|
+ };
|
|
|
+ item.table_list.forEach((items, indexs) => {
|
|
|
+ result[index].table_list[indexs] = [];
|
|
|
+ items.forEach((itemss, indexss) => {
|
|
|
+ debugger;
|
|
|
+ result[index].table_list[indexs][indexss] = [];
|
|
|
+ if (itemss.data) {
|
|
|
+ let Bookanswer = itemss.data.Bookanswer;
|
|
|
+ result[index].table_list[indexs][indexss].data = {
|
|
|
+ Bookanswer: Bookanswer,
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ result[index].table_list[indexs][indexss].data = null;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ return result;
|
|
|
},
|
|
|
}, // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
};
|