natasha 5 дней назад
Родитель
Сommit
60c918e0f9

+ 8 - 2
src/views/book/courseware/create/components/question/article/Article.vue

@@ -216,8 +216,11 @@ export default {
         item.map((sItem) => {
           let toneStr = [];
           for (let i = 0; i < sItem.length; i++) {
-            if (cnchar.isCnChar(sItem[i])) {
+            const pattern = /[\u4e00-\u9fa5]/;
+            if (cnchar.isCnChar(sItem[i]) && !pattern.test(cnchar.spell(sItem[i], 'low', 'tone'))) {
               toneStr.push(this.toneList[cnchar.spellInfo(cnchar.spell(sItem[i], 'low', 'tone')).tone]);
+            } else {
+              toneStr.push(' ');
             }
           }
 
@@ -272,8 +275,11 @@ export default {
           items.forEach((sItem) => {
             let toneStr = [];
             for (let i = 0; i < sItem.length; i++) {
-              if (cnchar.isCnChar(sItem[i])) {
+              const pattern = /[\u4e00-\u9fa5]/;
+              if (cnchar.isCnChar(sItem[i]) && !pattern.test(cnchar.spell(sItem[i], 'low', 'tone'))) {
                 toneStr.push(this.toneList[cnchar.spellInfo(cnchar.spell(sItem[i], 'low', 'tone')).tone]);
+              } else {
+                toneStr.push(' ');
               }
             }
 

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

@@ -506,8 +506,11 @@ export default {
         item.map((sItem) => {
           let toneStr = [];
           for (let i = 0; i < sItem.length; i++) {
-            if (cnchar.isCnChar(sItem[i])) {
+            const pattern = /[\u4e00-\u9fa5]/;
+            if (cnchar.isCnChar(sItem[i]) && !pattern.test(cnchar.spell(sItem[i], 'low', 'tone'))) {
               toneStr.push(this.toneList[cnchar.spellInfo(cnchar.spell(sItem[i], 'low', 'tone')).tone]);
+            } else {
+              toneStr.push(' ');
             }
           }
 
@@ -560,8 +563,11 @@ export default {
           items.forEach((sItem) => {
             let toneStr = [];
             for (let i = 0; i < sItem.length; i++) {
-              if (cnchar.isCnChar(sItem[i])) {
+              const pattern = /[\u4e00-\u9fa5]/;
+              if (cnchar.isCnChar(sItem[i]) && !pattern.test(cnchar.spell(sItem[i], 'low', 'tone'))) {
                 toneStr.push(this.toneList[cnchar.spellInfo(cnchar.spell(sItem[i], 'low', 'tone')).tone]);
+              } else {
+                toneStr.push(' ');
               }
             }
 

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

@@ -144,11 +144,11 @@ export default {
     },
 
     handleData() {
-      this.data.video_list.forEach((item) => {
-        GetFileURLMap({ file_id_list: [item.file_id] }).then(({ url_map }) => {
-          this.$set(item, 'file_url', url_map[item.file_id]);
-        });
-      });
+      // this.data.video_list.forEach((item) => {
+      //   GetFileURLMap({ file_id_list: [item.file_id] }).then(({ url_map }) => {
+      //     this.$set(item, 'file_url', url_map[item.file_id]);
+      //   });
+      // });
     },
     handleMindMap() {
       // 思维导图数据

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

@@ -117,7 +117,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                               color:
                                 newWordList.indexOf(pItem.chs) > -1 || pItem.words
                                   ? attrib
@@ -174,7 +173,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                             @click.stop="
                               viewNotes(
@@ -245,7 +243,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                             @click.stop="
                               viewNotes(
@@ -311,7 +308,6 @@
                             fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                             lineHeight:
                               attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                            display: 'inline-block',
                             color:
                               newWordList.indexOf(pItem.chs) > -1 || pItem.words
                                 ? attrib
@@ -446,7 +442,6 @@
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                 lineHeight:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                                display: 'inline-block',
                               }"
                               @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs)"
                               >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
@@ -505,7 +500,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                             @click.stop="
                               viewNotes(
@@ -582,7 +576,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                             @click.stop="
                               viewNotes(
@@ -663,7 +656,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                             @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs)"
                             >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span

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

@@ -121,7 +121,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                               backgroundColor:
                                 item.timeList &&
                                 item.timeList[pItem.sentIndex] &&
@@ -181,7 +180,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                               backgroundColor:
                                 item.timeList &&
                                 item.timeList[pItem.sentIndex] &&
@@ -264,7 +262,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                               backgroundColor:
                                 item.timeList &&
                                 item.timeList[pItem.sentIndex] &&
@@ -333,7 +330,6 @@
                             fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                             lineHeight:
                               attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                            display: 'inline-block',
                             backgroundColor:
                               item.timeList &&
                               item.timeList[pItem.sentIndex] &&
@@ -468,7 +464,6 @@
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                 lineHeight:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                                display: 'inline-block',
                               }"
                               >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
                             >
@@ -524,7 +519,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                           >
                             {{
@@ -592,7 +586,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                           >
                             {{
@@ -661,7 +654,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                             >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
                           >

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

@@ -134,7 +134,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                               color:
                                 newWordList.indexOf(pItem.chs) > -1 || pItem.words
                                   ? attrib
@@ -189,7 +188,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                             @click.stop="
                               viewNotes(
@@ -266,7 +264,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                             @click.stop="
                               viewNotes(
@@ -333,7 +330,6 @@
                             fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                             lineHeight:
                               attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                            display: 'inline-block',
                             color:
                               newWordList.indexOf(pItem.chs) > -1 || pItem.words
                                 ? attrib

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

@@ -136,7 +136,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                               color:
                                 paraIndex == pItem.paraIndex &&
                                 sentIndex == pItem.sentIndex &&
@@ -189,7 +188,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                             >{{
                               NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
@@ -257,7 +255,6 @@
                               fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                              display: 'inline-block',
                             }"
                             >{{
                               NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
@@ -316,7 +313,6 @@
                             fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                             lineHeight:
                               attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
-                            display: 'inline-block',
                             color:
                               paraIndex == pItem.paraIndex &&
                               sentIndex == pItem.sentIndex &&