Просмотр исходного кода

Merge branch 'master' of http://60.205.254.193:3000/GCLS/eep_page

dsy 3 недель назад
Родитель
Сommit
aafb07ae9d
37 измененных файлов с 303 добавлено и 222 удалено
  1. 5 4
      src/views/book/courseware/preview/components/article/NormalModelChs.vue
  2. 5 4
      src/views/book/courseware/preview/components/article/PhraseModelChs.vue
  3. 7 6
      src/views/book/courseware/preview/components/article/Practicechs.vue
  4. 8 7
      src/views/book/courseware/preview/components/article/Voicefullscreen.vue
  5. 13 10
      src/views/book/courseware/preview/components/article/WordModelChs.vue
  6. 2 1
      src/views/book/courseware/preview/components/article/components/Freewrite.vue
  7. 5 2
      src/views/book/courseware/preview/components/article/components/FreewriteLettle.vue
  8. 9 5
      src/views/book/courseware/preview/components/article/components/Notecard.vue
  9. 7 6
      src/views/book/courseware/preview/components/article/components/Practice.vue
  10. 30 20
      src/views/book/courseware/preview/components/article/components/WordPhraseDetail.vue
  11. 2 1
      src/views/book/courseware/preview/components/article/components/Wordcard.vue
  12. 5 5
      src/views/book/courseware/preview/components/article/index.vue
  13. 2 2
      src/views/book/courseware/preview/components/character/CharacterPreview.vue
  14. 3 2
      src/views/book/courseware/preview/components/character_base/components/FreewriteLettle.vue
  15. 1 1
      src/views/book/courseware/preview/components/character_structure/CharacterStructurePreview.vue
  16. 13 8
      src/views/book/courseware/preview/components/dialogue_article/NormalModelChs.vue
  17. 10 9
      src/views/book/courseware/preview/components/dialogue_article/PhraseModelChs.vue
  18. 13 8
      src/views/book/courseware/preview/components/dialogue_article/Practicechs.vue
  19. 7 3
      src/views/book/courseware/preview/components/dialogue_article/RemarkChs.vue
  20. 2 1
      src/views/book/courseware/preview/components/dialogue_article/RoleChs.vue
  21. 9 8
      src/views/book/courseware/preview/components/dialogue_article/WordModelChs.vue
  22. 10 5
      src/views/book/courseware/preview/components/dialogue_article/index.vue
  23. 2 2
      src/views/book/courseware/preview/components/drawing/DrawingPreview.vue
  24. 1 1
      src/views/book/courseware/preview/components/h5_games/H5GamesPreview.vue
  25. 3 3
      src/views/book/courseware/preview/components/image_text/ImageTextPreview.vue
  26. 9 8
      src/views/book/courseware/preview/components/image_text/components/MagazineSentence.vue
  27. 3 3
      src/views/book/courseware/preview/components/newWord_template/NewWordTemplatePreview.vue
  28. 56 37
      src/views/book/courseware/preview/components/new_word/NewWordPreview.vue
  29. 17 11
      src/views/book/courseware/preview/components/new_word/components/WordPhraseDetail.vue
  30. 20 17
      src/views/book/courseware/preview/components/new_word/components/writeTableZoom.vue
  31. 6 6
      src/views/book/courseware/preview/components/notes/NotesPreview.vue
  32. 4 4
      src/views/book/courseware/preview/components/pinyin_base/PinyinBasePreview.vue
  33. 1 1
      src/views/book/courseware/preview/components/record_input/SoundRecord.vue
  34. 5 5
      src/views/book/courseware/preview/components/table/TablePreview.vue
  35. 5 3
      src/views/book/courseware/preview/components/upload_preview/UploadPreviewPreview.vue
  36. 1 1
      src/views/book/courseware/preview/components/video_interaction/VideoInteractionPreview.vue
  37. 2 2
      src/views/book/courseware/preview/components/write_base/WriteBasePreview.vue

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

@@ -218,7 +218,7 @@
                                       pItem,
                                     )
                                   "
-                                  >{{ pItem.chs[wIndex] }}</span
+                                  >{{ convertText(pItem.chs[wIndex]) }}</span
                                 >
                                 <img
                                   v-if="pItem.img && pItem.img.length > 0 && pItem.imgPosition === 'after'"
@@ -347,7 +347,7 @@
                                   pItem,
                                 )
                               "
-                              ><span>{{ item.wordsList[pIndex + 1].chs }}</span
+                              ><span>{{ convertText(item.wordsList[pIndex + 1].chs) }}</span
                               ><img
                                 v-if="
                                   item.wordsList[pIndex + 1].img &&
@@ -489,7 +489,7 @@
                                   pItem,
                                 )
                               "
-                              ><span>{{ item.wordsList[pIndex + 2].chs }}</span
+                              ><span>{{ convertText(item.wordsList[pIndex + 2].chs) }}</span
                               ><img
                                 v-if="
                                   item.wordsList[pIndex + 2].img &&
@@ -635,7 +635,7 @@
                                     pItem,
                                   )
                                 "
-                                >{{ pItem.chs[wIndex] }}</span
+                                >{{ convertText(pItem.chs[wIndex]) }}</span
                               >
                             </template>
                             <img
@@ -1360,6 +1360,7 @@ export default {
     'attrib',
     'isMobile',
   ],
+  inject: ['convertText'],
   data() {
     return {
       resArr: [],

+ 5 - 4
src/views/book/courseware/preview/components/article/PhraseModelChs.vue

@@ -178,7 +178,7 @@
                                       : pItem.config.color,
                                 }"
                                 @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs, pItem)"
-                                >{{ pItem.chs[wIndex] }}</span
+                                >{{ convertText(pItem.chs[wIndex]) }}</span
                               ><img
                                 v-if="pItem.img && pItem.img.length > 0 && pItem.imgPosition === 'after'"
                                 :src="pItem.img[0].file_url"
@@ -253,7 +253,7 @@
                                   item.wordsList[pIndex + 1],
                                 )
                               "
-                              >{{ item.wordsList[pIndex + 1].chs }}
+                              >{{ convertText(item.wordsList[pIndex + 1].chs) }}
                               <img
                                 v-if="
                                   item.wordsList[pIndex + 1].img &&
@@ -347,7 +347,7 @@
                                   item.wordsList[pIndex + 2],
                                 )
                               "
-                              >{{ item.wordsList[pIndex + 2].chs
+                              >{{ convertText(item.wordsList[pIndex + 2].chs)
                               }}<img
                                 v-if="
                                   item.wordsList[pIndex + 2].img &&
@@ -449,7 +449,7 @@
                                     : pItem.config.color,
                               }"
                               @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs, pItem)"
-                              >{{ pItem.chs[wIndex] }}</span
+                              >{{ convertText(pItem.chs[wIndex]) }}</span
                             >
                             <img
                               v-if="pItem.img && pItem.img.length > 0 && pItem.imgPosition === 'after'"
@@ -1071,6 +1071,7 @@ export default {
     'attrib',
     'isMobile',
   ],
+  inject: ['convertText'],
   data() {
     return {
       resArr: [],

+ 7 - 6
src/views/book/courseware/preview/components/article/Practicechs.vue

@@ -94,7 +94,7 @@
                 v-if="item.enwords && config.isShowEN && curQue.enPosition && curQue.enPosition == 'top'"
                 :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
               >
-                {{ item.enwords }}
+                {{ convertText(item.enwords) }}
               </div>
               <div style="overflow: hidden; clear: both"></div>
               <div
@@ -173,7 +173,7 @@
                                     ? attrib.topic_color
                                     : pItem.config.color,
                               }"
-                              >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
+                              >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : '' }}</span
                             >
                           </template>
                           <img
@@ -267,7 +267,7 @@
                           >
                             {{
                               NumberList.indexOf(item.sentArr[pIndex + 1].pinyin) == -1
-                                ? item.sentArr[pIndex + 1].chs
+                                ? convertText(item.sentArr[pIndex + 1].chs)
                                 : ''
                             }}</span
                           >
@@ -377,7 +377,7 @@
                           >
                             {{
                               NumberList.indexOf(item.sentArr[pIndex + 2].pinyin) == -1
-                                ? item.sentArr[pIndex + 2].chs
+                                ? convertText(item.sentArr[pIndex + 2].chs)
                                 : ''
                             }}</span
                           >
@@ -479,7 +479,7 @@
                                   ? attrib.topic_color
                                   : pItem.config.color,
                             }"
-                            >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}
+                            >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : '' }}
                           </span>
                         </template>
                         <img
@@ -529,7 +529,7 @@
                 "
                 :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
               >
-                {{ item.enwords }}
+                {{ convertText(item.enwords) }}
               </div>
             </div>
             <div
@@ -745,6 +745,7 @@ export default {
     'multilingual',
     'attrib',
   ],
+  inject: ['convertText'],
   data() {
     return {
       resObj: null,

+ 8 - 7
src/views/book/courseware/preview/components/article/Voicefullscreen.vue

@@ -29,7 +29,7 @@
             :class="['enwords', bgIndex == 1 ? 'enwords-green' : '']"
             :style="{ fontSize: enSize + 'px' }"
           >
-            {{ enwords }}
+            {{ convertText(enwords) }}
           </div>
           <div
             v-for="(pItem, pIndex) in item"
@@ -108,7 +108,7 @@
                               display: 'inline-block',
                               width: pItem.chs[wIndex].trim() === '' ? '10px' : '',
                             }"
-                            >{{ pItem.chs[wIndex] }}</span
+                            >{{ convertText(pItem.chs[wIndex]) }}</span
                           >
                         </template>
                         <img
@@ -203,7 +203,7 @@
                             display: 'inline-block',
                             width: item[pIndex + 1].chs.trim() === '' ? '10px' : '',
                           }"
-                          >{{ item[pIndex + 1].chs }}</span
+                          >{{ convertText(item[pIndex + 1].chs) }}</span
                         >
                         <img
                           v-if="
@@ -305,7 +305,7 @@
                             display: 'inline-block',
                             width: item[pIndex + 2].chs.trim() === '' ? '10px' : '',
                           }"
-                          >{{ item[pIndex + 2].chs }}</span
+                          >{{ convertText(item[pIndex + 2].chs) }}</span
                         >
                         <img
                           v-if="
@@ -400,7 +400,7 @@
                             display: 'inline-block',
                             width: pItem.chs[wIndex].trim() === '' ? '10px' : '',
                           }"
-                          >{{ pItem.chs[wIndex] }}</span
+                          >{{ convertText(pItem.chs[wIndex]) }}</span
                         >
                       </template>
                       <img
@@ -451,7 +451,7 @@
           :class="['enwords', bgIndex == 1 ? 'enwords-green' : '']"
           :style="{ fontSize: enSize + 'px' }"
         >
-          {{ enwords }}
+          {{ convertText(enwords) }}
         </div>
       </div>
       <div class="vc-box-right">
@@ -501,7 +501,7 @@
           </div>
           <div
             :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
-            title="键盘控制开启后,可用方向键控制翻页,空格键播放暂停,回车键录音"
+            :title="convertText('键盘控制开启后,可用方向键控制翻页,空格键播放暂停,回车键录音')"
             @click="changeStatus('isKeyboard')"
           >
             <span
@@ -666,6 +666,7 @@ export default {
     'attrib',
     'isMobile',
   ],
+  inject: ['convertText'],
   data() {
     return {
       pySize: 32,

+ 13 - 10
src/views/book/courseware/preview/components/article/WordModelChs.vue

@@ -158,7 +158,7 @@
                                     ? attrib.assist_color
                                     : '',
                               }"
-                              >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : ''
+                              >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs) : ''
                               }}<img
                                 v-if="pItem.img && pItem.img.length > 0 && pItem.imgPosition === 'after'"
                                 :src="pItem.img[0].file_url"
@@ -233,7 +233,7 @@
                               }"
                               >{{
                                 NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
-                                  ? item.wordsList[pIndex + 1].chs
+                                  ? convertText(item.wordsList[pIndex + 1].chs)
                                   : ''
                               }}<img
                                 v-if="
@@ -336,7 +336,7 @@
                               }"
                               >{{
                                 NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
-                                  ? item.wordsList[pIndex + 2].chs
+                                  ? convertText(item.wordsList[pIndex + 2].chs)
                                   : ''
                               }}<img
                                 v-if="
@@ -422,7 +422,7 @@
                                   : '',
                             }"
                             @click="showWordDetail($event, pItem)"
-                            >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : ''
+                            >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs) : ''
                             }}<img
                               v-if="pItem.img && pItem.img.length > 0 && pItem.imgPosition === 'after'"
                               :src="pItem.img[0].file_url"
@@ -510,7 +510,7 @@
                   v-if="item.enwords && config.isShowEN && curQue.enPosition && curQue.enPosition == 'top'"
                   :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
                 >
-                  {{ item.enwords }}
+                  {{ convertText(item.enwords) }}
                 </div>
                 <div style="overflow: hidden; clear: both"></div>
                 <div
@@ -578,7 +578,9 @@
                                       ? attrib.font_size.replace('pt', '') * 1.4 + 'pt'
                                       : '28px',
                                 }"
-                                >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
+                                >{{
+                                  NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : ''
+                                }}</span
                               >
                             </template>
                           </span>
@@ -640,7 +642,7 @@
                             >
                               {{
                                 NumberList.indexOf(item.sentArr[pIndex + 1].pinyin) == -1
-                                  ? item.sentArr[pIndex + 1].chs
+                                  ? convertText(item.sentArr[pIndex + 1].chs)
                                   : ''
                               }}</span
                             >
@@ -711,7 +713,7 @@
                             >
                               {{
                                 NumberList.indexOf(item.sentArr[pIndex + 2].pinyin) == -1
-                                  ? item.sentArr[pIndex + 2].chs
+                                  ? convertText(item.sentArr[pIndex + 2].chs)
                                   : ''
                               }}</span
                             >
@@ -781,7 +783,7 @@
                                 lineHeight:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
                               }"
-                              >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
+                              >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : '' }}</span
                             >
                           </template>
                         </span>
@@ -826,7 +828,7 @@
                   "
                   :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
                 >
-                  {{ item.enwords }}
+                  {{ convertText(item.enwords) }}
                 </div>
                 <div
                   v-if="curQue.property.multilingual_position === 'para'"
@@ -971,6 +973,7 @@ export default {
     'attrib',
     'isMobile',
   ],
+  inject: ['convertText'],
   data() {
     return {
       resArr: [],

+ 2 - 1
src/views/book/courseware/preview/components/article/components/Freewrite.vue

@@ -43,7 +43,7 @@
         </div>
       </div> -->
     </div>
-    <div v-if="isNotice" class="record-notice">最多保存5条记录</div>
+    <div v-if="isNotice" class="record-notice">{{ convertText('最多保存5条记录') }}</div>
   </div>
 </template>
 
@@ -56,6 +56,7 @@ export default {
     FreeWriteQP,
   },
   props: ['lineColor', 'lineWidth', 'cur', 'wordNum', 'currentTreeID', 'TaskModel', 'writeList'],
+  inject: ['convertText'],
   data() {
     return {
       width: this.wordNum === '2' ? 256 : 256,

+ 5 - 2
src/views/book/courseware/preview/components/article/components/FreewriteLettle.vue

@@ -33,8 +33,10 @@
         <a v-if="TaskModel != 'ANSWER'" class="clean-btn" @click="resetHuahua"></a>
       </div>
       <ul class="nav-list">
-        <li :class="currenHzData && currenHzData.history ? '' : 'disabled'" @click="play()">播放</li>
-        <li :class="TaskModel == 'ANSWER' ? 'disabled' : ''" @click="handleWriteImg">保存</li>
+        <li :class="currenHzData && currenHzData.history ? '' : 'disabled'" @click="play()">
+          {{ convertText('播放') }}
+        </li>
+        <li :class="TaskModel == 'ANSWER' ? 'disabled' : ''" @click="handleWriteImg">{{ convertText('保存') }}</li>
       </ul>
     </div>
   </div>
@@ -71,6 +73,7 @@ export default {
     'TaskModel',
     'writeList',
   ],
+  inject: ['convertText'],
   data() {
     return {
       width: 256,

+ 9 - 5
src/views/book/courseware/preview/components/article/components/Notecard.vue

@@ -11,7 +11,7 @@
           :style="{
             color: attrib && attrib.topic_color ? attrib.topic_color : '',
           }"
-          >{{ item.number }}</span
+          >{{ convertText(item.number) }}</span
         >
         <span
           class="NPC-notes-con-text"
@@ -19,11 +19,11 @@
             color: attrib && attrib.topic_color ? attrib.topic_color : '',
             fontSize: attrib && attrib.font_size ? attrib.font_size : '',
           }"
-          v-html="item.con"
+          v-html="convertText(sanitizeHTML(item.con))"
         ></span>
       </div>
-      <div class="NPC-notes-trans" v-html="item.interpret"></div>
-      <div v-if="item.note" class="NPC-notes-note" v-html="item.note"></div>
+      <div class="NPC-notes-trans" v-html="convertText(sanitizeHTML(item.interpret))"></div>
+      <div v-if="item.note" class="NPC-notes-note" v-html="convertText(sanitizeHTML(item.note))"></div>
       <div v-if="item.img_list && item.img_list.length > 0" class="NPC-notes-note-img">
         <div v-for="(imgItem, imgIndex) in item.img_list" :key="'imgList' + imgIndex">
           <img :src="imgItem.id" class="NPC-notes-img" />
@@ -34,11 +34,15 @@
 </template>
 
 <script>
+import { sanitizeHTML } from '@/utils/common';
 export default {
   components: {},
   props: ['item', 'changeCard', 'attrib', 'isMobile'],
+  inject: ['convertText'],
   data() {
-    return {};
+    return {
+      sanitizeHTML,
+    };
   },
   computed: {},
   watch: {},

+ 7 - 6
src/views/book/courseware/preview/components/article/components/Practice.vue

@@ -17,8 +17,8 @@
         @click="changePraShow()"
       />
       <el-tabs type="border-card" @tab-click="handleClick">
-        <el-tab-pane label="简体" />
-        <el-tab-pane label="繁体" />
+        <el-tab-pane :label="convertText('简体')" />
+        <el-tab-pane :label="convertText('繁体')" />
       </el-tabs>
       <div
         class="tab-box"
@@ -133,7 +133,7 @@
                   }"
                   @click="changeNav(0)"
                 >
-                  描红
+                  {{ convertText('描红') }}
                 </li>
                 <li
                   :class="navIndex == 1 ? 'active' : ''"
@@ -143,7 +143,7 @@
                   }"
                   @click="changeNav(1)"
                 >
-                  临摹
+                  {{ convertText('临摹') }}
                 </li>
               </ul>
             </div>
@@ -246,7 +246,7 @@
                   }"
                   @click="changeNav(0)"
                 >
-                  描红
+                  {{ convertText('描红') }}
                 </li>
                 <li
                   :class="navIndex == 1 ? 'active' : ''"
@@ -256,7 +256,7 @@
                   }"
                   @click="changeNav(1)"
                 >
-                  临摹
+                  {{ convertText('临摹') }}
                 </li>
               </ul>
             </div>
@@ -296,6 +296,7 @@ export default {
     'isMobile',
     'pageFrom',
   ],
+  inject: ['convertText'],
   data() {
     return {
       //   learn_mode: "",

+ 30 - 20
src/views/book/courseware/preview/components/article/components/WordPhraseDetail.vue

@@ -77,7 +77,11 @@
                 <Audio :mp3="data.mp3Url" :theme-color="themeColor" :bg="bg" :ed="ed" />
               </template>
             </div>
-            <p v-if="data.definition_list.length > 0" class="jieshu" v-html="data.definition_list"></p>
+            <p
+              v-if="data.definition_list.length > 0"
+              class="jieshu"
+              v-html="convertText(sanitizeHTML(data.definition_list))"
+            ></p>
           </div>
         </div>
         <div class="zhedie-white">
@@ -108,7 +112,7 @@
                   :class="[lijuIndex == 1 ? 'sele' : '']"
                   @click="cutLiju(1)"
                 >
-                  <span> 本课例句 </span>
+                  <span> {{ convertText('本课例句') }} </span>
                   <span>{{ list1.sentence_list.length }} </span>
                 </div>
                 <div
@@ -116,7 +120,7 @@
                   :class="[lijuIndex == 2 ? 'sele' : '']"
                   @click="cutLiju(2)"
                 >
-                  <span> 本书例句 </span>
+                  <span> {{ convertText('本书例句') }} </span>
                   <span>
                     {{ list2.sentence_list.length }}
                   </span>
@@ -126,7 +130,7 @@
                   :class="[lijuIndex == 3 ? 'sele' : '']"
                   @click="cutLiju(3)"
                 >
-                  <span>本套例句</span>
+                  <span>{{ convertText('本套例句') }}</span>
                   <span>{{ list3.sentence_list.length }}</span>
                 </div>
               </div>
@@ -167,23 +171,27 @@
                     <template v-if="lijuPatternIndex == 1">
                       <el-tooltip effect="dark" placement="bottom">
                         <div slot="content">
-                          {{ item.source_courseware_name_path }}
+                          {{ convertText(item.source_courseware_name_path) }}
                         </div>
                         <p class="p1">
-                          {{ item.show_source_courseware_name_path }}
+                          {{ convertText(item.show_source_courseware_name_path) }}
                         </p>
                       </el-tooltip>
                       <div class="p2">
                         <div v-for="(txt, indexs) in item.resArr" :key="indexs">
-                          <span v-for="(txts, indexs) in txt" :key="indexs" v-html="txts"></span>
+                          <span
+                            v-for="(txts, indexs) in txt"
+                            :key="indexs"
+                            v-html="convertText(sanitizeHTML(txts))"
+                          ></span>
                         </div>
                       </div>
                       <!-- <p class="p2" v-html="item.resArr"></p> -->
                     </template>
                     <template v-else>
-                      <p v-html="item.res"></p>
+                      <p v-html="convertText(sanitizeHTML(item.res))"></p>
                       <p class="p2">
-                        {{ item.source_courseware_name_path }}
+                        {{ convertText(item.source_courseware_name_path) }}
                       </p>
                     </template>
                   </div>
@@ -196,14 +204,14 @@
                     padding: ' 16px 0 0 24px',
                   }"
                 >
-                  暂无例句
+                  {{ convertText('暂无例句') }}
                 </p>
               </div>
             </div>
           </div>
           <div v-if="list1 && list1.length > 0" v-loading="loading1">
             <div class="topTitle">
-              <span>本课例句({{ list1.length }})</span>
+              <span>{{ convertText('本课例句') }}({{ list1.length }})</span>
               <!-- <span @click="handleChangeTab('wordShow')"
                 >{{ wordShow ? "收起" : "展开" }}
                 <img
@@ -219,9 +227,9 @@
                 <div v-for="(item, i) in list1" :key="i">
                   <div>{{ i + 1 }}.</div>
                   <div>
-                    <p v-html="item.res"></p>
+                    <p v-html="convertText(sanitizeHTML(item.res))"></p>
                     <p class="p2">
-                      {{ item.source_courseware_name_path }}
+                      {{ convertText(item.source_courseware_name_path) }}
                     </p>
                   </div>
                 </div>
@@ -230,7 +238,7 @@
           </div>
           <div v-if="list2 && list2.length > 0" v-loading="loading2">
             <div class="topTitle">
-              <span>本书例句({{ list2.length }})</span>
+              <span>{{ convertText('本书例句') }}({{ list2.length }})</span>
               <!-- <span @click="handleChangeTab('wordShow2')"
                 >{{ wordShow2 ? "收起" : "展开" }}
                 <img
@@ -246,9 +254,9 @@
                 <div v-for="(item, i) in list2" :key="i">
                   <div>{{ list1.length + i + 1 }}.</div>
                   <div>
-                    <p v-html="item.res"></p>
+                    <p v-html="convertText(sanitizeHTML(item.res))"></p>
                     <p class="p2">
-                      {{ item.source_courseware_name_path }}
+                      {{ convertText(item.source_courseware_name_path) }}
                     </p>
                   </div>
                 </div>
@@ -257,7 +265,7 @@
           </div>
           <div v-if="list3 && list3.length > 0" v-loading="loading3">
             <div class="topTitle">
-              <span>本套教材例句({{ list3.length }})</span>
+              <span>{{ convertText('本套教材例句') }}({{ list3.length }})</span>
               <!-- <span @click="handleChangeTab('wordShow3')"
                 >{{ wordShow3 ? "收起" : "展开" }}
                 <img
@@ -272,9 +280,9 @@
                 <div v-for="(item, i) in list3" :key="i">
                   <div>{{ list1.length + list2.length + i + 1 }}.</div>
                   <div>
-                    <p>{{ item.sentence }}</p>
+                    <p>{{ convertText(item.sentence) }}</p>
                     <p class="p2">
-                      {{ item.source_courseware_name_path }}
+                      {{ convertText(item.source_courseware_name_path) }}
                     </p>
                   </div>
                 </div>
@@ -293,6 +301,7 @@ import Strockplayredline from './Strockplayredline.vue';
 import Audio from './AudioRed.vue';
 import { TextToAudioFile } from '@/api/app';
 import { getCoursewareWordExampleSentenceList } from '@/api/article';
+import { sanitizeHTML } from '@/utils/common';
 
 export default {
   // import引入的组件需要注入到对象中才能使用
@@ -300,7 +309,7 @@ export default {
     Strockplayredline,
     Audio,
   },
-  inject: ['getSelectId'],
+  inject: ['getSelectId', 'convertText'],
   props: [
     'data',
     'changeDetailIndex',
@@ -321,6 +330,7 @@ export default {
   data() {
     // 这里存放数据
     return {
+      sanitizeHTML,
       height: '',
       margintop: '',
       wordShow: true,

+ 2 - 1
src/views/book/courseware/preview/components/article/components/Wordcard.vue

@@ -168,7 +168,7 @@
             "
             class="collect-icon"
           /> -->
-          写一写
+          {{ convertText('写一写') }}
         </button>
       </div>
       <el-dialog
@@ -249,6 +249,7 @@ export default {
     'isFull',
     'pageFrom',
   ],
+  inject: ['convertText'],
   data() {
     return {
       loading: false,

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

@@ -6,7 +6,7 @@
     <div class="main">
       <div class="NPC-ArticleView NPC-ArticleView-container">
         <div class="ArticleView-header">
-          <a class="ArticleView-full" title="黑板模式" @click="fullScreen">
+          <a class="ArticleView-full" :title="convertText('黑板模式')" @click="fullScreen">
             <svg-icon
               icon-class="icon-full"
               size="24"
@@ -16,7 +16,7 @@
             />
           </a>
           <div>
-            <div :style="{ marginLeft: '40px', cursor: 'pointer' }" title="文本分析" @click="submit">
+            <div :style="{ marginLeft: '40px', cursor: 'pointer' }" :title="convertText('文本分析')" @click="submit">
               <svg-icon
                 icon-class="icon-wbfx"
                 size="24"
@@ -68,7 +68,7 @@
                     ? data.unified_attrib.topic_color
                     : '',
               }"
-              title="本课生词"
+              :title="convertText('本课生词')"
               @click="handleSwitchChange('showPractice', 'showWord', 'showPhrases')"
             >
               <svg-icon icon-class="icon-article-ci" size="24" />
@@ -81,7 +81,7 @@
                     ? data.unified_attrib.topic_color
                     : '',
               }"
-              title="语音练习"
+              :title="convertText('语音练习')"
               @click="handleSwitchChange('showPhrases', 'showWord', 'showPractice')"
             >
               <svg-icon icon-class="icon-article-practice" size="24" />
@@ -94,7 +94,7 @@
                     ? data.unified_attrib.topic_color
                     : '',
               }"
-              title="取词模式"
+              :title="'取词模式'"
               @click="handleSwitchChange('showPhrases', 'showPractice', 'showWord')"
             >
               <svg-icon icon-class="icon-article-phrase" size="24" />

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

@@ -173,7 +173,7 @@
                 </div>
               </div>
             </div>
-            <div class="en-common">{{ item.shiyi }}</div>
+            <div class="en-common">{{ convertText(item.shiyi) }}</div>
           </div>
         </div>
       </template>
@@ -325,7 +325,7 @@
               </div>
             </div>
             <div v-if="item.shiyi && isEnable(data.property.is_enable_shiyi)" class="words-bottom">
-              {{ item.shiyi }}
+              {{ convertText(item.shiyi) }}
             </div>
           </div>
         </div>

+ 3 - 2
src/views/book/courseware/preview/components/character_base/components/FreewriteLettle.vue

@@ -34,14 +34,14 @@
           }"
           @click="play()"
         >
-          播放
+          {{ convertText('播放') }}
         </li>
         <li
           :class="disabled ? 'disabled' : ''"
           :style="{ backgroundColor: attrib && attrib.topic_color ? attrib.topic_color : '#de4444' }"
           @click="handleWriteImg"
         >
-          保存
+          {{ convertText('保存') }}
         </li>
       </ul>
     </div>
@@ -95,6 +95,7 @@ export default {
       default: () => ({}),
     },
   },
+  inject: ['convertText'],
   data() {
     return {
       width: 300,

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

@@ -153,7 +153,7 @@
         </div>
       </div>
       <div v-if="isShowRightAnswer" class="right-answer">
-        <div class="title">正确答案</div>
+        <div class="title">{{ convertText('正确答案') }}</div>
         <div class="one-box">
           <div
             v-for="(items, row) in data.option_list"

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

@@ -79,7 +79,7 @@
           <div :class="['article-content', isHasRemark ? 'hasRemark' : '']">
             <template v-if="item.type === 'notice'">
               <p :class="['notice']">
-                {{ item.notice }}
+                {{ convertText(item.notice) }}
               </p>
             </template>
             <template v-else>
@@ -91,7 +91,7 @@
                 <span class="chs">{{ item.roleDetail.detail.wordsList | handleChs }}</span>
               </div> -->
                 <div v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin" class="roleDetail">
-                  <span class="chs">{{ item.roleDetail.fullName }}</span>
+                  <span class="chs">{{ convertText(item.roleDetail.fullName) }}</span>
                   <span class="pinyin">{{ item.roleDetail.fullPinyin }}</span>
                 </div>
                 <div
@@ -104,7 +104,7 @@
                     v-if="config.isShowEN && item.enwords && curQue.enPosition && curQue.enPosition == 'top'"
                     class="enwords"
                   >
-                    {{ item.enwords }}
+                    {{ convertText(item.enwords) }}
                   </div>
                   <div style="overflow: hidden; clear: both"></div>
                   <template v-if="item.type === 'text'">
@@ -220,7 +220,9 @@
                                         pItem,
                                       )
                                     "
-                                    >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
+                                    >{{
+                                      NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : ''
+                                    }}</span
                                   >
                                 </template>
                               </span>
@@ -333,7 +335,7 @@
                                 ? item.wordsList[pIndex + 1].chs
                                 : ''
                             }} -->
-                                {{ item.wordsList[pIndex + 1].chs }}
+                                {{ convertText(item.wordsList[pIndex + 1].chs) }}
                               </span>
                               <span
                                 v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
@@ -456,7 +458,7 @@
                                 ? item.wordsList[pIndex + 2].chs
                                 : ''
                             }} -->
-                                {{ item.wordsList[pIndex + 2].chs }}
+                                {{ convertText(item.wordsList[pIndex + 2].chs) }}
                               </span>
                               <span
                                 v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
@@ -576,7 +578,9 @@
                                       pItem,
                                     )
                                   "
-                                  >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
+                                  >{{
+                                    NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : ''
+                                  }}</span
                                 >
                               </template>
                             </span>
@@ -630,7 +634,7 @@
                     "
                     class="enwords"
                   >
-                    {{ item.enwords }}
+                    {{ convertText(item.enwords) }}
                   </div>
                   <div
                     v-if="curQue.property.multilingual_position === 'para'"
@@ -818,6 +822,7 @@ export default {
     'attrib',
     'isMobile',
   ],
+  inject: ['convertText'],
   data() {
     return {
       resArr: [],

+ 10 - 9
src/views/book/courseware/preview/components/dialogue_article/PhraseModelChs.vue

@@ -69,7 +69,7 @@
           <div :class="['article-content', isHasRemark ? 'hasRemark' : '']">
             <template v-if="item.type === 'notice'">
               <p :class="['notice']">
-                {{ item.notice }}
+                {{ convertText(item.notice) }}
               </p>
             </template>
             <template v-else>
@@ -90,10 +90,10 @@
                       v-for="(items, indexs) in item.roleDetail.segList"
                       :key="indexs"
                       @click="showWordDetail($event, items.matchWords)"
-                      >{{ items.chs }}</span
+                      >{{ convertText(items.chs) }}</span
                     >
                   </template>
-                  <span class="chs" v-else>{{ item.roleDetail.fullName }}</span>
+                  <span class="chs" v-else>{{ convertText(item.roleDetail.fullName) }}</span>
                   <span class="pinyin">{{ item.roleDetail.fullPinyin }}</span>
                 </div>
                 <div class="para-con" :style="{ background: item.roleDetail.color.bg }">
@@ -101,7 +101,7 @@
                     v-if="config.isShowEN && item.enwords && curQue.enPosition && curQue.enPosition == 'top'"
                     class="enwords"
                   >
-                    {{ item.enwords }}
+                    {{ convertText(item.enwords) }}
                   </div>
                   <div style="overflow: hidden; clear: both"></div>
                   <template v-if="item.type === 'text'">
@@ -171,7 +171,7 @@
                                       : pItem.config.color,
                                 }"
                                 @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs, pItem)"
-                                >{{ pItem.chs }}</span
+                                >{{ convertText(pItem.chs) }}</span
                               >
                               <span
                                 v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
@@ -252,7 +252,7 @@
                                     item.wordsList[pIndex + 1],
                                   )
                                 "
-                                >{{ item.wordsList[pIndex + 1].chs }}</span
+                                >{{ convertText(item.wordsList[pIndex + 1].chs) }}</span
                               >
                               <span
                                 v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
@@ -354,7 +354,7 @@
                                     item.wordsList[pIndex + 2],
                                   )
                                 "
-                                >{{ item.wordsList[pIndex + 2].chs }}</span
+                                >{{ convertText(item.wordsList[pIndex + 2].chs) }}</span
                               >
                               <span
                                 v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
@@ -426,7 +426,7 @@
                                     : pItem.config.color,
                               }"
                               @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs, pItem)"
-                              >{{ pItem.chs }}</span
+                              >{{ convertText(pItem.chs) }}</span
                             >
                             <span
                               v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
@@ -469,7 +469,7 @@
                     "
                     class="enwords"
                   >
-                    {{ item.enwords }}
+                    {{ convertText(item.enwords) }}
                   </div>
                   <div
                     v-if="curQue.property.multilingual_position === 'para'"
@@ -678,6 +678,7 @@ export default {
     'isMobile',
     'multilingual',
   ],
+  inject: ['convertText'],
   data() {
     return {
       resArr: [],

+ 13 - 8
src/views/book/courseware/preview/components/dialogue_article/Practicechs.vue

@@ -74,7 +74,7 @@
     >
       <template v-if="resObj">
         <p v-if="curQue.notice" class="notice" style="padding-top: 24px">
-          {{ curQue.notice }}
+          {{ convertText(curQue.notice) }}
         </p>
         <div class="NPC-sentences-list">
           <div
@@ -153,7 +153,7 @@
                           ? 'color85'
                           : 'color45',
                       ]"
-                      >{{ item.roleDetail.fullName }}</span
+                      >{{ convertText(item.roleDetail.fullName) }}</span
                     >
                     <span
                       :class="[
@@ -175,7 +175,7 @@
                     v-if="item.enwords && config.isShowEN && curQue.enPosition && curQue.enPosition == 'top'"
                     :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
                   >
-                    {{ item.enwords }}
+                    {{ convertText(item.enwords) }}
                   </div>
                   <div style="overflow: hidden; clear: both"></div>
                   <div class="NNPE-words-box">
@@ -270,7 +270,9 @@
                                           ? attrib.topic_color
                                           : pItem.config.color,
                                     }"
-                                    >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
+                                    >{{
+                                      NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : ''
+                                    }}</span
                                   >
                                 </template>
                               </span>
@@ -361,7 +363,7 @@
                                 >
                                   {{
                                     NumberList.indexOf(item.sentArr[pIndex + 1].pinyin) == -1
-                                      ? item.sentArr[pIndex + 1].chs
+                                      ? convertText(item.sentArr[pIndex + 1].chs)
                                       : ''
                                   }}</span
                                 >
@@ -464,7 +466,7 @@
                                 >
                                   {{
                                     NumberList.indexOf(item.sentArr[pIndex + 2].pinyin) == -1
-                                      ? item.sentArr[pIndex + 2].chs
+                                      ? convertText(item.sentArr[pIndex + 2].chs)
                                       : ''
                                   }}</span
                                 >
@@ -567,7 +569,9 @@
                                         ? attrib.topic_color
                                         : pItem.config.color,
                                   }"
-                                  >{{ NumberList.indexOf(pItem.chs[wIndex]) == -1 ? pItem.chs[wIndex] : '' }}</span
+                                  >{{
+                                    NumberList.indexOf(pItem.chs[wIndex]) == -1 ? convertText(pItem.chs[wIndex]) : ''
+                                  }}</span
                                 >
                               </template>
                             </span>
@@ -612,7 +616,7 @@
                     "
                     :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
                   >
-                    {{ item.enwords }}
+                    {{ convertText(item.enwords) }}
                   </div>
                   <div
                     v-if="curQue.property.multilingual_position === 'para'"
@@ -845,6 +849,7 @@ export default {
     'isPhone',
     'multilingual',
   ],
+  inject: ['convertText'],
   data() {
     return {
       wavblob: null,

+ 7 - 3
src/views/book/courseware/preview/components/dialogue_article/RemarkChs.vue

@@ -8,8 +8,8 @@
     class="remarkChs"
     :style="{ top: marginTop ? marginTop + 'px' : '0px' }"
   >
-    <div v-if="remarkDetail.chs" class="remark-chs" v-html="remarkDetail.chs"></div>
-    <div v-if="remarkDetail.en" class="remark-en" v-html="remarkDetail.en"></div>
+    <div v-if="remarkDetail.chs" class="remark-chs" v-html="convertText(sanitizeHTML(remarkDetail.chs))"></div>
+    <div v-if="remarkDetail.en" class="remark-en" v-html="convertText(sanitizeHTML(remarkDetail.en))"></div>
     <div v-if="remarkDetail.img_list && remarkDetail.img_list.length > 0" class="remark-img">
       <el-image
         :style="{
@@ -25,12 +25,16 @@
 </template>
 
 <script>
+import { sanitizeHTML } from '@/utils/common';
 export default {
   name: 'RemarkChs',
   components: {},
   props: ['remarkDetail', 'marginTop'],
+  inject: ['convertText'],
   data() {
-    return {};
+    return {
+      sanitizeHTML,
+    };
   },
   computed: {},
   watch: {},

+ 2 - 1
src/views/book/courseware/preview/components/dialogue_article/RoleChs.vue

@@ -11,7 +11,7 @@
       :src="require('@/assets/simple' + curRole.simpleHead + '.png')"
     />
     <span v-else class="adult-book-input-roleText" :style="{ background: curRole.color }">{{
-      curRole.fullName || curRole.name
+      convertText(curRole.fullName || curRole.name)
     }}</span>
     <!-- <template>
       <span class="pinyin" :style="{ color: wordColor }">{{ curRole.fullName }}</span>
@@ -48,6 +48,7 @@ export default {
     },
   },
   props: ['curRole', 'color', 'type'],
+  inject: ['convertText'],
   data() {
     return {};
   },

+ 9 - 8
src/views/book/courseware/preview/components/dialogue_article/WordModelChs.vue

@@ -68,7 +68,7 @@
           <div class="article-content">
             <template v-if="item.type === 'notice'">
               <p :class="['notice']">
-                {{ item.notice }}
+                {{ convertText(item.notice) }}
               </p>
             </template>
             <template v-else>
@@ -80,7 +80,7 @@
                 <span class="chs">{{ item.roleDetail.detail.wordsList | handleChs }}</span>
               </div> -->
                 <div v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin" class="roleDetail">
-                  <span class="chs">{{ item.roleDetail.fullName }}</span>
+                  <span class="chs">{{ convertText(item.roleDetail.fullName) }}</span>
                   <span class="pinyin">{{ item.roleDetail.fullPinyin }}</span>
                 </div>
                 <div class="para-con" :style="{ background: item.roleDetail.color.bg }">
@@ -88,7 +88,7 @@
                     v-if="config.isShowEN && item.enwords && curQue.enPosition && curQue.enPosition == 'top'"
                     class="enwords"
                   >
-                    {{ item.enwords }}
+                    {{ convertText(item.enwords) }}
                   </div>
                   <div style="overflow: hidden; clear: both"></div>
                   <template v-if="item.type === 'text'">
@@ -163,7 +163,7 @@
                                       ? attrib.topic_color
                                       : '',
                                 }"
-                                >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : '' }}</span
+                                >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs) : '' }}</span
                               >
                               <span
                                 v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
@@ -219,7 +219,7 @@
                                 }"
                                 >{{
                                   NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
-                                    ? item.wordsList[pIndex + 1].chs
+                                    ? convertText(item.wordsList[pIndex + 1].chs)
                                     : ''
                                 }}</span
                               >
@@ -295,7 +295,7 @@
                                 }"
                                 >{{
                                   NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
-                                    ? item.wordsList[pIndex + 2].chs
+                                    ? convertText(item.wordsList[pIndex + 2].chs)
                                     : ''
                                 }}</span
                               >
@@ -367,7 +367,7 @@
                                     : '',
                               }"
                               @click="showWordDetail($event, pItem)"
-                              >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : '' }}</span
+                              >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs) : '' }}</span
                             >
                             <span
                               v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
@@ -410,7 +410,7 @@
                     "
                     class="enwords"
                   >
-                    {{ item.enwords }}
+                    {{ convertText(item.enwords) }}
                   </div>
                   <div
                     v-if="curQue.property.multilingual_position === 'para'"
@@ -604,6 +604,7 @@ export default {
     'isMobile',
     'multilingual',
   ],
+  inject: ['convertText'],
   data() {
     return {
       resArr: [],

+ 10 - 5
src/views/book/courseware/preview/components/dialogue_article/index.vue

@@ -6,7 +6,7 @@
     <div class="main">
       <div class="NPC-ArticleView NPC-ArticleView-container">
         <div class="ArticleView-header">
-          <a class="ArticleView-full" title="黑板模式" @click="fullScreen">
+          <a class="ArticleView-full" :title="convertText('黑板模式')" @click="fullScreen">
             <svg-icon
               icon-class="icon-full"
               size="24"
@@ -20,7 +20,12 @@
                 (tokenData && tokenData.popedom_code_list && tokenData.popedom_code_list.indexOf(2100001) != -1) ||
                 (tokenData && tokenData.user_type === 'APP')
               " -->
-            <div class="left" :style="{ marginLeft: '40px', cursor: 'pointer' }" title="文本分析" @click="submit">
+            <div
+              class="left"
+              :style="{ marginLeft: '40px', cursor: 'pointer' }"
+              :title="convertText('文本分析')"
+              @click="submit"
+            >
               <!-- <img src="@/assets/wbfx-icon.png" alt="" /> -->
               <svg-icon
                 icon-class="icon-wbfx"
@@ -73,7 +78,7 @@
                     ? data.unified_attrib.topic_color
                     : '',
               }"
-              title="本课生词"
+              :title="convertText('本课生词')"
               @click="handleSwitchChange('showPractice', 'showWord', 'showPhrases')"
             >
               <svg-icon icon-class="icon-article-ci" size="24" />
@@ -86,7 +91,7 @@
                     ? data.unified_attrib.topic_color
                     : '',
               }"
-              title="语音练习"
+              :title="convertText('语音练习')"
               @click="handleSwitchChange('showPhrases', 'showWord', 'showPractice')"
             >
               <svg-icon icon-class="icon-article-practice" size="24" />
@@ -99,7 +104,7 @@
                     ? data.unified_attrib.topic_color
                     : '',
               }"
-              title="取词模式"
+              :title="convertText('取词模式')"
               @click="handleSwitchChange('showPhrases', 'showPractice', 'showWord')"
             >
               <svg-icon icon-class="icon-article-phrase" size="24" />

+ 2 - 2
src/views/book/courseware/preview/components/drawing/DrawingPreview.vue

@@ -20,7 +20,7 @@
         <img
           :src="image_url"
           draggable="false"
-          alt="背景图"
+          :alt="convertText('背景图')"
           :style="{
             width: isMobile ? '100%' : `${data.imgData.width}px`,
             height: isMobile ? mobileHeight + 'px' : `${data.imgData.height}px`,
@@ -127,7 +127,7 @@ export default {
       const { data } = this.$refs.signaturePad.saveSignature();
       this.imgSrc = data;
       this.answer.answer_list[0].answer = data;
-      this.$message.success('保存成功');
+      this.$message.success(this.convertText('保存成功'));
     },
     replay() {
       const signaturePad = this.$refs.signaturePad;

+ 1 - 1
src/views/book/courseware/preview/components/h5_games/H5GamesPreview.vue

@@ -14,7 +14,7 @@
             data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '#165dff',
         }"
         @click="toggleFullScreen"
-        >{{ full_type ? '退出全屏' : '进入全屏' }}</el-button
+        >{{ full_type ? convertText('退出全屏') : convertText('进入全屏') }}</el-button
       >
       <iframe
         :src="games_url"

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

@@ -54,12 +54,12 @@
           :disabled="disabled"
           type="textarea"
           style="height: 100%"
-          placeholder="请输入"
+          :placeholder="convertText('请输入')"
         />
       </div>
     </div>
     <div v-if="isShowRightAnswer" class="right-answer">
-      <div class="title">正确答案</div>
+      <div class="title">{{ convertText('正确答案') }}</div>
       <div
         v-if="image_url"
         class="img-box"
@@ -85,7 +85,7 @@
             :disabled="disabled"
             type="textarea"
             style="height: 100%"
-            placeholder="请输入"
+            :placeholder="convertText('请输入')"
           />
         </div>
       </div>

+ 9 - 8
src/views/book/courseware/preview/components/image_text/components/MagazineSentence.vue

@@ -67,7 +67,7 @@
                         :style="{
                           fontFamily: itemC.fontFamily,
                         }"
-                        >{{ itemC.wordsName }}</span
+                        >{{ convertText(itemC.wordsName) }}</span
                       >
                     </template>
                   </span>
@@ -103,7 +103,7 @@
                     :style="{
                       fontFamily: data[sentenceActive].wordsResultList[indexC + 1].fontFamily,
                     }"
-                    >{{ data[sentenceActive].wordsResultList[indexC + 1].wordsName }}</span
+                    >{{ convertText(data[sentenceActive].wordsResultList[indexC + 1].wordsName) }}</span
                   >
                   <span
                     v-if="property.pinyin_position == 'bottom' && property.view_pinyin === 'true'"
@@ -148,7 +148,7 @@
                     :style="{
                       fontFamily: data[sentenceActive].wordsResultList[indexC + 2].fontFamily,
                     }"
-                    >{{ data[sentenceActive].wordsResultList[indexC + 2].wordsName }}</span
+                    >{{ convertText(data[sentenceActive].wordsResultList[indexC + 2].wordsName) }}</span
                   >
                   <span
                     v-if="property.pinyin_position == 'bottom' && property.view_pinyin === 'true'"
@@ -188,7 +188,7 @@
                         :style="{
                           fontFamily: itemC.fontFamily,
                         }"
-                        >{{ itemC.wordsName }}</span
+                        >{{ convertText(itemC.wordsName) }}</span
                       >
                     </template>
                   </span>
@@ -220,7 +220,7 @@
             fontSize: fontSize + 'px',
             lineHeight: fontSize + 8 + 'px',
           }"
-          >{{ textList[sentenceActive].text }}</span
+          >{{ convertText(textList[sentenceActive].text) }}</span
         >
       </template>
       <div v-if="multilingualTextList[sentenceActive]" class="NPC-notes-note">
@@ -235,7 +235,7 @@
             color: fontSize === 20 ? themeList[sentenceTheme].bottomBarActive : '',
           }"
           @click="handleChangeBgColor(20, 'fontSize')"
-          >小</span
+          >{{ convertText('') }}</span
         >
         <div
           class="border"
@@ -249,7 +249,7 @@
             color: fontSize === 24 ? themeList[sentenceTheme].bottomBarActive : '',
           }"
           @click="handleChangeBgColor(24, 'fontSize')"
-          >中</span
+          >{{ convertText('') }}</span
         >
         <div
           class="border"
@@ -263,7 +263,7 @@
             color: fontSize === 28 ? themeList[sentenceTheme].bottomBarActive : '',
           }"
           @click="handleChangeBgColor(28, 'fontSize')"
-          >大</span
+          >{{ convertText('') }}</span
         >
       </div>
       <ul class="article-color" :style="{ background: themeList[sentenceTheme].bottomBg }">
@@ -306,6 +306,7 @@ export default {
     'attrib',
     'textList',
   ],
+  inject: ['convertText'],
   data() {
     // 这里存放数据
     return {

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

@@ -204,13 +204,13 @@
               @input="changeAnswer(item, index)"
             />
           </div>
-          <div v-if="data.property.model === 'input'" class="en-common">{{ item.shiyi }}</div>
+          <div v-if="data.property.model === 'input'" class="en-common">{{ convertText(item.shiyi) }}</div>
         </div>
       </div>
     </div>
 
     <div v-if="isShowRightAnswer" class="right-answer">
-      <div class="title">正确答案</div>
+      <div class="title">{{ convertText('正确答案') }}</div>
       <div class="box">
         <div
           v-for="(item, index) in data.option_list"
@@ -414,7 +414,7 @@
                 @input="changeAnswer(item, index)"
               />
             </div>
-            <div v-if="data.property.model === 'input'" class="en-common">{{ item.shiyi }}</div>
+            <div v-if="data.property.model === 'input'" class="en-common">{{ convertText(item.shiyi) }}</div>
           </div>
         </div>
       </div>

+ 56 - 37
src/views/book/courseware/preview/components/new_word/NewWordPreview.vue

@@ -21,7 +21,7 @@
                   data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '#de4444',
                 fontSize: data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
               }"
-              v-html="data.title_con"
+              v-html="convertText(sanitizeHTML(data.title_con))"
             ></span>
             <span v-if="showLang" class="NPC-topTitle-text">
               {{ titleTrans[getLang()] }}
@@ -173,7 +173,7 @@
                           </template>
 
                           <template v-else>
-                            <span style="flex-shrink: 0; width: 24px; height: 24px"></span>
+                            <span v-if="hasVoice" style="flex-shrink: 0; width: 24px; height: 24px"></span>
                           </template>
                           <div class="tabNum-box">
                             <template v-if="sItem.mIndex == 0">
@@ -218,7 +218,7 @@
                                       : '',
                                 }"
                                 class="NPC-word-tab-common NPC-word-tab-word"
-                                v-html="sItem.new_word"
+                                v-html="convertText(sanitizeHTML(sItem.new_word))"
                               >
                               </span>
                               <span
@@ -249,7 +249,7 @@
                               <p
                                 class="NPC-word-tab-common NPC-word-tab-cixing"
                                 :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '']"
-                                v-html="sItem.cixing"
+                                v-html="convertText(sanitizeHTML(sItem.cixing))"
                               ></p>
                               <span
                                 v-if="
@@ -290,7 +290,7 @@
                                       ? data.unified_attrib.font_size
                                       : '',
                                 }"
-                                v-html="sItem.new_word"
+                                v-html="convertText(sanitizeHTML(sItem.new_word))"
                               ></p>
                               <span
                                 v-if="
@@ -324,7 +324,7 @@
                               <p
                                 class="NPC-word-tab-common NPC-word-tab-cixing"
                                 :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '']"
-                                v-html="sItem.cixing"
+                                v-html="convertText(sanitizeHTML(sItem.cixing))"
                               ></p>
 
                               <span
@@ -343,7 +343,10 @@
                         </div>
 
                         <span>
-                          <p class="NPC-word-tab-common NPC-word-tab-def" v-html="sItem.def_str"></p>
+                          <p
+                            class="NPC-word-tab-common NPC-word-tab-def"
+                            v-html="convertText(sanitizeHTML(sItem.def_str))"
+                          ></p>
                           <span
                             v-if="
                               showLang &&
@@ -357,7 +360,10 @@
                           </span>
                         </span>
                         <div v-if="sItem.collocation">
-                          <span class="collocation"><span>搭配:</span><b v-html="sItem.collocation"></b></span>
+                          <span class="collocation"
+                            ><span>{{ convertText('搭配:') }}</span
+                            ><b v-html="convertText(sanitizeHTML(sItem.collocation))"></b
+                          ></span>
                           <span v-if="showLang" class="">
                             {{
                               multilingualTextList[getLang()] &&
@@ -370,9 +376,9 @@
                         </div>
                         <div v-if="sItem.liju_list">
                           <span class="collocation"
-                            ><span>例句:</span>
+                            ><span>{{ convertText('例句:') }}</span>
                             <div>
-                              <b v-html="sItem.liju_list"></b>
+                              <b v-html="convertText(sanitizeHTML(sItem.liju_list))"></b>
                             </div>
                           </span>
                           <span v-if="showLang" class="">
@@ -470,7 +476,7 @@
                       </template>
 
                       <template v-else>
-                        <span style="flex-shrink: 0; width: 24px; height: 24px"></span>
+                        <span v-if="hasVoice" style="flex-shrink: 0; width: 24px; height: 24px"></span>
                       </template>
                       <div class="tabNum-box">
                         <template v-if="sItem.mIndex == 0">
@@ -521,7 +527,7 @@
                                   : '',
                             }"
                             class="NPC-word-tab-common NPC-word-tab-word"
-                            v-html="sItem.new_word"
+                            v-html="convertText(sanitizeHTML(sItem.new_word))"
                           >
                           </span>
                           <span
@@ -554,7 +560,7 @@
                           <p
                             class="NPC-word-tab-common NPC-word-tab-cixing"
                             :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '']"
-                            v-html="sItem.cixing"
+                            v-html="convertText(sanitizeHTML(sItem.cixing))"
                           ></p>
                           <span
                             v-if="
@@ -569,7 +575,10 @@
                           </span>
                         </span>
                         <span :style="{ width: data.col_width[3].value + 'px' }">
-                          <p class="NPC-word-tab-common NPC-word-tab-def" v-html="sItem.def_str"></p>
+                          <p
+                            class="NPC-word-tab-common NPC-word-tab-def"
+                            v-html="convertText(sanitizeHTML(sItem.def_str))"
+                          ></p>
                           <span
                             v-if="
                               showLang &&
@@ -614,7 +623,7 @@
                                   ? data.unified_attrib.font_size
                                   : '',
                             }"
-                            v-html="sItem.new_word"
+                            v-html="convertText(sanitizeHTML(sItem.new_word))"
                           ></p>
                           <span
                             v-if="
@@ -650,7 +659,7 @@
                           <p
                             class="NPC-word-tab-common NPC-word-tab-cixing"
                             :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '']"
-                            v-html="sItem.cixing"
+                            v-html="convertText(sanitizeHTML(sItem.cixing))"
                           ></p>
 
                           <span
@@ -666,7 +675,10 @@
                           </span>
                         </span>
                         <span :style="{ width: data.col_width[3].value + 'px' }">
-                          <p class="NPC-word-tab-common NPC-word-tab-def" v-html="sItem.def_str"></p>
+                          <p
+                            class="NPC-word-tab-common NPC-word-tab-def"
+                            v-html="convertText(sanitizeHTML(sItem.def_str))"
+                          ></p>
                           <span
                             v-if="
                               showLang &&
@@ -701,7 +713,10 @@
                       </div>
 
                       <div v-if="sItem.collocation" :style="{ width: data.col_width[4].value + 'px' }">
-                        <span class="collocation"><span>搭配:</span><b v-html="sItem.collocation"></b></span>
+                        <span class="collocation"
+                          ><span>{{ convertText('搭配:') }}</span
+                          ><b v-html="convertText(sanitizeHTML(sItem.collocation))"></b
+                        ></span>
                         <span v-if="showLang" class="">
                           {{
                             multilingualTextList[getLang()] &&
@@ -714,9 +729,9 @@
                       </div>
                       <div v-if="sItem.liju_list" :style="{ width: data.col_width[5].value + 'px' }">
                         <span class="collocation"
-                          ><span>例句:</span>
+                          ><span>{{ convertText('例句:') }}</span>
                           <div>
-                            <b v-html="sItem.liju_list"></b>
+                            <b v-html="convertText(sanitizeHTML(sItem.liju_list))"></b>
                           </div>
                         </span>
                         <span v-if="showLang" class="">
@@ -772,7 +787,7 @@
                     }"
                   >
                     <div class="header-info-preview">
-                      <h5 :style="{ textAlign: 'left' }">{{ item.header_con }}</h5>
+                      <h5 :style="{ textAlign: 'left' }">{{ convertText(item.header_con) }}</h5>
                       <label
                         :style="{
                           background:
@@ -780,7 +795,7 @@
                               ? data.unified_attrib.topic_color
                               : '',
                         }"
-                        >{{ item.label }}</label
+                        >{{ convertText(item.label) }}</label
                       >
                     </div>
                     <div v-if="item.file_list[0]" class="item-image">
@@ -800,7 +815,7 @@
                       />
                     </div>
                     <h2 v-if="item.new_word" :class="['con-preview', item.file_list[0] ? '' : 'con-preview-big']">
-                      {{ item.new_word }}
+                      {{ convertText(item.new_word) }}
                     </h2>
 
                     <a class="overturn-btn" @click="changeShowLeft(item)"><i class="el-icon-refresh"></i></a>
@@ -815,7 +830,7 @@
                     }"
                   >
                     <div class="header-info-preview">
-                      <h5 :style="{ textAlign: 'left' }">{{ item.header_con }}</h5>
+                      <h5 :style="{ textAlign: 'left' }">{{ convertText(item.header_con) }}</h5>
                       <label
                         :style="{
                           background:
@@ -823,7 +838,7 @@
                               ? data.unified_attrib.topic_color
                               : '',
                         }"
-                        >{{ item.label }}</label
+                        >{{ convertText(item.label) }}</label
                       >
                     </div>
                     <div
@@ -943,12 +958,12 @@
                         }"
                       >
                         <div v-if="item.cixing">
-                          <label class="card-label">词性:</label>
-                          <p v-html="item.cixing"></p>
+                          <label class="card-label">{{ convertText('词性:') }}</label>
+                          <p v-html="convertText(sanitizeHTML(item.cixing))"></p>
                         </div>
                         <div v-if="item.definition_list">
-                          <label class="card-label">释义:</label>
-                          <p v-html="item.definition_list"></p>
+                          <label class="card-label">{{ convertText('释义:') }}</label>
+                          <p v-html="convertText(sanitizeHTML(item.definition_list))"></p>
                         </div>
                       </div>
                     </div>
@@ -967,21 +982,21 @@
                     >
                       <template v-if="!(item.collocation || item.liju_list) || item.new_word.length >= 4">
                         <div v-if="item.cixing">
-                          <label class="card-label">词性:</label>
-                          <p v-html="item.cixing"></p>
+                          <label class="card-label">{{ convertText('词性:') }}</label>
+                          <p v-html="convertText(sanitizeHTML(item.cixing))"></p>
                         </div>
                         <div v-if="item.definition_list">
-                          <label class="card-label">释义:</label>
-                          <p v-html="item.definition_list"></p>
+                          <label class="card-label">{{ convertText('释义:') }}</label>
+                          <p v-html="convertText(sanitizeHTML(item.definition_list))"></p>
                         </div>
                       </template>
                       <div v-if="item.collocation">
-                        <label class="card-label">搭配:</label>
-                        <p v-html="item.collocation"></p>
+                        <label class="card-label">{{ convertText('搭配:') }}</label>
+                        <p v-html="convertText(sanitizeHTML(item.collocation))"></p>
                       </div>
                       <div v-if="item.liju_list">
-                        <label class="card-label">例句:</label>
-                        <p v-html="item.liju_list"></p>
+                        <label class="card-label">{{ convertText('例句:') }}</label>
+                        <p v-html="convertText(sanitizeHTML(item.liju_list))"></p>
                       </div>
                     </div>
                     <a class="overturn-btn" @click="changeShowLeft(item)"><i class="el-icon-refresh"></i></a>
@@ -1133,6 +1148,7 @@ export default {
       showCard: false, // 卡片放大
       showIndex: 0, // 卡片放大索引
       dataHeight: 0, // 组件列表中容器高度
+      hasVoice: false, // 整体是否有读音
     };
   },
   watch: {
@@ -1273,6 +1289,7 @@ export default {
       this.$refs.newwordAudio.pause();
     },
     initData() {
+      this.hasVoice = false;
       this.rowWidth = 0;
       this.data.col_width.forEach((item) => {
         this.rowWidth += Number(item.value);
@@ -1292,6 +1309,7 @@ export default {
         // GetFileURLMap({ file_id_list: [this.data.audio_data.file_id] }).then(({ url_map }) => {
         //   this.data.audio_data.url = url_map[this.data.audio_data.file_id];
         // });
+        this.hasVoice = true;
       }
       this.data.new_word_list.forEach((item) => {
         if (item.number) {
@@ -1305,6 +1323,7 @@ export default {
           GetFileURLMap({ file_id_list: [item.mp3_list] }).then(({ url_map }) => {
             this.$set(item, 'mp3_list_url', url_map[item.mp3_list]);
           });
+          this.hasVoice = true;
         }
         // if (item.file_list && item.file_list[0]) {
         //   GetFileURLMap({ file_id_list: item.file_list }).then(({ url_map }) => {

+ 17 - 11
src/views/book/courseware/preview/components/new_word/components/WordPhraseDetail.vue

@@ -86,7 +86,7 @@
                 <AudioRed :mp3="data.mp3Url" :theme-color="themeColor" :bg="bg" :ed="ed" />
               </template>
             </div>
-            <p class="jieshu" v-html="data.definition_list"></p>
+            <p class="jieshu" v-html="convertText(sanitizeHTML(data.definition_list))"></p>
           </div>
         </div>
         <div class="zhedie-white">
@@ -117,7 +117,7 @@
                   :class="[lijuIndex == 1 ? 'sele' : '']"
                   @click="cutLiju(1)"
                 >
-                  <span> 本课例句 </span>
+                  <span> {{ convertText('本课例句') }} </span>
                   <span>{{ list1.sentence_list.length }} </span>
                 </div>
                 <div
@@ -125,7 +125,7 @@
                   :class="[lijuIndex == 2 ? 'sele' : '']"
                   @click="cutLiju(2)"
                 >
-                  <span> 本书例句 </span>
+                  <span> {{ convertText('本书例句') }} </span>
                   <span>
                     {{ list2.sentence_list.length }}
                   </span>
@@ -135,7 +135,7 @@
                   :class="[lijuIndex == 3 ? 'sele' : '']"
                   @click="cutLiju(3)"
                 >
-                  <span>本套例句</span>
+                  <span>{{ convertText('本套例句') }}</span>
                   <span>{{ list3.sentence_list.length }}</span>
                 </div>
               </div>
@@ -176,23 +176,27 @@
                     <template v-if="lijuPatternIndex == 1">
                       <el-tooltip effect="dark" placement="bottom">
                         <div slot="content">
-                          {{ item.source_courseware_name_path }}
+                          {{ convertText(item.source_courseware_name_path) }}
                         </div>
                         <p class="p1">
-                          {{ item.show_source_courseware_name_path }}
+                          {{ convertText(item.show_source_courseware_name_path) }}
                         </p>
                       </el-tooltip>
                       <div class="p2">
                         <div v-for="(txt, indexs) in item.resArr" :key="indexs">
-                          <span v-for="(txts, indexs) in txt" :key="indexs" v-html="txts"></span>
+                          <span
+                            v-for="(txts, indexs) in txt"
+                            :key="indexs"
+                            v-html="convertText(sanitizeHTML(txts))"
+                          ></span>
                         </div>
                       </div>
                       <!-- <p class="p2" v-html="item.resArr"></p> -->
                     </template>
                     <template v-else>
-                      <p v-html="item.res"></p>
+                      <p v-html="convertText(sanitizeHTML(item.res))"></p>
                       <p class="p2">
-                        {{ item.source_courseware_name_path }}
+                        {{ convertText(item.source_courseware_name_path) }}
                       </p>
                     </template>
                   </div>
@@ -205,7 +209,7 @@
                     padding: ' 16px 0 0 24px',
                   }"
                 >
-                  暂无例句
+                  {{ convertText('暂无例句') }}
                 </p>
               </div>
             </div>
@@ -221,6 +225,7 @@
 import Strockplayredline from './Strockplayredline.vue';
 import AudioRed from '../../voice_matrix/components/AudioRed.vue';
 import { getCoursewareWordExampleSentenceList } from '@/api/article';
+import { sanitizeHTML } from '@/utils/common';
 
 export default {
   // import引入的组件需要注入到对象中才能使用
@@ -228,7 +233,7 @@ export default {
     Strockplayredline,
     AudioRed,
   },
-  inject: ['getSelectId'],
+  inject: ['getSelectId', 'convertText'],
   props: [
     'data',
     'changeDetailIndex',
@@ -249,6 +254,7 @@ export default {
   data() {
     // 这里存放数据
     return {
+      sanitizeHTML,
       height: '',
       margintop: '',
       wordShow: true,

+ 20 - 17
src/views/book/courseware/preview/components/new_word/components/writeTableZoom.vue

@@ -23,9 +23,9 @@
         }"
       >
         <div class="header-info-preview">
-          <h5 :style="{ textAlign: 'left' }">{{ data.header_con }}</h5>
+          <h5 :style="{ textAlign: 'left' }">{{ convertText(data.header_con) }}</h5>
           <label :style="{ background: attrib && attrib.topic_color ? attrib.topic_color : '' }">{{
-            data.label
+            convertText(data.label)
           }}</label>
         </div>
         <div v-if="data.file_list[0]" class="item-image">
@@ -45,7 +45,7 @@
           />
         </div>
         <h2 v-if="data.new_word" :class="['con-preview', data.file_list[0] ? '' : 'con-preview-big']">
-          {{ data.new_word }}
+          {{ convertText(data.new_word) }}
         </h2>
 
         <a v-if="isPreview" class="overturn-btn" @click="changeShowLeft"><i class="el-icon-refresh"></i></a>
@@ -60,9 +60,9 @@
         }"
       >
         <div class="header-info-preview">
-          <h5 :style="{ textAlign: 'left' }">{{ data.header_con }}</h5>
+          <h5 :style="{ textAlign: 'left' }">{{ convertText(data.header_con) }}</h5>
           <label :style="{ background: attrib && attrib.topic_color ? attrib.topic_color : '' }">{{
-            data.label
+            convertText(data.label)
           }}</label>
         </div>
         <div
@@ -155,12 +155,12 @@
             }"
           >
             <div v-if="data.cixing">
-              <label class="card-label">词性:</label>
-              <p v-html="data.cixing"></p>
+              <label class="card-label">{{ convertText('词性:') }}</label>
+              <p v-html="convertText(sanitizeHTML(data.cixing))"></p>
             </div>
             <div v-if="data.definition_list">
-              <label class="card-label">释义:</label>
-              <p v-html="data.definition_list"></p>
+              <label class="card-label">{{ convertText('释义:') }}</label>
+              <p v-html="convertText(sanitizeHTML(data.definition_list))"></p>
             </div>
           </div>
         </div>
@@ -179,21 +179,21 @@
         >
           <template v-if="!(data.collocation || data.liju_list) || data.new_word.length >= 4">
             <div v-if="data.cixing">
-              <label class="card-label">词性:</label>
-              <p v-html="data.cixing"></p>
+              <label class="card-label">{{ convertText('词性:') }}</label>
+              <p v-html="convertText(sanitizeHTML(data.cixing))"></p>
             </div>
             <div v-if="data.definition_list">
-              <label class="card-label">释义:</label>
-              <p v-html="data.definition_list"></p>
+              <label class="card-label">{{ convertText('释义:') }}</label>
+              <p v-html="convertText(sanitizeHTML(data.definition_list))"></p>
             </div>
           </template>
           <div v-if="data.collocation">
-            <label class="card-label">搭配:</label>
-            <p v-html="data.collocation"></p>
+            <label class="card-label">{{ convertText('搭配:') }}</label>
+            <p v-html="convertText(sanitizeHTML(data.collocation))"></p>
           </div>
           <div v-if="data.liju_list">
-            <label class="card-label">例句:</label>
-            <p v-html="data.liju_list"></p>
+            <label class="card-label">{{ convertText('例句:') }}</label>
+            <p v-html="convertText(sanitizeHTML(data.liju_list))"></p>
           </div>
         </div>
         <a v-if="isPreview" class="overturn-btn" @click="changeShowLeft"><i class="el-icon-refresh"></i></a>
@@ -219,6 +219,7 @@
 import AudioPlay from './AudioPlay.vue';
 import Strockplay from './Strockplay.vue';
 import AudioLine from '../../voice_matrix/components/AudioLine.vue';
+import { sanitizeHTML } from '@/utils/common';
 
 export default {
   // import引入的组件需要注入到对象中才能使用
@@ -239,9 +240,11 @@ export default {
     'url',
     'isMobile',
   ],
+  inject: ['convertText'],
   data() {
     // 这里存放数据
     return {
+      sanitizeHTML,
       loading: false,
       isFlipped: false,
       showLeft: true,

+ 6 - 6
src/views/book/courseware/preview/components/notes/NotesPreview.vue

@@ -21,7 +21,7 @@
                   data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '#de4444',
                 fontSize: data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
               }"
-              v-html="data.title_con"
+              v-html="convertText(sanitizeHTML(data.title_con))"
             ></span>
             <span v-if="showLang" class="NPC-topTitle-text">
               {{ titleTrans[getLang()] }}
@@ -44,7 +44,7 @@
                       data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
                     fontSize: data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
                   }"
-                  v-html="item.number"
+                  v-html="convertText(sanitizeHTML(item.number))"
                 ></span>
                 <div class="NPC-notes-con-box">
                   <template v-if="isEnable(data.property.view_pinyin)">
@@ -83,7 +83,7 @@
                             fontSize:
                               data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
                           }"
-                          v-html="item.con"
+                          v-html="convertText(sanitizeHTML(item.con))"
                         ></span
                         ><span
                           v-if="data.property.pinyin_position === 'back'"
@@ -120,7 +120,7 @@
                       fontSize:
                         data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
                     }"
-                    v-html="item.con"
+                    v-html="convertText(sanitizeHTML(item.con))"
                   ></span>
                   <span v-if="showLang" class="multilingual">
                     {{
@@ -133,9 +133,9 @@
                   </span>
                 </div>
               </div>
-              <div class="NPC-notes-trans" v-html="item.interpret"></div>
+              <div class="NPC-notes-trans" v-html="convertText(sanitizeHTML(item.interpret))"></div>
 
-              <div v-if="item.note" class="NPC-notes-note" v-html="item.note"></div>
+              <div v-if="item.note" class="NPC-notes-note" v-html="convertText(sanitizeHTML(item.note))"></div>
               <div v-if="item.file_list[0]" class="NPC-notes-note-img">
                 <el-image
                   :src="item.file_list[0].file_url"

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

@@ -27,7 +27,7 @@
               fontSize: data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
             }"
           >
-            <span v-if="data.content_hz" class="items-hz">{{ data.content_hz }}</span>
+            <span v-if="data.content_hz" class="items-hz">{{ convertText(data.content_hz) }}</span>
             <!-- 拼音输入 -->
             <template v-if="data.property.fun_type === 'input'">
               <span
@@ -43,7 +43,7 @@
                   class="item-input"
                   @blur="onInputChange(itemc)"
                 />
-                <span v-else>{{ itemc.con }}</span>
+                <span v-else>{{ convertText(itemc.con) }}</span>
               </span>
             </template>
             <template v-else-if="data.property.answer_mode === 'select'">
@@ -151,7 +151,7 @@
         </template>
       </div>
       <div v-if="isShowRightAnswer && data.property.fun_type === 'input'" class="right-answer">
-        <div class="title" style="margin: 10px 0">正确答案</div>
+        <div class="title" style="margin: 10px 0">{{ convertText('正确答案') }}</div>
         <div
           class="content-box"
           :class="[data.property.arrange_type === 'horizontal' ? 'content-box-flex' : 'content-box-vertical']"
@@ -170,7 +170,7 @@
                 fontSize: data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
               }"
             >
-              <span v-if="data.content_hz" class="items-hz">{{ data.content_hz }}</span>
+              <span v-if="data.content_hz" class="items-hz">{{ convertText(data.content_hz) }}</span>
               <!-- 拼音输入 -->
               <template v-if="data.property.fun_type === 'input'">
                 <span

+ 1 - 1
src/views/book/courseware/preview/components/record_input/SoundRecord.vue

@@ -78,7 +78,7 @@
     <el-select
       v-if="manyTimes"
       v-model="selectIndex"
-      placeholder="无录音"
+      :placeholder="convertText('无录音')"
       :class="[type + 'Select']"
       @change="handleChangeRecord"
     >

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

@@ -82,7 +82,7 @@
                                 class="word-item"
                                 @click="handleSelectWord(content, mark, item)"
                               >
-                                {{ content }}
+                                {{ convertText(content) }}
                               </span>
                             </div>
 
@@ -127,7 +127,7 @@
                           {{ item.pinyin.replace(/\s+/g, '') }}
                         </span>
                         <span :style="{ ...item.activeTextStyle }">
-                          {{ item.text }}
+                          {{ convertText(item.text) }}
                         </span>
                         <span v-if="data.property.pinyin_position === 'bottom'" class="pinyin">{{
                           item.pinyin.replace(/\s+/g, '')
@@ -145,7 +145,7 @@
                             data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
                           fontFamily: data.unified_attrib && data.unified_attrib.font ? data.unified_attrib.font : '',
                         }"
-                        v-html="sanitizeHTML(item.value)"
+                        v-html="convertText(sanitizeHTML(item.value))"
                       ></span>
                       <template v-if="item.type === 'input'">
                         <template v-if="data.property.fill_type === fillTypeList[0].value">
@@ -166,7 +166,7 @@
                                 class="word-item"
                                 @click="handleSelectWord(content, mark, item)"
                               >
-                                {{ content }}
+                                {{ convertText(content) }}
                               </span>
                             </div>
 
@@ -209,7 +209,7 @@
                           :key="`answer-${j}`"
                           class="right-answer"
                         >
-                          {{ computedAnswerText(item, i, j) }}
+                          {{ convertText(computedAnswerText(item, i, j)) }}
                         </span>
                       </template>
                     </div>

+ 5 - 3
src/views/book/courseware/preview/components/upload_preview/UploadPreviewPreview.vue

@@ -31,7 +31,7 @@
                   : '',
             }"
             @click="active_index = index"
-            >{{ label }}</span
+            >{{ convertText(label) }}</span
           >
         </div>
         <ul v-if="source_list[active_index].length > 0" class="file-list">
@@ -46,7 +46,9 @@
                         data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
                       fontFamily: data.unified_attrib && data.unified_attrib.font ? data.unified_attrib.font : '',
                     }"
-                    >{{ data.file_info[file.file_id].xuhao + data.file_info[file.file_id].file_name }} </span
+                    >{{
+                      convertText(data.file_info[file.file_id].xuhao + data.file_info[file.file_id].file_name)
+                    }} </span
                   ><span
                     >{{
                       multilingualTextList[getLang()] && multilingualTextList[getLang()][i]
@@ -76,7 +78,7 @@
             fontFamily: data.unified_attrib && data.unified_attrib.font ? data.unified_attrib.font : '',
           }"
         >
-          暂无本类型文件,看看其他类型吧
+          {{ convertText('暂无本类型文件,看看其他类型吧') }}
         </p>
       </template>
     </div>

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

@@ -23,7 +23,7 @@
           data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '#165dff',
       }"
       @click="lookReport"
-      >查看答题报告</el-button
+      >{{ convertText('查看答题报告') }}</el-button
     >
     <el-dialog
       v-if="visible"

+ 2 - 2
src/views/book/courseware/preview/components/write_base/WriteBasePreview.vue

@@ -4,7 +4,7 @@
     <SerialNumberPosition v-if="isEnable(data.property.sn_display_mode)" :property="data.property" />
 
     <div v-if="width" class="main">
-      <h2>书写区</h2>
+      <h2>{{ convertText('书写区') }}</h2>
       <div class="esign-box">
         <vue-esign
           ref="esign"
@@ -22,7 +22,7 @@
         </div>
       </div>
       <template v-if="data.write_base64[0]">
-        <h2>展示区</h2>
+        <h2>{{ convertText('展示区') }}</h2>
         <img style="background-color: #f7f8fa" :src="data.write_base64[0]" alt="write-show" />
       </template>
     </div>