natasha 1 vuosi sitten
vanhempi
commit
aefe259a20

+ 5 - 0
src/icons/svg/Go-end.svg

@@ -0,0 +1,5 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="Go-end (&#228;&#184;&#139;&#228;&#184;&#128;&#230;&#155;&#178;)">
+<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M22.668 25C23.2203 25 23.668 24.5523 23.668 24V8C23.668 7.44772 23.2203 7 22.668 7C22.1157 7 21.668 7.44772 21.668 8V24C21.668 24.5523 22.1157 25 22.668 25ZM10.0391 7.29289C9.64861 6.90237 9.01545 6.90237 8.62492 7.29289C8.2344 7.68342 8.2344 8.31658 8.62492 8.70711L15.9178 16L8.62492 23.2929C8.2344 23.6834 8.2344 24.3166 8.62492 24.7071C9.01545 25.0976 9.64861 25.0976 10.0391 24.7071L18.0391 16.7071C18.4297 16.3166 18.4297 15.6834 18.0391 15.2929L10.0391 7.29289Z" fill="currentColor" fill-opacity="0.88"/>
+</g>
+</svg>

+ 5 - 0
src/icons/svg/Go-start.svg

@@ -0,0 +1,5 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="Go-start (&#228;&#184;&#138;&#228;&#184;&#128;&#230;&#155;&#178;)">
+<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M16.0822 16L23.3751 8.70711C23.7656 8.31658 23.7656 7.68342 23.3751 7.29289C22.9846 6.90237 22.3514 6.90237 21.9609 7.29289L13.9609 15.2929C13.5703 15.6834 13.5703 16.3166 13.9609 16.7071L21.9609 24.7071C22.3514 25.0976 22.9846 25.0976 23.3751 24.7071C23.7656 24.3166 23.7656 23.6834 23.3751 23.2929L16.0822 16ZM10.332 8C10.332 7.44772 9.88432 7 9.33203 7C8.77975 7 8.33203 7.44772 8.33203 8V24C8.33203 24.5523 8.77975 25 9.33203 25C9.88432 25 10.332 24.5523 10.332 24V8Z" fill="currentColor" fill-opacity="0.88"/>
+</g>
+</svg>

+ 5 - 0
src/icons/svg/Headphone-sound.svg

@@ -0,0 +1,5 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="Headphone-sound (&#232;&#128;&#179;&#230;&#156;&#186;&#229;&#163;&#176;&#233;&#159;&#179;)">
+<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M7.66797 16.0013C7.66797 11.3989 11.3989 7.66797 16.0013 7.66797C20.6037 7.66797 24.3346 11.3989 24.3346 16.0013V25.3346C24.3346 25.8869 24.7824 26.3346 25.3346 26.3346H28.0013C29.29 26.3346 30.3346 25.29 30.3346 24.0013V18.668C30.3346 17.3793 29.29 16.3346 28.0013 16.3346H26.3346V16.0013C26.3346 10.2944 21.7083 5.66797 16.0013 5.66797C10.2944 5.66797 5.66797 10.2944 5.66797 16.0013V16.3346H4.0013C2.71265 16.3346 1.66797 17.3793 1.66797 18.668V24.0013C1.66797 25.29 2.71265 26.3346 4.0013 26.3346H6.66797C7.22025 26.3346 7.66797 25.8869 7.66797 25.3346V16.0013ZM28.0013 24.3346H26.3346V18.3346H28.0013C28.1854 18.3346 28.3346 18.4839 28.3346 18.668V24.0013C28.3346 24.1854 28.1854 24.3346 28.0013 24.3346ZM4.0013 18.3346H5.66797V24.3346H4.0013C3.8172 24.3346 3.66797 24.1854 3.66797 24.0013V18.668C3.66797 18.4839 3.8172 18.3346 4.0013 18.3346ZM14.668 16.332C15.0984 16.332 15.4805 16.6075 15.6167 17.0158L17.3346 22.1698L17.7193 21.0158C17.8554 20.6075 18.2375 20.332 18.668 20.332H21.3346C21.8869 20.332 22.3346 20.7797 22.3346 21.332C22.3346 21.8843 21.8869 22.332 21.3346 22.332H19.3887L18.2833 25.6483C18.1472 26.0566 17.7651 26.332 17.3346 26.332C16.9042 26.332 16.5221 26.0566 16.386 25.6483L14.668 20.4943L14.2833 21.6483C14.1472 22.0566 13.7651 22.332 13.3346 22.332H10.668C10.1157 22.332 9.66797 21.8843 9.66797 21.332C9.66797 20.7797 10.1157 20.332 10.668 20.332H12.6139L13.7193 17.0158C13.8554 16.6075 14.2375 16.332 14.668 16.332Z" fill="currentColor" fill-opacity="0.88"/>
+</g>
+</svg>

+ 8 - 0
src/icons/svg/Type-drive.svg

@@ -0,0 +1,8 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="&#232;&#175;&#173;&#233;&#159;&#179;&#229;&#141;&#161;&#231;&#137;&#135;/Type-drive (&#231;&#163;&#129;&#229;&#184;&#166;)">
+<g id="Union">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M6.33203 13.9987C6.33203 11.9737 7.97365 10.332 9.9987 10.332C9.99841 10.332 9.99898 10.332 9.9987 10.332C9.99885 10.332 9.99985 10.332 10 10.332H22C22.0686 10.332 22.1356 10.3389 22.2003 10.3521C24.053 10.5362 25.5 12.0994 25.5 14.0006C25.5 15.9061 24.0465 17.4722 22.1877 17.6504C22.1269 17.6619 22.0641 17.668 22 17.668H10C9.97149 17.668 9.94326 17.6668 9.91535 17.6644C7.9288 17.6201 6.33203 15.9959 6.33203 13.9987ZM9.9987 12.332C9.07822 12.332 8.33203 13.0782 8.33203 13.9987C8.33203 14.9192 9.07822 15.6654 9.9987 15.6654C10.9192 15.6654 11.6654 14.9192 11.6654 13.9987C11.6654 13.0782 10.9192 12.332 9.9987 12.332ZM13.2656 12.332C13.5212 12.8321 13.6654 13.3985 13.6654 13.9987C13.6654 14.5999 13.5207 15.1673 13.2642 15.668H18.5668C18.311 15.1678 18.1667 14.601 18.1667 14.0006C18.1667 13.3997 18.3112 12.8325 18.5675 12.332H13.2656ZM20.1667 14.0006C20.1667 13.0801 20.9129 12.334 21.8333 12.334C22.7538 12.334 23.5 13.0801 23.5 14.0006C23.5 14.9211 22.7538 15.6673 21.8333 15.6673C20.9129 15.6673 20.1667 14.9211 20.1667 14.0006Z" fill="currentColor" fill-opacity="0.88"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M1.66797 8.0013C1.66797 6.71261 2.71265 5.66797 4.0013 5.66797H28.0013C29.29 5.66797 30.3346 6.71262 30.3346 8.0013V24.0013C30.3346 25.29 29.29 26.3346 28.0013 26.3346H4.0013C2.71265 26.3346 1.66797 25.29 1.66797 24.0013V8.0013ZM4.0013 7.66797C3.8172 7.66797 3.66797 7.8172 3.66797 8.0013V24.0013C3.66797 24.1854 3.8172 24.3346 4.0013 24.3346H5.92726C5.95128 24.3329 5.97554 24.332 6 24.332H6.25378L9.57036 21.0155C10.008 20.5779 10.6014 20.332 11.2203 20.332H20.1748C20.7318 20.332 21.2704 20.5313 21.6932 20.8938L25.7046 24.332H26C26.0245 24.332 26.0487 24.3329 26.0727 24.3346H28.0013C28.1854 24.3346 28.3346 24.1854 28.3346 24.0013V8.0013C28.3346 7.81719 28.1854 7.66797 28.0013 7.66797H4.0013ZM22.6314 24.332L20.3917 22.4123C20.3312 22.3605 20.2543 22.332 20.1748 22.332H11.2203C11.1319 22.332 11.0471 22.3671 10.9846 22.4297L9.08221 24.332H22.6314Z" fill="currentColor" fill-opacity="0.88"/>
+</g>
+</g>
+</svg>

+ 5 - 0
src/icons/svg/Voice-luyin.svg

@@ -0,0 +1,5 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="Voice (&#229;&#189;&#149;&#233;&#159;&#179;)">
+<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M15.9987 1.66797C12.8691 1.66797 10.332 4.20502 10.332 7.33464V16.0013C10.332 19.1309 12.8691 21.668 15.9987 21.668C19.1283 21.668 21.6654 19.1309 21.6654 16.0013V7.33464C21.6654 4.20502 19.1283 1.66797 15.9987 1.66797ZM6 14.332C6.55228 14.332 7 14.7797 7 15.332C7 20.3026 11.0294 24.332 16 24.332C20.9706 24.332 25 20.3026 25 15.332C25 14.7797 25.4477 14.332 26 14.332C26.5523 14.332 27 14.7797 27 15.332C27 21.0701 22.6065 25.782 17 26.2872V29.332C17 29.8843 16.5523 30.332 16 30.332C15.4477 30.332 15 29.8843 15 29.332V26.2872C9.39348 25.782 5 21.0701 5 15.332C5 14.7797 5.44772 14.332 6 14.332Z" fill="currentColor"/>
+</g>
+</svg>

+ 6 - 3
src/views/bookShelf/articleDetail.vue

@@ -22,9 +22,10 @@
             <div class="atricle-data">
                 <normal-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='original'" :articleInfo="articleInfo"></normal-model>
                 <phrase-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='newWord'" :articleInfo="articleInfo" :likePhraseList="likePhraseList" :likeWord="likeWordList" @changeLike="changeLike"></phrase-model>
+                <practice-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='practice'" :articleInfo="articleInfo"></practice-model>
                 <inner-text-search :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='search'" :articleInfo="articleInfo" ref="innerTextSearchs"></inner-text-search>
                 <lexical-type :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='filtrate'" :articleInfo="articleInfo" ref="lexicalType"></lexical-type>
-                <div class="article-btn" v-if="this.$route.query.iss_id">
+                <div class="article-btn" v-if="this.$route.query.iss_id&&menuType!=='practice'">
                     <div class="left">
                         <span :class="['support colloct-article',!noRead?'active':'']" @click="changeStatus('noRead')"><svg-icon icon-class="like-line" :style="{marginRight:articleNumber?'8px':'0px'}"></svg-icon>{{articleNumber?articleNumber:''}}</span>
                         <!-- <span :class="['oppose',oppose?'active':'']" @click="changeStatus('oppose')"><svg-icon icon-class="oppose"></svg-icon></span> -->
@@ -44,7 +45,7 @@
                 </div>
             </div>
             <!-- 词汇表 -->
-            <div class="glossary-box" :style="{borderTopColor:bgColorList[activeIndex].contentBg}">
+            <div class="glossary-box" :style="{borderTopColor:bgColorList[activeIndex].contentBg}" v-if="menuType!=='practice'">
                 <div class="title" :style="{color:bgColorList[activeIndex].glossaryTitle}">
                     <h2>词汇表</h2>
                     <a @click="showGlossary=!showGlossary">{{showGlossary?'收起':'展开'}}</a>
@@ -182,6 +183,7 @@ import MenuRight from "./components/MenuRight.vue"
 import ArticleInfo from "./components/ArticleInfo.vue"
 import InnerTextSearch from "./components/InnerTextSearch.vue"
 import LexicalType from "./components/LexicalType.vue"
+import PracticeModel from "./components/PracticeModel.vue"
 import * as echarts from "echarts";
 import { getLogin } from "@/api/ajax";
 import { getToken } from '@/utils/auth'
@@ -201,7 +203,8 @@ export default {
     PhraseModel,
     ArticleInfo,
     InnerTextSearch,
-    LexicalType
+    LexicalType,
+    PracticeModel
   },
   data(){
     return{

+ 604 - 0
src/views/bookShelf/components/PracticeModel.vue

@@ -0,0 +1,604 @@
+<!--  -->
+<template>
+  <div class="NNPE-ArticleView" v-if="articleInfo">
+    <template v-if="resArr&&resArr.wordsList&&resArr.wordsList[0]&&resArr.wordsList[0][0]&&resArr.wordsList[0][0].hasOwnProperty('pno')&&resArr.wordsList[0][0].pno===0">
+        <h2 :class="['NNPE-words',]">
+            <span v-for="(itemR,indexR) in resArr.wordsList[0]" :key="indexR" :style="{color:colorObj.titleColor,fontSize:(wordFontsize+30)+'px',lineHeight:(wordFontsize+38)+'px',marginRight:'10px',fontWeight:'700'}" 
+            :class="[
+                    itemR.tokens[9]===' '?'marginRight':'',itemR.marginRight?'marginSingleRight':''
+                ]">
+                    <template v-if="itemR.isShow">
+                        <span
+                                class="NNPE-chs"
+                                :class="[
+                                    itemR.type,itemR.tokens[9]===' '?'marginRight':'',itemR.highIndex?'fontWeight':'',itemR.marginRight?'marginSingleRight':''
+                                ]"
+                                >{{ itemR.tokens[2] }}</span
+                            >
+                            <span
+                                class="NNPE-chs NNPE-chs-both"
+                                v-if="resArr.wordsList[0][indexR + 1] &&
+                                resArr.wordsList[0][indexR + 1].tokens[2] &&
+                                enFhList.indexOf(resArr.wordsList[0][indexR + 1].tokens[2]) > -1"
+                                :class="[
+                                        resArr.wordsList[0][indexR + 1].type,resArr.wordsList[0][indexR + 1].tokens[9]===' '?'marginRight':'',resArr.wordsList[0][indexR + 1].highIndex?'fontWeight':'',resArr.wordsList[0][indexR + 1].marginRight?'marginSingleRight':''
+                                    ]"
+                                >{{ resArr.wordsList[0][indexR + 1].tokens[2] }}</span
+                            >
+                    </template>
+                <!-- {{itemR.tokens[2]}} -->
+                </span>
+        </h2>
+    </template>
+    <h6 class="nnpe-article-author" :style="{color:colorObj.sourceColor,fontSize:(wordFontsize-4)+'px',lineHeight:(wordFontsize+4)+'px',fontWeight:'400'}">
+        {{articleInfo.art_author+' · '+articleInfo.study_phase_name+'版 · 第 '+articleInfo.iss_no+' 期 · '+articleInfo.release_date+' · '+articleInfo.chn_item+(articleInfo.page_no_in_pub?' · P'+articleInfo.page_no_in_pub:'')}}
+    </h6>
+    <div class="audio-box">
+        <div
+            class="aduioLine-content aduioLine-box"
+            v-if="
+                articleInfo.art_sound_url
+            " :style="{background:colorObj.audiobg,borderColor:colorObj.audioBorder}"
+        >
+            <AudioLine
+                audioId="artNormalAudio"
+                :mp3="articleInfo.art_sound_url"
+                :getCurTime="getCurTime"
+                ref="audioLine"
+                :mp3Source="'mp3'"
+            />
+            <svg-icon icon-class="icon-wrapper" class="wrapper"></svg-icon>
+        </div>
+    </div>
+    <template v-if="resArr.wordsList&&resArr.wordsList.length > 0">
+      <div class="table-box" :class="['table-box-'+colorObj.type]">
+        <div
+          :class="['NNPE-detail']"
+          v-for="(item, index) in resArr.wordsList"
+          :key="'detail' + index"
+        >
+          <b class="para-index" :style="{fontSize:wordFontsize + 'px',color:resArr.timeList[index] && resArr.timeList[index] && curTime >= resArr.timeList[index].s && curTime <= resArr.timeList[index].e ? colorObj.type==='white'?'#2F3742':colorObj.type==='darkGreen'?'#299772':colorObj.type==='armyGreen'?'#30A47D':'#5373E7':colorObj.type==='white'?'#D0D3D9':colorObj.type==='darkGreen'?'#7A8983':colorObj.type==='armyGreen'?'#6B7C74':'#737781'}">{{index+1}}</b>
+          <div class="wordsList-box">
+            <div class="nnpe-sentence-box">
+              <div v-for="(pItem, pIndex) in item" :key="'wordsList' + pIndex">
+                <template v-if="pItem.isShow">
+                    <div
+                        :class="[
+                        'NNPE-words',
+                        isPlaying &&
+                        resArr.timeList[index] &&
+                        resArr.timeList[index] &&
+                        curTime >= resArr.timeList[index].s &&
+                        curTime <= resArr.timeList[index].e
+                            ? 'sentActive'
+                            : '',
+                        pItem.pno == paraIndex && pItem.sno == sentIndex
+                            ? 'overActive'
+                            : '',
+                        ]"
+                        @click="
+                        handleChangeTime(
+                            resArr.timeList[index] &&
+                            resArr.timeList[index] &&
+                            resArr.timeList[index].s
+                        )
+                        "
+                        @mouseover="handleMouseover(pItem)"
+                        @mouseleave="handleMouseleave"
+                    >
+                            <span
+                                class="NNPE-chs"
+                                :class="[
+                                    isPlaying &&
+                                    resArr.timeList[index] &&
+                                    resArr.timeList[index] &&
+                                    resArr.timeList[index].e &&
+                                    resArr.timeList[index].tokens &&
+                                    resArr.timeList[index].tokens[pItem.wIndex]&&
+                                    curTime >=
+                                        resArr.timeList[index].tokens[pItem.wIndex].s &&
+                                    curTime <= resArr.timeList[index].e
+                                        ? 'wordActive'
+                                        : '',
+                                    pItem.tokens[9]===' '?'marginRight':'',pItem.marginRight?'marginSingleRight':''
+                                ]"
+                                :style="{fontSize:wordFontsize + 'px',color: isPlaying &&
+                                        resArr.timeList[index] &&
+                                        resArr.timeList[index] &&
+                                        resArr.timeList[index].tokens[pItem.wIndex]&&
+                                        curTime >=
+                                            resArr.timeList[index].tokens[pItem.wIndex].s &&
+                                        curTime <= resArr.timeList[index].tokens[pItem.wIndex].e?colorObj.statisticValue:
+                                        resArr.timeList[index] &&
+                                        resArr.timeList[index] &&
+                                        curTime >= resArr.timeList[index].s &&
+                                        curTime <= resArr.timeList[index].e?colorObj.contentColor:colorObj.type==='white'?'#D0D3D9':colorObj.type==='darkGreen'?'#7A8983':colorObj.type==='darkBlue'?'#737781':'#6B7C74'}"
+                                >{{ pItem.tokens[2] }}</span
+                            >
+                            <span
+                            class="NNPE-chs NNPE-chs-both"
+                            v-if="item[pIndex + 1] &&
+                            item[pIndex + 1].tokens[2] &&
+                            enFhList.indexOf(item[pIndex + 1].tokens[2]) > -1"
+                            :class="[
+                                    isPlaying &&
+                                    resArr.timeList[index] &&
+                                    resArr.timeList[index] &&
+                                    resArr.timeList[index].tokens[pItem.wIndex]&&
+                                    curTime >=
+                                        resArr.timeList[index].tokens[pItem.wIndex].s &&
+                                    curTime <= resArr.timeList[index].e
+                                        ? 'wordActive'
+                                        : '',
+                                    item[pIndex + 1].tokens[9]===' '?'marginRight':'',item[pIndex + 1].marginRight?'marginSingleRight':''
+                                ]"
+                                :style="{fontSize:wordFontsize + 'px',color: isPlaying &&
+                                        resArr.timeList[index] &&
+                                        resArr.timeList[index] &&
+                                        resArr.timeList[index].tokens[pItem.wIndex]&&
+                                        curTime >=
+                                            resArr.timeList[index].tokens[pItem.wIndex].s &&
+                                        curTime <= resArr.timeList[index].tokens[pItem.wIndex].e?colorObj.statisticValue:resArr.timeList[index] &&
+                                        resArr.timeList[index] &&
+                                        curTime >= resArr.timeList[index].s &&
+                                        curTime <= resArr.timeList[index].e?colorObj.contentColor:colorObj.type==='white'?'#D0D3D9':colorObj.type==='darkGreen'?'#7A8983':colorObj.type==='darkBlue'?'#737781':'#6B7C74'}"
+                            >{{ item[pIndex + 1].tokens[2] }}</span
+                        >
+                    </div>
+                </template>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="operate-box" :style="{background:colorObj.contentBg}">
+            <div class="operate-box-inner" :style="{background:colorObj.contentInnerBg}">
+                <div class="operate-box-inner-content">
+                    <div class="operate-item">
+                        <svg-icon icon-class="Go-start" :style="{color:colorObj.type==='white'||colorObj.type==='darkGreen'?'#000':'#fff'}"></svg-icon>
+                        <span :style="{color:colorObj.type==='armyGreen'?'#7C8983':''}">上一句</span>
+                    </div>
+                    <div class="operate-item">
+                        <svg-icon icon-class="Type-drive" :style="{color:colorObj.type==='white'||colorObj.type==='darkGreen'?'#000':'#fff'}"></svg-icon>
+                        <span :style="{color:colorObj.type==='armyGreen'?'#7C8983':''}">听对比</span>
+                    </div>
+                    <div class="operate-item">
+                        <b class="luyin-btn">
+                            <svg-icon icon-class="Voice-luyin" :style="{color:'#fff'}"></svg-icon>
+                        </b>
+                    </div>
+                    <div class="operate-item">
+                        <svg-icon icon-class="Headphone-sound" :style="{color:colorObj.type==='white'||colorObj.type==='darkGreen'?'#000':'#fff'}"></svg-icon>
+                        <span :style="{color:colorObj.type==='armyGreen'?'#7C8983':''}">我读的</span>
+                    </div>
+                    <div class="operate-item">
+                        <svg-icon icon-class="Go-start" :style="{color:colorObj.type==='white'||colorObj.type==='darkGreen'?'#000':'#fff'}"></svg-icon>
+                        <span :style="{color:colorObj.type==='armyGreen'?'#7C8983':''}">下一句</span>
+                    </div>
+                </div>
+            </div>
+        </div>
+      </div>
+    </template>
+
+    <!-- <img src="../../../assets/article-img.png" style="max-width:100%;margin:24px 0;" /> -->
+    <div class="clear-box">
+        <h5>词汇标记设置</h5>
+        <div class="item">
+            <span>跟读</span>
+            <el-switch
+                v-model="repeatAfter"
+                active-color="#175DFF"
+                inactive-color="#D0D3D9"
+                key="sent-repeatAfter">
+            </el-switch>
+        </div>
+        <div class="item">
+            <span>单句模式</span>
+            <el-switch
+                v-model="singleModel"
+                active-color="#175DFF"
+                inactive-color="#D0D3D9"
+                key="sent-singleModel"
+                @change="mutualExclusive('singleModel','autoNextSent')">
+            </el-switch>
+        </div>
+        <div class="item">
+            <span>自动下一句</span>
+            <el-switch
+                v-model="autoNextSent"
+                active-color="#175DFF"
+                inactive-color="#D0D3D9"
+                key="sent-autoNextSent"
+                @change="mutualExclusive('autoNextSent','singleModel')">
+            </el-switch>
+        </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import AudioLine from "@/components/common/AudioLine.vue"
+export default {
+  name: "ArticleView",
+  props: [ "titleFontsize", "wordFontsize", "colorObj","articleType","articleInfo"],
+  components: {
+    AudioLine,
+  },
+  data() {
+    return {
+      resArr: [],
+      curTime: 0, //单位s
+      enFhList: [
+        ",",
+        ".",
+        ";",
+        "?",
+        "!",
+        ":",
+        ">",
+        "<",
+        "'",
+        "’",
+        "n't",
+        "n’t",
+        "n’ts",
+        "n‘t",
+        "'t",
+        "’t",
+        "‘t",
+        "'s",
+        "’s",
+        "‘s",
+        "'m",
+        "’m",
+        "‘m",
+        "'re",
+        "’re",
+        "‘re",
+        "'d",
+        "’d",
+        "‘d",
+        "'ve",
+        "’ve",
+        "‘ve",
+        ")",
+        "'ll",
+        "’ll",
+        "‘ll",
+        "”",
+      ],
+      articleImg: {}, // 文章图片
+      paraIndex: -1, //段落索引
+      sentIndex: -1, // 句子索引
+      repeatAfter: false,
+      singleModel: false,
+      autoNextSent: false,
+    };
+  },
+  computed: {
+    isPlaying: function () {
+      let playing = false;
+      if (this.$refs.audioLine) {
+        playing = this.$refs.audioLine.audio.isPlaying;
+      }
+      return playing;
+    },
+  },
+  watch: {},
+  //方法集合
+  methods: {
+    getCurTime(curTime) {
+      this.curTime = curTime * 1000;
+    },
+    handleData() {
+      let resArr = {
+            wordsList: [],
+            timeList: [],
+        };
+      let articleInfo = JSON.parse(JSON.stringify(this.articleInfo));
+      articleInfo.art_corpus_data.sentList.forEach((item,index) => {
+        let wordlist = []
+        item.tokens.forEach((items,indexs)=>{
+            let obj = {
+                sent_id:item.id,
+                sno: item.sno-1,
+                pno: item.pno,
+                text: item.text,
+                tokens: items,
+                wIndex: indexs,
+                isShow: this.enFhList.indexOf(items[2])==-1,
+                marginRight: indexs===item.tokens.length-1
+            }
+            wordlist.push(obj)
+        })
+        resArr.wordsList.push(wordlist)
+        resArr.timeList.push(articleInfo.art_sound_srt_data.sents[index])
+      });
+      this.resArr = resArr;
+    },
+    handleChangeTime(time) {
+      if (time>=0) {
+        this.curTime = time;
+        this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
+      }
+    },
+    //经过每个词,高亮句子
+    handleMouseover(pItem) {
+      this.paraIndex = pItem.pno;
+      this.sentIndex = pItem.sno;
+    },
+    handleMouseleave() {
+      this.paraIndex = -1;
+      this.sentIndex = -1;
+    },
+    mutualExclusive(val,val1){
+        if(this[val]){
+            this[val1] = false
+        }
+    }
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    if (this.articleInfo) {
+      this.handleData();
+    }
+  },
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='scss' scoped>
+//@import url(); 引入公共css类
+.NNPE-ArticleView {
+  width: 100%;
+  .nnpe-article-author{
+      margin: 24px 0;
+  }
+  h2{
+    display: flex;
+    flex-flow: wrap;
+    &.sentActive {
+        background: rgba(24, 144, 255, 0.1);
+    }
+    &.overActive {
+        background: rgba(0, 0, 0, 0.06);
+    }
+    .wordActive {
+        color: #175DFF;
+    }
+  }
+  .table-box {
+    padding-top: 20px;
+    padding-bottom: 64px;
+    // background: #f7f7f7;
+    // border-top: 1px solid rgba(0, 0, 0, 0.1);
+    :last-child {
+      :last-child.wordsList-box {
+        padding-bottom: 40px;
+      }
+    }
+    .wordsList-box {
+      flex: 1;
+      padding: 20px 0;
+      .nnpe-sentence-box {
+        display: flex;
+        flex-flow: wrap;
+      }
+      > img {
+        max-width: 50%;
+        display: block;
+        padding: 16px 0;
+        margin: 0 auto;
+      }
+    }
+  }
+  .NNPE-detail {
+    clear: both;
+    overflow: hidden;
+    display: flex;
+    .para-index{
+        color:#D0D3D9;
+        font-size: 18px;
+        font-weight: 700;
+        line-height: 26px;
+        padding-top: 20px;
+        width: 40px;
+        flex-shrink: 0;
+        &-active{
+            color: #2F3742;
+        }
+    }
+    .NNPE-words {
+      float: left;
+      padding: 0;
+      &.noPadding{
+          padding:0;
+      }
+      &.sentActive {
+        background: rgba(24, 144, 255, 0.1);
+      }
+      &.overActive {
+        background: rgba(0, 0, 0, 0.06);
+      }
+      &.textLeft {
+        text-align: left;
+      }
+      &.textCenter {
+        text-align: center;
+      }
+      > span {
+        float: left;
+        cursor: pointer;
+        &.NNPE-chs {
+          //   font-size: 24px;
+          font-family: 'Smartisan';
+          line-height: 150%;
+          color: #000000;
+          &.wordActive {
+            color: #175DFF;
+          }
+          &.marginRight{
+            padding: 0 3px;
+          }
+          &.marginSingleRight{
+            padding: 0 3px 0 0;
+          }
+        }
+        &.padding {
+          padding: 0 3px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .operate-box{
+    position: fixed;
+    border-top: 1px solid #EBEBEB;
+    height: 192px;
+    width: 1000px;
+    background: #F2F3F5;
+    left: 50%;
+    bottom: 0;
+    margin-left: -500px;
+    padding-bottom: 24px;
+    &-inner{
+        padding-top: 40px;
+        height: 144px;
+        &-content{
+            width: 680px;
+            margin: 0 auto;
+            display: flex;
+            justify-content: space-between;
+        }
+        .operate-item{
+            text-align: center;
+            cursor: pointer;
+            .luyin-btn{
+                display: block;
+                width: 64px;
+                height: 64px;
+                padding: 16px;
+                border-radius: 60px;
+                background: #F2555A;
+                box-shadow: 0px 8px 10px -5px rgba(0, 0, 0, 0.08), 0px 16px 24px 2px rgba(0, 0, 0, 0.04), 0px 6px 30px 5px rgba(0, 0, 0, 0.05);
+            }
+            .svg-icon{
+                display: block;
+                width: 32px;
+                height: 32px;
+                margin: 0 auto;
+            }
+            span{
+                color: #929CA8;
+                font-size: 12px;
+                font-weight: 400;
+                line-height: 20px;
+            }
+        }
+    }
+  }
+  .table-box-white{
+    .wordActive {
+        color: #3459D2 !important;
+    }
+    .sentActive {
+        background: #D9E2FC !important;
+    }
+  }
+  .table-box-darkGreen{
+    .wordActive {
+        color: #299772 !important;
+    }
+    .sentActive {
+        background: #ECEFED !important;
+    }
+  }
+  .table-box-darkBlue{
+    .wordActive {
+        color: #5373E7 !important;
+    }
+    .sentActive {
+        background:#1C2129 !important;
+    }
+  }
+  .table-box-armyGreen{
+    .wordActive {
+        color: #30A47D !important;
+    }
+    .sentActive {
+        background: #2A2F2C !important;
+    }
+  }
+}
+.audio-box{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+}
+.aduioLine-box{
+    width: 516px;
+    height: 48px;
+    background: #FFFFFF;
+    border: 1px solid #EBEBEB;
+    border-radius: 30px;
+    display: flex;
+    align-items: center;
+    padding: 8px 24px;
+    .wrapper{
+        width: 24px;
+        height: 24px;
+        flex-shrink: 0;
+        color: #175DFF;
+        margin-left: 8px;
+    }
+    .Audio{
+        width: 430px;
+    }
+}
+.clear-box{
+    right: calc((100% - 1000px)/2);
+    position: fixed;
+    top: 150px;
+    width: 270px;
+    overflow: auto;
+    width: 176px;
+    padding: 8px;
+    border-radius: 8px;
+    border: 1px solid #EBEBEB;
+    background: #FFF;
+    box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.10), 0px 4px 6px 1px rgba(0, 0, 0, 0.06), 0px 3px 6px 2px rgba(0, 0, 0, 0.05);
+    margin-top: 24px;
+    h5{
+        margin: 0;
+        color: rgba(0, 0, 0, 0.40);
+        font-size: 14px;
+        font-weight: 400;
+        line-height: 22px;
+    }
+    .item{
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        margin-top: 4px;
+        border-radius: 4px;
+        background:#F2F3F5;
+        padding: 4px 8px;
+        color: #2F3742;
+        font-size: 14px;
+        font-weight: 400;
+        line-height: 22px; 
+        cursor: pointer;
+        &.red-item{
+            color: #F53F3F;
+        }
+
+    }
+}
+</style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
src/views/personalCenter/components/WordCard.vue


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä