|
@@ -16,6 +16,7 @@
|
|
|
:mp3="curQue.mp3_list[0].id"
|
|
|
:getCurTime="getCurTime"
|
|
|
ref="audioLine"
|
|
|
+ :width="audioWidth"
|
|
|
/>
|
|
|
</div>
|
|
|
<template v-if="resArr.length > 0">
|
|
@@ -62,6 +63,17 @@
|
|
|
: 'textCenter',
|
|
|
pItem.chs == '“' ? 'textRight' : '',
|
|
|
]"
|
|
|
+ @click="
|
|
|
+ handleChangeTime(
|
|
|
+ item.timeList &&
|
|
|
+ item.timeList.length > 0 &&
|
|
|
+ item.timeList[pItem.sentIndex].bg,
|
|
|
+ item,
|
|
|
+ item.timeList &&
|
|
|
+ item.timeList.length > 0 &&
|
|
|
+ item.timeList[pItem.sentIndex].ed
|
|
|
+ )
|
|
|
+ "
|
|
|
>
|
|
|
<template v-if="!pItem.width">
|
|
|
<template v-if="pItem.isShow">
|
|
@@ -86,12 +98,31 @@
|
|
|
>
|
|
|
<template v-if="!pItem.isHeng">
|
|
|
<span
|
|
|
+ v-for="(wItem, wIndex) in pItem.leg"
|
|
|
+ :key="'ci' + wIndex + pIndex + index"
|
|
|
+ :class="[
|
|
|
+ pItem.chstimeList &&
|
|
|
+ pItem.chstimeList[wIndex] &&
|
|
|
+ curTime >= pItem.chstimeList[wIndex].wordBg &&
|
|
|
+ curTime < item.timeList[pItem.sentIndex].ed
|
|
|
+ ? 'wordActive'
|
|
|
+ : '',
|
|
|
+ 'NNPE-chs',
|
|
|
+ pItem.config.underLine
|
|
|
+ ? 'NNPE-chs-underline'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ :style="hengStyle(pItem.config)"
|
|
|
+ >{{
|
|
|
+ pItem.chs[wIndex]
|
|
|
+ }}</span
|
|
|
+ >
|
|
|
+ <!-- <span
|
|
|
class="NNPE-chs"
|
|
|
:class="[
|
|
|
- item.timeList.length > 0 &&
|
|
|
- curTime >=
|
|
|
- item.timeList[pItem.sentIndex]
|
|
|
- .wordsResultList[pItem.wordIndex].wordBg &&
|
|
|
+ pItem.chstimeList &&
|
|
|
+ pItem.chstimeList[wIndex] &&
|
|
|
+ curTime >= pItem.chstimeList[wIndex].wordBg &&
|
|
|
curTime <= item.timeList[pItem.sentIndex].ed
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
@@ -101,7 +132,7 @@
|
|
|
]"
|
|
|
:style="hengStyle(pItem.config)"
|
|
|
>{{ pItem.chs }}</span
|
|
|
- >
|
|
|
+ > -->
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<template v-if="judgeAnswer == 'standardAnswer'">
|
|
@@ -184,16 +215,16 @@
|
|
|
item.wordsList[pIndex + 1].pinyin | handlePY
|
|
|
}}</span
|
|
|
>
|
|
|
-
|
|
|
<span
|
|
|
class="NNPE-chs"
|
|
|
style="text-align: left"
|
|
|
:class="[
|
|
|
item.timeList.length > 0 &&
|
|
|
+ pItem.chstimeList &&
|
|
|
+ pItem.chstimeList[pItem.leg - 1] &&
|
|
|
curTime >=
|
|
|
- item.timeList[pItem.sentIndex].wordsResultList[
|
|
|
- pItem.wordIndex
|
|
|
- ].wordBg &&
|
|
|
+ pItem.chstimeList[pItem.leg - 1].wordBg &&
|
|
|
+ curQue.wordTime &&
|
|
|
curTime <= item.timeList[pItem.sentIndex].ed
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
@@ -248,7 +279,6 @@
|
|
|
class="NNPE-chs"
|
|
|
style="text-align: left"
|
|
|
:class="[
|
|
|
- isPlaying &&
|
|
|
item.timeList &&
|
|
|
item.timeList[pItem.sentIndex] &&
|
|
|
curTime >= item.timeList[pItem.sentIndex].bg &&
|
|
@@ -300,15 +330,43 @@
|
|
|
>{{ pItem.pinyin | handlePY }}</span
|
|
|
>
|
|
|
<template v-if="!pItem.isHeng">
|
|
|
- <span
|
|
|
+ <span
|
|
|
+ v-if="pItem.chs != '#'"
|
|
|
+ class="NNPE-chs"
|
|
|
+ :class="[
|
|
|
+ pItem.chs != '“' && pItem.padding && item.isHasPY ? 'padding' : '',
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <template>
|
|
|
+ <span
|
|
|
+ v-for="(wItem, wIndex) in pItem.leg"
|
|
|
+ :key="'ci' + wIndex + pIndex + index"
|
|
|
+ :class="[
|
|
|
+ pItem.chstimeList &&
|
|
|
+ pItem.chstimeList[wIndex] &&
|
|
|
+ curTime >= pItem.chstimeList[wIndex].wordBg &&
|
|
|
+ curTime <= item.timeList[pItem.sentIndex].ed
|
|
|
+ ? 'wordActive'
|
|
|
+ : '',
|
|
|
+ 'NNPE-chs',
|
|
|
+ pItem.config.underLine
|
|
|
+ ? 'NNPE-chs-underline'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ :style="hengStyle(pItem.config)"
|
|
|
+ >{{
|
|
|
+ pItem.chs[wIndex]
|
|
|
+ }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
+ <!-- <span
|
|
|
v-if="pItem.chs != '#'"
|
|
|
class="NNPE-chs"
|
|
|
:class="[
|
|
|
- item.timeList.length > 0 &&
|
|
|
- curTime >=
|
|
|
- item.timeList[pItem.sentIndex].wordsResultList[
|
|
|
- pItem.wordIndex
|
|
|
- ].wordBg &&
|
|
|
+ pItem.chstimeList &&
|
|
|
+ pItem.chstimeList[wIndex] &&
|
|
|
+ curTime >= pItem.chstimeList[wIndex].wordBg &&
|
|
|
curTime <= item.timeList[pItem.sentIndex].ed
|
|
|
? 'wordActive'
|
|
|
: '',
|
|
@@ -321,7 +379,7 @@
|
|
|
]"
|
|
|
:style="hengStyle(pItem.config)"
|
|
|
>{{ pItem.chs }}</span
|
|
|
- >
|
|
|
+ > -->
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<template v-if="judgeAnswer == 'standardAnswer'">
|
|
@@ -631,6 +689,7 @@ export default {
|
|
|
"Bookanswer",
|
|
|
"TaskModel",
|
|
|
"judgeAnswer",
|
|
|
+ "audioWidth"
|
|
|
],
|
|
|
components: {
|
|
|
AudioLine,
|
|
@@ -731,7 +790,7 @@ export default {
|
|
|
minHeight: Number(sizeVal) + 9 + "px",
|
|
|
lineHeight: Number(sizeVal) + 8 + "px",
|
|
|
fontSize: config ? config.fontSize : '20px',
|
|
|
- fontFamily: config ? config.fontFamily : 'FZJCGFKTK'
|
|
|
+ fontFamily: config ? config.fontFamily : 'FZJCGFKTK',
|
|
|
};
|
|
|
};
|
|
|
},
|
|
@@ -791,9 +850,11 @@ export default {
|
|
|
},
|
|
|
handleData() {
|
|
|
let resArr = [];
|
|
|
+ let curQue = JSON.parse(JSON.stringify(this.curQue));
|
|
|
+ let wordTimeList = curQue.wordTime;
|
|
|
let reg = /_{2,}/g;
|
|
|
let leg = this.curQue.detail.length;
|
|
|
- let curQue = JSON.parse(JSON.stringify(this.curQue));
|
|
|
+ let asIndex = 0;
|
|
|
this.curQue.answerArr = this.curQue.answer
|
|
|
? this.curQue.answer.split("\n")
|
|
|
: [];
|
|
@@ -809,7 +870,17 @@ export default {
|
|
|
let paraArr = [];
|
|
|
if (dItem.wordsList && dItem.wordsList.length > 0) {
|
|
|
dItem.wordsList.forEach((sItem, sIndex) => {
|
|
|
+ let sentArr = [];
|
|
|
sItem.forEach((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);
|
|
|
if (wItem.pinyin) {
|
|
|
isHasPY++;
|
|
@@ -832,14 +903,28 @@ export default {
|
|
|
underLine: wItem.underLine,
|
|
|
wordPadding: wItem.wordPadding,
|
|
|
},
|
|
|
+ leg: wItem.chs.length,
|
|
|
+ chstimeList: [],
|
|
|
+ startIndex: startIndex,
|
|
|
+ endIndex: endIndex,
|
|
|
};
|
|
|
+ if (wordTimeList && wordTimeList.length > 0) {
|
|
|
+ obj.chstimeList = wordTimeList[asIndex].wordsResultList.slice(
|
|
|
+ startIndex,
|
|
|
+ endIndex
|
|
|
+ );
|
|
|
+ }
|
|
|
if (obj.isHeng) {
|
|
|
isRecord = isRecord + 1;
|
|
|
hengIndex = hengIndex + 1;
|
|
|
obj.hengIndex = hengIndex;
|
|
|
obj.answer = "";
|
|
|
}
|
|
|
+ sentArr.push(obj);
|
|
|
paraArr.push(obj);
|
|
|
+ if (wIndex == sItem.length - 1) {
|
|
|
+ asIndex++;
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
let curSentencesLeg = dItem.sentences.length;
|
|
@@ -871,6 +956,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.resArr = resArr;
|
|
|
+ console.log(resArr)
|
|
|
// 循环文章图片
|
|
|
if (curQue.img_list) {
|
|
|
curQue.img_list.forEach((item) => {
|
|
@@ -953,9 +1039,12 @@ export default {
|
|
|
return listRes;
|
|
|
},
|
|
|
//点击播放某个句子
|
|
|
- handleChangeTime(time) {
|
|
|
- this.curTime = time;
|
|
|
- this.$refs.audioLine.onTimeupdateTime(time / 1000);
|
|
|
+ handleChangeTime(time, item, ed) {
|
|
|
+ if (item.timeList && item.timeList.length > 0) {
|
|
|
+ this.curTime = time;
|
|
|
+ this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
|
|
|
+ }
|
|
|
+ this.ed = ed;
|
|
|
},
|
|
|
//处理数组
|
|
|
handlePara(para) {
|
|
@@ -1079,7 +1168,7 @@ export default {
|
|
|
&-box {
|
|
|
float: left;
|
|
|
> span {
|
|
|
- display: block;
|
|
|
+ // display: block;
|
|
|
&.NNPE-pinyin {
|
|
|
font-family: "GB-PINYINOK-B";
|
|
|
font-weight: normal;
|
|
@@ -1093,6 +1182,9 @@ export default {
|
|
|
&.textLeft {
|
|
|
text-align: left;
|
|
|
}
|
|
|
+ &.wordActive {
|
|
|
+ color: #de4444;
|
|
|
+ }
|
|
|
}
|
|
|
&.NNPE-chs {
|
|
|
font-family: "FZJCGFKTK";
|
|
@@ -1108,6 +1200,12 @@ export default {
|
|
|
&.NNPE-chs-underline {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
+ .NNPE-chs-underline {
|
|
|
+ text-decoration: underline;
|
|
|
+ }
|
|
|
+ .wordActive {
|
|
|
+ color: #de4444;
|
|
|
+ }
|
|
|
}
|
|
|
&.padding {
|
|
|
padding: 0 3px;
|
|
@@ -1138,6 +1236,9 @@ export default {
|
|
|
&.textLeft {
|
|
|
text-align: left;
|
|
|
}
|
|
|
+ &.wordActive {
|
|
|
+ color: #de4444;
|
|
|
+ }
|
|
|
}
|
|
|
&.NNPE-chs {
|
|
|
font-family: "FZJCGFKTK";
|
|
@@ -1153,27 +1254,17 @@ export default {
|
|
|
&.NNPE-chs-underline {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
+ .NNPE-chs-underline {
|
|
|
+ text-decoration: underline;
|
|
|
+ }
|
|
|
+ .wordActive {
|
|
|
+ color: #de4444;
|
|
|
+ }
|
|
|
}
|
|
|
&.padding {
|
|
|
padding: 0 3px;
|
|
|
}
|
|
|
}
|
|
|
- .answer-input {
|
|
|
- min-height: 28px;
|
|
|
- box-sizing: border-box;
|
|
|
- border: 0;
|
|
|
- border-bottom: 1px #000 solid;
|
|
|
- background: 0 0;
|
|
|
- min-width: 100px;
|
|
|
- outline: 0;
|
|
|
- text-align: left;
|
|
|
- font-family: "FZJCGFKTK";
|
|
|
- font-size: 20px;
|
|
|
- padding: 0 10px;
|
|
|
- box-sizing: border-box;
|
|
|
- color: #000000;
|
|
|
- line-height: 26px;
|
|
|
- }
|
|
|
}
|
|
|
.enwords {
|
|
|
font-family: "robot";
|