Explorar el Código

课文高亮句子主题色

natasha hace 2 meses
padre
commit
edfa5cbd92

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

@@ -127,6 +127,15 @@
                               fontFamily: pItem.config.fontFamily,
                               height: '28px',
                               display: 'inline-block',
+                              backgroundColor:
+                                item.timeList &&
+                                item.timeList[pItem.sentIndex] &&
+                                curTime >= item.timeList[pItem.sentIndex].bg &&
+                                curTime <= item.timeList[pItem.sentIndex].ed &&
+                                curTime &&
+                                attrib
+                                  ? attrib.assist_color
+                                  : '',
                             }"
                           >
                             <template>
@@ -142,6 +151,17 @@
                                     ? 'wordActive'
                                     : '',
                                 ]"
+                                :style="{
+                                  color:
+                                    isPlaying &&
+                                    pItem.chstimeList &&
+                                    pItem.chstimeList[wIndex] &&
+                                    curTime >= pItem.chstimeList[wIndex].wordBg &&
+                                    curTime < item.timeList[pItem.sentIndex].ed &&
+                                    attrib
+                                      ? attrib.topic_color
+                                      : '',
+                                }"
                                 @click.stop="
                                   viewNotes(
                                     $event,
@@ -223,6 +243,25 @@
                               height: '28px',
                               display: 'inline-block',
                               width: item.wordsList[pIndex + 1].chs.trim() === '' ? '6px' : '',
+                              backgroundColor:
+                                isPlaying &&
+                                item.timeList &&
+                                item.timeList[pItem.sentIndex] &&
+                                curTime >= item.timeList[pItem.sentIndex].bg &&
+                                curTime <= item.timeList[pItem.sentIndex].ed &&
+                                curTime &&
+                                attrib
+                                  ? attrib.assist_color
+                                  : '',
+                              color:
+                                pItem.chstimeList &&
+                                pItem.chstimeList[pItem.leg - 1] &&
+                                curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
+                                curQue.wordTime &&
+                                curTime <= item.timeList[pItem.sentIndex].ed &&
+                                attrib
+                                  ? attrib.topic_color
+                                  : '',
                             }"
                             @click.stop="
                               viewNotes(
@@ -311,6 +350,25 @@
                               height: '28px',
                               display: 'inline-block',
                               width: item.wordsList[pIndex + 2].chs.trim() === '' ? '6px' : '',
+                              backgroundColor:
+                                isPlaying &&
+                                item.timeList &&
+                                item.timeList[pItem.sentIndex] &&
+                                curTime >= item.timeList[pItem.sentIndex].bg &&
+                                curTime <= item.timeList[pItem.sentIndex].ed &&
+                                curTime &&
+                                attrib
+                                  ? attrib.assist_color
+                                  : '',
+                              color:
+                                pItem.chstimeList &&
+                                pItem.chstimeList[pItem.leg - 1] &&
+                                curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
+                                curQue.wordTime &&
+                                curTime <= item.timeList[pItem.sentIndex].ed &&
+                                attrib
+                                  ? attrib.topic_color
+                                  : '',
                             }"
                             @click.stop="
                               viewNotes(
@@ -380,6 +438,17 @@
                             pItem.chs != '“' && pItem.padding && config.isShowPY ? 'padding' : '',
                             pItem.paraIndex == paraIndex && pItem.sentIndex == sentIndex ? 'overActive' : '',
                           ]"
+                          :style="{
+                            backgroundColor:
+                              item.timeList &&
+                              item.timeList[pItem.sentIndex] &&
+                              curTime >= item.timeList[pItem.sentIndex].bg &&
+                              curTime <= item.timeList[pItem.sentIndex].ed &&
+                              curTime &&
+                              attrib
+                                ? attrib.assist_color
+                                : '',
+                          }"
                         >
                           <template>
                             <span
@@ -399,6 +468,15 @@
                                 height: '28px',
                                 display: 'inline-block',
                                 width: pItem.chs[wIndex].trim() === '' ? '6px' : '',
+                                color:
+                                  isPlaying &&
+                                  pItem.chstimeList &&
+                                  pItem.chstimeList[wIndex] &&
+                                  curTime >= pItem.chstimeList[wIndex].wordBg &&
+                                  curTime < item.timeList[pItem.sentIndex].ed &&
+                                  attrib
+                                    ? attrib.topic_color
+                                    : '',
                               }"
                               @click.stop="
                                 viewNotes(

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

@@ -70,6 +70,9 @@
           v-for="(item, index) in resObj.sentList"
           :key="'detail' + index"
           :class="['NNPE-detail-box', sentIndex == index ? 'active' : '']"
+          :style="{
+            backgroundColor: sentIndex == index && attrib ? attrib.assist_color : '',
+          }"
         >
           <div
             :class="['NNPE-detail']"
@@ -143,6 +146,13 @@
                               height: '28px',
                               display: 'inline-block',
                               width: pItem.chs[wIndex].trim() === '' ? '6px' : '',
+                              color:
+                                pItem.timeList[wIndex] &&
+                                curTime >= pItem.timeList[wIndex].wordBg &&
+                                curTime <= curQue.wordTime[index].ed &&
+                                attrib
+                                  ? attrib.topic_color
+                                  : '',
                             }"
                             >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
                           >
@@ -190,6 +200,14 @@
                             height: '28px',
                             display: 'inline-block',
                             width: item.sentArr[pIndex + 1].chs.trim() === '' ? '6px' : '',
+                            color:
+                              pItem.timeList[pItem.leg - 1] &&
+                              curQue.wordTime &&
+                              curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
+                              curTime <= curQue.wordTime[index].ed &&
+                              attrib
+                                ? attrib.topic_color
+                                : '',
                           }"
                         >
                           {{
@@ -248,6 +266,14 @@
                             height: '28px',
                             display: 'inline-block',
                             width: item.sentArr[pIndex + 2].chs.trim() === '' ? '6px' : '',
+                            color:
+                              pItem.timeList[pItem.leg - 1] &&
+                              curQue.wordTime &&
+                              curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
+                              curTime <= curQue.wordTime[index].ed &&
+                              attrib
+                                ? attrib.topic_color
+                                : '',
                           }"
                         >
                           {{
@@ -311,6 +337,15 @@
                             height: '28px',
                             display: 'inline-block',
                             width: pItem.chs[wIndex].trim() === '' ? '6px' : '',
+                            color:
+                              pItem.timeList[wIndex] &&
+                              curQue.wordTime &&
+                              curQue.wordTime[index] &&
+                              curTime >= pItem.timeList[wIndex].wordBg &&
+                              curTime <= curQue.wordTime[index].ed &&
+                              attrib
+                                ? attrib.topic_color
+                                : '',
                           }"
                           >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
                         >

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

@@ -111,6 +111,15 @@
                               fontFamily: pItem.config.fontFamily,
                               height: '28px',
                               display: 'inline-block',
+                              backgroundColor:
+                                item.timeList &&
+                                item.timeList[pItem.sentIndex] &&
+                                curTime >= item.timeList[pItem.sentIndex].bg &&
+                                curTime <= item.timeList[pItem.sentIndex].ed &&
+                                curTime &&
+                                attrib
+                                  ? attrib.assist_color
+                                  : '',
                             }"
                             >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : '' }}</span
                           >
@@ -144,6 +153,15 @@
                               fontFamily: item.wordsList[pIndex + 1].config.fontFamily,
                               height: '28px',
                               display: 'inline-block',
+                              backgroundColor:
+                                item.timeList &&
+                                item.timeList[pItem.sentIndex] &&
+                                curTime >= item.timeList[pItem.sentIndex].bg &&
+                                curTime <= item.timeList[pItem.sentIndex].ed &&
+                                curTime &&
+                                attrib
+                                  ? attrib.assist_color
+                                  : '',
                             }"
                             >{{
                               NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
@@ -200,6 +218,15 @@
                               fontFamily: item.wordsList[pIndex + 2].config.fontFamily,
                               height: '28px',
                               display: 'inline-block',
+                              backgroundColor:
+                                item.timeList &&
+                                item.timeList[pItem.sentIndex] &&
+                                curTime >= item.timeList[pItem.sentIndex].bg &&
+                                curTime <= item.timeList[pItem.sentIndex].ed &&
+                                curTime &&
+                                attrib
+                                  ? attrib.assist_color
+                                  : '',
                             }"
                             >{{
                               NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
@@ -244,6 +271,15 @@
                             fontFamily: pItem.config.fontFamily,
                             height: '28px',
                             display: 'inline-block',
+                            backgroundColor:
+                              item.timeList &&
+                              item.timeList[pItem.sentIndex] &&
+                              curTime >= item.timeList[pItem.sentIndex].bg &&
+                              curTime <= item.timeList[pItem.sentIndex].ed &&
+                              curTime &&
+                              attrib
+                                ? attrib.assist_color
+                                : '',
                           }"
                           @click="showWordDetail($event, pItem)"
                           >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : '' }}</span

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

@@ -149,13 +149,13 @@
         >
           <svg-icon
             icon-class="icon-pencil"
-            size="24"
+            size="16"
             :style="{
               color: attrib && attrib.topic_color ? attrib.topic_color : '#de4444',
             }"
             class="collect-icon"
           />
-          <img
+          <!-- <img
             :src="
               themeColor
                 ? themeColor == 'green'
@@ -166,7 +166,7 @@
                 : require('@/assets/icon/Pencil-16-normal-red.png')
             "
             class="collect-icon"
-          />
+          /> -->
           写一写
         </button>
       </div>

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

@@ -169,6 +169,14 @@
                                   fontFamily: pItem.config.fontFamily,
                                   height: '28px',
                                   display: 'inline-block',
+                                  color:
+                                    pItem.chstimeList &&
+                                    pItem.chstimeList[wIndex] &&
+                                    curTime >= pItem.chstimeList[wIndex].wordBg &&
+                                    curTime < item.timeList[pItem.sentIndex].ed &&
+                                    attrib
+                                      ? attrib.topic_color
+                                      : '',
                                 }"
                                 >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
                               >
@@ -235,6 +243,15 @@
                               fontFamily: item.wordsList[pIndex + 1].config.fontFamily,
                               height: '28px',
                               display: 'inline-block',
+                              color:
+                                pItem.chstimeList &&
+                                pItem.chstimeList[pItem.leg - 1] &&
+                                curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
+                                curQue.wordTime &&
+                                curTime <= item.timeList[pItem.sentIndex].ed &&
+                                attrib
+                                  ? attrib.topic_color
+                                  : '',
                             }"
                             >{{
                               NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
@@ -311,6 +328,15 @@
                               fontFamily: item.wordsList[pIndex + 2].config.fontFamily,
                               height: '28px',
                               display: 'inline-block',
+                              color:
+                                pItem.chstimeList &&
+                                pItem.chstimeList[pItem.leg - 1] &&
+                                curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
+                                curQue.wordTime &&
+                                curTime <= item.timeList[pItem.sentIndex].ed &&
+                                attrib
+                                  ? attrib.topic_color
+                                  : '',
                             }"
                             >{{
                               NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
@@ -389,6 +415,14 @@
                                 fontFamily: pItem.config.fontFamily,
                                 height: '28px',
                                 display: 'inline-block',
+                                color:
+                                  pItem.chstimeList &&
+                                  pItem.chstimeList[wIndex] &&
+                                  curTime >= pItem.chstimeList[wIndex].wordBg &&
+                                  curTime <= item.timeList[pItem.sentIndex].ed &&
+                                  attrib
+                                    ? attrib.topic_color
+                                    : '',
                               }"
                               >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
                             >

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

@@ -75,6 +75,9 @@
           :class="['NNPE-detail-box', sentIndex == index ? 'active' : '']"
           v-for="(item, index) in resObj.sentList"
           :key="'detail' + index"
+          :style="{
+            backgroundColor: sentIndex == index && attrib ? attrib.assist_color : '',
+          }"
         >
           <div
             class="NNPE-detail"
@@ -231,6 +234,17 @@
                                     fontFamily: pItem.config.fontFamily,
                                     height: '28px',
                                     display: 'inline-block',
+                                    color:
+                                      isPlaying &&
+                                      pItem.timeList &&
+                                      pItem.timeList[wIndex] &&
+                                      curTime >= pItem.timeList[wIndex].wordBg &&
+                                      curQue.wordTime &&
+                                      curQue.wordTime[index] &&
+                                      curTime <= curQue.wordTime[index].ed &&
+                                      attrib
+                                        ? attrib.topic_color
+                                        : '',
                                   }"
                                   >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
                                 >
@@ -279,6 +293,16 @@
                                   fontFamily: item.sentArr[pIndex + 1].config.fontFamily,
                                   height: '28px',
                                   display: 'inline-block',
+                                  color:
+                                    isPlaying &&
+                                    pItem.timeList[pItem.leg - 1] &&
+                                    curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
+                                    curQue.wordTime &&
+                                    curQue.wordTime[index] &&
+                                    curTime <= curQue.wordTime[index].ed &&
+                                    attrib
+                                      ? attrib.topic_color
+                                      : '',
                                 }"
                               >
                                 {{
@@ -338,6 +362,16 @@
                                   fontFamily: item.sentArr[pIndex + 2].config.fontFamily,
                                   height: '28px',
                                   display: 'inline-block',
+                                  color:
+                                    isPlaying &&
+                                    pItem.timeList[pItem.leg - 1] &&
+                                    curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
+                                    curQue.wordTime &&
+                                    curQue.wordTime[index] &&
+                                    curTime <= curQue.wordTime[index].ed &&
+                                    attrib
+                                      ? attrib.topic_color
+                                      : '',
                                 }"
                               >
                                 {{
@@ -404,6 +438,17 @@
                                   fontFamily: pItem.config.fontFamily,
                                   height: '28px',
                                   display: 'inline-block',
+                                  color:
+                                    isPlaying &&
+                                    pItem.timeList &&
+                                    pItem.timeList[wIndex] &&
+                                    curTime >= pItem.timeList[wIndex].wordBg &&
+                                    curQue.wordTime &&
+                                    curQue.wordTime[index] &&
+                                    curTime <= curQue.wordTime[index].ed &&
+                                    attrib
+                                      ? attrib.topic_color
+                                      : '',
                                 }"
                                 >{{ pItem.chs[wIndex] }}</span
                               >

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

@@ -126,6 +126,13 @@
                               fontFamily: pItem.config.fontFamily,
                               height: '28px',
                               display: 'inline-block',
+                              color:
+                                paraIndex == pItem.paraIndex &&
+                                sentIndex == pItem.sentIndex &&
+                                wordIndex == pItem.wordIndex &&
+                                attrib
+                                  ? attrib.topic_color
+                                  : '',
                             }"
                             >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : '' }}</span
                           >
@@ -247,6 +254,13 @@
                             fontFamily: pItem.config.fontFamily,
                             height: '28px',
                             display: 'inline-block',
+                            color:
+                              paraIndex == pItem.paraIndex &&
+                              sentIndex == pItem.sentIndex &&
+                              wordIndex == pItem.wordIndex &&
+                              attrib
+                                ? attrib.topic_color
+                                : '',
                           }"
                           @click="showWordDetail($event, pItem)"
                           >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : '' }}</span