|
|
@@ -1,28 +1,28 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
- <div class="NNPE-ArticleView" v-if="curQue">
|
|
|
+ <div v-if="curQue" class="NNPE-ArticleView">
|
|
|
<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
|
|
|
- audioId="diaNormalAudio"
|
|
|
+ ref="audioLine"
|
|
|
+ audio-id="diaNormalAudio"
|
|
|
:mp3="curQue.mp3_list[0].url"
|
|
|
- :getCurTime="getCurTime"
|
|
|
- :mp3Source="curQue.mp3_list[0].source"
|
|
|
+ :get-cur-time="getCurTime"
|
|
|
+ :mp3-source="curQue.mp3_list[0].source"
|
|
|
:width="colLength == 2 ? 200 : isPhone ? 200 : 790"
|
|
|
:ed="ed"
|
|
|
type="audioLine"
|
|
|
- ref="audioLine"
|
|
|
- @emptyEd="emptyEd"
|
|
|
:attrib="attrib"
|
|
|
+ @emptyEd="emptyEd"
|
|
|
/>
|
|
|
</template>
|
|
|
</div>
|
|
|
@@ -57,10 +57,12 @@
|
|
|
<div :class="['empty-left', isHasRemark ? 'hasRemark' : '']"></div>
|
|
|
<div class="empty-right"></div>
|
|
|
</div>
|
|
|
- <p :class="['notice', isHasRemark ? 'hasRemark' : '']" v-if="curQue.notice">
|
|
|
+ <p v-if="curQue.notice" :class="['notice', isHasRemark ? 'hasRemark' : '']">
|
|
|
{{ curQue.notice }}
|
|
|
</p>
|
|
|
<div
|
|
|
+ v-for="(item, index) in resArr"
|
|
|
+ :key="'detail' + index"
|
|
|
:class="[
|
|
|
'NNPE-detail',
|
|
|
item.isTitle ? 'NNPE-detail-title' : '',
|
|
|
@@ -70,18 +72,16 @@
|
|
|
? 'active'
|
|
|
: '',
|
|
|
]"
|
|
|
- v-for="(item, index) in resArr"
|
|
|
- :key="'detail' + index"
|
|
|
>
|
|
|
<div :class="['article-content', isHasRemark ? 'hasRemark' : '']">
|
|
|
- <RoleChs :curRole="item.roleDetail" :type="curQue.property.role_img_type" />
|
|
|
+ <RoleChs :cur-role="item.roleDetail" :type="curQue.property.role_img_type" />
|
|
|
<div class="wordsList-box">
|
|
|
- <img :src="articleImg[index]" v-if="articleImg[0] && index == 0" />
|
|
|
+ <img v-if="articleImg[0] && index == 0" :src="articleImg[index]" />
|
|
|
<!-- <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
|
|
|
<span class="pinyin">{{ item.roleDetail.detail.wordsList | handlePinyin }}</span>
|
|
|
<span class="chs">{{ item.roleDetail.detail.wordsList | handleChs }}</span>
|
|
|
</div> -->
|
|
|
- <div class="roleDetail" v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin">
|
|
|
+ <div v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin" class="roleDetail">
|
|
|
<span class="chs">{{ item.roleDetail.fullName }}</span>
|
|
|
<span class="pinyin">{{ item.roleDetail.fullPinyin }}</span>
|
|
|
</div>
|
|
|
@@ -99,9 +99,9 @@
|
|
|
</div>
|
|
|
<div style="overflow: hidden; clear: both"></div>
|
|
|
<div
|
|
|
- class="NNPE-words"
|
|
|
v-for="(pItem, pIndex) in item.wordsList"
|
|
|
:key="'wordsList' + pIndex"
|
|
|
+ class="NNPE-words"
|
|
|
:class="[
|
|
|
pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
|
|
|
pItem.chs == '“' ? 'textRight' : '',
|
|
|
@@ -156,15 +156,6 @@
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
|
]"
|
|
|
- @click.stop="
|
|
|
- viewNotes(
|
|
|
- $event,
|
|
|
- pItem.chs[wIndex],
|
|
|
- item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].bg,
|
|
|
- item,
|
|
|
- item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
- )
|
|
|
- "
|
|
|
:style="{
|
|
|
fontFamily: pItem.config.fontFamily,
|
|
|
height: '28px',
|
|
|
@@ -178,6 +169,15 @@
|
|
|
? attrib.topic_color
|
|
|
: '',
|
|
|
}"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes(
|
|
|
+ $event,
|
|
|
+ pItem.chs[wIndex],
|
|
|
+ item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].bg,
|
|
|
+ item,
|
|
|
+ item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
+ )
|
|
|
+ "
|
|
|
>{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -206,6 +206,7 @@
|
|
|
v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[noFont.indexOf(item.wordsList[pIndex + 1].pinyin) > -1 ? 'noFont' : '']"
|
|
|
+ style="text-align: left"
|
|
|
@click.stop="
|
|
|
viewNotes(
|
|
|
$event,
|
|
|
@@ -215,7 +216,6 @@
|
|
|
item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
)
|
|
|
"
|
|
|
- style="text-align: left"
|
|
|
>{{ item.wordsList[pIndex + 1].pinyin }}</span
|
|
|
>
|
|
|
<span
|
|
|
@@ -230,15 +230,6 @@
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
|
]"
|
|
|
- @click.stop="
|
|
|
- viewNotes(
|
|
|
- $event,
|
|
|
- item.wordsList[pIndex + 1].chs,
|
|
|
- item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].bg,
|
|
|
- item,
|
|
|
- item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
- )
|
|
|
- "
|
|
|
:style="{
|
|
|
fontFamily: item.wordsList[pIndex + 1].config.fontFamily,
|
|
|
height: '28px',
|
|
|
@@ -253,6 +244,15 @@
|
|
|
? attrib.topic_color
|
|
|
: '',
|
|
|
}"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes(
|
|
|
+ $event,
|
|
|
+ item.wordsList[pIndex + 1].chs,
|
|
|
+ item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].bg,
|
|
|
+ item,
|
|
|
+ item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
+ )
|
|
|
+ "
|
|
|
>{{
|
|
|
NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
|
|
|
? item.wordsList[pIndex + 1].chs
|
|
|
@@ -263,6 +263,7 @@
|
|
|
v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[noFont.indexOf(item.wordsList[pIndex + 1].pinyin) > -1 ? 'noFont' : '']"
|
|
|
+ style="text-align: left"
|
|
|
@click.stop="
|
|
|
viewNotes(
|
|
|
$event,
|
|
|
@@ -272,18 +273,17 @@
|
|
|
item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
)
|
|
|
"
|
|
|
- style="text-align: left"
|
|
|
>{{ item.wordsList[pIndex + 1].pinyin }}</span
|
|
|
>
|
|
|
</span>
|
|
|
<span
|
|
|
- class="NNPE-words-box"
|
|
|
v-if="
|
|
|
item.wordsList[pIndex + 2] &&
|
|
|
item.wordsList[pIndex + 2].chs &&
|
|
|
(chsFhList.indexOf(item.wordsList[pIndex + 2].chs) > -1 ||
|
|
|
NumberList.indexOf(item.wordsList[pIndex + 2].chs) > -1)
|
|
|
"
|
|
|
+ class="NNPE-words-box"
|
|
|
>
|
|
|
<span
|
|
|
v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
|
|
|
@@ -291,6 +291,7 @@
|
|
|
'NNPE-pinyin',
|
|
|
noFont.indexOf(item.wordsList[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
|
|
|
]"
|
|
|
+ style="text-align: left"
|
|
|
@click.stop="
|
|
|
viewNotes(
|
|
|
$event,
|
|
|
@@ -300,7 +301,6 @@
|
|
|
item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
)
|
|
|
"
|
|
|
- style="text-align: left"
|
|
|
>{{ item.wordsList[pIndex + 2].pinyin }}</span
|
|
|
>
|
|
|
<span
|
|
|
@@ -315,15 +315,6 @@
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
|
]"
|
|
|
- @click.stop="
|
|
|
- viewNotes(
|
|
|
- $event,
|
|
|
- item.wordsList[pIndex + 2].chs,
|
|
|
- item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].bg,
|
|
|
- item,
|
|
|
- item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
- )
|
|
|
- "
|
|
|
:style="{
|
|
|
fontFamily: item.wordsList[pIndex + 2].config.fontFamily,
|
|
|
height: '28px',
|
|
|
@@ -338,6 +329,15 @@
|
|
|
? attrib.topic_color
|
|
|
: '',
|
|
|
}"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes(
|
|
|
+ $event,
|
|
|
+ item.wordsList[pIndex + 2].chs,
|
|
|
+ item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].bg,
|
|
|
+ item,
|
|
|
+ item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
+ )
|
|
|
+ "
|
|
|
>{{
|
|
|
NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
|
|
|
? item.wordsList[pIndex + 2].chs
|
|
|
@@ -350,6 +350,7 @@
|
|
|
'NNPE-pinyin',
|
|
|
noFont.indexOf(item.wordsList[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
|
|
|
]"
|
|
|
+ style="text-align: left"
|
|
|
@click.stop="
|
|
|
viewNotes(
|
|
|
$event,
|
|
|
@@ -359,7 +360,6 @@
|
|
|
item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
)
|
|
|
"
|
|
|
- style="text-align: left"
|
|
|
>{{ item.wordsList[pIndex + 2].pinyin }}</span
|
|
|
>
|
|
|
</span>
|
|
|
@@ -402,15 +402,6 @@
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
|
]"
|
|
|
- @click.stop="
|
|
|
- viewNotes(
|
|
|
- $event,
|
|
|
- pItem.chs[wIndex],
|
|
|
- item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].bg,
|
|
|
- item,
|
|
|
- item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
- )
|
|
|
- "
|
|
|
:style="{
|
|
|
fontFamily: pItem.config.fontFamily,
|
|
|
height: '28px',
|
|
|
@@ -424,6 +415,15 @@
|
|
|
? attrib.topic_color
|
|
|
: '',
|
|
|
}"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes(
|
|
|
+ $event,
|
|
|
+ pItem.chs[wIndex],
|
|
|
+ item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].bg,
|
|
|
+ item,
|
|
|
+ item.timeList && item.timeList.length > 0 && item.timeList[pItem.sentIndex].ed,
|
|
|
+ )
|
|
|
+ "
|
|
|
>{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -471,9 +471,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'"
|
|
|
>
|
|
|
{{
|
|
|
curQue.detail[index].multilingualTextList && curQue.detail[index].multilingualTextList[multilingual]
|
|
|
@@ -483,19 +483,19 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <img :src="articleImg[index + 1]" v-if="articleImg[index + 1]" />
|
|
|
+ <img v-if="articleImg[index + 1]" :src="articleImg[index + 1]" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
|
+ v-if="item.remarkDetail"
|
|
|
:class="[
|
|
|
'remarkBox',
|
|
|
item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0 ? 'remark-top' : 'remark-top-8',
|
|
|
]"
|
|
|
- v-if="item.remarkDetail"
|
|
|
>
|
|
|
<RemarkChs
|
|
|
- :remarkDetail="item.remarkDetail"
|
|
|
- :marginTop="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0 ? 44 : 8"
|
|
|
+ :remark-detail="item.remarkDetail"
|
|
|
+ :margin-top="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0 ? 44 : 8"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -506,9 +506,9 @@
|
|
|
|
|
|
<template v-for="(items, indexs) in curQue.detail">
|
|
|
<div
|
|
|
- class="multilingual"
|
|
|
- :key="indexs"
|
|
|
v-if="curQue.property.multilingual_position === 'all' && items.multilingualTextList[multilingual]"
|
|
|
+ :key="indexs"
|
|
|
+ class="multilingual"
|
|
|
>
|
|
|
<div class="multilingual-para" :class="[items.isTitle ? 'multilingual-para-center' : '']">
|
|
|
{{
|
|
|
@@ -519,40 +519,40 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <div class="dia-article-record" v-if="curQue.Bookanswer">
|
|
|
+ <div v-if="curQue.Bookanswer" class="dia-article-record">
|
|
|
<Soundrecord
|
|
|
type="promax"
|
|
|
class="luyin-box"
|
|
|
:TaskModel="TaskModel"
|
|
|
- :answerRecordList="curQue.Bookanswer.normalModel.recordList"
|
|
|
- @handleWav="handleWav"
|
|
|
+ :answer-record-list="curQue.Bookanswer.normalModel.recordList"
|
|
|
:attrib="attrib"
|
|
|
+ @handleWav="handleWav"
|
|
|
/>
|
|
|
</div>
|
|
|
</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
|
|
|
- audioId="diaNormalAudio"
|
|
|
+ ref="audioLine"
|
|
|
+ audio-id="diaNormalAudio"
|
|
|
:mp3="curQue.mp3_list[0].url"
|
|
|
- :getCurTime="getCurTime"
|
|
|
- :mp3Source="curQue.mp3_list[0].source"
|
|
|
+ :get-cur-time="getCurTime"
|
|
|
+ :mp3-source="curQue.mp3_list[0].source"
|
|
|
:width="colLength == 2 ? 200 : isPhone ? 200 : 790"
|
|
|
:ed="ed"
|
|
|
type="audioLine"
|
|
|
- ref="audioLine"
|
|
|
- @emptyEd="emptyEd"
|
|
|
:attrib="attrib"
|
|
|
+ @emptyEd="emptyEd"
|
|
|
/>
|
|
|
</template>
|
|
|
</div>
|
|
|
@@ -584,7 +584,7 @@
|
|
|
left: windowWidth > 642 ? '' : '0px',
|
|
|
}"
|
|
|
>
|
|
|
- <Notecard :item="curNoteCon" :changeCard="changeCard" :attrib="attrib" />
|
|
|
+ <Notecard :item="curNoteCon" :change-card="changeCard" :attrib="attrib" />
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
@@ -599,20 +599,6 @@ import Soundrecord from '../../common/SoundRecord.vue';
|
|
|
import Notecard from '../article/components/Notecard.vue';
|
|
|
export default {
|
|
|
name: 'DialogueNormalModelChs',
|
|
|
- props: [
|
|
|
- 'curQue',
|
|
|
- 'colorBox',
|
|
|
- 'NNPEAnnotationList',
|
|
|
- 'bodyLeft',
|
|
|
- 'bodyWidth',
|
|
|
- 'noFont',
|
|
|
- 'config',
|
|
|
- 'TaskModel',
|
|
|
- 'colLength',
|
|
|
- 'isPhone',
|
|
|
- 'multilingual',
|
|
|
- 'attrib',
|
|
|
- ],
|
|
|
components: {
|
|
|
AudioLine,
|
|
|
RoleChs,
|
|
|
@@ -625,7 +611,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 +622,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,10 +630,24 @@ export default {
|
|
|
return str;
|
|
|
},
|
|
|
},
|
|
|
+ props: [
|
|
|
+ 'curQue',
|
|
|
+ 'colorBox',
|
|
|
+ 'NNPEAnnotationList',
|
|
|
+ 'bodyLeft',
|
|
|
+ 'bodyWidth',
|
|
|
+ 'noFont',
|
|
|
+ 'config',
|
|
|
+ 'TaskModel',
|
|
|
+ 'colLength',
|
|
|
+ 'isPhone',
|
|
|
+ 'multilingual',
|
|
|
+ 'attrib',
|
|
|
+ ],
|
|
|
data() {
|
|
|
return {
|
|
|
resArr: [],
|
|
|
- curTime: 0, //单位s
|
|
|
+ curTime: 0, // 单位s
|
|
|
chsFhList: [',', '。', '”', ':', '》', '?', '!', ';', '#', '、'],
|
|
|
enFhList: [',', '.', ';', '?', '!', ':', '>', '<'],
|
|
|
NumberList: ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳'],
|
|
|
@@ -668,7 +668,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- isPlaying: function () {
|
|
|
+ isPlaying() {
|
|
|
let playing = false;
|
|
|
if (this.$refs.audioLine) {
|
|
|
playing = this.$refs.audioLine.audio.isPlaying;
|
|
|
@@ -687,7 +687,7 @@ export default {
|
|
|
immediate: true,
|
|
|
},
|
|
|
noteNum: {
|
|
|
- handler: function (val, oldVal) {
|
|
|
+ handler(val, oldVal) {
|
|
|
let _this = this;
|
|
|
if (val) {
|
|
|
_this.handleNote(val);
|
|
|
@@ -697,7 +697,7 @@ export default {
|
|
|
deep: true,
|
|
|
},
|
|
|
isNoteShow: {
|
|
|
- handler: function (val, oldVal) {
|
|
|
+ handler(val, oldVal) {
|
|
|
let _this = this;
|
|
|
if (val) {
|
|
|
setTimeout(() => {
|
|
|
@@ -714,9 +714,28 @@ export default {
|
|
|
deep: true,
|
|
|
},
|
|
|
},
|
|
|
- //方法集合
|
|
|
+ // 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
+ created() {},
|
|
|
+ // 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ mounted() {
|
|
|
+ if (this.curQue) {
|
|
|
+ this.handleData();
|
|
|
+ window.addEventListener('resize', this.getScreenHeight);
|
|
|
+ this.getScreenHeight();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeCreate() {}, // 生命周期 - 创建之前
|
|
|
+ beforeMount() {}, // 生命周期 - 挂载之前
|
|
|
+ beforeUpdate() {}, // 生命周期 - 更新之前
|
|
|
+ updated() {}, // 生命周期 - 更新之后
|
|
|
+ beforeDestroy() {
|
|
|
+ window.removeEventListener('resize', this.getScreenHeight);
|
|
|
+ }, // 生命周期 - 销毁之前
|
|
|
+ destroyed() {}, // 生命周期 - 销毁完成
|
|
|
+ activated() {},
|
|
|
+ // 方法集合
|
|
|
methods: {
|
|
|
- //拼音的显示和隐藏
|
|
|
+ // 拼音的显示和隐藏
|
|
|
changePinyin() {
|
|
|
if (this.config.isHasPY) {
|
|
|
this.$emit('changeConfig', 'isShowPY');
|
|
|
@@ -729,7 +748,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleWav(list, tmIndex) {
|
|
|
- tmIndex = tmIndex ? tmIndex : 0;
|
|
|
+ tmIndex = tmIndex || 0;
|
|
|
this.$set(this.curQue.Bookanswer.normalModel, 'recordList', list);
|
|
|
},
|
|
|
getCurTime(curTime) {
|
|
|
@@ -756,15 +775,15 @@ export default {
|
|
|
dItem.wordsList.forEach((sItem, sIndex) => {
|
|
|
let sentArr = [];
|
|
|
sItem.forEach((wItem, wIndex) => {
|
|
|
- //this.judgePad(sItem, wItem, wIndex);
|
|
|
+ // this.judgePad(sItem, wItem, wIndex);
|
|
|
let startIndex = wIndex == 0 ? 0 : sentArr[wIndex - 1].startIndex + sentArr[wIndex - 1].chs.length;
|
|
|
let endIndex = wIndex == 0 ? wItem.chs.length : sentArr[wIndex - 1].endIndex + wItem.chs.length;
|
|
|
this.mergeWordSymbol(wItem);
|
|
|
let obj = {
|
|
|
- paraIndex: dIndex, //段落索引
|
|
|
- sentIndex: sIndex, //在段落中句子索引
|
|
|
- articleSentIndex: asIndex, //在文章中句子索引
|
|
|
- wordIndex: wIndex, //单词的索引
|
|
|
+ paraIndex: dIndex, // 段落索引
|
|
|
+ sentIndex: sIndex, // 在段落中句子索引
|
|
|
+ articleSentIndex: asIndex, // 在文章中句子索引
|
|
|
+ wordIndex: wIndex, // 单词的索引
|
|
|
pinyin:
|
|
|
curQue.pinyin_type === 'pinyin'
|
|
|
? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
|
|
|
@@ -772,13 +791,13 @@ export default {
|
|
|
: wItem.pinyin
|
|
|
: wItem.pinyin_tone,
|
|
|
chs: wItem.chs,
|
|
|
- padding: true, //wItem.padding,
|
|
|
+ padding: true, // wItem.padding,
|
|
|
className: wItem.className,
|
|
|
isShow: wItem.isShow,
|
|
|
isNumShow: wItem.isNumShow,
|
|
|
- isNewWord: this.newWords.indexOf(wItem.chs) > -1 ? true : false,
|
|
|
- startIndex: startIndex,
|
|
|
- endIndex: endIndex,
|
|
|
+ isNewWord: this.newWords.indexOf(wItem.chs) > -1,
|
|
|
+ startIndex,
|
|
|
+ endIndex,
|
|
|
leg: wItem.chs.length,
|
|
|
chstimeList: [],
|
|
|
fontSize: wItem.fontSize,
|
|
|
@@ -810,11 +829,11 @@ export default {
|
|
|
dItem.sentencesEn && dItem.sentencesEn.length > 0 ? dItem.sentencesEn.join(' ').replace(/\'/g, '’') : '';
|
|
|
let paraObj = {
|
|
|
wordsList: paraArr,
|
|
|
- enwords: enwords,
|
|
|
- timeList: timeList,
|
|
|
- roleDetail: roleDetail,
|
|
|
- remarkDetail: remarkDetail,
|
|
|
- dhaspinyin: dhaspinyin,
|
|
|
+ enwords,
|
|
|
+ timeList,
|
|
|
+ roleDetail,
|
|
|
+ remarkDetail,
|
|
|
+ dhaspinyin,
|
|
|
};
|
|
|
resArr.push(paraObj);
|
|
|
});
|
|
|
@@ -837,7 +856,7 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- //词和标点合一起
|
|
|
+ // 词和标点合一起
|
|
|
mergeWordSymbol(wItem) {
|
|
|
if (this.chsFhList.indexOf(wItem.chs) > -1 || this.NumberList.indexOf(wItem.chs) > -1) {
|
|
|
wItem.isShow = false;
|
|
|
@@ -845,7 +864,7 @@ export default {
|
|
|
wItem.isShow = true;
|
|
|
}
|
|
|
},
|
|
|
- //获取角色
|
|
|
+ // 获取角色
|
|
|
getRole(dItem) {
|
|
|
let roleIndex = dItem.roleIndex;
|
|
|
let resObj = null;
|
|
|
@@ -861,7 +880,7 @@ export default {
|
|
|
|
|
|
return resObj;
|
|
|
},
|
|
|
- //判断是否有padding
|
|
|
+ // 判断是否有padding
|
|
|
judgePad(sItem, wItem, curIndex) {
|
|
|
let leg = sItem.length;
|
|
|
if (curIndex < leg - 1) {
|
|
|
@@ -877,7 +896,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- //转化时间
|
|
|
+ // 转化时间
|
|
|
handleTimeList(list) {
|
|
|
let listRes = [];
|
|
|
list.forEach((item) => {
|
|
|
@@ -886,7 +905,7 @@ export default {
|
|
|
});
|
|
|
return listRes;
|
|
|
},
|
|
|
- //点击播放某个句子
|
|
|
+ // 点击播放某个句子
|
|
|
handleChangeTime(time, item, ed) {
|
|
|
if (item.timeList && item.timeList.length > 0) {
|
|
|
this.curTime = time;
|
|
|
@@ -903,7 +922,7 @@ export default {
|
|
|
if (_this.NumberList.indexOf(noteNum) > -1) {
|
|
|
for (let i = 0; i < _this.NumberList.length; i++) {
|
|
|
if (_this.NumberList[i] === noteNum) {
|
|
|
- noteIndex = '' + i + '';
|
|
|
+ noteIndex = `${String(i)}`;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -927,12 +946,10 @@ export default {
|
|
|
|
|
|
if (left - this.bodyLeft > this.contentWidth / 2) {
|
|
|
_this.left = left - width + 10;
|
|
|
+ } else if (left - 200 > 500) {
|
|
|
+ _this.left = 500;
|
|
|
} else {
|
|
|
- if (left - 200 > 500) {
|
|
|
- _this.left = 500;
|
|
|
- } else {
|
|
|
- _this.left = left - 200;
|
|
|
- }
|
|
|
+ _this.left = left - 200;
|
|
|
}
|
|
|
if (_this.oldNoteNum === noteNum) {
|
|
|
_this.handleNote(noteNum);
|
|
|
@@ -958,26 +975,7 @@ export default {
|
|
|
_this.oldNoteNum = '';
|
|
|
_this.noteNum = '';
|
|
|
},
|
|
|
- },
|
|
|
- //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
- created() {},
|
|
|
- //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
- mounted() {
|
|
|
- if (this.curQue) {
|
|
|
- this.handleData();
|
|
|
- window.addEventListener('resize', this.getScreenHeight);
|
|
|
- this.getScreenHeight();
|
|
|
- }
|
|
|
- },
|
|
|
- beforeCreate() {}, //生命周期 - 创建之前
|
|
|
- beforeMount() {}, //生命周期 - 挂载之前
|
|
|
- beforeUpdate() {}, //生命周期 - 更新之前
|
|
|
- updated() {}, //生命周期 - 更新之后
|
|
|
- beforeDestroy() {
|
|
|
- window.removeEventListener('resize', this.getScreenHeight);
|
|
|
- }, //生命周期 - 销毁之前
|
|
|
- destroyed() {}, //生命周期 - 销毁完成
|
|
|
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+ }, // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|