瀏覽代碼

Merge branch 'master' of http://gcls-git.helxsoft.cn/GCLS/eep_page

zq 2 月之前
父節點
當前提交
fe31876560
共有 73 個文件被更改,包括 1264 次插入249 次删除
  1. 1 1
      .env
  2. 1 1
      package.json
  3. 5 0
      src/api/article.js
  4. 9 0
      src/api/pinyinCorrection.js
  5. 3 5
      src/components/CommonPreview.vue
  6. 3 2
      src/views/book/courseware/create/components/PreviewEdit.vue
  7. 35 2
      src/views/book/courseware/create/components/base/common/CorrectPinyin.vue
  8. 14 1
      src/views/book/courseware/create/components/base/upload_control/UploadControl.vue
  9. 11 0
      src/views/book/courseware/create/components/question/article/Article.vue
  10. 5 3
      src/views/book/courseware/create/components/question/article/CheckArticle.vue
  11. 32 4
      src/views/book/courseware/create/components/question/article/CheckPinyin.vue
  12. 3 0
      src/views/book/courseware/create/components/question/article/CheckStyle.vue
  13. 31 2
      src/views/book/courseware/create/components/question/article/NewWord.vue
  14. 37 4
      src/views/book/courseware/create/components/question/character/Character.vue
  15. 9 0
      src/views/book/courseware/create/components/question/character/CharacterSetting.vue
  16. 32 2
      src/views/book/courseware/create/components/question/character_structure/CharacterStructure.vue
  17. 13 1
      src/views/book/courseware/create/components/question/character_structure/CharacterStructureSetting.vue
  18. 8 3
      src/views/book/courseware/create/components/question/dialogue_article/Article.vue
  19. 29 2
      src/views/book/courseware/create/components/question/dialogue_article/ArticleSetting.vue
  20. 32 4
      src/views/book/courseware/create/components/question/image_text/CheckPinyin.vue
  21. 1 0
      src/views/book/courseware/create/components/question/image_text/CheckStyle.vue
  22. 36 1
      src/views/book/courseware/create/components/question/newWord_template/NewWordTemplate.vue
  23. 14 1
      src/views/book/courseware/create/components/question/newWord_template/NewWordTemplateSetting.vue
  24. 33 3
      src/views/book/courseware/create/components/question/new_word/NewWord.vue
  25. 58 17
      src/views/book/courseware/create/components/question/notes/Notes.vue
  26. 6 1
      src/views/book/courseware/create/components/question/video_interaction/VideoInteraction.vue
  27. 3 0
      src/views/book/courseware/data/article.js
  28. 19 19
      src/views/book/courseware/data/bookType.js
  29. 21 0
      src/views/book/courseware/data/character.js
  30. 3 0
      src/views/book/courseware/data/characterBase.js
  31. 20 0
      src/views/book/courseware/data/characterStructure.js
  32. 3 0
      src/views/book/courseware/data/dialogueArticle.js
  33. 3 0
      src/views/book/courseware/data/drawing.js
  34. 3 0
      src/views/book/courseware/data/h5Games.js
  35. 3 0
      src/views/book/courseware/data/imageText.js
  36. 3 0
      src/views/book/courseware/data/newWord.js
  37. 20 0
      src/views/book/courseware/data/newWordTemplate.js
  38. 3 0
      src/views/book/courseware/data/notes.js
  39. 3 0
      src/views/book/courseware/data/pinyinBase.js
  40. 3 0
      src/views/book/courseware/data/recordInput.js
  41. 3 0
      src/views/book/courseware/data/table.js
  42. 3 1
      src/views/book/courseware/data/uploadControl.js
  43. 3 0
      src/views/book/courseware/data/uploadPreview.js
  44. 3 0
      src/views/book/courseware/data/videoInteraction.js
  45. 3 0
      src/views/book/courseware/data/write.js
  46. 3 0
      src/views/book/courseware/data/writeBase.js
  47. 6 0
      src/views/book/courseware/preview/CoursewarePreview.vue
  48. 13 4
      src/views/book/courseware/preview/components/article/NormalModelChs.vue
  49. 22 8
      src/views/book/courseware/preview/components/article/PhraseModelChs.vue
  50. 1 0
      src/views/book/courseware/preview/components/article/Practicechs.vue
  51. 1 0
      src/views/book/courseware/preview/components/article/WordModelChs.vue
  52. 91 14
      src/views/book/courseware/preview/components/article/components/WordPhraseDetail.vue
  53. 1 0
      src/views/book/courseware/preview/components/article/index.vue
  54. 54 6
      src/views/book/courseware/preview/components/character/CharacterPreview.vue
  55. 62 4
      src/views/book/courseware/preview/components/character_structure/CharacterStructurePreview.vue
  56. 13 4
      src/views/book/courseware/preview/components/dialogue_article/NormalModelChs.vue
  57. 13 4
      src/views/book/courseware/preview/components/dialogue_article/PhraseModelChs.vue
  58. 1 0
      src/views/book/courseware/preview/components/dialogue_article/Practicechs.vue
  59. 1 0
      src/views/book/courseware/preview/components/dialogue_article/WordModelChs.vue
  60. 1 0
      src/views/book/courseware/preview/components/dialogue_article/index.vue
  61. 1 1
      src/views/book/courseware/preview/components/image_text/ImageTextPreview.vue
  62. 6 0
      src/views/book/courseware/preview/components/image_text/components/MagazineSentence.vue
  63. 2 2
      src/views/book/courseware/preview/components/matching/MatchingPreview.vue
  64. 36 0
      src/views/book/courseware/preview/components/newWord_template/NewWordTemplatePreview.vue
  65. 2 1
      src/views/book/courseware/preview/components/newWord_template/components/Strockplayredline.vue
  66. 91 14
      src/views/book/courseware/preview/components/new_word/components/WordPhraseDetail.vue
  67. 19 1
      src/views/book/courseware/preview/components/pinyin_base/PinyinBasePreview.vue
  68. 19 9
      src/views/book/courseware/preview/components/upload_control/UploadControlPreview.vue
  69. 8 12
      src/views/book/courseware/preview/components/upload_control/components/UploadView.vue
  70. 3 1
      src/views/book/courseware/preview/components/video_interaction/VideoInteractionPreview.vue
  71. 72 28
      src/views/personal_workbench/pinyin_correction_list/index.vue
  72. 68 28
      src/views/personal_workbench/pinyin_correction_list_manager/index.vue
  73. 68 28
      src/views/personal_workbench/pinyin_correction_list_org/index.vue

+ 1 - 1
.env

@@ -11,4 +11,4 @@ VUE_APP_BookWebSI = '/GCLSBookWebSI/ServiceInterface'
 VUE_APP_EepServer = '/EEPServer/SI'
 
 #version
-VUE_APP_VERSION = '2026.03.27'
+VUE_APP_VERSION = '2026.04.06'

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "eep_page",
-  "version": "2026.03.27",
+  "version": "2026.04.06",
   "private": true,
   "main": "main.js",
   "description": "智慧梧桐数字教材编辑器",

+ 5 - 0
src/api/article.js

@@ -47,3 +47,8 @@ export function getSysConfig() {
 export function getWordTimes(data) {
   return http.post(`${process.env.VUE_APP_EepServer}?MethodName=tool-AudioTextDot_OldFormat`, data);
 }
+
+// 词典
+export function toolDictionary(data) {
+  return http.post(`${process.env.VUE_APP_EepServer}?MethodName=tool-Dictionary`, data);
+}

+ 9 - 0
src/api/pinyinCorrection.js

@@ -22,5 +22,14 @@ export function toolCopyPinyinCorrectionToStorage(data) {
   return http.post(`${process.env.VUE_APP_EepServer}?MethodName=tool-CopyPinyinCorrectionToStorage`,data);
 }
 
+// 编辑拼音校正
+export function toolUpdatePinyinCorrection(data) {
+  return http.post(`${process.env.VUE_APP_EepServer}?MethodName=tool-UpdatePinyinCorrection`, data);
+}
+
+// 得到词的拼音校正列表
+export function toolGetWordPinyinCorrectionList(data) {
+  return http.post(`${process.env.VUE_APP_EepServer}?MethodName=tool-GetWordPinyinCorrectionList`, data);
+}
 
 

+ 3 - 5
src/components/CommonPreview.vue

@@ -1227,6 +1227,9 @@ export default {
       if (this.curSelectId === nodeId) return;
       this.curSelectId = nodeId;
       this.selectNode(nodeId);
+      this.isShowGroup = false;
+      this.groupShowAll = true;
+      this.$refs.courserware.clearRowCheckList();
     },
     /**
      * 计算章节名称样式
@@ -1514,11 +1517,6 @@ export default {
       this.menuPosition.endY = event.clientY - clientRect.top;
     },
     endSelection() {
-      console.log('this.startX' + this.menuPosition.startX);
-      console.log('this.endX' + this.menuPosition.endX);
-      console.log('this.startY' + this.menuPosition.startY);
-      console.log('this.endY' + this.menuPosition.endY);
-
       if (!this.isSelecting || this.menuPosition.startX === this.menuPosition.endX || !this.menuPosition.endX) return;
       this.isSelecting = false;
       const width = Math.abs(this.menuPosition.endX - this.menuPosition.startX);

+ 3 - 2
src/views/book/courseware/create/components/PreviewEdit.vue

@@ -20,7 +20,7 @@
                   :key="`${type}-${i}-${j}-${k}`"
                   class="drag-line"
                   :class="[type, ...lineClass]"
-                  :style="{ gridArea: type }"
+                  :style="{ gridArea: type, cursor }"
                   :data-type="type"
                   @mousedown="dragStart($event, { cursor, type, i, j, k, id: grid.id })"
                 ></span>
@@ -86,7 +86,7 @@ export default {
       moveLineList: [
         {
           type: 'top',
-          cursor: 'ns-resize',
+          cursor: 'default',
           lineClass: ['drag-line'],
         },
         {
@@ -263,6 +263,7 @@ export default {
     dragStart(event, { cursor, type, id, i, j, k }) {
       const dragElement = this.findChildComponentByKey(`preview-${id}`);
       if (!dragElement) return;
+      if (cursor === 'default') return; // 无需拖动
       this.dragElement = dragElement;
 
       const { clientX, clientY } = event;

+ 35 - 2
src/views/book/courseware/create/components/base/common/CorrectPinyin.vue

@@ -45,14 +45,31 @@
         active-text="显示拼音"
         inactive-text="隐藏拼音"
       />
-      <el-input
+      <!-- <el-input
         v-show="isEnable(dataContent.showPinyin)"
         v-model="numberPinyin"
         autocomplete="off"
         placeholder="请输入正确的拼音"
         @blur="convertTonePinyin"
         class="pinyin-input"
-      />
+      /> -->
+      <el-select
+        v-show="isEnable(dataContent.showPinyin)"
+        v-model="numberPinyin"
+        placeholder="请选择"
+        filterable
+        allow-create
+        default-first-option
+        @change="convertTonePinyin"
+        class="pinyin-input"
+      >
+        <el-option v-for="item in pinyinList" :key="item.pinyin" :value="item.pinyin.replace(/,/g, '')">
+          <span style="float: left">{{ item.pinyin ? item.pinyin.replace(/,/g, '') : '' }}</span>
+          <span style="float: right; font-size: 13px; color: #8492a6">{{
+            item.storage_type === 1 ? '机构库' : item.storage_type === 2 ? '全域库' : '个人库'
+          }}</span>
+        </el-option>
+      </el-select>
     </div>
     <span v-show="isEnable(dataContent.showPinyin)" class="tips"
       >一到四声分别用数字1-4表示,轻声用0表示,拼音间用空格隔开。</span
@@ -80,6 +97,7 @@ import RichText from '@/components/RichText.vue';
 import _ from 'lodash';
 import { fontFamilyList } from '@/views/book/courseware/data/table.js';
 import { isEnable } from '@/views/book/courseware/data/common';
+import { toolGetWordPinyinCorrectionList } from '@/api/pinyinCorrection';
 
 export default {
   name: 'CorrectPinyin',
@@ -138,6 +156,7 @@ export default {
         left: 0,
       },
       dataContent: { activeTextStyle: {}, note: {} },
+      pinyinList: [], // 拼音校正列表
     };
   },
   watch: {
@@ -157,6 +176,7 @@ export default {
         }
         this.$set(this.dataContent, 'showPinyin', _showPinyin);
         this.$set(this.dataContent, 'activeTextStyle', style);
+        this.getPinyinList();
       },
       deep: true,
     },
@@ -210,6 +230,19 @@ export default {
         this.$set(this.dataContent.activeTextStyle, 'textDecoration', style.textDecoration);
       }
     },
+    // 获取拼音校正库列表
+    getPinyinList() {
+      this.pinyinList = [];
+      toolGetWordPinyinCorrectionList({
+        word: this.dataContent.text,
+      })
+        .then((res) => {
+          if (res.status === 1) {
+            this.pinyinList = res.pinyin_correction_list;
+          }
+        })
+        .catch(() => {});
+    },
   },
 };
 </script>

+ 14 - 1
src/views/book/courseware/create/components/base/upload_control/UploadControl.vue

@@ -1,6 +1,10 @@
 <template>
   <ModuleBase ref="base" :type="data.type">
-    <template #content> 学生上传文件控件 </template>
+    <template #content>
+      <div class="write-base-wrapper">
+        <span>占位</span>
+      </div>
+    </template>
   </ModuleBase>
 </template>
 
@@ -20,3 +24,12 @@ export default {
   methods: {},
 };
 </script>
+<style lang="scss" scoped>
+.write-base-wrapper {
+  min-height: 100px;
+  line-height: 100px;
+  color: #aaa;
+  text-align: center;
+  background: #f7f8fa;
+}
+</style>

+ 11 - 0
src/views/book/courseware/create/components/question/article/Article.vue

@@ -17,6 +17,7 @@
           </div>
           <SvgIcon icon-class="delete-black" size="12" @click="removeFile" />
         </div>
+        <span v-if="data.content" class="tips">说明:需先点击“生成分词”按钮后,再进行文章校对或生成字幕节点</span>
         <div v-if="data.content" class="btn-box">
           <a @click="handleChangeContent">生成分词</a>
           <a @click="checkArticle">文章校对</a>
@@ -340,6 +341,7 @@ export default {
             color: '',
             matchWords: '',
             matchNotes: '',
+            notesColor: '',
             img: [],
             imgPosition: 'after',
           };
@@ -418,6 +420,7 @@ export default {
                   color: '',
                   matchWords: '',
                   matchNotes: '',
+                  notesColor: '',
                   img: [],
                   imgPosition: 'after',
                 };
@@ -487,6 +490,7 @@ export default {
       color,
       matchWords,
       matchNotes,
+      notesColor,
       img,
       imgPosition,
     ) {
@@ -497,6 +501,7 @@ export default {
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].color = color;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].matchWords = matchWords;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].matchNotes = matchNotes;
+      this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].notesColor = notesColor;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].img = img;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].imgPosition = imgPosition;
     },
@@ -817,6 +822,12 @@ export default {
   }
 }
 
+.tips {
+  margin: 0;
+  font-size: 12px;
+  color: #e82d2d;
+}
+
 .tabs-box {
   display: flex;
   column-gap: 12px;

+ 5 - 3
src/views/book/courseware/create/components/question/article/CheckArticle.vue

@@ -23,8 +23,8 @@
           <div class="remark-box" @click="showRemark(index)">
             <SvgIcon icon-class="edit-line" />{{
               item.remark && (item.remark.chs || item.remark.en || item.remark.img_list.length > 0)
-                ? '修改备注'
-                : '添加备注'
+                ? '修改气泡'
+                : '添加气泡'
             }}
           </div>
         </template>
@@ -77,7 +77,7 @@
     </el-dialog>
     <el-dialog
       v-if="remarkVisible"
-      title="标注"
+      title="气泡"
       :visible.sync="remarkVisible"
       width="50%"
       :close-on-click-modal="false"
@@ -240,6 +240,7 @@ export default {
       color,
       matchWords,
       matchNotes,
+      notesColor,
       img,
       imgPosition,
     ) {
@@ -255,6 +256,7 @@ export default {
         color,
         matchWords,
         matchNotes,
+        notesColor,
         img,
         imgPosition,
       );

+ 32 - 4
src/views/book/courseware/create/components/question/article/CheckPinyin.vue

@@ -61,7 +61,22 @@
             </span>
           </div>
         </div>
-        <el-input v-model="checkPinyinInput" type="text" class="checkPinyinInput" />
+        <!-- <el-input v-model="checkPinyinInput" type="text" class="checkPinyinInput" /> -->
+        <el-select
+          v-model="checkPinyinInput"
+          placeholder="请选择"
+          filterable
+          allow-create
+          default-first-option
+          class="checkPinyinInput"
+        >
+          <el-option v-for="item in pinyinList" :key="item.pinyin" :value="item.pinyin.replace(/,/g, '')">
+            <span style="float: left">{{ item.pinyin.replace(/,/g, '') }}</span>
+            <span style="float: right; font-size: 13px; color: #8492a6">{{
+              item.storage_type === 1 ? '机构库' : item.storage_type === 2 ? '全域库' : '个人库'
+            }}</span>
+          </el-option>
+        </el-select>
         <p class="tips">
           一到四声分别用数字1-4表示。拼音间用空格隔开,儿化音用_代替空格,如“骨朵儿”输入“gu1 duo3_er”。
         </p>
@@ -75,8 +90,7 @@
 </template>
 
 <script>
-// import { publicMethods, reparse } from '@/api/api';
-import th from 'element-ui/lib/locale/lang/th';
+import { toolGetWordPinyinCorrectionList } from '@/api/pinyinCorrection';
 
 export default {
   components: {},
@@ -108,6 +122,7 @@ export default {
         ['m̄', 'ḿ', 'm', 'm̀', 'm'],
       ],
       toneList: [' ', 'ˉ', 'ˊ', 'ˇ', 'ˋ'],
+      pinyinList: [], // 拼音校正列表
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -166,7 +181,20 @@ export default {
     selectItem(item, index) {
       this.activeIndex = `${index}_${item.sentenceIndex}_${item.wordIndex}`;
       this.itemActive = item;
-      this.dialogFlag = true;
+      this.pinyinList = [];
+      toolGetWordPinyinCorrectionList({
+        word: item.text,
+      })
+        .then((res) => {
+          if (res.status === 1) {
+            this.pinyinList = res.pinyin_correction_list;
+          }
+          this.dialogFlag = true;
+        })
+        .catch(() => {
+          this.dialogFlag = true;
+        });
+
       this.checkPinyinInput = '';
     },
     cancleDialog() {

+ 3 - 0
src/views/book/courseware/create/components/question/article/CheckStyle.vue

@@ -105,6 +105,7 @@
             placeholder="请输入注释表的“内容”"
             @blur="onBlur(itemActive, 'matchNotes')"
           ></el-input>
+          <el-color-picker v-model="itemActive.notesColor"></el-color-picker>
         </div>
         <div class="btn-box">
           <el-button type="info" size="small" @click="cancleDialog">取消</el-button>
@@ -206,6 +207,7 @@ export default {
               color: itemss.color,
               matchWords: itemss.matchWords,
               matchNotes: itemss.matchNotes,
+              notesColor: itemss.notesColor,
               img: itemss.img,
               imgPosition: itemss.imgPosition,
             };
@@ -253,6 +255,7 @@ export default {
         this.itemActive.color,
         this.itemActive.matchWords,
         this.itemActive.matchNotes,
+        this.itemActive.notesColor,
         this.itemActive.img,
         this.itemActive.imgPosition,
       );

+ 31 - 2
src/views/book/courseware/create/components/question/article/NewWord.vue

@@ -316,6 +316,7 @@ import SelectUpload from '@/views/book/courseware/create/components/common/Selec
 import UploadPicture from '../new_word/components/UploadPicture.vue';
 import { getWordTime, prepareTranscribe, fileToBase64Text, getWordTimes } from '@/api/article';
 import { GetStaticResources, TextToAudioFile, GetTextToAudioConfParamList } from '@/api/app';
+import { PinyinBuild_OldFormat } from '@/api/book';
 import RichText from '@/components/RichText.vue';
 import CheckSubtitles from '@/views/book/courseware/create/components/question/voice_matrix/CheckSubtitles.vue';
 import {
@@ -556,7 +557,7 @@ export default {
       }
     },
     // 获取数据
-    handleBlurCon(row) {
+    async handleBlurCon(row) {
       let cons = row.new_word.trim();
       let MethodName = 'hz_resource_manager-GetMultHZStrokesContent';
       let data = {
@@ -587,7 +588,35 @@ export default {
           this.loading = false;
         });
 
-      row.pinyin = cnchar.spell(cons, 'array', 'low', 'tone').join(' ');
+      // row.pinyin = cnchar.spell(cons, 'array', 'low', 'tone').join(' ');
+      if (cons) {
+        row.pinyin = await this.handlePinyin(cons);
+      }
+    },
+    // 自动生成拼音
+    handlePinyin(text) {
+      let data = {
+        text: text,
+        is_rich_text: 'false',
+        is_first_sentence_first_hz_pinyin_first_char_upper_case: 'false',
+        is_fill_space: 'false',
+        is_custom_fc: 'false',
+      };
+      return new Promise((resolve, reject) => {
+        PinyinBuild_OldFormat(data).then((res) => {
+          if (res.parsed_text) {
+            let mergedData = '';
+            res.parsed_text.paragraph_list.map((outerArr, i) =>
+              outerArr.map((innerArr, j) =>
+                innerArr.map((newItem, k) => {
+                  mergedData += newItem.pinyin + ' ';
+                }),
+              ),
+            );
+            resolve(mergedData);
+          }
+        });
+      });
     },
     createWordTimes() {
       if (this.data.audio_data.file_id) {

+ 37 - 4
src/views/book/courseware/create/components/question/character/Character.vue

@@ -136,6 +136,7 @@ import ModuleMixin from '../../common/ModuleMixin';
 
 import { getCharacterData, modelList, getOption } from '@/views/book/courseware/data/character';
 import { GetStaticResources, TextToAudioFile } from '@/api/app';
+import { PinyinBuild_OldFormat } from '@/api/book';
 import cnchar from 'cnchar';
 import UploadFile from '../../base/common/UploadFile.vue';
 import SoundRecord from '@/views/book/courseware/create/components/question/fill/components/SoundRecord.vue';
@@ -259,7 +260,10 @@ export default {
         let data = {
           hz_str: str,
         };
-        items.pinyin = cnchar.spell(str, 'array', 'low', 'tone').join(' ');
+        // items.pinyin = cnchar.spell(str, 'array', 'low', 'tone').join(' ');
+        if (str) {
+          items.pinyin = await this.handlePinyin(str);
+        }
         await GetStaticResources(MethodName, data)
           .then((res) => {
             for (let key in res) {
@@ -268,6 +272,7 @@ export default {
               }
             }
             let hzDetailList = res;
+
             arr.forEach((item, index) => {
               let objs = {};
               if (item === '@') {
@@ -324,13 +329,41 @@ export default {
             });
           })
           .catch(() => {});
-        // if (str) {
-        //   this.handleMatic(str, index);
-        // }
+        for (let index = 0; index < arr.length; index++) {
+          if (regex.test(arr[index])) {
+            // 汉字
+            items.content_list[index].pinyin = await this.handlePinyin(arr[index]);
+          }
+        }
       } else {
         this.$message.warning('请先输入内容');
       }
     },
+    // 自动生成拼音
+    handlePinyin(text) {
+      let data = {
+        text: text,
+        is_rich_text: 'false',
+        is_first_sentence_first_hz_pinyin_first_char_upper_case: 'false',
+        is_fill_space: 'false',
+        is_custom_fc: 'false',
+      };
+      return new Promise((resolve, reject) => {
+        PinyinBuild_OldFormat(data).then((res) => {
+          if (res.parsed_text) {
+            let mergedData = '';
+            res.parsed_text.paragraph_list.map((outerArr, i) =>
+              outerArr.map((innerArr, j) =>
+                innerArr.map((newItem, k) => {
+                  mergedData += newItem.pinyin + ' ';
+                }),
+              ),
+            );
+            resolve(mergedData);
+          }
+        });
+      });
+    },
     uploads(file_id, index, file_url) {
       this.data.option_list[index].audio_file_id = {
         file_url,

+ 9 - 0
src/views/book/courseware/create/components/question/character/CharacterSetting.vue

@@ -13,6 +13,13 @@
       <el-form-item label="框颜色">
         <el-color-picker v-model="property.frame_color" />
       </el-form-item>
+      <el-form-item label="框大小">
+        <el-radio-group v-model="property.frame_size">
+          <el-radio v-for="{ value, label } in frameSizeList" :key="value" :label="value">
+            {{ label }}
+          </el-radio>
+        </el-radio-group>
+      </el-form-item>
 
       <el-divider />
       <el-form-item v-if="property.model === 'miao'" label="描红格">
@@ -115,6 +122,7 @@ import {
   isEnable,
   frameList,
   audioGenerationMethodList,
+  frameSizeList,
 } from '@/views/book/courseware/data/character';
 import { GetTextToAudioConfParamList } from '@/api/app';
 import { speedRatioList } from '@/views/book/courseware/data/common';
@@ -134,6 +142,7 @@ export default {
       voice_type_list: [],
       emotion_list: [],
       speedRatioList,
+      frameSizeList,
     };
   },
   created() {

+ 32 - 2
src/views/book/courseware/create/components/question/character_structure/CharacterStructure.vue

@@ -88,6 +88,7 @@ import {
   isEnable,
 } from '@/views/book/courseware/data/characterStructure';
 import { GetStaticResources } from '@/api/app';
+import { PinyinBuild_OldFormat } from '@/api/book';
 import cnchar from 'cnchar';
 
 export default {
@@ -150,7 +151,7 @@ export default {
       });
       this.data.mind_map.node_list = node_list;
     },
-    handleHanzi(item) {
+    async handleHanzi(item) {
       let cons = item.content.trim();
       let MethodName = 'hz_resource_manager-GetMultHZStrokesContent';
       let data = {
@@ -179,9 +180,38 @@ export default {
         })
         .catch(() => {});
 
-      item.pinyin = cnchar.spell(cons, 'array', 'low', 'tone').join(' ');
+      // item.pinyin = cnchar.spell(cons, 'array', 'low', 'tone').join(' ');
+      if (cons) {
+        item.pinyin = await this.handlePinyin(cons);
+      }
+
       this.handleMindMap();
     },
+    // 自动生成拼音
+    handlePinyin(text) {
+      let data = {
+        text: text,
+        is_rich_text: 'false',
+        is_first_sentence_first_hz_pinyin_first_char_upper_case: 'false',
+        is_fill_space: 'false',
+        is_custom_fc: 'false',
+      };
+      return new Promise((resolve, reject) => {
+        PinyinBuild_OldFormat(data).then((res) => {
+          if (res.parsed_text) {
+            let mergedData = '';
+            res.parsed_text.paragraph_list.map((outerArr, i) =>
+              outerArr.map((innerArr, j) =>
+                innerArr.map((newItem, k) => {
+                  mergedData += newItem.pinyin + ' ';
+                }),
+              ),
+            );
+            resolve(mergedData);
+          }
+        });
+      });
+    },
     handleData() {
       let file_id_list = [];
       this.data.structure_img_list.forEach((item) => {

+ 13 - 1
src/views/book/courseware/create/components/question/character_structure/CharacterStructureSetting.vue

@@ -3,6 +3,13 @@
     <el-form :model="property" label-width="72px" label-position="left">
       <SerialNumber :property="property" />
       <BackgroundSet :property="property" />
+      <el-form-item label="框大小">
+        <el-radio-group v-model="property.frame_size">
+          <el-radio v-for="{ value, label } in frameSizeList" :key="value" :label="value">
+            {{ label }}
+          </el-radio>
+        </el-radio-group>
+      </el-form-item>
       <el-form-item label="拼音显示">
         <el-radio-group v-model="property.view_pinyin">
           <el-radio v-for="{ value, label } in showList" :key="value" :label="value">
@@ -18,7 +25,11 @@
 <script>
 import SettingMixin from '@/views/book/courseware/create/components/common/SettingMixin';
 
-import { getCharacterStructureProperty, showList } from '@/views/book/courseware/data/characterStructure';
+import {
+  getCharacterStructureProperty,
+  showList,
+  frameSizeList,
+} from '@/views/book/courseware/data/characterStructure';
 
 export default {
   name: 'CharacterStructureSetting',
@@ -27,6 +38,7 @@ export default {
     return {
       property: getCharacterStructureProperty(),
       showList,
+      frameSizeList,
     };
   },
   methods: {},

+ 8 - 3
src/views/book/courseware/create/components/question/dialogue_article/Article.vue

@@ -89,8 +89,8 @@
             <div v-if="item.type !== 'notice'" class="remark-box" @click="showRemark(index)">
               <SvgIcon icon-class="edit-line" />{{
                 item.remark && (item.remark.chs || item.remark.en || item.remark.img_list.length > 0)
-                  ? '修改备注'
-                  : '添加备注'
+                  ? '修改气泡'
+                  : '添加气泡'
               }}
             </div>
           </div>
@@ -141,6 +141,7 @@
           </div>
           <SvgIcon icon-class="delete-black" size="12" @click="removeFile" />
         </div>
+        <span class="tips">说明:需先点击“生成分词”按钮后,再进行文章校对或生成字幕节点</span>
         <div v-if="data.detail.length > 0" class="btn-box">
           <a @click="handleChangeContent">生成分词</a>
           <a @click="checkArticle">文章校对</a>
@@ -166,7 +167,7 @@
         </div>
       </div>
       <el-dialog
-        title="标注"
+        title="气泡"
         :visible.sync="remarkVisible"
         width="50%"
         :close-on-click-modal="false"
@@ -706,6 +707,7 @@ export default {
             color: '',
             matchWords: '',
             matchNotes: '',
+            notesColor: '',
             img: [],
             imgPosition: 'after',
           };
@@ -781,6 +783,7 @@ export default {
                   color: '',
                   matchWords: '',
                   matchNotes: '',
+                  notesColor: '',
                   img: [],
                   imgPosition: 'after',
                 };
@@ -836,6 +839,7 @@ export default {
       color,
       matchWords,
       matchNotes,
+      notesColor,
       img,
       imgPosition,
     ) {
@@ -846,6 +850,7 @@ export default {
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].color = color;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].matchWords = matchWords;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].matchNotes = matchNotes;
+      this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].notesColor = notesColor;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].img = img;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].imgPosition = imgPosition;
     },

+ 29 - 2
src/views/book/courseware/create/components/question/dialogue_article/ArticleSetting.vue

@@ -175,6 +175,7 @@ import {
   pinyinPositionList,
 } from '@/views/book/courseware/data/dialogueArticle';
 import { GetTextToAudioConfParamList } from '@/api/app';
+import { PinyinBuild_OldFormat } from '@/api/book';
 import cnchar from 'cnchar';
 
 export default {
@@ -218,12 +219,38 @@ export default {
       item[field] = item[field] ? item[field].trim() : '';
     },
     // 生成拼音
-    segWord(item) {
+    async segWord(item) {
       if (!item.fullName) {
         this.$message.warning('姓名不能为空');
         return;
       }
-      this.$set(item, 'fullPinyin', cnchar.spell(item.fullName, 'low', 'tone'));
+      let pinyin = await this.handlePinyin(item.fullName);
+      this.$set(item, 'fullPinyin', pinyin);
+    },
+    // 自动生成拼音
+    handlePinyin(text) {
+      let data = {
+        text: text,
+        is_rich_text: 'false',
+        is_first_sentence_first_hz_pinyin_first_char_upper_case: 'false',
+        is_fill_space: 'false',
+        is_custom_fc: 'false',
+      };
+      return new Promise((resolve, reject) => {
+        PinyinBuild_OldFormat(data).then((res) => {
+          if (res.parsed_text) {
+            let mergedData = '';
+            res.parsed_text.paragraph_list.map((outerArr, i) =>
+              outerArr.map((innerArr, j) =>
+                innerArr.map((newItem, k) => {
+                  mergedData += newItem.pinyin + ' ';
+                }),
+              ),
+            );
+            resolve(mergedData);
+          }
+        });
+      });
     },
     // 角色名分词
     partWord(item) {

+ 32 - 4
src/views/book/courseware/create/components/question/image_text/CheckPinyin.vue

@@ -53,7 +53,22 @@
             </span>
           </div>
         </div>
-        <el-input v-model="checkPinyinInput" type="text" class="checkPinyinInput" />
+        <!-- <el-input v-model="checkPinyinInput" type="text" class="checkPinyinInput" /> -->
+        <el-select
+          v-model="checkPinyinInput"
+          placeholder="请选择"
+          filterable
+          allow-create
+          default-first-option
+          class="checkPinyinInput"
+        >
+          <el-option v-for="item in pinyinList" :key="item.pinyin" :value="item.pinyin.replace(/,/g, '')">
+            <span style="float: left">{{ item.pinyin.replace(/,/g, '') }}</span>
+            <span style="float: right; font-size: 13px; color: #8492a6">{{
+              item.storage_type === 1 ? '机构库' : item.storage_type === 2 ? '全域库' : '个人库'
+            }}</span>
+          </el-option>
+        </el-select>
         <p class="tips">
           一到四声分别用数字1-4表示。拼音间用空格隔开,儿化音用_代替空格,如“骨朵儿”输入“gu1 duo3_er”。
         </p>
@@ -67,8 +82,7 @@
 </template>
 
 <script>
-// import { publicMethods, reparse } from '@/api/api';
-import th from 'element-ui/lib/locale/lang/th';
+import { toolGetWordPinyinCorrectionList } from '@/api/pinyinCorrection';
 
 export default {
   components: {},
@@ -100,6 +114,7 @@ export default {
         ['m̄', 'ḿ', 'm', 'm̀', 'm'],
       ],
       toneList: [' ', 'ˉ', 'ˊ', 'ˇ', 'ˋ'],
+      pinyinList: [], // 拼音校正列表
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -158,7 +173,20 @@ export default {
     selectItem(item, index) {
       this.activeIndex = index;
       this.itemActive = item;
-      this.dialogFlag = true;
+      this.pinyinList = [];
+      toolGetWordPinyinCorrectionList({
+        word: item.wordsName ? item.wordsName : item.onebest,
+      })
+        .then((res) => {
+          if (res.status === 1) {
+            this.pinyinList = res.pinyin_correction_list;
+          }
+          this.dialogFlag = true;
+        })
+        .catch(() => {
+          this.dialogFlag = true;
+        });
+
       this.checkPinyinInput = '';
     },
     cancleDialog() {

+ 1 - 0
src/views/book/courseware/create/components/question/image_text/CheckStyle.vue

@@ -160,6 +160,7 @@ export default {
               color: itemss.color,
               matchWords: itemss.matchWords,
               matchNotes: itemss.matchNotes,
+              notesColor: itemss.notesColor,
               img: itemss.img,
               imgPosition: itemss.imgPosition,
             };

+ 36 - 1
src/views/book/courseware/create/components/question/newWord_template/NewWordTemplate.vue

@@ -172,6 +172,7 @@ import {
   isEnable,
 } from '@/views/book/courseware/data/newWordTemplate';
 import { GetStaticResources } from '@/api/app';
+import { PinyinBuild_OldFormat } from '@/api/book';
 
 export default {
   name: 'NewWordTemplatePage',
@@ -227,7 +228,10 @@ export default {
             str += item;
           }
         });
-        items.pinyin = cnchar.spell(str, 'array', 'low', 'tone').join(' ');
+        // items.pinyin = cnchar.spell(str, 'array', 'low', 'tone').join(' ');
+        if (str) {
+          items.pinyin = await this.handlePinyin(str);
+        }
         let MethodName = 'hz_resource_manager-GetMultHZStrokesContent';
         let data = {
           hz_str: str,
@@ -319,10 +323,41 @@ export default {
             });
           })
           .catch(() => {});
+        for (let index = 0; index < arr.length; index++) {
+          if (regex.test(arr[index])) {
+            // 汉字
+            items.content_list[index].pinyin = await this.handlePinyin(arr[index]);
+          }
+        }
       } else {
         this.$message.warning('请先输入内容');
       }
     },
+    // 自动生成拼音
+    handlePinyin(text) {
+      let data = {
+        text: text,
+        is_rich_text: 'false',
+        is_first_sentence_first_hz_pinyin_first_char_upper_case: 'false',
+        is_fill_space: 'false',
+        is_custom_fc: 'false',
+      };
+      return new Promise((resolve, reject) => {
+        PinyinBuild_OldFormat(data).then((res) => {
+          if (res.parsed_text) {
+            let mergedData = '';
+            res.parsed_text.paragraph_list.map((outerArr, i) =>
+              outerArr.map((innerArr, j) =>
+                innerArr.map((newItem, k) => {
+                  mergedData += newItem.pinyin + ' ';
+                }),
+              ),
+            );
+            resolve(mergedData);
+          }
+        });
+      });
+    },
   },
 };
 </script>

+ 14 - 1
src/views/book/courseware/create/components/question/newWord_template/NewWordTemplateSetting.vue

@@ -3,6 +3,13 @@
     <el-form :model="property" label-width="72px" label-position="left">
       <SerialNumber :property="property" />
       <BackgroundSet :property="property" />
+      <el-form-item label="框大小">
+        <el-radio-group v-model="property.frame_size">
+          <el-radio v-for="{ value, label } in frameSizeList" :key="value" :label="value">
+            {{ label }}
+          </el-radio>
+        </el-radio-group>
+      </el-form-item>
       <el-form-item label="笔画动画">
         <el-radio-group v-model="property.is_enable_play_structure">
           <el-radio v-for="{ value, label } in showList" :key="value" :label="value">
@@ -39,7 +46,12 @@
 <script>
 import SettingMixin from '@/views/book/courseware/create/components/common/SettingMixin';
 
-import { getNewWordTemplateProperty, showList, displayList } from '@/views/book/courseware/data/newWordTemplate';
+import {
+  getNewWordTemplateProperty,
+  showList,
+  displayList,
+  frameSizeList,
+} from '@/views/book/courseware/data/newWordTemplate';
 
 export default {
   name: 'NewWordTemplateSetting',
@@ -49,6 +61,7 @@ export default {
       property: getNewWordTemplateProperty(),
       showList,
       displayList,
+      frameSizeList,
     };
   },
   methods: {},

+ 33 - 3
src/views/book/courseware/create/components/question/new_word/NewWord.vue

@@ -421,7 +421,7 @@ import { getNewWordData, getOption } from '@/views/book/courseware/data/newWord'
 import SelectUpload from '@/views/book/courseware/create/components/common/SelectUpload.vue';
 import { GetStaticResources, TextToAudioFile } from '@/api/app';
 import cnchar from 'cnchar';
-import { ChapterGetBookChapterStruct } from '@/api/book';
+import { ChapterGetBookChapterStruct, PinyinBuild_OldFormat } from '@/api/book';
 import { getWordTime, prepareTranscribe, fileToBase64Text, getWordTimes } from '@/api/article';
 import { addTone, handleToneValue } from '@/views/book/courseware/data/common';
 export default {
@@ -632,7 +632,7 @@ export default {
       }
     },
     // 获取数据
-    handleBlurCon(row) {
+    async handleBlurCon(row) {
       let cons = row.new_word.trim();
       let MethodName = 'hz_resource_manager-GetMultHZStrokesContent';
       let data = {
@@ -663,9 +663,39 @@ export default {
           this.loading = false;
         });
 
-      row.pinyin = cnchar.spell(cons, 'array', 'low', 'tone').join(' ');
+      // row.pinyin = cnchar.spell(cons, 'array', 'low', 'tone').join(' ');
+      if (cons) {
+        row.pinyin = await this.handlePinyin(cons);
+      }
+
       this.handleMindMap();
     },
+    // 自动生成拼音
+    handlePinyin(text) {
+      let data = {
+        text: text,
+        is_rich_text: 'false',
+        is_first_sentence_first_hz_pinyin_first_char_upper_case: 'false',
+        is_fill_space: 'false',
+        is_custom_fc: 'false',
+      };
+      return new Promise((resolve, reject) => {
+        PinyinBuild_OldFormat(data).then((res) => {
+          if (res.parsed_text) {
+            let mergedData = '';
+            res.parsed_text.paragraph_list.map((outerArr, i) =>
+              outerArr.map((innerArr, j) =>
+                innerArr.map((newItem, k) => {
+                  mergedData += newItem.pinyin + ' ';
+                }),
+              ),
+            );
+            resolve(mergedData);
+          }
+        });
+      });
+    },
+
     handleMindMap() {
       // 思维导图数据
       let node_list = [];

+ 58 - 17
src/views/book/courseware/create/components/question/notes/Notes.vue

@@ -169,30 +169,71 @@ export default {
       });
       this.data.mind_map.node_list = node_list;
     },
-    handleBlurCon(i) {
+    async handleBlurCon(i) {
       let text = this.data.option[i].con.replace(/<[^>]+>/g, '');
-      this.data.option[i].pinyin = cnchar
-        .spell(
+      if (text) {
+        this.data.option[i].pinyin = await this.handlePinyins(
           text,
-          'array',
-          this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' ? 'high' : 'low',
-          'tone',
-        )
-        .join(' ');
+          this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case,
+        );
+      }
+      // this.data.option[i].pinyin = cnchar
+      //   .spell(
+      //     text,
+      //     'array',
+      //     this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' ? 'high' : 'low',
+      //     'tone',
+      //   )
+      //   .join(' ');
 
       this.handleMindMap();
     },
-    handlePinyin() {
-      this.data.option.forEach((item) => {
+    async handlePinyin() {
+      for (const item of this.data.option) {
         let text = item.con.replace(/<[^>]+>/g, '');
-        item.pinyin = cnchar
-          .spell(
+        if (text) {
+          item.pinyin = await this.handlePinyins(
             text,
-            'array',
-            this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' ? 'high' : 'low',
-            'tone',
-          )
-          .join(' ');
+            this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case,
+          );
+        }
+      }
+      // this.data.option.forEach((item) => {
+      //   let text = item.con.replace(/<[^>]+>/g, '');
+
+      // item.pinyin = cnchar
+      //   .spell(
+      //     text,
+      //     'array',
+      //     this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' ? 'high' : 'low',
+      //     'tone',
+      //   )
+      //   .join(' ');
+      // });
+    },
+    // 自动生成拼音
+    handlePinyins(text, flag) {
+      let data = {
+        text: text,
+        is_rich_text: 'false',
+        is_first_sentence_first_hz_pinyin_first_char_upper_case: flag ? flag : 'false',
+        is_fill_space: 'false',
+        is_custom_fc: 'false',
+      };
+      return new Promise((resolve, reject) => {
+        PinyinBuild_OldFormat(data).then((res) => {
+          if (res.parsed_text) {
+            let mergedData = '';
+            res.parsed_text.paragraph_list.map((outerArr, i) =>
+              outerArr.map((innerArr, j) =>
+                innerArr.map((newItem, k) => {
+                  mergedData += newItem.pinyin + ' ';
+                }),
+              ),
+            );
+            resolve(mergedData);
+          }
+        });
       });
     },
     handleMultilingual() {

+ 6 - 1
src/views/book/courseware/create/components/question/video_interaction/VideoInteraction.vue

@@ -183,6 +183,7 @@ export default {
       this.data.video_id_list = file_id_list;
       this.data.file_id_list = this.data.files_id_list.concat(file_id_list);
       this.data.video_info_list = file_info_list;
+
       if (file_list.length === 0) {
         this.data.file_info_list = [];
       } else {
@@ -230,7 +231,11 @@ export default {
           id,
           position: (this.currentTime / this.duration) * 100,
         });
-        this.file_id_list.push(id);
+        this.data.file_info_list = this.data.file_info_list.sort(
+          (a, b) => Number(a.currentTime) - Number(b.currentTime),
+        );
+
+        this.file_id_list = this.data.file_info_list.map((item) => item.id).concat(this.data.video_id_list);
       } else {
         let index = this.data.file_info_list.findIndex((item) => item.id === id);
         this.data.file_info_list[index].file_name = type;

+ 3 - 0
src/views/book/courseware/data/article.js

@@ -7,6 +7,7 @@ import {
   isEnable,
   pinyinPositionList,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 
 export { arrangeTypeList, switchOption, isEnable, pinyinPositionList };
@@ -68,6 +69,8 @@ export function getArticleProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     mp3_position: positionList[0].value,
     is_enable_new_word: switchOption[0].value,

+ 19 - 19
src/views/book/courseware/data/bookType.js

@@ -27,10 +27,10 @@ import FillPage from '../create/components/question/fill/Fill.vue';
 import FillSetting from '../create/components/question/fill/FillSetting.vue';
 import RecordInput from '../create/components/question/record_input/RecordInput.vue';
 import RecordInputSetting from '../create/components/question/record_input/RecordInputSetting.vue';
-// import UploadControl from '../create/components/base/upload_control/UploadControl.vue';
-// import UploadControlSetting from '../create/components/base/upload_control/UploadControlSetting.vue';
-import UploadPreview from '../create/components/base/upload_preview/UploadPreview.vue';
-import UploadRreviewSetting from '../create/components/base/upload_preview/UploadRreviewSetting.vue';
+import UploadControl from '../create/components/base/upload_control/UploadControl.vue';
+import UploadControlSetting from '../create/components/base/upload_control/UploadControlSetting.vue';
+// import UploadPreview from '../create/components/base/upload_preview/UploadPreview.vue';
+// import UploadRreviewSetting from '../create/components/base/upload_preview/UploadRreviewSetting.vue';
 import PinyinBase from '../create/components/question/pinyin_base/PinyinBase.vue';
 import PinyinBaseSetting from '../create/components/question/pinyin_base/PinyinBaseSetting.vue';
 // import CharacterBase from '../create/components/base/character_base/CharacterBase.vue';
@@ -89,8 +89,8 @@ import SortPreview from '@/views/book/courseware/preview/components/sort/SortPre
 import VoiceMatrixPreview from '@/views/book/courseware/preview/components/voice_matrix/VoiceMatrixPreview.vue';
 import FillPreview from '@/views/book/courseware/preview/components/fill/FillPreview.vue';
 import RecordInputPreview from '../preview/components/record_input/RecordInputPreview.vue';
-// import UploadControlPreview from '../preview/components/upload_control/UploadControlPreview.vue';
-import UploadPreviewPreview from '../preview/components/upload_preview/UploadPreviewPreview.vue';
+import UploadControlPreview from '../preview/components/upload_control/UploadControlPreview.vue';
+// import UploadPreviewPreview from '../preview/components/upload_preview/UploadPreviewPreview.vue';
 import PinyinBasePreview from '../preview/components/pinyin_base/PinyinBasePreview.vue';
 // import CharacterBasePreview from '../preview/components/character_base/CharacterBasePreview.vue';
 import CharacterPreview from '../preview/components/character/CharacterPreview.vue';
@@ -184,22 +184,22 @@ export const bookTypeOption = [
         set: RecordInputSetting,
         preview: RecordInputPreview,
       },
-      // {
-      //   value: 'upload_control',
-      //   label: '上传',
-      //   icon: 'uploadControl',
-      //   component: UploadControl,
-      //   set: UploadControlSetting,
-      //   preview: UploadControlPreview,
-      // },
       {
-        value: 'upload_preview',
+        value: 'upload_control',
         label: '上传',
-        icon: 'uploadPreviews',
-        component: UploadPreview,
-        set: UploadRreviewSetting,
-        preview: UploadPreviewPreview,
+        icon: 'uploadControl',
+        component: UploadControl,
+        set: UploadControlSetting,
+        preview: UploadControlPreview,
       },
+      // {
+      //   value: 'upload_preview',
+      //   label: '上传',
+      //   icon: 'uploadPreviews',
+      //   component: UploadPreview,
+      //   set: UploadRreviewSetting,
+      //   preview: UploadPreviewPreview,
+      // },
       {
         value: 'drawing',
         label: '趣味画板',

+ 21 - 0
src/views/book/courseware/data/character.js

@@ -6,6 +6,7 @@ import {
   switchOption,
   isEnable,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 import { getRandomNumber } from '@/utils';
 
@@ -51,6 +52,23 @@ export const frameList = [
   },
 ];
 
+// 汉字框大小
+export const frameSizeList = [
+  {
+    value: 'big',
+    label: '大',
+  },
+  {
+    value: 'middle',
+    label: '中',
+  },
+  {
+    value: 'small',
+    label: '小',
+  },
+];
+
+
 // 读音生成方式
 export const audioGenerationMethodList = [
   {
@@ -89,6 +107,8 @@ export function getCharacterProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
 
     view_pinyin: showList[0].value,
@@ -109,6 +129,7 @@ export function getCharacterProperty() {
     ...commonComponentProperty,
     is_enable_voice_answer: switchOption[1].value,
     audio_generation_method: audioGenerationMethodList[0].value,
+    frame_size: frameSizeList[0].value,
   };
 }
 

+ 3 - 0
src/views/book/courseware/data/characterBase.js

@@ -5,6 +5,7 @@ import {
   arrangeTypeList,
   switchOption,
   isEnable,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 import { getRandomNumber } from '@/utils';
 
@@ -77,6 +78,8 @@ export function getCharacterBaseProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     audio_generation_method: audioGenerationMethodList[0].value,
     is_enable_voice_answer: switchOption[0].value,

+ 20 - 0
src/views/book/courseware/data/characterStructure.js

@@ -6,6 +6,7 @@ import {
   switchOption,
   isEnable,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 import { getRandomNumber } from '@/utils';
 
@@ -23,6 +24,22 @@ export const showList = [
   },
 ];
 
+// 汉字框大小
+export const frameSizeList = [
+  {
+    value: 'big',
+    label: '大',
+  },
+  {
+    value: 'middle',
+    label: '中',
+  },
+  {
+    value: 'small',
+    label: '小',
+  },
+];
+
 // 结构列表
 export const structureList = [
   {
@@ -118,9 +135,12 @@ export function getCharacterStructureProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
 
     view_pinyin: showList[0].value,
+    frame_size: frameSizeList[0].value,
 
     ...commonComponentProperty,
   };

+ 3 - 0
src/views/book/courseware/data/dialogueArticle.js

@@ -7,6 +7,7 @@ import {
   isEnable,
   pinyinPositionList,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 import { getRandomNumber } from '@/utils';
 
@@ -105,6 +106,8 @@ export function getArticleProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[0].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     mp3_position: positionList[0].value,
     is_enable_new_word: switchOption[0].value,

+ 3 - 0
src/views/book/courseware/data/drawing.js

@@ -4,6 +4,7 @@ import {
   serialNumberPositionList,
   isEnable,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 
 export { isEnable };
@@ -13,6 +14,8 @@ export function getDrawingProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     ...commonComponentProperty,
   };

+ 3 - 0
src/views/book/courseware/data/h5Games.js

@@ -3,6 +3,7 @@ import {
   serialNumberTypeList,
   serialNumberPositionList,
   isEnable,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 
 export { isEnable };
@@ -12,6 +13,8 @@ export function getH5GamesProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
   };
 }

+ 3 - 0
src/views/book/courseware/data/imageText.js

@@ -5,6 +5,7 @@ import {
   isEnable,
   pinyinPositionList,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 
 export { isEnable };
@@ -14,6 +15,8 @@ export function getImageTextProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
 
     view_pinyin: 'true', // 显示拼音

+ 3 - 0
src/views/book/courseware/data/newWord.js

@@ -6,6 +6,7 @@ import {
   switchOption,
   isEnable,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 
 export { arrangeTypeList, switchOption, isEnable };
@@ -68,6 +69,8 @@ export function getNewWordProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     audio_generation_method: audioGenerationMethodList[0].value,
     pinyin_position: pinyinPositionList[0].value,

+ 20 - 0
src/views/book/courseware/data/newWordTemplate.js

@@ -6,6 +6,7 @@ import {
   switchOption,
   isEnable,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 import { getRandomNumber } from '@/utils';
 
@@ -39,6 +40,22 @@ export const frameList = [
   },
 ];
 
+// 汉字框大小
+export const frameSizeList = [
+  {
+    value: 'big',
+    label: '大',
+  },
+  {
+    value: 'middle',
+    label: '中',
+  },
+  {
+    value: 'small',
+    label: '小',
+  },
+];
+
 // 模式类型
 export const modelList = [
   {
@@ -86,6 +103,8 @@ export function getNewWordTemplateProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
 
     is_enable_play_structure: showList[0].value,
@@ -97,6 +116,7 @@ export function getNewWordTemplateProperty() {
 
     // input模式
     is_enable_shiyi: showList[0].value,
+    frame_size: frameSizeList[0].value,
 
     ...commonComponentProperty,
   };

+ 3 - 0
src/views/book/courseware/data/notes.js

@@ -6,6 +6,7 @@ import {
   switchOption,
   isEnable,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 
 export { arrangeTypeList, switchOption, isEnable };
@@ -38,6 +39,8 @@ export function getNotesProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     is_word_show: wordShowList[0].value,
     view_pinyin: 'false', // 显示拼音

+ 3 - 0
src/views/book/courseware/data/pinyinBase.js

@@ -5,6 +5,7 @@ import {
   arrangeTypeList,
   switchOption,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 import { getRandomNumber } from '@/utils';
 
@@ -65,6 +66,8 @@ export function getPinyinBaseProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     arrange_type: arrangeTypeList[0].value,
     audio_position: audioPositionList[0].value,

+ 3 - 0
src/views/book/courseware/data/recordInput.js

@@ -4,6 +4,7 @@ import {
   serialNumberPositionList,
   switchOption,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 
 export { switchOption };
@@ -21,6 +22,8 @@ export function getRecordInputProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     ...commonComponentProperty,
   };

+ 3 - 0
src/views/book/courseware/data/table.js

@@ -5,6 +5,7 @@ import {
   switchOption,
   pinyinPositionList,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 import { getRandomNumber } from '@/utils';
 export { switchOption };
@@ -36,6 +37,8 @@ export function getTableProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
 
     height: 400,

+ 3 - 1
src/views/book/courseware/data/uploadControl.js

@@ -1,10 +1,12 @@
-import { displayList, serialNumberTypeList, serialNumberPositionList } from '@/views/book/courseware/data/common';
+import { displayList, serialNumberTypeList, serialNumberPositionList, serialNumberStyleList, } from '@/views/book/courseware/data/common';
 
 export function getUploadControlProperty() {
   return {
     serial_number: 1, // 序号
     sn_type: serialNumberTypeList[0].value, // 序号类型:letter字母 number数字  capital大写字母 bracket_number括号数字
     sn_position: serialNumberPositionList[3].value, // 序号位置:top-start top top-end,left-start left left-end等
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
   };
 }

+ 3 - 0
src/views/book/courseware/data/uploadPreview.js

@@ -3,6 +3,7 @@ import {
   serialNumberTypeList,
   serialNumberPositionList,
   switchOption,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 export { switchOption };
 
@@ -11,6 +12,8 @@ export function getUploadPreviewProperty() {
     serial_number: 1, // 序号
     sn_type: serialNumberTypeList[0].value, // 序号类型:letter字母 number数字  capital大写字母 bracket_number括号数字
     sn_position: serialNumberPositionList[3].value, // 序号位置:top-start top top-end,left-start left left-end等
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     is_enable_download: switchOption[0].value,
   };

+ 3 - 0
src/views/book/courseware/data/videoInteraction.js

@@ -4,6 +4,7 @@ import {
   serialNumberPositionList,
   isEnable,
   commonComponentProperty,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 
 export { isEnable };
@@ -24,6 +25,8 @@ export function getVideoInteractionProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     ...commonComponentProperty,
     feed_back: feedBackList[0].value

+ 3 - 0
src/views/book/courseware/data/write.js

@@ -5,6 +5,7 @@ import {
   arrangeTypeList,
   switchOption,
   isEnable,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 
 export { arrangeTypeList, switchOption, isEnable };
@@ -54,6 +55,8 @@ export function getWriteProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
     frame_type: 'tian',
     frame_color: '#F13232',

+ 3 - 0
src/views/book/courseware/data/writeBase.js

@@ -5,6 +5,7 @@ import {
   arrangeTypeList,
   switchOption,
   isEnable,
+  serialNumberStyleList,
 } from '@/views/book/courseware/data/common';
 import { getRandomNumber } from '@/utils';
 
@@ -77,6 +78,8 @@ export function getWriteBaseProperty() {
     serial_number: 1,
     sn_type: serialNumberTypeList[0].value,
     sn_position: serialNumberPositionList[3].value,
+    sn_style: serialNumberStyleList[0].value,
+    sn_background_color: '#ea3232', // 序号背景色
     sn_display_mode: displayList[1].value,
   };
 }

+ 6 - 0
src/views/book/courseware/preview/CoursewarePreview.vue

@@ -352,6 +352,12 @@ export default {
       };
     },
     /**
+     * 清空行选择列表
+     */
+    clearRowCheckList() {
+      this.rowCheckList = {};
+    },
+    /**
      * 分割整数为多个 1的倍数
      * @param {number} num
      * @param {number} parts

+ 13 - 4
src/views/book/courseware/preview/components/article/NormalModelChs.vue

@@ -202,7 +202,9 @@
                                       curTime < item.timeList[pItem.sentIndex].ed &&
                                       attrib
                                         ? attrib.topic_color
-                                        : pItem.config.color,
+                                        : pItem.notesColor
+                                          ? pItem.notesColor
+                                          : pItem.config.color,
                                   }"
                                   @click.stop="
                                     viewNotes(
@@ -335,7 +337,9 @@
                                   curTime <= item.timeList[pItem.sentIndex].ed &&
                                   attrib
                                     ? attrib.topic_color
-                                    : item.wordsList[pIndex + 1].config.color,
+                                    : item.wordsList[pIndex + 1].notesColor
+                                      ? item.wordsList[pIndex + 1].notesColor
+                                      : item.wordsList[pIndex + 1].config.color,
                               }"
                               @click.stop="
                                 viewNotes(
@@ -477,7 +481,9 @@
                                   curTime <= item.timeList[pItem.sentIndex].ed &&
                                   attrib
                                     ? attrib.topic_color
-                                    : item.wordsList[pIndex + 2].config.color,
+                                    : item.wordsList[pIndex + 2].notesColor
+                                      ? item.wordsList[pIndex + 2].notesColor
+                                      : item.wordsList[pIndex + 2].config.color,
                               }"
                               @click.stop="
                                 viewNotes(
@@ -619,7 +625,9 @@
                                     curTime < item.timeList[pItem.sentIndex].ed &&
                                     attrib
                                       ? attrib.topic_color
-                                      : pItem.config.color,
+                                      : pItem.notesColor
+                                        ? pItem.notesColor
+                                        : pItem.config.color,
                                 }"
                                 @click.stop="
                                   viewNotes(
@@ -1548,6 +1556,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 22 - 8
src/views/book/courseware/preview/components/article/PhraseModelChs.vue

@@ -154,7 +154,9 @@
                                     ? attrib
                                       ? attrib.topic_color
                                       : pItem.config.color
-                                    : pItem.config.color,
+                                    : pItem.notesColor
+                                      ? pItem.notesColor
+                                      : pItem.config.color,
                               }"
                               ><span
                                 v-for="(wItem, wIndex) in pItem.leg"
@@ -175,7 +177,9 @@
                                     curTime < item.timeList[pItem.sentIndex].ed &&
                                     attrib
                                       ? attrib.topic_color
-                                      : pItem.config.color,
+                                      : pItem.notesColor
+                                        ? pItem.notesColor
+                                        : pItem.config.color,
                                 }"
                                 @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs, pItem)"
                                 >{{ convertText(pItem.chs[wIndex]) }}</span
@@ -236,7 +240,9 @@
                                 textDecoration: item.wordsList[pIndex + 1].config.textDecoration,
                                 borderBottom: item.wordsList[pIndex + 1].config.border === 'dotted' ? '1px dotted' : '',
                                 fontWeight: item.wordsList[pIndex + 1].config.fontWeight,
-                                color: item.wordsList[pIndex + 1].config.color,
+                                color: item.wordsList[pIndex + 1].notesColor
+                                  ? item.wordsList[pIndex + 1].notesColor
+                                  : item.wordsList[pIndex + 1].config.color,
                                 height:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
@@ -330,7 +336,9 @@
                                 textDecoration: item.wordsList[pIndex + 2].config.textDecoration,
                                 borderBottom: item.wordsList[pIndex + 2].config.border === 'dotted' ? '1px dotted' : '',
                                 fontWeight: item.wordsList[pIndex + 2].config.fontWeight,
-                                color: item.wordsList[pIndex + 2].config.color,
+                                color: item.wordsList[pIndex + 2].notesColor
+                                  ? item.wordsList[pIndex + 2].notesColor
+                                  : item.wordsList[pIndex + 2].config.color,
                                 height:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
@@ -425,7 +433,9 @@
                                   ? attrib
                                     ? attrib.topic_color
                                     : pItem.config.color
-                                  : pItem.config.color,
+                                  : pItem.notesColor
+                                    ? pItem.notesColor
+                                    : pItem.config.color,
                             }"
                             ><span
                               v-for="(wItem, wIndex) in pItem.leg"
@@ -446,7 +456,9 @@
                                   curTime < item.timeList[pItem.sentIndex].ed &&
                                   attrib
                                     ? attrib.topic_color
-                                    : pItem.config.color,
+                                    : pItem.notesColor
+                                      ? pItem.notesColor
+                                      : pItem.config.color,
                               }"
                               @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs, pItem)"
                               >{{ convertText(pItem.chs[wIndex]) }}</span
@@ -603,7 +615,7 @@
                                   textDecoration: pItem.config.textDecoration,
                                   borderBottom: pItem.config.border === 'dotted' ? '1px dotted' : '',
                                   fontWeight: pItem.config.fontWeight,
-                                  color: pItem.config.color,
+                                  color: pItem.notesColor ? pItem.notesColor : pItem.config.color,
                                   height:
                                     attrib && attrib.font_size
                                       ? attrib.font_size.replace('pt', '') * 1.4 + 'pt'
@@ -848,7 +860,7 @@
                                 textDecoration: pItem.config.textDecoration,
                                 borderBottom: pItem.config.border === 'dotted' ? '1px dotted' : '',
                                 fontWeight: pItem.config.fontWeight,
-                                color: pItem.config.color,
+                                color: pItem.notesColor ? pItem.notesColor : pItem.config.color,
                                 height:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
@@ -1280,6 +1292,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };
@@ -1349,6 +1362,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/article/Practicechs.vue

@@ -972,6 +972,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/article/WordModelChs.vue

@@ -1135,6 +1135,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 91 - 14
src/views/book/courseware/preview/components/article/components/WordPhraseDetail.vue

@@ -291,6 +291,40 @@
           </div>
         </div>
       </div>
+      <div class="bottom" v-if="data && data.endata">
+        <div class="from">来自百度汉语</div>
+        <div class="wordDetail">
+          <p class="word">
+            {{ data.new_word }}
+            <span v-for="(fy, i) in data.endata.mean_list" :key="i"> [{{ fy.pinyin }}] </span>
+            <img v-if="data.endata.src_tts" @click="playAudio('audiosrc')" src="@/assets/play-red.png" alt="" />
+            <audio ref="audiosrc" :src="data.endata.src_tts"></audio>
+          </p>
+          <div class="yinpin">
+            <div>
+              <span>{{ data.endata.dst }} </span>
+              <img v-if="data.endata.dst_tts" @click="playAudio('audiodst')" src="@/assets/play-red.png" alt="" />
+              <audio ref="audiodst" :src="data.endata.dst_tts"></audio>
+            </div>
+          </div>
+          <div class="jieshu" v-for="(fy, i) in data.endata.mean_list" :key="i">
+            <p v-if="data.endata.mean_list.length > 1">{{ fy.pinyin }}</p>
+            <div v-for="(fys, j) in fy.exp_list" :key="j">
+              <div class="jieshu-item">
+                <label>{{ j + 1 }}.</label>
+                <span>{{ fys.mean }}</span>
+              </div>
+
+              <div class="jieshu-item" v-if="JSON.parse(fys.sentence).length > 0 && JSON.parse(fys.sentence)[0]">
+                <label style="opacity: 0">{{ j + 1 }}.</label>
+                <div>
+                  <p v-for="(fyss, l) in JSON.parse(fys.sentence)" :key="l">{{ fyss }}</p>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
     </div>
     <div class="cut-area" style="display: none"></div>
   </div>
@@ -300,7 +334,7 @@
 import Strockplayredline from './Strockplayredline.vue';
 import Audio from './AudioRed.vue';
 import { TextToAudioFile } from '@/api/app';
-import { getCoursewareWordExampleSentenceList } from '@/api/article';
+import { getCoursewareWordExampleSentenceList, toolDictionary } from '@/api/article';
 import { sanitizeHTML } from '@/utils/common';
 
 export default {
@@ -461,7 +495,9 @@ export default {
         }
       }
     },
-    playAudio() {},
+    playAudio(audio) {
+      this.$refs[audio].play();
+    },
     // 关闭单词详情
     closeWordShow() {
       this.closeWord(false);
@@ -827,6 +863,7 @@ export default {
     },
     initData() {
       this.viewIntp();
+      this.getDictionary();
     },
     handleChangeTab(flag) {
       this[flag] = !this[flag];
@@ -857,6 +894,22 @@ export default {
         });
       }
     },
+    // 百度汉语内容
+    getDictionary() {
+      toolDictionary({
+        word: this.data.new_word,
+        from: 'zh',
+        to: 'en',
+      })
+        .then((res) => {
+          if (res.status === 1) {
+            this.data.endata = res;
+          }
+        })
+        .catch((err) => {
+          this.loading3 = false;
+        });
+    },
   },
 };
 </script>
@@ -1303,7 +1356,7 @@ export default {
 
   .bottom {
     padding-bottom: 23px;
-    margin-top: 16px;
+    margin-top: 16px !important;
 
     .from {
       display: flex;
@@ -1311,7 +1364,6 @@ export default {
       justify-content: flex-end;
 
       //   text-align: right;
-      margin-right: 16px;
       font-size: 14px;
       line-height: 16px;
       color: #000;
@@ -1324,9 +1376,10 @@ export default {
     }
 
     .wordDetail {
-      width: 538px;
+      // width: 538px;
       padding-bottom: 23px;
-      margin-left: 40px;
+
+      // margin-left: 40px;
       border-bottom: 1px solid rgba(0, 0, 0, 10%);
 
       p {
@@ -1334,15 +1387,27 @@ export default {
       }
 
       .word {
+        display: flex;
+        align-items: center;
         font-size: 24px;
         font-weight: bold;
         line-height: 28px;
         color: #000;
+
+        img {
+          width: 24px;
+          height: 24px;
+          cursor: pointer;
+        }
+
+        span {
+          margin: 0 5px;
+        }
       }
 
       .yinpin {
         display: flex;
-        margin-top: 16px;
+        margin: 16px 0;
         font-size: 16px;
         line-height: 150%;
         color: #000;
@@ -1370,18 +1435,30 @@ export default {
       }
 
       .jieshu {
-        display: flex;
-        margin-top: 16px;
+        margin-bottom: 10px;
         font-size: 16px;
         line-height: 150%;
         color: #000;
 
-        > :nth-child(1) {
-          width: 30px;
-        }
+        .jieshu-item {
+          display: flex;
+          font-size: 13px;
+          line-height: 25px;
 
-        :nth-child(2) {
-          width: 524px;
+          label {
+            margin-right: 6px;
+            color: #848691;
+            word-break: keep-all;
+          }
+
+          > span {
+            font-weight: bold;
+            color: #272933;
+          }
+
+          > div {
+            color: #272933;
+          }
         }
       }
     }

+ 1 - 0
src/views/book/courseware/preview/components/article/index.vue

@@ -593,6 +593,7 @@ export default {
 
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 54 - 6
src/views/book/courseware/preview/components/character/CharacterPreview.vue

@@ -13,6 +13,7 @@
         >
           <div
             class="number-box"
+            :class="['number-box-' + data.property.frame_size]"
             :style="{
               marginTop: isEnable(data.property.view_pinyin) ? '30px' : '',
             }"
@@ -53,6 +54,7 @@
                     <el-image
                       v-if="items.file_list[0]"
                       class="items-image"
+                      :class="['frame-size-' + data.property.frame_size]"
                       :src="items.file_list[0].file_url"
                       fit="contain"
                       :style="{
@@ -64,6 +66,7 @@
                   <template v-else-if="items && items.type === 'lian'">
                     <span
                       class="items-lian"
+                      :class="['items-lian-' + data.property.frame_size]"
                       :style="{
                         color:
                           data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
@@ -105,6 +108,7 @@
                       item.content_list[indexs + 1].type !== 'lian'
                         ? 'NoborderRight'
                         : '',
+                      'frame-size-' + data.property.frame_size,
                     ]"
                     :play-color="
                       data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : ''
@@ -138,6 +142,7 @@
                       item.content_list[indexs + 1].type !== 'lian'
                         ? 'NoborderRight'
                         : '',
+                      'frame-size-' + data.property.frame_size,
                     ]"
                     :style="{
                       borderColor:
@@ -226,7 +231,7 @@
                       items.hz_info && items.hz_info[0].hzDetail.hz_json ? items.hz_info[0].hzDetail.hz_json : []
                     "
                     class="hanzi-storck"
-                    :class="['strock-chinese', 'border-right-none']"
+                    :class="['strock-chinese', 'border-right-none', 'frame-size-' + data.property.frame_size]"
                     :bg-type="data.property.frame_type"
                     :play-color="
                       data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : ''
@@ -262,7 +267,7 @@
                   :book-text="item.content"
                   :target-div="'write-praT-1' + indexI + index + randomId"
                   :book-strokes="itemI.strokes"
-                  :class="['strock-chinese']"
+                  :class="['strock-chinese', 'frame-size-' + data.property.frame_size]"
                   :bg-type="data.property.frame_type"
                   :play-color="
                     data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : ''
@@ -281,7 +286,7 @@
                   :target-div="'write-praT-2' + indexI + index + randomId"
                   :book-strokes="itemI.strokes"
                   :stroke-color="'#ddd'"
-                  :class="['strock-chinese']"
+                  :class="['strock-chinese', 'frame-size-' + data.property.frame_size]"
                   :bg-type="data.property.frame_type"
                   :play-color="
                     data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : ''
@@ -297,7 +302,7 @@
               <!-- 书写 -->
               <div v-for="(items, indexs) in item.imgArr" :key="'write' + indexs" class="con-box">
                 <div
-                  :class="['strockplay-newWord']"
+                  :class="['strockplay-newWord', 'frame-size-' + data.property.frame_size]"
                   :style="{
                     borderColor:
                       data.unified_attrib && data.unified_attrib.topic_color
@@ -414,7 +419,12 @@
         :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
         @handleWav="handleWav"
       />
-      <PreviewOperation @showAnswerAnalysis="showAnswerAnalysis" @retry="retry" />
+      <PreviewOperation
+        v-if="data.property.model === 'miao'"
+        @showAnswerAnalysis="showAnswerAnalysis"
+        @retry="retry"
+        :isShowAnswer="isShowAnswers"
+      />
       <AnswerCorrect
         :answer-correct="data?.answer_correct"
         :visible.sync="visibleAnswerCorrect"
@@ -473,6 +483,7 @@ export default {
       miao_arr: [],
       if_miao_show: false, // 描红模块
       randomId: Math.random().toString(36).substring(2, 12),
+      isShowAnswers: false,
     };
   },
   computed: {},
@@ -495,7 +506,16 @@ export default {
       this.answer.record_list = val;
     },
   },
-  created() {},
+  created() {
+    if (
+      (this.data.answer_list && this.data.answer_list.length > 0) ||
+      (this.data.analysis_list && this.data.analysis_list.length > 0)
+    ) {
+      this.isShowAnswers = true;
+    } else {
+      this.isShowAnswers = false;
+    }
+  },
   methods: {
     handleWav(data) {
       this.data.record_list = data;
@@ -722,6 +742,14 @@ export default {
     height: 80px;
     margin-right: 16px;
 
+    &-middle {
+      height: 70px;
+    }
+
+    &-small {
+      height: 60px;
+    }
+
     .number {
       display: block;
       width: 24px;
@@ -761,6 +789,16 @@ export default {
     border-radius: 4px;
   }
 
+  .frame-size-middle {
+    width: 70px !important;
+    height: 70px !important;
+  }
+
+  .frame-size-small {
+    width: 60px !important;
+    height: 60px !important;
+  }
+
   .items-lian {
     display: block;
     height: 80px;
@@ -768,6 +806,16 @@ export default {
     font-size: 34px;
     line-height: 80px;
     color: #346cda;
+
+    &-middle {
+      height: 70px;
+      line-height: 70px;
+    }
+
+    &-small {
+      height: 60px;
+      line-height: 60px;
+    }
   }
 
   .items-flex {

+ 62 - 4
src/views/book/courseware/preview/components/character_structure/CharacterStructurePreview.vue

@@ -26,6 +26,7 @@
               :id="item.id"
               :key="'op' + i"
               class="option_one"
+              :class="['option_one-' + data.property.frame_size]"
               :style="{
                 background:
                   data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
@@ -69,6 +70,7 @@
               <!-- @click="writeWord(conItem, items.pinyin)" -->
               <div
                 class="strockplay-newWord"
+                :class="['frame-size-' + data.property.frame_size]"
                 :style="{
                   borderColor:
                     data.unified_attrib && data.unified_attrib.topic_color
@@ -102,7 +104,7 @@
           <div class="image">
             <img src="@/assets/drag-arrows.png" alt="" />
           </div>
-          <div class="answer">
+          <div class="answer" :class="['answer-' + data.property.frame_size]">
             <!-- :disabled="TaskModel == 'ANSWER' ? true : items.is_example ? true : false" -->
 
             <draggable
@@ -111,6 +113,7 @@
               group="site"
               :disabled="items.is_example"
               class="content-box content-boxs"
+              :class="['content-boxs-' + data.property.frame_size]"
               :move="onMove"
             >
               <transition-group>
@@ -118,7 +121,10 @@
                   v-for="(answer, i) in answer.answer_list[row].answer_list"
                   :key="'op' + i"
                   class="option_one"
-                  :class="[items.is_example ? 'option_one_example' : classNameJudge(items, row)]"
+                  :class="[
+                    items.is_example ? 'option_one_example' : classNameJudge(items, row),
+                    'option_one-' + data.property.frame_size,
+                  ]"
                   :index="'form' + i"
                   :style="{
                     borderColor:
@@ -141,7 +147,10 @@
                   v-if="answer.answer_list[row].answer_list.length == 0"
                   :key="row"
                   class="option_one"
-                  :class="[isJudgingRightWrong && items.answer ? 'wrong' : '']"
+                  :class="[
+                    isJudgingRightWrong && items.answer ? 'wrong' : '',
+                    'option_one-' + data.property.frame_size,
+                  ]"
                   :style="{
                     borderColor:
                       data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
@@ -191,6 +200,7 @@
                 <template v-if="items.hz_info.length > 0">
                   <div
                     class="strockplay-newWord"
+                    :class="['frame-size-' + data.property.frame_size]"
                     :style="{
                       borderColor:
                         data.unified_attrib && data.unified_attrib.topic_color
@@ -229,7 +239,7 @@
               <div class="answer">
                 <div
                   class="option_one"
-                  :class="[items.is_example ? 'option_one_example' : '']"
+                  :class="[items.is_example ? 'option_one_example' : '', 'option_one-' + data.property.frame_size]"
                   :style="{
                     borderColor:
                       data.unified_attrib && data.unified_attrib.topic_color
@@ -408,6 +418,14 @@ export default {
   .content-boxs {
     height: 80px;
     overflow: hidden;
+
+    &-middle {
+      height: 70px;
+    }
+
+    &-small {
+      height: 60px;
+    }
   }
 
   .option {
@@ -429,6 +447,16 @@ export default {
       background: #9dcaff;
       border-radius: 4px;
 
+      &-middle {
+        width: 62px;
+        height: 62px;
+      }
+
+      &-small {
+        width: 52px;
+        height: 52px;
+      }
+
       img {
         max-width: 100%;
         max-height: 100%;
@@ -455,6 +483,16 @@ export default {
     border-radius: 4px;
   }
 
+  .frame-size-middle {
+    width: 70px !important;
+    height: 70px !important;
+  }
+
+  .frame-size-small {
+    width: 60px !important;
+    height: 60px !important;
+  }
+
   .one {
     display: flex;
     align-items: center;
@@ -505,6 +543,16 @@ export default {
       width: 80px;
       height: 80px;
 
+      &-middle {
+        width: 70px;
+        height: 70px;
+      }
+
+      &-small {
+        width: 60px;
+        height: 60px;
+      }
+
       .option_one {
         display: flex;
         align-items: center;
@@ -515,6 +563,16 @@ export default {
         border: 2px solid #346cda;
         border-radius: 4px;
 
+        &-middle {
+          width: 70px;
+          height: 70px;
+        }
+
+        &-small {
+          width: 60px;
+          height: 60px;
+        }
+
         &.right {
           background: #e9f7f2 !important;
           border-color: $right-color !important;

+ 13 - 4
src/views/book/courseware/preview/components/dialogue_article/NormalModelChs.vue

@@ -203,7 +203,9 @@
                                         curTime < item.timeList[pItem.sentIndex].ed &&
                                         attrib
                                           ? attrib.topic_color
-                                          : pItem.config.color,
+                                          : pItem.notesColor
+                                            ? pItem.notesColor
+                                            : pItem.config.color,
                                       fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                       lineHeight:
                                         attrib && attrib.font_size
@@ -312,7 +314,9 @@
                                     curTime <= item.timeList[pItem.sentIndex].ed &&
                                     attrib
                                       ? attrib.topic_color
-                                      : item.wordsList[pIndex + 1].config.color,
+                                      : item.wordsList[pIndex + 1].notesColor
+                                        ? item.wordsList[pIndex + 1].notesColor
+                                        : item.wordsList[pIndex + 1].config.color,
                                   fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                   lineHeight:
                                     attrib && attrib.font_size
@@ -435,7 +439,9 @@
                                     curTime <= item.timeList[pItem.sentIndex].ed &&
                                     attrib
                                       ? attrib.topic_color
-                                      : item.wordsList[pIndex + 2].config.color,
+                                      : item.wordsList[pIndex + 2].notesColor
+                                        ? item.wordsList[pIndex + 2].notesColor
+                                        : item.wordsList[pIndex + 2].config.color,
                                   fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                   lineHeight:
                                     attrib && attrib.font_size
@@ -561,7 +567,9 @@
                                       curTime <= item.timeList[pItem.sentIndex].ed &&
                                       attrib
                                         ? attrib.topic_color
-                                        : pItem.config.color,
+                                        : pItem.notesColor
+                                          ? pItem.notesColor
+                                          : pItem.config.color,
                                     fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                     lineHeight:
                                       attrib && attrib.font_size
@@ -989,6 +997,7 @@ export default {
 
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 13 - 4
src/views/book/courseware/preview/components/dialogue_article/PhraseModelChs.vue

@@ -168,7 +168,9 @@
                                       ? attrib
                                         ? attrib.topic_color
                                         : pItem.config.color
-                                      : pItem.config.color,
+                                      : pItem.notesColor
+                                        ? pItem.notesColor
+                                        : pItem.config.color,
                                 }"
                                 @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs, pItem)"
                                 >{{ convertText(pItem.chs) }}</span
@@ -241,7 +243,9 @@
                                       ? attrib
                                         ? attrib.topic_color
                                         : item.wordsList[pIndex + 1].config.color
-                                      : item.wordsList[pIndex + 1].config.color,
+                                      : item.wordsList[pIndex + 1].notesColor
+                                        ? item.wordsList[pIndex + 1].notesColor
+                                        : item.wordsList[pIndex + 1].config.color,
                                 }"
                                 @click.stop="
                                   viewNotes(
@@ -343,7 +347,9 @@
                                       ? attrib
                                         ? attrib.topic_color
                                         : item.wordsList[pIndex + 2].config.color
-                                      : item.wordsList[pIndex + 2].config.color,
+                                      : item.wordsList[pIndex + 2].notesColor
+                                        ? item.wordsList[pIndex + 2].notesColor
+                                        : item.wordsList[pIndex + 2].config.color,
                                 }"
                                 @click.stop="
                                   viewNotes(
@@ -423,7 +429,9 @@
                                     ? attrib
                                       ? attrib.topic_color
                                       : pItem.config.color
-                                    : pItem.config.color,
+                                    : pItem.notesColor
+                                      ? pItem.notesColor
+                                      : pItem.config.color,
                               }"
                               @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs, pItem)"
                               >{{ convertText(pItem.chs) }}</span
@@ -873,6 +881,7 @@ export default {
 
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/dialogue_article/Practicechs.vue

@@ -1084,6 +1084,7 @@ export default {
 
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/dialogue_article/WordModelChs.vue

@@ -775,6 +775,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/dialogue_article/index.vue

@@ -591,6 +591,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 1
src/views/book/courseware/preview/components/image_text/ImageTextPreview.vue

@@ -58,7 +58,7 @@
         />
       </div>
     </div>
-    <PreviewOperation @showAnswerAnalysis="showAnswerAnalysis" @retry="retry" />
+    <PreviewOperation v-if="data.input_list.length > 0" @showAnswerAnalysis="showAnswerAnalysis" @retry="retry" />
     <AnswerCorrect
       :answer-correct="data?.answer_correct"
       :visible.sync="visibleAnswerCorrect"

+ 6 - 0
src/views/book/courseware/preview/components/image_text/components/MagazineSentence.vue

@@ -419,6 +419,7 @@ export default {
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
+    this.handlePlay();
     this.audio.addEventListener('timeupdate', () => {
       this.currentTime = this.audio.currentTime;
       const currentTime = this.audio.currentTime;
@@ -481,6 +482,7 @@ export default {
           this.isPlay = false;
           this.currentTime = 0;
           this.sentenceActive -= 1;
+          this.handlePlay();
         } else {
           this.$message.warning('已经是第一句');
         }
@@ -489,6 +491,7 @@ export default {
         this.isPlay = false;
         this.currentTime = 0;
         this.sentenceActive += 1;
+        this.handlePlay();
       } else {
         this.$message.warning('已经是最后一句');
       }
@@ -518,6 +521,9 @@ export default {
       }
     },
   },
+  beforeDestroy() {
+    this.audio.pause();
+  },
 };
 </script>
 

+ 2 - 2
src/views/book/courseware/preview/components/matching/MatchingPreview.vue

@@ -346,7 +346,7 @@ export default {
       let svg = document.createElementNS(svgNS, 'svg');
       svg.setAttribute(
         'style',
-        `position:absolute; width: 74px; height: ${Math.max(8, height)}px; top: ${top}px; left: ${left}px;overflow: visible;`,
+        `position:absolute; width: 102px; height: ${Math.max(8, height)}px; top: ${top}px; left: ${left}px;overflow: visible;`,
       );
       svg.classList.add('connection-line', `svg-${mark}-${curMark}`); // 添加类名
       // 向SVG元素添加 path 元素
@@ -546,7 +546,7 @@ export default {
 
     .list-item {
       display: flex;
-      column-gap: 72px;
+      column-gap: 100px;
       align-items: stretch;
       padding: 1px;
 

+ 36 - 0
src/views/book/courseware/preview/components/newWord_template/NewWordTemplatePreview.vue

@@ -11,6 +11,7 @@
       >
         <div
           class="number-box"
+          :class="['number-box-' + data.property.frame_size]"
           :style="{
             marginTop: isEnable(data.property.view_pinyin)
               ? '30px'
@@ -111,6 +112,7 @@
                   <el-image
                     v-if="items.file_list[0]"
                     class="items-image"
+                    :class="['frame-size-' + data.property.frame_size]"
                     :src="items.file_list[0].file_url"
                     fit="contain"
                     :style="{
@@ -122,6 +124,7 @@
                 <template v-else-if="items && items.type === 'lian'">
                   <span
                     class="items-lian"
+                    :class="['items-lian-' + data.property.frame_size]"
                     :style="{
                       color:
                         data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
@@ -156,6 +159,7 @@
                     item.content_list[indexs + 1].type !== 'lian'
                       ? 'NoborderRight'
                       : '',
+                    'frame-size-' + data.property.frame_size,
                   ]"
                   bg-type="tian"
                   :style="{
@@ -234,6 +238,7 @@
           >
             <div
               class="number-box"
+              :class="['number-box-' + data.property.frame_size]"
               :style="{
                 marginTop: isEnable(data.property.view_pinyin)
                   ? '30px'
@@ -335,6 +340,7 @@
                       <el-image
                         v-if="items.file_list[0]"
                         class="items-image"
+                        :class="['frame-size-' + data.property.frame_size]"
                         :src="items.file_list[0].file_url"
                         fit="contain"
                         :style="{
@@ -348,6 +354,7 @@
                     <template v-else-if="items && items.type === 'lian'">
                       <span
                         class="items-lian"
+                        :class="['items-lian-' + data.property.frame_size]"
                         :style="{
                           color:
                             data.unified_attrib && data.unified_attrib.topic_color
@@ -386,6 +393,7 @@
                         item.content_list[indexs + 1].type !== 'lian'
                           ? 'NoborderRight'
                           : '',
+                        'frame-size-' + data.property.frame_size,
                       ]"
                       :style="{
                         borderColor:
@@ -582,6 +590,14 @@ export default {
     height: 80px;
     margin-right: 16px;
 
+    &-middle {
+      height: 70px;
+    }
+
+    &-small {
+      height: 60px;
+    }
+
     .number {
       display: block;
       width: 24px;
@@ -620,6 +636,16 @@ export default {
     border-radius: 4px;
   }
 
+  .frame-size-middle {
+    width: 70px !important;
+    height: 70px !important;
+  }
+
+  .frame-size-small {
+    width: 60px !important;
+    height: 60px !important;
+  }
+
   .items-lian {
     display: block;
     height: 80px;
@@ -627,6 +653,16 @@ export default {
     font-size: 34px;
     line-height: 80px;
     color: #346cda;
+
+    &-middle {
+      height: 70px;
+      line-height: 70px;
+    }
+
+    &-small {
+      height: 60px;
+      line-height: 60px;
+    }
   }
 
   .inputdv {

+ 2 - 1
src/views/book/courseware/preview/components/newWord_template/components/Strockplayredline.vue

@@ -23,7 +23,8 @@
         :style="{ color: playColor ? playColor : '' }"
         @click="playHanzi"
       />
-      <div :id="targetDiv" class="character-target-div" :style="{ padding: '5px' }"></div>
+      <!-- :style="{ padding: '5px' }" -->
+      <div :id="targetDiv" class="character-target-div"></div>
     </template>
     <template v-else>
       <span class="book-text">{{ Book_text }}</span>

+ 91 - 14
src/views/book/courseware/preview/components/new_word/components/WordPhraseDetail.vue

@@ -216,6 +216,40 @@
           </div>
         </div>
       </div>
+      <div class="bottom" v-if="data && data.endata">
+        <div class="from">来自百度汉语</div>
+        <div class="wordDetail">
+          <p class="word">
+            {{ data.new_word }}
+            <span v-for="(fy, i) in data.endata.mean_list" :key="i"> [{{ fy.pinyin }}] </span>
+            <img v-if="data.endata.src_tts" @click="playAudio('audiosrc')" src="@/assets/play-red.png" alt="" />
+            <audio ref="audiosrc" :src="data.endata.src_tts"></audio>
+          </p>
+          <div class="yinpin">
+            <div>
+              <span>{{ data.endata.dst }} </span>
+              <img v-if="data.endata.dst_tts" @click="playAudio('audiodst')" src="@/assets/play-red.png" alt="" />
+              <audio ref="audiodst" :src="data.endata.dst_tts"></audio>
+            </div>
+          </div>
+          <div class="jieshu" v-for="(fy, i) in data.endata.mean_list" :key="i">
+            <p v-if="data.endata.mean_list.length > 1">{{ fy.pinyin }}</p>
+            <div v-for="(fys, j) in fy.exp_list" :key="j">
+              <div class="jieshu-item">
+                <label>{{ j + 1 }}.</label>
+                <span>{{ fys.mean }}</span>
+              </div>
+
+              <div class="jieshu-item" v-if="JSON.parse(fys.sentence).length > 0 && JSON.parse(fys.sentence)[0]">
+                <label style="opacity: 0">{{ j + 1 }}.</label>
+                <div>
+                  <p v-for="(fyss, l) in JSON.parse(fys.sentence)" :key="l">{{ fyss }}</p>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
     </div>
     <div class="cut-area" style="display: none"></div>
   </div>
@@ -224,7 +258,7 @@
 <script>
 import Strockplayredline from './Strockplayredline.vue';
 import AudioRed from '../../voice_matrix/components/AudioRed.vue';
-import { getCoursewareWordExampleSentenceList } from '@/api/article';
+import { getCoursewareWordExampleSentenceList, toolDictionary } from '@/api/article';
 import { sanitizeHTML } from '@/utils/common';
 
 export default {
@@ -351,7 +385,9 @@ export default {
         }
       }
     },
-    playAudio() {},
+    playAudio(audio) {
+      this.$refs[audio].play();
+    },
     // 关闭单词详情
     closeWordShow() {
       this.closeWord(false);
@@ -724,6 +760,7 @@ export default {
       }
       this.data.new_word_str = new_word_str;
       this.viewIntp();
+      this.getDictionary();
     },
     handleChangeTab(flag) {
       this[flag] = !this[flag];
@@ -765,6 +802,22 @@ export default {
         });
       }
     },
+    // 百度汉语内容
+    getDictionary() {
+      toolDictionary({
+        word: this.data.new_word,
+        from: 'zh',
+        to: 'en',
+      })
+        .then((res) => {
+          if (res.status === 1) {
+            this.data.endata = res;
+          }
+        })
+        .catch((err) => {
+          this.loading3 = false;
+        });
+    },
   },
 };
 </script>
@@ -1212,7 +1265,7 @@ export default {
 
   .bottom {
     padding-bottom: 23px;
-    margin-top: 16px;
+    margin-top: 16px !important;
 
     .from {
       display: flex;
@@ -1220,7 +1273,6 @@ export default {
       justify-content: flex-end;
 
       //   text-align: right;
-      margin-right: 16px;
       font-size: 14px;
       line-height: 16px;
       color: #000;
@@ -1233,9 +1285,10 @@ export default {
     }
 
     .wordDetail {
-      width: 538px;
+      // width: 538px;
       padding-bottom: 23px;
-      margin-left: 40px;
+
+      // margin-left: 40px;
       border-bottom: 1px solid rgba(0, 0, 0, 10%);
 
       p {
@@ -1243,15 +1296,27 @@ export default {
       }
 
       .word {
+        display: flex;
+        align-items: center;
         font-size: 24px;
         font-weight: bold;
         line-height: 28px;
         color: #000;
+
+        img {
+          width: 24px;
+          height: 24px;
+          cursor: pointer;
+        }
+
+        span {
+          margin: 0 5px;
+        }
       }
 
       .yinpin {
         display: flex;
-        margin-top: 16px;
+        margin: 16px 0;
         font-size: 16px;
         line-height: 150%;
         color: #000;
@@ -1279,18 +1344,30 @@ export default {
       }
 
       .jieshu {
-        display: flex;
-        margin-top: 16px;
+        margin-bottom: 10px;
         font-size: 16px;
         line-height: 150%;
         color: #000;
 
-        > :nth-child(1) {
-          width: 30px;
-        }
+        .jieshu-item {
+          display: flex;
+          font-size: 13px;
+          line-height: 25px;
 
-        :nth-child(2) {
-          width: 524px;
+          label {
+            margin-right: 6px;
+            color: #848691;
+            word-break: keep-all;
+          }
+
+          > span {
+            font-weight: bold;
+            color: #272933;
+          }
+
+          > div {
+            color: #272933;
+          }
         }
       }
     }

+ 19 - 1
src/views/book/courseware/preview/components/pinyin_base/PinyinBasePreview.vue

@@ -150,7 +150,15 @@
           />
         </template>
       </div>
-      <PreviewOperation @showAnswerAnalysis="showAnswerAnalysis" @retry="retry" />
+      <PreviewOperation
+        v-if="
+          data.property.fun_type !== 'show' ||
+          (data.property.fun_type === 'show' && isEnable(data.property.is_enable_voice_answer))
+        "
+        @showAnswerAnalysis="showAnswerAnalysis"
+        @retry="retry"
+        :isShowAnswer="isShowAnswers"
+      />
       <AnswerCorrect
         :answer-correct="data?.answer_correct"
         :visible.sync="visibleAnswerCorrect"
@@ -261,6 +269,7 @@ export default {
       active_letter: '', // 选中字母的值
       active_letter_index: 0, // 选择字母索引
       select_item_index: 0, // 小题索引
+      isShowAnswers: false,
     };
   },
   watch: {
@@ -286,6 +295,15 @@ export default {
   },
   created() {
     // console.log(this.data);
+    if (
+      data.property.fun_type !== 'show' ||
+      (data.property.fun_type === 'show' && this.data.answer_list && this.data.answer_list.length > 0) ||
+      (this.data.analysis_list && this.data.analysis_list.length > 0)
+    ) {
+      this.isShowAnswers = true;
+    } else {
+      this.isShowAnswers = false;
+    }
   },
   methods: {
     chooseTone(item, value) {

+ 19 - 9
src/views/book/courseware/preview/components/upload_control/UploadControlPreview.vue

@@ -25,7 +25,7 @@
             :preview-src-list="[data.answer.answer_list[0].file_url]"
           />
         </template>
-        <template v-else-if="data.answer.answer_list[0].file_name.indexOf('pdf') !== -1">
+        <template v-else>
           <iframe
             id="ifm"
             :src="data.answer.answer_list[0].newpath"
@@ -72,24 +72,34 @@ export default {
   data() {
     return {
       data: getUploadControlData(),
-      acceptFileType: '.png,.jpg,.pdf',
+      acceptFileType: '.png,.jpg,.jpeg,.txt,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.mp3,.wma,.mp4,.mov,.zip,.rar',
       file_preview_url: getConfig() ? getConfig().doc_preview_service_address : '',
       showIframe: false,
     };
   },
   methods: {
     changeFillId(fileList) {
-      this.data.answer.answer_list = [fileList[0].response.file_info_list[0]];
-      let path = `${this.file_preview_url}onlinePreview?url=${Base64.encode(fileList[0].response.file_info_list[0].file_url)}`;
-      this.data.answer.answer_list[0].newpath = path;
-      this.$forceUpdate();
+      if (fileList.length > 0) {
+        this.data.answer.answer_list = [fileList[0].response.file_info_list[0]];
+        let path = `${this.file_preview_url}onlinePreview?url=${Base64.encode(fileList[0].response.file_info_list[0].file_url)}`;
+        this.data.answer.answer_list[0].newpath = path;
+        this.$forceUpdate();
+      }
     },
     remove() {
       if (!this.isJudgingRightWrong) {
         if (this.data.answer.answer_list.length > 0) {
-          this.data.answer.answer_list = [];
-          this.$message.success('删除成功');
-          this.$forceUpdate();
+          this.$confirm('确定要删除此文件吗?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+            .then(() => {
+              this.data.answer.answer_list = [];
+              this.$message.success('删除成功');
+              this.$forceUpdate();
+            })
+            .catch(() => {});
         }
       }
     },

+ 8 - 12
src/views/book/courseware/preview/components/upload_control/components/UploadView.vue

@@ -51,11 +51,12 @@ export default {
       let UserCode = '';
       let UserType = '';
       if (userInfor) {
-        let user = getToken();
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
+        let token = getToken();
+        UserCode = token?.gcls_sys_session_info?.user_id ?? '';
+        UserType = token?.gcls_sys_session_info?.user_type ?? '';
+        SessionID = token?.gcls_sys_session_info?.session_id ?? '';
       }
+
       return `${process.env.VUE_APP_EEP}/FileServer/WebFileUpload?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}&SecurityLevel=Mid`;
     },
   },
@@ -107,13 +108,8 @@ export default {
           this.$message.warning('上传图片大小不能超过2M');
           return false; // 必须返回false
         }
-      } else if (file.type.indexOf('application/pdf') !== -1) {
-        if (file.size > 20 * 1024 * 1024) {
-          this.$message.warning('上传pdf大小不能超过20M');
-          return false; // 必须返回false
-        }
-      } else if (file.size > 500 * 1024 * 1024) {
-        this.$message.warning('上传文件大小不能超过500M');
+      } else if (file.size > 20 * 1024 * 1024) {
+        this.$message.warning('上传pdf大小不能超过20M');
         return false; // 必须返回false
       }
 
@@ -177,7 +173,7 @@ export default {
   justify-content: center;
   width: 141px;
   height: 39px;
-  margin: -20px auto 10px;
+  margin: 20px auto 10px;
   font-size: 16px;
   line-height: 150%;
   color: #000;

+ 3 - 1
src/views/book/courseware/preview/components/video_interaction/VideoInteractionPreview.vue

@@ -24,7 +24,7 @@
     </div>
     <!-- v-if="Object.keys(this.userAnswer).length === data.file_info_list.length" -->
     <el-button
-      v-if="data.property.feed_back === 'total'"
+      v-if="data.property.feed_back === 'total' && answerNumber === data.file_info_list.length"
       type="primary"
       :style="{
         background:
@@ -128,6 +128,7 @@ export default {
         rightRate: 0,
       },
       player: null,
+      answerNumber: 0, // 用户答题个数
     };
   },
   watch: {
@@ -253,6 +254,7 @@ export default {
         this.visible = false;
         this.player.play();
       }
+      this.answerNumber = Object.keys(this.userAnswer).length;
     },
     lookReport() {
       this.player.pause();

+ 72 - 28
src/views/personal_workbench/pinyin_correction_list/index.vue

@@ -38,7 +38,7 @@
 
         <el-table-column min-width="100" prop="pinyin" label="拼音" align="center" header-align="center" sortable>
         </el-table-column>
-        <el-table-column
+        <!-- <el-table-column
           min-width="100"
           prop="pinyin_lt"
           label="连体拼音"
@@ -46,7 +46,7 @@
           header-align="center"
           sortable
         >
-        </el-table-column>
+        </el-table-column> -->
 
         <el-table-column
           prop="create_time"
@@ -59,6 +59,7 @@
 
         <el-table-column prop="operation" label="操作" fixed="right" width="200" align="center" header-align="center">
           <template slot-scope="{ row }">
+            <span class="link" @click="editTemplate(row)">编辑</span>
             <span class="link danger" @click="deleteTemplate(row)">删除</span>
           </template>
         </el-table-column>
@@ -67,7 +68,7 @@
       <PaginationPage ref="pagination" :total="total" @getList="queryTemplateList" />
     </div>
     <el-dialog
-      title="添加拼音校正"
+      :title="data.id ? '编辑拼音校正' : '添加拼音校正'"
       :visible="visible"
       width="660px"
       :close-on-click-modal="false"
@@ -92,14 +93,14 @@
               @blur="handleReplaceTone(data.pinyin, 'pinyin')"
             />
           </el-form-item>
-          <el-form-item label="连体拼音" prop="pinyin_lt">
+          <!-- <el-form-item label="连体拼音" prop="pinyin_lt">
             <el-input
               ref="pinyin_lt"
               v-model="data.pinyin_lt"
               placeholder="请输入连体拼音"
               @blur="handleReplaceTone(data.pinyin_lt, 'pinyin_lt')"
             />
-          </el-form-item>
+          </el-form-item> -->
         </el-form>
         <div class="yunmu">
           <span>点击可复制</span>
@@ -131,7 +132,12 @@ import MenuPage from '../common/menu.vue';
 import PaginationPage from '@/components/PaginationPage.vue';
 
 import { PageQueryPinyinCorrectionListPersonal } from '@/api/list.js';
-import { toolAddPinyinCorrection, toolDeletePinyinCorrection, toolGetCXList } from '@/api/pinyinCorrection';
+import {
+  toolAddPinyinCorrection,
+  toolDeletePinyinCorrection,
+  toolGetCXList,
+  toolUpdatePinyinCorrection,
+} from '@/api/pinyinCorrection';
 
 export default {
   name: 'PersonalWorkbenchPinyinCorrectionList',
@@ -248,29 +254,55 @@ export default {
     // 确定创建拼音校正
     addTemplate() {
       this.loading = true;
-      toolAddPinyinCorrection(this.data)
-        .then((res) => {
-          this.loading = false;
-          this.visible = false;
-          if (res.status === 1) {
-            this.$message({
-              type: 'success',
-              message: '创建成功!',
-            });
-            this.data = {
-              storage_type: 0,
-              word: '',
-              pos: '',
-              pinyin: '',
-              pinyin_lt: '',
-            };
+      if (this.data.id) {
+        toolUpdatePinyinCorrection(this.data)
+          .then((res) => {
+            this.loading = false;
+            this.visible = false;
+            if (res.status === 1) {
+              this.$message({
+                type: 'success',
+                message: '修改成功!',
+              });
+              this.data = {
+                storage_type: 0,
+                word: '',
+                pos: '',
+                pinyin: '',
+                pinyin_lt: '',
+              };
 
-            this.queryList();
-          }
-        })
-        .catch(() => {
-          this.loading = false;
-        });
+              this.queryList();
+            }
+          })
+          .catch(() => {
+            this.loading = false;
+          });
+      } else {
+        toolAddPinyinCorrection(this.data)
+          .then((res) => {
+            this.loading = false;
+            this.visible = false;
+            if (res.status === 1) {
+              this.$message({
+                type: 'success',
+                message: '创建成功!',
+              });
+              this.data = {
+                storage_type: 0,
+                word: '',
+                pos: '',
+                pinyin: '',
+                pinyin_lt: '',
+              };
+
+              this.queryList();
+            }
+          })
+          .catch(() => {
+            this.loading = false;
+          });
+      }
     },
 
     // 删除词汇
@@ -293,6 +325,18 @@ export default {
         })
         .catch(() => {});
     },
+    // 编辑词汇
+    editTemplate(row) {
+      this.data = {
+        id: row.id,
+        storage_type: 0,
+        word: row.word,
+        pos: row.pos,
+        pinyin: row.pinyin,
+        pinyin_lt: row.pinyin_lt,
+      };
+      this.visible = true;
+    },
     CopyToClipboard(element) {
       var doc = document,
         text = doc.getElementById(element),

+ 68 - 28
src/views/personal_workbench/pinyin_correction_list_manager/index.vue

@@ -40,7 +40,7 @@
 
         <el-table-column min-width="100" prop="pinyin" label="拼音" align="center" header-align="center" sortable>
         </el-table-column>
-        <el-table-column
+        <!-- <el-table-column
           min-width="100"
           prop="pinyin_lt"
           label="连体拼音"
@@ -48,7 +48,7 @@
           header-align="center"
           sortable
         >
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column
           min-width="100"
           prop="storage_type"
@@ -73,8 +73,9 @@
 
         <el-table-column prop="operation" label="操作" fixed="right" width="200" align="center" header-align="center">
           <template slot-scope="{ row }">
-            <span class="link danger" @click="deleteTemplate(row)">删除</span>
+            <span class="link" @click="editTemplate(row)">编辑</span>
             <span class="link" @click="copyPinyin(row)" v-if="row.storage_type !== 2">写入全域库</span>
+            <span class="link danger" @click="deleteTemplate(row)">删除</span>
           </template>
         </el-table-column>
       </el-table>
@@ -82,7 +83,7 @@
       <PaginationPage ref="pagination" :total="total" @getList="queryTemplateList" />
     </div>
     <el-dialog
-      title="添加拼音校正"
+      :title="data.id ? '编辑拼音校正' : '添加拼音校正'"
       :visible="visible"
       width="660px"
       :close-on-click-modal="false"
@@ -107,14 +108,14 @@
               @blur="handleReplaceTone(data.pinyin, 'pinyin')"
             />
           </el-form-item>
-          <el-form-item label="连体拼音" prop="pinyin_lt">
+          <!-- <el-form-item label="连体拼音" prop="pinyin_lt">
             <el-input
               ref="pinyin_lt"
               v-model="data.pinyin_lt"
               placeholder="请输入连体拼音"
               @blur="handleReplaceTone(data.pinyin_lt, 'pinyin_lt')"
             />
-          </el-form-item>
+          </el-form-item> -->
         </el-form>
         <div class="yunmu">
           <span>点击可复制</span>
@@ -151,6 +152,7 @@ import {
   toolDeletePinyinCorrection,
   toolGetCXList,
   toolCopyPinyinCorrectionToStorage,
+  toolUpdatePinyinCorrection,
 } from '@/api/pinyinCorrection';
 
 export default {
@@ -287,29 +289,55 @@ export default {
     // 确定创建拼音校正
     addTemplate() {
       this.loading = true;
-      toolAddPinyinCorrection(this.data)
-        .then((res) => {
-          this.loading = false;
-          this.visible = false;
-          if (res.status === 1) {
-            this.$message({
-              type: 'success',
-              message: '创建成功!',
-            });
-            this.data = {
-              storage_type: 2,
-              word: '',
-              pos: '',
-              pinyin: '',
-              pinyin_lt: '',
-            };
+      if (this.data.id) {
+        toolUpdatePinyinCorrection(this.data)
+          .then((res) => {
+            this.loading = false;
+            this.visible = false;
+            if (res.status === 1) {
+              this.$message({
+                type: 'success',
+                message: '修改成功!',
+              });
+              this.data = {
+                storage_type: 2,
+                word: '',
+                pos: '',
+                pinyin: '',
+                pinyin_lt: '',
+              };
 
-            this.queryList();
-          }
-        })
-        .catch(() => {
-          this.loading = false;
-        });
+              this.queryList();
+            }
+          })
+          .catch(() => {
+            this.loading = false;
+          });
+      } else {
+        toolAddPinyinCorrection(this.data)
+          .then((res) => {
+            this.loading = false;
+            this.visible = false;
+            if (res.status === 1) {
+              this.$message({
+                type: 'success',
+                message: '创建成功!',
+              });
+              this.data = {
+                storage_type: 2,
+                word: '',
+                pos: '',
+                pinyin: '',
+                pinyin_lt: '',
+              };
+
+              this.queryList();
+            }
+          })
+          .catch(() => {
+            this.loading = false;
+          });
+      }
     },
 
     // 删除词汇
@@ -332,6 +360,18 @@ export default {
         })
         .catch(() => {});
     },
+    // 编辑词汇
+    editTemplate(row) {
+      this.data = {
+        id: row.id,
+        storage_type: row.storage_type,
+        word: row.word,
+        pos: row.pos,
+        pinyin: row.pinyin,
+        pinyin_lt: row.pinyin_lt,
+      };
+      this.visible = true;
+    },
     // 复制拼音到指定库
     copyPinyin(row) {
       this.$confirm('是否要将此词汇写入机构库吗?', '提示', {

+ 68 - 28
src/views/personal_workbench/pinyin_correction_list_org/index.vue

@@ -40,7 +40,7 @@
 
         <el-table-column min-width="100" prop="pinyin" label="拼音" align="center" header-align="center" sortable>
         </el-table-column>
-        <el-table-column
+        <!-- <el-table-column
           min-width="100"
           prop="pinyin_lt"
           label="连体拼音"
@@ -48,7 +48,7 @@
           header-align="center"
           sortable
         >
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column
           min-width="100"
           prop="storage_type"
@@ -73,8 +73,9 @@
 
         <el-table-column prop="operation" label="操作" fixed="right" width="200" align="center" header-align="center">
           <template slot-scope="{ row }">
-            <span class="link danger" @click="deleteTemplate(row)">删除</span>
+            <span class="link" @click="editTemplate(row)">编辑</span>
             <span class="link" @click="copyPinyin(row)" v-if="row.storage_type === 0">写入机构库</span>
+            <span class="link danger" @click="deleteTemplate(row)">删除</span>
           </template>
         </el-table-column>
       </el-table>
@@ -82,7 +83,7 @@
       <PaginationPage ref="pagination" :total="total" @getList="queryTemplateList" />
     </div>
     <el-dialog
-      title="添加拼音校正"
+      :title="data.id ? '编辑拼音校正' : '添加拼音校正'"
       :visible="visible"
       width="660px"
       :close-on-click-modal="false"
@@ -107,14 +108,14 @@
               @blur="handleReplaceTone(data.pinyin, 'pinyin')"
             />
           </el-form-item>
-          <el-form-item label="连体拼音" prop="pinyin_lt">
+          <!-- <el-form-item label="连体拼音" prop="pinyin_lt">
             <el-input
               ref="pinyin_lt"
               v-model="data.pinyin_lt"
               placeholder="请输入连体拼音"
               @blur="handleReplaceTone(data.pinyin_lt, 'pinyin_lt')"
             />
-          </el-form-item>
+          </el-form-item> -->
         </el-form>
         <div class="yunmu">
           <span>点击可复制</span>
@@ -151,6 +152,7 @@ import {
   toolDeletePinyinCorrection,
   toolGetCXList,
   toolCopyPinyinCorrectionToStorage,
+  toolUpdatePinyinCorrection,
 } from '@/api/pinyinCorrection';
 
 export default {
@@ -283,29 +285,55 @@ export default {
     // 确定创建拼音校正
     addTemplate() {
       this.loading = true;
-      toolAddPinyinCorrection(this.data)
-        .then((res) => {
-          this.loading = false;
-          this.visible = false;
-          if (res.status === 1) {
-            this.$message({
-              type: 'success',
-              message: '创建成功!',
-            });
-            this.data = {
-              storage_type: 1,
-              word: '',
-              pos: '',
-              pinyin: '',
-              pinyin_lt: '',
-            };
+      if (this.data.id) {
+        toolUpdatePinyinCorrection(this.data)
+          .then((res) => {
+            this.loading = false;
+            this.visible = false;
+            if (res.status === 1) {
+              this.$message({
+                type: 'success',
+                message: '修改成功!',
+              });
+              this.data = {
+                storage_type: 1,
+                word: '',
+                pos: '',
+                pinyin: '',
+                pinyin_lt: '',
+              };
 
-            this.queryList();
-          }
-        })
-        .catch(() => {
-          this.loading = false;
-        });
+              this.queryList();
+            }
+          })
+          .catch(() => {
+            this.loading = false;
+          });
+      } else {
+        toolAddPinyinCorrection(this.data)
+          .then((res) => {
+            this.loading = false;
+            this.visible = false;
+            if (res.status === 1) {
+              this.$message({
+                type: 'success',
+                message: '创建成功!',
+              });
+              this.data = {
+                storage_type: 1,
+                word: '',
+                pos: '',
+                pinyin: '',
+                pinyin_lt: '',
+              };
+
+              this.queryList();
+            }
+          })
+          .catch(() => {
+            this.loading = false;
+          });
+      }
     },
 
     // 删除词汇
@@ -328,6 +356,18 @@ export default {
         })
         .catch(() => {});
     },
+    // 编辑词汇
+    editTemplate(row) {
+      this.data = {
+        id: row.id,
+        storage_type: row.storage_type,
+        word: row.word,
+        pos: row.pos,
+        pinyin: row.pinyin,
+        pinyin_lt: row.pinyin_lt,
+      };
+      this.visible = true;
+    },
     // 复制拼音到指定库
     copyPinyin(row) {
       this.$confirm('是否要将此词汇写入机构库吗?', '提示', {