|
@@ -1,11 +1,12 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
<div class="NNPE-ArticleView" v-if="curQue">
|
|
|
- <div class="aduioLine-box aduioLine-practice-npc" v-if="
|
|
|
- curQue.mp3_list &&
|
|
|
- curQue.mp3_list.length > 0 &&
|
|
|
- curQue.mp3_list[0].id
|
|
|
- ">
|
|
|
+ <div
|
|
|
+ class="aduioLine-box aduioLine-practice-npc"
|
|
|
+ v-if="
|
|
|
+ curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].id
|
|
|
+ "
|
|
|
+ >
|
|
|
<div class="aduioLine-content">
|
|
|
<template
|
|
|
v-if="
|
|
@@ -116,13 +117,19 @@
|
|
|
v-if="
|
|
|
item.wordsList[pIndex + 1] &&
|
|
|
item.wordsList[pIndex + 1].chs &&
|
|
|
- chsFhList.indexOf(item.wordsList[pIndex + 1].chs) > -1 || item.wordsList[pIndex + 1] &&
|
|
|
- item.wordsList[pIndex + 1].chs &&item.wordsList[pIndex + 1].chs== '#'
|
|
|
+ (chsFhList.indexOf(item.wordsList[pIndex + 1].chs) >
|
|
|
+ -1 ||
|
|
|
+ NumberList.indexOf(item.wordsList[pIndex + 1].chs) >
|
|
|
+ -1)
|
|
|
"
|
|
|
>
|
|
|
<span class="NNPE-words-box">
|
|
|
<span
|
|
|
- v-if="curQue.pyPosition == 'top' && config.isShowPY && item.dhaspinyin"
|
|
|
+ v-if="
|
|
|
+ curQue.pyPosition == 'top' &&
|
|
|
+ config.isShowPY &&
|
|
|
+ item.dhaspinyin
|
|
|
+ "
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[
|
|
|
pItem.className ? pItem.className : '',
|
|
@@ -145,13 +152,19 @@
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
|
]"
|
|
|
- >{{ NumberList.indexOf(pItem.pinyin)==-1 ? pItem.chs[wIndex] : '' }}</span
|
|
|
+ >{{
|
|
|
+ NumberList.indexOf(pItem.pinyin) == -1
|
|
|
+ ? pItem.chs[wIndex]
|
|
|
+ : ""
|
|
|
+ }}</span
|
|
|
>
|
|
|
</template>
|
|
|
</span>
|
|
|
<span
|
|
|
v-if="
|
|
|
- curQue.pyPosition == 'bottom' && config.isShowPY && item.dhaspinyin
|
|
|
+ curQue.pyPosition == 'bottom' &&
|
|
|
+ config.isShowPY &&
|
|
|
+ item.dhaspinyin
|
|
|
"
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[
|
|
@@ -164,7 +177,11 @@
|
|
|
</span>
|
|
|
<span class="NNPE-words-box">
|
|
|
<span
|
|
|
- v-if="curQue.pyPosition == 'top' && config.isShowPY && item.dhaspinyin"
|
|
|
+ v-if="
|
|
|
+ curQue.pyPosition == 'top' &&
|
|
|
+ config.isShowPY &&
|
|
|
+ item.dhaspinyin
|
|
|
+ "
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[
|
|
|
noFont.indexOf(
|
|
@@ -173,7 +190,12 @@
|
|
|
? 'noFont'
|
|
|
: '',
|
|
|
]"
|
|
|
- @click.stop="viewNotes($event, item.wordsList[pIndex + 1].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes(
|
|
|
+ $event,
|
|
|
+ item.wordsList[pIndex + 1].pinyin
|
|
|
+ )
|
|
|
+ "
|
|
|
style="text-align: left"
|
|
|
>{{ item.wordsList[pIndex + 1].pinyin }}</span
|
|
|
>
|
|
@@ -191,11 +213,19 @@
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
|
]"
|
|
|
- >{{ NumberList.indexOf(item.wordsList[pIndex + 1].pinyin)==-1 ? item.wordsList[pIndex + 1].chs : '' }}</span
|
|
|
+ >{{
|
|
|
+ NumberList.indexOf(
|
|
|
+ item.wordsList[pIndex + 1].pinyin
|
|
|
+ ) == -1
|
|
|
+ ? item.wordsList[pIndex + 1].chs
|
|
|
+ : ""
|
|
|
+ }}</span
|
|
|
>
|
|
|
<span
|
|
|
v-if="
|
|
|
- curQue.pyPosition == 'bottom' && config.isShowPY && item.dhaspinyin
|
|
|
+ curQue.pyPosition == 'bottom' &&
|
|
|
+ config.isShowPY &&
|
|
|
+ item.dhaspinyin
|
|
|
"
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[
|
|
@@ -205,7 +235,12 @@
|
|
|
? 'noFont'
|
|
|
: '',
|
|
|
]"
|
|
|
- @click.stop="viewNotes($event, item.wordsList[pIndex + 1].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes(
|
|
|
+ $event,
|
|
|
+ item.wordsList[pIndex + 1].pinyin
|
|
|
+ )
|
|
|
+ "
|
|
|
style="text-align: left"
|
|
|
>{{ item.wordsList[pIndex + 1].pinyin }}</span
|
|
|
>
|
|
@@ -215,12 +250,14 @@
|
|
|
v-if="
|
|
|
item.wordsList[pIndex + 2] &&
|
|
|
item.wordsList[pIndex + 2].chs &&
|
|
|
- chsFhList.indexOf(item.wordsList[pIndex + 2].chs) >
|
|
|
- -1
|
|
|
+ (chsFhList.indexOf(item.wordsList[pIndex + 2].chs) >
|
|
|
+ -1 ||
|
|
|
+ NumberList.indexOf(
|
|
|
+ item.wordsList[pIndex + 2].chs
|
|
|
+ ) > -1)
|
|
|
"
|
|
|
>
|
|
|
<span
|
|
|
- v-if="curQue.pyPosition == 'top' && config.isShowPY && item.dhaspinyin"
|
|
|
:class="[
|
|
|
'NNPE-pinyin',
|
|
|
noFont.indexOf(
|
|
@@ -229,7 +266,12 @@
|
|
|
? 'noFont'
|
|
|
: '',
|
|
|
]"
|
|
|
- @click.stop="viewNotes($event, item.wordsList[pIndex + 2].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes(
|
|
|
+ $event,
|
|
|
+ item.wordsList[pIndex + 2].pinyin
|
|
|
+ )
|
|
|
+ "
|
|
|
style="text-align: left"
|
|
|
>{{ item.wordsList[pIndex + 2].pinyin }}</span
|
|
|
>
|
|
@@ -246,11 +288,22 @@
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
|
]"
|
|
|
- >{{ NumberList.indexOf(item.wordsList[pIndex + 2].pinyin)==-1 ? item.wordsList[pIndex + 2].chs : '' }}</span
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, item.wordsList[pIndex + 2].chs)
|
|
|
+ "
|
|
|
+ >{{
|
|
|
+ NumberList.indexOf(
|
|
|
+ item.wordsList[pIndex + 2].pinyin
|
|
|
+ ) == -1
|
|
|
+ ? item.wordsList[pIndex + 2].chs
|
|
|
+ : ""
|
|
|
+ }}</span
|
|
|
>
|
|
|
<span
|
|
|
v-if="
|
|
|
- curQue.pyPosition == 'bottom' && config.isShowPY && item.dhaspinyin
|
|
|
+ curQue.pyPosition == 'bottom' &&
|
|
|
+ config.isShowPY &&
|
|
|
+ item.dhaspinyin
|
|
|
"
|
|
|
:class="[
|
|
|
'NNPE-pinyin',
|
|
@@ -260,7 +313,12 @@
|
|
|
? 'noFont'
|
|
|
: '',
|
|
|
]"
|
|
|
- @click.stop="viewNotes($event, item.wordsList[pIndex + 2].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes(
|
|
|
+ $event,
|
|
|
+ item.wordsList[pIndex + 2].pinyin
|
|
|
+ )
|
|
|
+ "
|
|
|
style="text-align: left"
|
|
|
>{{ item.wordsList[pIndex + 2].pinyin }}</span
|
|
|
>
|
|
@@ -268,7 +326,11 @@
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<span
|
|
|
- v-if="curQue.pyPosition == 'top' && config.isShowPY && item.dhaspinyin"
|
|
|
+ v-if="
|
|
|
+ curQue.pyPosition == 'top' &&
|
|
|
+ config.isShowPY &&
|
|
|
+ item.dhaspinyin
|
|
|
+ "
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[
|
|
|
pItem.chs != '“' && pItem.padding ? 'padding' : '',
|
|
@@ -299,13 +361,19 @@
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
|
]"
|
|
|
- >{{ NumberList.indexOf(pItem.pinyin)==-1 ? pItem.chs[wIndex] : '' }}</span
|
|
|
+ >{{
|
|
|
+ NumberList.indexOf(pItem.pinyin) == -1
|
|
|
+ ? pItem.chs[wIndex]
|
|
|
+ : ""
|
|
|
+ }}</span
|
|
|
>
|
|
|
</template>
|
|
|
</span>
|
|
|
<span
|
|
|
v-if="
|
|
|
- curQue.pyPosition == 'bottom' && config.isShowPY && item.dhaspinyin
|
|
|
+ curQue.pyPosition == 'bottom' &&
|
|
|
+ config.isShowPY &&
|
|
|
+ item.dhaspinyin
|
|
|
"
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[
|
|
@@ -429,7 +497,7 @@ export default {
|
|
|
return {
|
|
|
resArr: [],
|
|
|
curTime: 0, //单位s
|
|
|
- chsFhList: [",", "。", "”", ":", "》", "《", "?", "!", ";"],
|
|
|
+ chsFhList: [",", "。", "”", ":", "》", "《", "?", "!", ";", "#"],
|
|
|
enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
|
|
|
NumberList: [
|
|
|
"①",
|
|
@@ -534,7 +602,7 @@ export default {
|
|
|
let asIndex = 0;
|
|
|
let dhaspinyin = false; // 每段是否有拼音
|
|
|
curQue.detail.forEach((dItem, dIndex) => {
|
|
|
- dhaspinyin = false
|
|
|
+ dhaspinyin = false;
|
|
|
let roleDetail = this.getRole(dItem);
|
|
|
let remarkDetail = dItem.remark;
|
|
|
if (remarkDetail && (remarkDetail.chs || remarkDetail.en)) {
|
|
@@ -565,6 +633,7 @@ export default {
|
|
|
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,
|
|
@@ -582,7 +651,7 @@ export default {
|
|
|
if (wIndex == sItem.length - 1) {
|
|
|
asIndex++;
|
|
|
}
|
|
|
- if(wItem.pinyin) dhaspinyin=true
|
|
|
+ if (wItem.pinyin) dhaspinyin = true;
|
|
|
});
|
|
|
});
|
|
|
|
|
@@ -604,11 +673,12 @@ export default {
|
|
|
timeList: timeList,
|
|
|
roleDetail: roleDetail,
|
|
|
remarkDetail: remarkDetail,
|
|
|
- dhaspinyin:dhaspinyin
|
|
|
+ dhaspinyin: dhaspinyin,
|
|
|
};
|
|
|
resArr.push(paraObj);
|
|
|
});
|
|
|
this.resArr = resArr;
|
|
|
+ console.log(this.resArr);
|
|
|
|
|
|
// 循环文章图片
|
|
|
if (curQue.img_list) {
|
|
@@ -629,7 +699,10 @@ export default {
|
|
|
},
|
|
|
//词和标点合一起
|
|
|
mergeWordSymbol(wItem) {
|
|
|
- if (this.chsFhList.indexOf(wItem.chs) > -1||this.NumberList.indexOf(wItem.pinyin)>-1) {
|
|
|
+ if (
|
|
|
+ this.chsFhList.indexOf(wItem.chs) > -1 ||
|
|
|
+ this.NumberList.indexOf(wItem.chs) > -1
|
|
|
+ ) {
|
|
|
wItem.isShow = false;
|
|
|
} else {
|
|
|
wItem.isShow = true;
|