Procházet zdrojové kódy

表格校对分词后不保存分词问题

natasha před 1 měsícem
rodič
revize
23ea378c94

+ 4 - 3
src/views/book/courseware/create/components/question/table/Table.vue

@@ -836,13 +836,14 @@ export default {
     async saveOptionWord(saveArr, rowIndex, colIndex) {
       const option = this.data.option_list[rowIndex]?.[colIndex];
       if (!option) return;
-      const { parsed_text } = await this.createParsedTextInfoPinyin(
+      const { parsed_text, rich_text } = await this.createParsedTextInfoPinyin(
         option.content,
         rowIndex,
         colIndex,
         'option_list',
         saveArr,
-      ).then(({ rich_text }) => {
+      );
+      if (rich_text) {
         let list = rich_text.text_list;
         list.forEach((item) => {
           let inputIndex = 0;
@@ -869,7 +870,7 @@ export default {
           }
         });
         this.$set(this.data.option_list[rowIndex][colIndex], 'rich_text_list', list);
-      });
+      }
       this.$set(this.optionWordDataMap, option.mark, buildWordProofreadData(parsed_text?.paragraph_list || []));
       this.$set(this.optionWordDataSourceMap, option.mark, option.content || '');
     },

+ 0 - 1
src/views/book/courseware/preview/components/table/TablePreview.vue

@@ -1410,7 +1410,6 @@ export default {
       status.crossAnswer = index === this.statusList.length - 1 ? this.statusList[0] : this.statusList[index + 1];
     },
     handleData() {
-      console.log(this.data);
       this.table_width = 0;
       this.isHasInput = false;
       this.data.col_width.forEach((item) => {