|
|
@@ -144,7 +144,7 @@
|
|
|
placeholder="请输入词汇,用于选词填空"
|
|
|
/>
|
|
|
<p class="tips">在需要作答的单元格内输入三个以上下划线“___”</p>
|
|
|
- <el-button @click="identifyText">识别</el-button>
|
|
|
+ <el-button @click="identifyText()">识别</el-button>
|
|
|
<el-button @click="handleMultilingual">多语言</el-button>
|
|
|
<template v-if="isEnable(data.has_identify)">
|
|
|
<p class="tips">在需要作答的单元格内录入标准答案,多个填空答案用换行录入,同一个填空有多个答案用斜线“/”隔开</p>
|
|
|
@@ -188,21 +188,24 @@
|
|
|
icon="el-icon-refresh"
|
|
|
title="刷新"
|
|
|
class="refresh-pinyin-btn"
|
|
|
- @click.native="identifyText"
|
|
|
+ @click.native="identifyText()"
|
|
|
/></el-divider>
|
|
|
-
|
|
|
- <PinyinText
|
|
|
- v-if="isEnable(data.property.view_pinyin)"
|
|
|
- :id="'table_pinyin_text'"
|
|
|
- ref="PinyinText"
|
|
|
- :paragraph-list="data.paragraph_list"
|
|
|
- :rich-text-list="data.rich_text_list"
|
|
|
- :pinyin-position="data.property.pinyin_position"
|
|
|
- :pinyin-size="data?.unified_attrib?.pinyin_size"
|
|
|
- :font-size="data?.unified_attrib?.font_size"
|
|
|
- :font-family="data?.unified_attrib?.font"
|
|
|
- @fillCorrectPinyin="fillCorrectPinyin"
|
|
|
- />
|
|
|
+ <template v-if="isEnable(data.property.view_pinyin)">
|
|
|
+ <template v-for="(item, index) in data.option_list">
|
|
|
+ <PinyinText
|
|
|
+ v-for="(items, indexs) in item"
|
|
|
+ :key="index + '_' + indexs"
|
|
|
+ :id="'table_pinyin_text_' + index + '_' + indexs"
|
|
|
+ ref="PinyinText"
|
|
|
+ :rich-text-list="items.rich_text_list"
|
|
|
+ :pinyin-position="data.property.pinyin_position"
|
|
|
+ :pinyin-size="data?.unified_attrib?.pinyin_size"
|
|
|
+ :font-size="data?.unified_attrib?.font_size"
|
|
|
+ :font-family="data?.unified_attrib?.font"
|
|
|
+ @fillCorrectPinyin="fillCorrectPinyin"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
<el-dialog
|
|
|
title="配置单元格"
|
|
|
:visible="editCellFlag"
|
|
|
@@ -335,7 +338,11 @@ export default {
|
|
|
this.data.paragraph_list_parameter.text = text;
|
|
|
this.data.paragraph_list_parameter.is_first_sentence_first_hz_pinyin_first_char_upper_case =
|
|
|
this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case;
|
|
|
- this.createParsedTextInfoPinyin(text);
|
|
|
+ this.data.option_list.forEach((item, index) => {
|
|
|
+ item.forEach((items, indexs) => {
|
|
|
+ this.createParsedTextInfoPinyin(items.content, index + '#' + indexs);
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
deep: true,
|
|
|
@@ -356,7 +363,11 @@ export default {
|
|
|
if (text && isEnable(this.data.property.view_pinyin)) {
|
|
|
this.data.paragraph_list_parameter.text = text;
|
|
|
this.data.paragraph_list_parameter.is_first_sentence_first_hz_pinyin_first_char_upper_case = val;
|
|
|
- this.createParsedTextInfoPinyin(text);
|
|
|
+ this.data.option_list.forEach((item, index) => {
|
|
|
+ item.forEach((items, indexs) => {
|
|
|
+ this.createParsedTextInfoPinyin(items.content, index + '#' + indexs);
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
deep: true,
|
|
|
@@ -453,13 +464,18 @@ export default {
|
|
|
if (editIndex) {
|
|
|
let arr = editIndex.split('#');
|
|
|
text = this.data.option_list[arr[0]][arr[1]].content;
|
|
|
+ this.createParsedTextInfoPinyin(text, editIndex);
|
|
|
+ } else {
|
|
|
+ this.data.option_list.forEach((item, index) => {
|
|
|
+ item.forEach((items, indexs) => {
|
|
|
+ this.createParsedTextInfoPinyin(items.content, index + '#' + indexs);
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
- this.createParsedTextInfoPinyin(text);
|
|
|
}
|
|
|
},
|
|
|
// 获取拼音解析文本
|
|
|
- createParsedTextInfoPinyin(text) {
|
|
|
+ createParsedTextInfoPinyin(text, editIndex) {
|
|
|
if (text === '') {
|
|
|
this.data.paragraph_list_parameter.pinyin_proofread_word_list = [];
|
|
|
return;
|
|
|
@@ -490,8 +506,8 @@ export default {
|
|
|
),
|
|
|
);
|
|
|
this.data.paragraph_list = mergedData;
|
|
|
- if (this.editContentIndex) {
|
|
|
- let arr = this.editContentIndex.split('#');
|
|
|
+ if (editIndex) {
|
|
|
+ let arr = editIndex.split('#');
|
|
|
let list = res.rich_text.text_list;
|
|
|
list.forEach((item) => {
|
|
|
let inputIndex = 0;
|