Bladeren bron

课文音频主题色、录音组件统一样式

dsy 2 weken geleden
bovenliggende
commit
b2a06b71ea

+ 0 - 16
src/views/book/courseware/data/richText.js

@@ -447,21 +447,6 @@ export const categoryList = {
   others: '其他',
 };
 
-export const typeList = [
-  {
-    label: '富文本',
-    value: 'richtext',
-  },
-  {
-    label: '标题',
-    value: 'title',
-  },
-  {
-    label: '其它',
-    value: 'other',
-  },
-];
-
 export function getRichTextProperty() {
   return {
     serial_number: 1, // 序号
@@ -474,7 +459,6 @@ export function getRichTextProperty() {
     pinyin_position: pinyinPositionList[0].value, // top bottom
     pinyin_overall_position: pinyinOverallPositionList[0].value, // left center right
     is_first_sentence_first_hz_pinyin_first_char_upper_case: 'true', // 句首大写
-    type: typeList[0].value, // 富文本类型
   };
 }
 

+ 30 - 6
src/views/book/courseware/preview/common/SoundRecord.vue

@@ -2,14 +2,22 @@
   <div class="record">
     <template v-if="type === 'normal' || type === 'mini'">
       <div :class="['record', microphoneStatus ? 'active' : '']" @click="microphone">
-        <div
+        <!-- <div
           v-if="microphoneStatus"
           :style="{
             backgroundColor: attrib?.topic_color,
             maskImage: `url(${require('@/assets/voice_matrix/luyin-active.png')})`,
           }"
           class="icon-mask"
-        ></div>
+        ></div> -->
+        <SvgIcon
+          v-if="microphoneStatus"
+          icon-class="luyin-ing"
+          size="24"
+          :style="{
+            color: attrib && attrib.topic_color ? attrib.topic_color : '',
+          }"
+        />
         <SvgIcon
           v-else
           icon-class="luyin-radio-button"
@@ -43,14 +51,22 @@
 
     <template v-else-if="type === 'pro'">
       <div :class="['record', microphoneStatus ? 'active' : '']" @click="microphone">
-        <div
+        <!-- <div
           v-if="microphoneStatus"
           :style="{
             backgroundColor: attrib?.topic_color,
             maskImage: `url(${require('@/assets/voice_matrix/luyin-active.png')})`,
           }"
           class="icon-mask"
-        ></div>
+        ></div> -->
+        <SvgIcon
+          v-if="microphoneStatus"
+          icon-class="luyin-ing"
+          size="24"
+          :style="{
+            color: attrib && attrib.topic_color ? attrib.topic_color : '',
+          }"
+        />
         <SvgIcon
           v-else
           icon-class="luyin-radio-button"
@@ -82,14 +98,22 @@
 
     <template v-else>
       <div :class="['record', microphoneStatus ? 'active' : '']" @click="microphone">
-        <div
+        <!-- <div
           v-if="microphoneStatus"
           :style="{
             backgroundColor: attrib?.topic_color,
             maskImage: `url(${require('@/assets/voice_matrix/luyin-active.png')})`,
           }"
           class="icon-mask"
-        ></div>
+        ></div> -->
+        <SvgIcon
+          v-if="microphoneStatus"
+          icon-class="luyin-ing"
+          size="24"
+          :style="{
+            color: attrib && attrib.topic_color ? attrib.topic_color : '',
+          }"
+        />
         <SvgIcon
           v-else
           icon-class="luyin-radio-button"

+ 2 - 0
src/views/book/courseware/preview/components/article/NormalModelChs.vue

@@ -22,6 +22,7 @@
             :width="colLength == 2 ? 200 : 700"
             :ed="ed"
             type="audioLine"
+            :attrib="attrib"
             @emptyEd="emptyEd"
           />
         </template>
@@ -909,6 +910,7 @@
             :width="colLength == 2 ? 200 : 700"
             :ed="ed"
             type="audioLine"
+            :attrib="attrib"
             @emptyEd="emptyEd"
           />
         </template>

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

@@ -19,6 +19,7 @@
             :get-cur-time="getCurTime"
             :mp3-source="curQue.mp3_list[0].source"
             :width="colLength == 2 ? 200 : 700"
+            :attrib="attrib"
           />
         </template>
       </div>
@@ -613,6 +614,7 @@
             :get-cur-time="getCurTime"
             :mp3-source="curQue.mp3_list[0].source"
             :width="colLength == 2 ? 200 : 700"
+            :attrib="attrib"
           />
         </template>
       </div>

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

@@ -23,6 +23,7 @@
             :mp3-source="curQue.mp3_list[0].source"
             :ed="ed"
             type="audioLine"
+            :attrib="attrib"
             @handleChangeStopAudio="handleChangeStopAudio"
             @emptyEd="emptyEd"
           />
@@ -403,6 +404,7 @@
                   :is-record="isRecord"
                   :handle-change-stop-audio="handleChangeStopAudio"
                   :get-play-status="getPlayStatus"
+                  :attrib="attrib"
                 />
               </div>
             </div>
@@ -448,6 +450,7 @@
             :mp3-source="curQue.mp3_list[0].source"
             :ed="ed"
             type="audioLine"
+            :attrib="attrib"
             @handleChangeStopAudio="handleChangeStopAudio"
             @emptyEd="emptyEd"
           />

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

@@ -19,6 +19,7 @@
             :get-cur-time="getCurTime"
             :mp3-source="curQue.mp3_list[0].source"
             :width="colLength == 2 ? 200 : 700"
+            :attrib="attrib"
           />
         </template>
       </div>
@@ -585,6 +586,7 @@
             :get-cur-time="getCurTime"
             :mp3-source="curQue.mp3_list[0].source"
             :width="colLength == 2 ? 200 : 700"
+            :attrib="attrib"
           />
         </template>
       </div>

+ 2 - 1
src/views/book/courseware/preview/components/character_base/components/AudioPlay.vue

@@ -196,7 +196,8 @@ export default {
     height: 40px;
     color: #fff;
     cursor: pointer;
-    background-color: $main-color;
+
+    // background-color: $main-color;
     border-radius: 20px;
 
     &.not-url {

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

@@ -21,7 +21,16 @@
           @choose="choose($event)"
         >
           <transition-group>
-            <div v-for="(item, i) in data.structure_select_list" :id="item.id" :key="'op' + i" class="option_one">
+            <div
+              v-for="(item, i) in data.structure_select_list"
+              :id="item.id"
+              :key="'op' + i"
+              class="option_one"
+              :style="{
+                background:
+                  data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
+              }"
+            >
               <img
                 :src="item.type === 'local' ? require('@/assets/structure/' + item.value) : item.value"
                 class="small-img"

+ 2 - 0
src/views/book/courseware/preview/components/dialogue_article/NormalModelChs.vue

@@ -21,6 +21,7 @@
             :width="colLength == 2 ? 200 : isPhone ? 200 : 790"
             :ed="ed"
             type="audioLine"
+            :attrib="attrib"
             @emptyEd="emptyEd"
           />
         </template>
@@ -515,6 +516,7 @@
             :width="colLength == 2 ? 200 : isPhone ? 200 : 790"
             :ed="ed"
             type="audioLine"
+            :attrib="attrib"
             @emptyEd="emptyEd"
           />
         </template>

+ 12 - 11
src/views/book/courseware/preview/components/dialogue_article/PhraseModelChs.vue

@@ -19,6 +19,7 @@
             :get-cur-time="getCurTime"
             :mp3-source="curQue.mp3_list[0].source"
             :width="colLength == 2 ? 200 : isPhone ? 200 : 790"
+            :attrib="attrib"
           />
         </template>
       </div>
@@ -366,6 +367,7 @@
             :get-cur-time="getCurTime"
             :mp3-source="curQue.mp3_list[0].source"
             :width="colLength == 2 ? 200 : isPhone ? 200 : 790"
+            :attrib="attrib"
           />
         </template>
       </div>
@@ -682,7 +684,7 @@ export default {
           });
         });
         let enwords =
-          dItem.sentencesEn && dItem.sentencesEn.length > 0 ? dItem.sentencesEn.join(' ').replace(/\'/g, '’') : '';
+          dItem.sentencesEn && dItem.sentencesEn.length > 0 ? dItem.sentencesEn.join(' ').replace(/\\'/g, '’') : '';
         let paraObj = {
           wordsList: paraArr,
           enwords,
@@ -705,27 +707,27 @@ export default {
       let endIndex = 0;
       let words = '';
       this.newWordList.forEach((item) => {
-        if (item.length == 1) {
-          if (item == wItem.chs && !wItem.banLight) {
+        if (item.length === 1) {
+          if (item === wItem.chs && !wItem.banLight) {
             words = wItem.chs;
             endIndex = startIndex + 1;
           }
-        } else if (item[0] == wItem.chs && sentence.indexOf(item) > -1) {
+        } else if (item[0] === wItem.chs && sentence.indexOf(item) > -1) {
           let index = null;
           let chsStr = '';
           for (let i = startIndex; i < sItem.length + 1; i++) {
             index = i;
-            if (chsStr.length == item.length) {
+            if (chsStr.length === item.length) {
               break;
             } else {
               chsStr += sItem[i] ? sItem[i].chs : '';
             }
           }
-          if (chsStr == item && !wItem.banLight) {
+          if (chsStr === item && !wItem.banLight) {
             words = item;
             endIndex = index;
           }
-        } else if (wItem.new_word && wItem.new_word == item && !wItem.banLight) {
+        } else if (wItem.new_word && wItem.new_word === item && !wItem.banLight) {
           words = item;
           endIndex = startIndex + 1;
         }
@@ -751,7 +753,7 @@ export default {
       let roleList = JSON.parse(JSON.stringify(this.curQue.property.role_list));
       for (let i = 0; i < roleList.length; i++) {
         let item = roleList[i];
-        if (item.id == roleIndex) {
+        if (item.id === roleIndex) {
           resObj = item;
           // resObj.color = this.colorBox[i];
           break;
@@ -812,12 +814,12 @@ export default {
       if (word && this.newWordList.indexOf(word) > -1) {
         this.highWordsArr.push(word);
       }
-      if (words && word != words && this.newWordList.indexOf(words) > -1) {
+      if (words && word !== words && this.newWordList.indexOf(words) > -1) {
         this.highWordsArr.push(words);
       }
       if (this.newWordList.indexOf(word) > -1 || this.newWordList.indexOf(words) > -1) {
         if (word && this.newWordList.indexOf(word) > -1) {
-          if (_this.oldHz != word) {
+          if (_this.oldHz !== word) {
             this.isShow = false;
             setTimeout(() => {
               _this.hz = word;
@@ -981,7 +983,6 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-//@import url(); 引入公共css类
 .NNPE-ArticleView {
   width: 100%;
 

+ 140 - 133
src/views/book/courseware/preview/components/dialogue_article/Practicechs.vue

@@ -1,31 +1,32 @@
 <!--  -->
 <template>
-  <div v-if="curQue" class="NNPE-ArticleView">
+  <div class="NNPE-ArticleView" v-if="curQue">
     <!-- <a class="ArticleView-full" @click="fullScreen">黑板模式</a> -->
     <div
+      class="aduioLine-box aduioLine-practice-npc"
       v-if="
         ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
           config.isHasPY ||
           config.isHasEN) &&
         curQue.property.mp3_position === 'top'
       "
-      class="aduioLine-box aduioLine-practice-npc"
     >
       <div class="aduioLine-content">
         <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
           <AudioLine
-            ref="audioLine"
-            audio-id="diaPraAudio"
+            audioId="diaPraAudio"
             :mp3="curQue.mp3_list[0].url"
-            :get-cur-time="getCurTime"
-            :stop-audio="stopAudio"
+            :getCurTime="getCurTime"
+            ref="audioLine"
+            :stopAudio="stopAudio"
             :width="colLength == 2 ? 175 : isPhone ? 200 : 750"
-            :is-repeat="isRepeat"
-            :mp3-source="curQue.mp3_list[0].source"
+            :isRepeat="isRepeat"
+            :mp3Source="curQue.mp3_list[0].source"
             :ed="ed"
             type="audioLine"
             @handleChangeStopAudio="handleChangeStopAudio"
             @emptyEd="emptyEd"
+            :attrib="attrib"
           />
         </template>
       </div>
@@ -66,14 +67,14 @@
     </div>
 
     <template v-if="resObj">
-      <p v-if="curQue.notice" class="notice" style="padding-top: 24px">
+      <p class="notice" v-if="curQue.notice" style="padding-top: 24px">
         {{ curQue.notice }}
       </p>
       <div class="NPC-sentences-list">
         <div
+          :class="['NNPE-detail-box', sentIndex == index ? 'active' : '']"
           v-for="(item, index) in resObj.sentList"
           :key="'detail' + index"
-          :class="['NNPE-detail-box', sentIndex == index ? 'active' : '']"
         >
           <div
             class="NNPE-detail"
@@ -87,7 +88,7 @@
           >
             <template v-if="item.sentArr[0].sentIndex == 0">
               <RoleChs
-                :cur-role="item.roleDetail"
+                :curRole="item.roleDetail"
                 :color="
                   (curQue.wordTime &&
                     curQue.wordTime[index] &&
@@ -131,7 +132,7 @@
                     >{{ item.roleDetail.detail.wordsList | handleChs }}</span
                   >
                 </div> -->
-                <div v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin" class="roleDetail">
+                <div class="roleDetail" v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin">
                   <span
                     :class="[
                       'chs',
@@ -170,9 +171,9 @@
                 <div style="overflow: hidden; clear: both"></div>
                 <div class="NNPE-words-box">
                   <div
+                    class="NNPE-words"
                     v-for="(pItem, pIndex) in item.sentArr"
                     :key="'wordsList' + pIndex"
-                    class="NNPE-words"
                     :class="[
                       pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
                       pItem.chs == '“' ? 'textRight' : '',
@@ -301,12 +302,12 @@
                             </template>
                           </span>
                           <span
+                            class="NNPE-words-box"
                             v-if="
                               item.sentArr[pIndex + 2] &&
                               item.sentArr[pIndex + 2].chs &&
                               chsFhList.indexOf(item.sentArr[pIndex + 2].chs) > -1
                             "
-                            class="NNPE-words-box"
                           >
                             <template v-if="curQue.property.pinyin_position == 'top'">
                               <span
@@ -447,9 +448,9 @@
                   {{ item.enwords }}
                 </div>
                 <div
-                  v-if="curQue.property.multilingual_position === 'para'"
                   class="multilingual-para"
                   :class="[item.isTitle ? 'multilingual-para-center' : '']"
+                  v-if="curQue.property.multilingual_position === 'para'"
                 >
                   {{
                     multilingualTextList[multilingual] && multilingualTextList[multilingual][index]
@@ -465,32 +466,33 @@
               <Soundrecord
                 type="promax"
                 class="luyin-box"
-                :TaskModel="TaskModel"
-                v-if="refresh"
-                :answer-record-list="
-                  curQue.Bookanswer.practiceModel[index] && curQue.Bookanswer.practiceModel[index].recordList
-                "
-                :tm-index="index"
-                :sent-index="sentIndex"
                 @getWavblob="getWavblob"
                 @handleParentPlay="handleParentPlay"
                 @sentPause="sentPause"
+                :TaskModel="TaskModel"
+                :answerRecordList="
+                  curQue.Bookanswer.practiceModel[index] && curQue.Bookanswer.practiceModel[index].recordList
+                "
+                :tmIndex="index"
                 @handleWav="handleWav"
+                :sentIndex="sentIndex"
+                v-if="refresh"
               />
-              <div v-if="curQue.mp3_list && curQue.mp3_list.length > 0" class="compare-box">
+              <div class="compare-box" v-if="curQue.mp3_list && curQue.mp3_list.length > 0">
                 <Audio-compare
-                  :theme-color="attrib ? attrib.topic_color : '#e35454'"
+                  :themeColor="attrib ? attrib.topic_color : '#e35454'"
                   :index="index"
-                  :sent-index="sentIndex"
+                  :sentIndex="sentIndex"
                   :url="curQue.mp3_list[0].id"
                   :bg="curQue.wordTime[index].bg"
                   :ed="curQue.wordTime[index].ed"
                   :wavblob="wavblob"
-                  :get-cur-time="getCurTime"
-                  :sent-pause="sentPause"
-                  :is-record="isRecord"
-                  :handle-change-stop-audio="handleChangeStopAudio"
-                  :get-play-status="getPlayStatus"
+                  :getCurTime="getCurTime"
+                  :sentPause="sentPause"
+                  :isRecord="isRecord"
+                  :handleChangeStopAudio="handleChangeStopAudio"
+                  :getPlayStatus="getPlayStatus"
+                  :attrib="attrib"
                 />
               </div>
             </div>
@@ -504,9 +506,9 @@
     </template>
     <template v-for="(items, indexs) in curQue.detail">
       <div
-        v-if="curQue.property.multilingual_position === 'all' && items.multilingualTextList[multilingual]"
-        :key="indexs"
         class="multilingual"
+        :key="indexs"
+        v-if="curQue.property.multilingual_position === 'all' && items.multilingualTextList[multilingual]"
       >
         <div class="multilingual-para" :class="[items.isTitle ? 'multilingual-para-center' : '']">
           {{
@@ -518,29 +520,30 @@
       </div>
     </template>
     <div
+      class="aduioLine-box aduioLine-practice-npc aduioLine-box-bottom"
       v-if="
         ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
           config.isHasPY ||
           config.isHasEN) &&
         curQue.property.mp3_position === 'bottom'
       "
-      class="aduioLine-box aduioLine-practice-npc aduioLine-box-bottom"
     >
       <div class="aduioLine-content">
         <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
           <AudioLine
-            ref="audioLine"
-            audio-id="diaPraAudio"
+            audioId="diaPraAudio"
             :mp3="curQue.mp3_list[0].url"
-            :get-cur-time="getCurTime"
-            :stop-audio="stopAudio"
+            :getCurTime="getCurTime"
+            ref="audioLine"
+            :stopAudio="stopAudio"
             :width="colLength == 2 ? 175 : isPhone ? 200 : 750"
-            :is-repeat="isRepeat"
-            :mp3-source="curQue.mp3_list[0].source"
+            :isRepeat="isRepeat"
+            :mp3Source="curQue.mp3_list[0].source"
             :ed="ed"
             type="audioLine"
             @handleChangeStopAudio="handleChangeStopAudio"
             @emptyEd="emptyEd"
+            :attrib="attrib"
           />
         </template>
       </div>
@@ -578,27 +581,27 @@
         />
       </div>
     </div>
-    <div :id="'screen-' + mathNum" class="voice-full-screen">
+    <div class="voice-full-screen" :id="'screen-' + mathNum">
       <Voicefullscreen
         v-if="isFull && resObj"
-        :theme-color="attrib ? attrib.topic_color : '#e35454'"
-        :cur-que="curQue"
-        :sent-list="resObj.sentList"
-        :sent-index="sentIndex"
+        :themeColor="attrib ? attrib.topic_color : '#e35454'"
+        :curQue="curQue"
+        :sentList="resObj.sentList"
+        :sentIndex="sentIndex"
         :mp3="curQue.mp3_list && curQue.mp3_list[0] ? curQue.mp3_list[0].id : ''"
-        :no-font="noFont"
+        :noFont="noFont"
         :NNPENewWordList="NNPENewWordList"
-        :current-tree-i-d="currentTreeID"
-        :is-full="isFull"
+        :currentTreeID="currentTreeID"
+        :isFull="isFull"
         :config="config"
         :TaskModel="TaskModel"
-        :NpcNewWordMp3="NpcNewWordMp3"
-        :attrib="attrib"
         @handleWav="handleWav"
         @changePinyin="changePinyin"
         @changeEN="changeEN"
         @exitFullscreen="exitFullscreen"
         @changeIsFull="changeIsFull"
+        :NpcNewWordMp3="NpcNewWordMp3"
+        :attrib="attrib"
       />
     </div>
   </div>
@@ -613,6 +616,20 @@ import AudioCompare from '../article/components/AudioCompare.vue';
 import Voicefullscreen from '../article/Voicefullscreen.vue';
 export default {
   name: 'ArticleView',
+  props: [
+    'curQue',
+    'colorBox',
+    'noFont',
+    'attrib',
+    'config',
+    'NNPENewWordList',
+    'currentTreeID',
+    'TaskModel',
+    'colLength',
+    'NpcNewWordMp3',
+    'isPhone',
+    'multilingual',
+  ],
   components: {
     AudioLine,
     Soundrecord,
@@ -625,7 +642,7 @@ export default {
       let str = '';
       wordsList.forEach((item, index) => {
         if (index < wordsList.length - 1) {
-          str += `${item.pinyin} `;
+          str += item.pinyin + ' ';
         } else {
           str += item.pinyin;
         }
@@ -636,7 +653,7 @@ export default {
       let str = '';
       wordsList.forEach((item, index) => {
         if (index < wordsList.length - 1) {
-          str += `${item.chs} `;
+          str += item.chs + ' ';
         } else {
           str += item.chs;
         }
@@ -644,32 +661,18 @@ export default {
       return str;
     },
   },
-  props: [
-    'curQue',
-    'colorBox',
-    'noFont',
-    'attrib',
-    'config',
-    'NNPENewWordList',
-    'currentTreeID',
-    'TaskModel',
-    'colLength',
-    'NpcNewWordMp3',
-    'isPhone',
-    'multilingual',
-  ],
   data() {
     return {
       wavblob: null,
       resObj: null,
-      curTime: 0, // 单位s
+      curTime: 0, //单位s
       chsFhList: [',', '。', '”', ':', '》', '?', '!', ';', '、'],
       enFhList: [',', '.', ';', '?', '!', ':', '>', '<'],
       NumberList: ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳'],
       stopAudio: false,
       sentIndex: 0,
       isRepeat: false,
-      currSent: null, // 当前句子的时间
+      currSent: null, //当前句子的时间
       isRecord: false,
       isFull: false,
       mathNum: Math.random().toString(36).substr(2),
@@ -683,7 +686,7 @@ export default {
     };
   },
   computed: {
-    isPlaying() {
+    isPlaying: function () {
       let playing = false;
       if (this.$refs.audioLine) {
         playing = this.$refs.audioLine.audio.isPlaying;
@@ -693,7 +696,7 @@ export default {
   },
   watch: {
     sentIndex: {
-      handler(newVal, oldVal) {
+      handler: function (newVal, oldVal) {
         let _this = this;
         if (newVal != oldVal) {
           let Bookanswer = _this.curQue.Bookanswer;
@@ -713,7 +716,7 @@ export default {
       deep: true,
     },
     isFull: {
-      handler(newVal, oldVal) {
+      handler: function (newVal, oldVal) {
         let _this = this;
         _this.refresh = false;
         if (!newVal) {
@@ -726,25 +729,10 @@ export default {
       deep: true,
     },
   },
-  // 生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
-  // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-    if (this.curQue) {
-      this.handleData();
-    }
-  },
-  beforeCreate() {}, // 生命周期 - 创建之前
-  beforeMount() {}, // 生命周期 - 挂载之前
-  beforeUpdate() {}, // 生命周期 - 更新之前
-  updated() {}, // 生命周期 - 更新之后
-  beforeDestroy() {}, // 生命周期 - 销毁之前
-  destroyed() {}, // 生命周期 - 销毁完成
-  activated() {},
-  // 方法集合
+  //方法集合
   methods: {
     getPlayStatus(val) {
-      // this.isPlaying = val;
+      //this.isPlaying = val;
     },
     pauseAudio() {
       let audio = document.getElementsByTagName('audio');
@@ -762,7 +750,7 @@ export default {
         });
       }
     },
-    // 语音全屏
+    //语音全屏
     fullScreen(type) {
       this.pauseAudio();
       this.pauseVideo();
@@ -770,8 +758,8 @@ export default {
       this.goFullscreen();
     },
     goFullscreen() {
-      let id = `screen-${this.mathNum}`;
-      let element = document.getElementById(id);
+      let id = 'screen-' + this.mathNum;
+      var element = document.getElementById(id);
       if (element.requestFullscreen) {
         element.requestFullscreen();
       } else if (element.msRequestFullscreen) {
@@ -833,8 +821,8 @@ export default {
         let trans_arr = item.translation.split('\n');
         this.$set(this.multilingualTextList, item.type, trans_arr);
       });
-      let resArr = [];
-      let sentArrTotal = [];
+      let resArr = [],
+        sentArrTotal = [];
       let curQue = JSON.parse(JSON.stringify(this.curQue));
       let wordTimeList = curQue.wordTime;
       let dhaspinyin = false; // 每段是否有拼音
@@ -855,18 +843,20 @@ export default {
               if (!this.highWords) {
                 this.findLightWord(wItem, wIndex, sentence, sItem);
                 words = this.highWords ? this.highWords.words : '';
-              } else if (wIndex > this.highWords.endIndex - 1) {
-                this.highWords = null;
-                this.findLightWord(wItem, wIndex, sentence, sItem);
-                words = this.highWords ? this.highWords.words : '';
               } else {
-                words = this.highWords ? this.highWords.words : '';
+                if (wIndex > this.highWords.endIndex - 1) {
+                  this.highWords = null;
+                  this.findLightWord(wItem, wIndex, sentence, sItem);
+                  words = this.highWords ? this.highWords.words : '';
+                } else {
+                  words = this.highWords ? this.highWords.words : '';
+                }
               }
             }
             let obj = {
-              paraIndex: dIndex, // 段落索引
-              sentIndex: sIndex, // 在段落中句子索引
-              wordIndex: wIndex, // 单词的索引
+              paraIndex: dIndex, //段落索引
+              sentIndex: sIndex, //在段落中句子索引
+              wordIndex: wIndex, //单词的索引
               pinyin:
                 curQue.pinyin_type === 'pinyin'
                   ? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
@@ -877,11 +867,11 @@ export default {
               padding: true,
               className: wItem.className,
               isShow: wItem.isShow,
-              startIndex,
-              endIndex,
+              startIndex: startIndex,
+              endIndex: endIndex,
               leg: wItem.chs.length,
               timeList: [],
-              words,
+              words: words,
               config: {
                 fontFamily: wItem.fontFamily,
               },
@@ -890,10 +880,10 @@ export default {
             if (wItem.pinyin) dhaspinyin = true;
           });
           let objs = {
-            roleDetail,
-            sentArr,
+            roleDetail: roleDetail,
+            sentArr: sentArr,
             enwords: dItem.sentencesEn && dItem.sentencesEn[sIndex] && dItem.sentencesEn[sIndex].replace(/\'/g, '’'),
-            dhaspinyin,
+            dhaspinyin: dhaspinyin,
           };
           sentArrTotal.push(sentArr);
           resArr.push(objs);
@@ -905,7 +895,7 @@ export default {
 
       this.resObj = { sentList: resArr };
     },
-    // 获取角色
+    //获取角色
     getRole(dItem) {
       let roleIndex = dItem.roleIndex;
       let resObj = null;
@@ -931,7 +921,7 @@ export default {
         });
       });
     },
-    // 词和标点合一起
+    //词和标点合一起
     mergeWordSymbol(wItem) {
       if (this.chsFhList.indexOf(wItem.chs) > -1 || this.NumberList.indexOf(wItem.pinyin) > -1) {
         wItem.isShow = false;
@@ -940,41 +930,43 @@ export default {
       }
     },
     findLightWord(wItem, startIndex, sentence, sItem) {
-      let endIndex = 0,
-        words = '';
+      let words = '',
+        endIndex = 0;
       this.newWordList.forEach((item) => {
         if (item.length == 1) {
           if (item == wItem.chs && !wItem.banLight) {
             words = wItem.chs;
             endIndex = startIndex + 1;
           }
-        } else if (item[0] == wItem.chs && sentence.indexOf(item) > -1) {
-          let index = null;
-          let chsStr = '';
-          for (let i = startIndex; i < sItem.length + 1; i++) {
-            index = i;
-            if (chsStr.length == item.length) {
-              break;
-            } else {
-              chsStr += sItem[i] ? sItem[i].chs : '';
+        } else {
+          if (item[0] == wItem.chs && sentence.indexOf(item) > -1) {
+            let index = null;
+            let chsStr = '';
+            for (let i = startIndex; i < sItem.length + 1; i++) {
+              index = i;
+              if (chsStr.length == item.length) {
+                break;
+              } else {
+                chsStr += sItem[i] ? sItem[i].chs : '';
+              }
             }
-          }
-          if (chsStr == item && !wItem.banLight) {
+            if (chsStr == item && !wItem.banLight) {
+              words = item;
+              endIndex = index;
+            }
+          } else if (wItem.new_word && wItem.new_word == item && !wItem.banLight) {
             words = item;
-            endIndex = index;
+            endIndex = startIndex + 1;
           }
-        } else if (wItem.new_word && wItem.new_word == item && !wItem.banLight) {
-          words = item;
-          endIndex = startIndex + 1;
         }
       });
       if (words) {
-        this.highWords = { words, endIndex };
+        this.highWords = { words: words, endIndex: endIndex };
       } else {
         this.highWords = null;
       }
     },
-    // 判断是否有padding
+    //判断是否有padding
     judgePad(sItem, wItem, curIndex) {
       let leg = sItem.length;
       if (curIndex < leg - 1) {
@@ -990,7 +982,7 @@ export default {
         }
       }
     },
-    // 转化时间
+    //转化时间
     handleTimeList(list) {
       let listRes = [];
       list.forEach((item) => {
@@ -999,7 +991,7 @@ export default {
       });
       return listRes;
     },
-    // 计算总时间
+    //计算总时间
     countWordTime(sentArr) {
       let total = 0;
       sentArr.forEach((item) => {
@@ -1007,7 +999,7 @@ export default {
       });
       return total;
     },
-    // 点击播放某个句子
+    //点击播放某个句子
     handleChangeTime(time, index, ed) {
       let _this = this;
       if (_this.isRepeat) {
@@ -1024,7 +1016,7 @@ export default {
       this.ed = undefined;
     },
     handleWav(list, tmIndex) {
-      tmIndex = tmIndex || 0;
+      tmIndex = tmIndex ? tmIndex : 0;
       this.curQue.Bookanswer.practiceModel[tmIndex] = {
         recordList: [],
       };
@@ -1038,7 +1030,7 @@ export default {
     handleChangeStopAudio() {
       this.stopAudio = false;
     },
-    // 拼音的显示和隐藏
+    //拼音的显示和隐藏
     changePinyin() {
       if (this.config.isHasPY) {
         this.$emit('changeConfig', 'isShowPY');
@@ -1069,7 +1061,22 @@ export default {
       });
       this.newWordList = JSON.parse(JSON.stringify(NewWordList));
     },
-  }, // 如果页面有keep-alive缓存功能,这个函数会触发
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    if (this.curQue) {
+      this.handleData();
+    }
+  },
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
 <style lang="scss" scoped>

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

@@ -19,6 +19,7 @@
             :get-cur-time="getCurTime"
             :mp3-source="curQue.mp3_list[0].source"
             :width="colLength == 2 ? 200 : isPhone ? 200 : 790"
+            :attrib="attrib"
           />
         </template>
       </div>
@@ -876,7 +877,6 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-//@import url(); 引入公共css类
 .NNPE-ArticleView {
   position: relative;
   width: 100%;

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

@@ -13,6 +13,7 @@
         :width="audio_width"
         :ed="ed"
         type="audioLine"
+        :attrib="data.unified_attrib"
         @emptyEd="emptyEd"
       />
     </template>

+ 2 - 1
src/views/book/courseware/preview/components/new_word/NewWordPreview.vue

@@ -692,7 +692,8 @@ export default {
   mounted() {
     this.width = `${
       document.querySelector('.preview-main').offsetWidth -
-      73 -
+      200 -
+      20 -
       (this.data.property.sn_display_mode === 'true' ? 15 : 0) -
       (this.newData ? 16 : 0)
     }px`;

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

@@ -17,6 +17,9 @@
           <div
             class="option-content"
             :class="[isJudgingRightWrong ? (con_preview[0].all_right ? 'all-right' : 'has-error') : '']"
+            :style="{
+              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>
             <!-- 拼音输入 -->

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

@@ -51,13 +51,13 @@
       <SvgIcon
         v-if="microphoneStatus"
         icon-class="luyin-ing"
-        size="16"
+        size="24"
         :style="{ color: attrib.topic_color ? attrib.topic_color : '#DCDFE6' }"
       />
       <SvgIcon
         v-else
-        icon-class="luyin"
-        size="16"
+        icon-class="luyin-radio-button"
+        size="24"
         :style="{ color: attrib.topic_color ? attrib.topic_color : '#DCDFE6' }"
       />
     </div>
@@ -69,7 +69,10 @@
         microphoneStatus ? 'record-ing' : '',
         selectIndex || selectIndex == 0 ? 'record-black' : '',
       ]"
-      :style="{ color: microphoneStatus ? (attrib.topic_color ? attrib.topic_color : '#DCDFE6') : '' }"
+      :style="{
+        fontSize: attrib && attrib.font_size ? attrib.font_size : '',
+        color: microphoneStatus && attrib && attrib.topic_color ? attrib.topic_color : '#DCDFE6',
+      }"
       >{{ isPlaying ? '-' : '' }}{{ handleDateTime(recordtime) }}</span
     >
     <el-select
@@ -87,8 +90,8 @@
     ></div>
     <a v-if="manyTimes" :class="['record-delete', hasMicro ? 'record-delete-has' : '']" @click="handleDelete">
       <SvgIcon
-        icon-class="delete-btn"
-        size="16"
+        icon-class="luyin-delete"
+        size="24"
         :style="{ color: hasMicro ? (attrib.topic_color ? attrib.topic_color : '#DCDFE6') : 'rgba(0, 0, 0, 0.3)' }"
       />
     </a>
@@ -387,8 +390,8 @@ export default {
   height: 32px;
 
   .playBack {
-    width: 16px;
-    height: 16px;
+    width: 24px;
+    height: 24px;
     margin-left: 8px;
     cursor: pointer;
     background: url('@/assets/voice_matrix/luyin-play.png') center no-repeat;
@@ -414,20 +417,21 @@ export default {
   }
 
   .record {
-    width: 16px;
-    height: 16px;
+    width: 24px;
+    height: 24px;
     cursor: pointer;
-    background: url('@/assets/voice_matrix/luyin.png') center no-repeat;
-    background-size: 100%;
+
+    // background: url('@/assets/voice_matrix/luyin.png') center no-repeat;
+    // background-size: 100%;
 
     &.active {
-      background: url('@/assets/voice_matrix/luyin-active.png') center no-repeat;
-      background-size: 100%;
+      // background: url('@/assets/voice_matrix/luyin-active.png') center no-repeat;
+      // background-size: 100%;
     }
 
     &.active:hover {
-      background: url('@/assets/voice_matrix/luyin-stop.png') center no-repeat;
-      background-size: 100%;
+      // background: url('@/assets/voice_matrix/luyin-stop.png') center no-repeat;
+      // background-size: 100%;
     }
   }
 
@@ -457,8 +461,8 @@ export default {
 
   .record-delete {
     display: block;
-    width: 16px;
-    height: 16px;
+    width: 24px;
+    height: 24px;
     margin-left: 8px;
     font-size: 0;
     cursor: pointer;