|
@@ -74,13 +74,13 @@
|
|
|
<div v-for="(items, indexs) in item.imgArr" :key="indexs" class="con-box">
|
|
|
<div
|
|
|
:class="['strockplay-newWord', (indexs + 1) % writer_number_yuan !== 0 ? 'border-left-none' : '']"
|
|
|
- @click="freeWrite(items, index, indexs, item.mark)"
|
|
|
+ @click="freeWrite(items ? JSON.parse(items) : null, index, indexs, item.mark)"
|
|
|
>
|
|
|
<SvgIcon icon-class="hanzi-writer-bg" class="character-target-bg" />
|
|
|
<img
|
|
|
- v-if="!play_status && items && items.strokes_image"
|
|
|
+ v-if="!play_status && items && JSON.parse(items).strokes_image"
|
|
|
class="hanzi-writer-img"
|
|
|
- :src="items.strokes_image"
|
|
|
+ :src="JSON.parse(items).strokes_image"
|
|
|
alt=""
|
|
|
/>
|
|
|
</div>
|
|
@@ -96,12 +96,15 @@
|
|
|
<div class="words-dic-box">
|
|
|
<div v-for="(itemc, indexc) in item.imgArr" :key="indexc" class="words-dic-item">
|
|
|
<span class="pinyin">{{ item.pinyin_arr[indexc].pinyin_item }}</span>
|
|
|
- <div :class="['strockplay-newWord']" @click="freeWrite(itemc, index, indexc, item.mark)">
|
|
|
+ <div
|
|
|
+ :class="['strockplay-newWord']"
|
|
|
+ @click="freeWrite(itemc ? JSON.parse(itemc) : itemc, index, indexc, item.mark)"
|
|
|
+ >
|
|
|
<SvgIcon icon-class="hanzi-writer-bg" class="character-target-bg" />
|
|
|
<img
|
|
|
- v-if="!play_status && itemc && itemc.strokes_image"
|
|
|
+ v-if="!play_status && itemc && JSON.parse(itemc).strokes_image"
|
|
|
class="hanzi-writer-img"
|
|
|
- :src="itemc.strokes_image"
|
|
|
+ :src="JSON.parse(itemc).strokes_image"
|
|
|
alt=""
|
|
|
/>
|
|
|
</div>
|
|
@@ -148,7 +151,6 @@ export default {
|
|
|
hanzi_color: '#404040', // 描红汉字底色
|
|
|
writer_number_yuan: 19,
|
|
|
writer_number: null, // 书写个数
|
|
|
- answer_list: [], // 用户答题数据
|
|
|
if_free_show: false,
|
|
|
free_img: [],
|
|
|
active_index: null,
|
|
@@ -226,7 +228,6 @@ export default {
|
|
|
methods: {
|
|
|
// 初始化数据
|
|
|
handleData() {
|
|
|
- this.answer_list = [];
|
|
|
this.writer_number = this.data.property.tian_number ? Number(this.data.property.tian_number) : 8;
|
|
|
let option_list = JSON.parse(JSON.stringify(this.data.option_list));
|
|
|
option_list.forEach((item) => {
|
|
@@ -254,7 +255,9 @@ export default {
|
|
|
mark: item.mark,
|
|
|
strokes_content_list: arr,
|
|
|
};
|
|
|
- this.answer_list.push(obj);
|
|
|
+ if (!this.isJudgingRightWrong) {
|
|
|
+ this.answer.answer_list.push(obj);
|
|
|
+ }
|
|
|
});
|
|
|
this.option_list = option_list;
|
|
|
this.show_preview = true;
|
|
@@ -268,7 +271,7 @@ export default {
|
|
|
this.if_free_show = false;
|
|
|
},
|
|
|
closeIfFreeShow(data, rowIndex, colIndex, mark) {
|
|
|
- this.option_list[rowIndex].imgArr[colIndex] = data;
|
|
|
+ this.option_list[rowIndex].imgArr[colIndex] = JSON.stringify(data);
|
|
|
this.if_free_show = false;
|
|
|
this.freeWrite(data, rowIndex, colIndex, mark);
|
|
|
this.$forceUpdate();
|
|
@@ -287,7 +290,7 @@ export default {
|
|
|
},
|
|
|
// 删除记录
|
|
|
deleteWriteRecord(rowIndex, colIndex, current_hz) {
|
|
|
- this.$set(this.option_list[rowIndex].imgArr, colIndex, {});
|
|
|
+ this.$set(this.option_list[rowIndex].imgArr, colIndex, JSON.stringify({}));
|
|
|
this.changeCurQue(null, colIndex, this.active_mark);
|
|
|
this.current_hz_data = null;
|
|
|
this.active_mark = '';
|
|
@@ -296,12 +299,12 @@ export default {
|
|
|
changeCurQue(answer, colIndex, mark) {
|
|
|
if (answer) {
|
|
|
let write_model = [];
|
|
|
- this.answer_list.forEach((itema) => {
|
|
|
+ this.answer.answer_list.forEach((itema) => {
|
|
|
if (itema.mark === mark) {
|
|
|
write_model = itema.strokes_content_list;
|
|
|
}
|
|
|
});
|
|
|
- write_model[colIndex] = answer;
|
|
|
+ write_model[colIndex] = JSON.stringify(answer);
|
|
|
}
|
|
|
},
|
|
|
},
|