|
|
@@ -107,7 +107,7 @@
|
|
|
<div class="option-list">
|
|
|
<div v-for="(item, i) in data.option_list" :key="i" class="table-node">
|
|
|
<el-color-picker v-model="data.rows_bg_list[i]" />
|
|
|
- <div v-for="li in item" :key="li.mark" class="table-item">
|
|
|
+ <div v-for="(li, j) in item" :key="li.mark" class="table-item">
|
|
|
<!-- eslint-disable max-len -->
|
|
|
<RichText
|
|
|
v-if="property.isGetContent"
|
|
|
@@ -117,6 +117,7 @@
|
|
|
:font-family="data?.unified_attrib?.font"
|
|
|
:font-color="data?.unified_attrib?.text_color"
|
|
|
:inline="true"
|
|
|
+ :itemIndex="i + '#' + j"
|
|
|
toolbar="fontselect fontsizeselect forecolor backcolor | underline | bold italic strikethrough alignleft aligncenter alignright image media link"
|
|
|
@handleRichTextBlur="handleBlurCon"
|
|
|
/>
|
|
|
@@ -269,6 +270,7 @@ export default {
|
|
|
activeCell: null,
|
|
|
editCellFlag: false,
|
|
|
statusList: ['normal', 'tick', 'cross'],
|
|
|
+ editContentIndex: '', // 编辑内容的单元格索引
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -403,7 +405,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 识别文本
|
|
|
- identifyText() {
|
|
|
+ identifyText(editIndex) {
|
|
|
let text = '';
|
|
|
this.data.has_identify = 'true';
|
|
|
this.data.option_list.forEach((item, index) => {
|
|
|
@@ -448,6 +450,11 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
if (isEnable(this.data.property.view_pinyin)) {
|
|
|
+ if (editIndex) {
|
|
|
+ let arr = editIndex.split('#');
|
|
|
+ text = this.data.option_list[arr[0]][arr[1]].content;
|
|
|
+ }
|
|
|
+
|
|
|
this.createParsedTextInfoPinyin(text);
|
|
|
}
|
|
|
},
|
|
|
@@ -483,7 +490,37 @@ export default {
|
|
|
),
|
|
|
);
|
|
|
this.data.paragraph_list = mergedData;
|
|
|
- this.$set(this.data, 'rich_text_list', res.rich_text.text_list);
|
|
|
+ if (this.editContentIndex) {
|
|
|
+ let arr = this.editContentIndex.split('#');
|
|
|
+ let list = res.rich_text.text_list;
|
|
|
+ list.forEach((item) => {
|
|
|
+ let inputIndex = 0;
|
|
|
+ if (item.word_list) {
|
|
|
+ item.word_list.forEach((items, index) => {
|
|
|
+ let isUnderline = /^_{3,}$/.test(items.text);
|
|
|
+ if (isUnderline) {
|
|
|
+ let obj = {
|
|
|
+ value: '',
|
|
|
+ type: 'input',
|
|
|
+ mark: getRandomNumber(),
|
|
|
+ inputIndex,
|
|
|
+ write_base64: '',
|
|
|
+ audio_answer_list: [],
|
|
|
+ };
|
|
|
+ inputIndex++;
|
|
|
+ item.word_list[index] = { ...items, ...obj };
|
|
|
+ } else {
|
|
|
+ items.type = 'text';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ item.type = 'text';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$set(this.data.option_list[arr[0]][arr[1]], 'rich_text_list', list);
|
|
|
+ } else {
|
|
|
+ this.$set(this.data, 'rich_text_list', res.rich_text.text_list);
|
|
|
+ }
|
|
|
let pinyin_index = 0;
|
|
|
this.data.option_list.forEach((item, index) => {
|
|
|
item.forEach((items, indexs) => {
|
|
|
@@ -508,8 +545,12 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
+ if (this.editContentIndex) {
|
|
|
+ this.editContentIndex = '';
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
+ console.log(this.data);
|
|
|
},
|
|
|
// 填充校对后的拼音
|
|
|
fillCorrectPinyin({ selectContent: { text, pinyin, activeTextStyle }, i, j, k }) {
|
|
|
@@ -536,8 +577,9 @@ export default {
|
|
|
});
|
|
|
this.data.mind_map.node_list = node_list;
|
|
|
},
|
|
|
- handleBlurCon() {
|
|
|
- this.identifyText();
|
|
|
+ handleBlurCon(index) {
|
|
|
+ this.editContentIndex = index;
|
|
|
+ this.identifyText(index);
|
|
|
this.handleMindMap();
|
|
|
},
|
|
|
handleMultilingual() {
|