|
@@ -1,7 +1,12 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
<div class="NNPE-ArticleView" v-if="curQue">
|
|
|
- <div v-if="curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
|
|
|
+ <div
|
|
|
+ class="aduioLine-box"
|
|
|
+ v-if="
|
|
|
+ curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url
|
|
|
+ "
|
|
|
+ >
|
|
|
<AudioLine
|
|
|
:mp3="curQue.mp3_list[0].url"
|
|
|
:getCurTime="getCurTime"
|
|
@@ -10,25 +15,30 @@
|
|
|
</div>
|
|
|
<template v-if="resArr.length > 0">
|
|
|
<div class="NPC-sentences-list">
|
|
|
+ <div class="NPC-article-empty">
|
|
|
+ <div class="empty-left"></div>
|
|
|
+ <div class="empty-right"></div>
|
|
|
+ </div>
|
|
|
<div
|
|
|
- :class="['NNPE-detail', item.isTitle ? 'NNPE-detail-title' : '']"
|
|
|
+ :class="[
|
|
|
+ 'NNPE-detail',
|
|
|
+ item.isTitle ? 'NNPE-detail-title' : '',
|
|
|
+ curTime >= item.timeList[0].bg &&
|
|
|
+ curTime <= item.timeList[item.timeList.length - 1].ed
|
|
|
+ ? 'active'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
v-for="(item, index) in resArr"
|
|
|
:key="'detail' + index"
|
|
|
>
|
|
|
- <div
|
|
|
- :class="[
|
|
|
- 'article-content',
|
|
|
- index == 0 ? 'paraFirst' : '',
|
|
|
- index == resArr.length - 1 ? 'paraLast' : '',
|
|
|
- ]"
|
|
|
- >
|
|
|
+ <div class="article-content">
|
|
|
<RoleChs :curRole="item.roleDetail" />
|
|
|
<div class="wordsList-box">
|
|
|
<img
|
|
|
:src="articleImg[index]"
|
|
|
v-if="articleImg[0] && index == 0"
|
|
|
/>
|
|
|
- <div>
|
|
|
+ <div :style="{ background: item.roleDetail.color.bg }">
|
|
|
<div
|
|
|
class="NNPE-words"
|
|
|
v-for="(pItem, pIndex) in item.wordsList"
|
|
@@ -53,9 +63,12 @@
|
|
|
<span
|
|
|
class="NNPE-chs"
|
|
|
:class="[
|
|
|
- curTime >= item.timeList[pItem.sentIndex].bg &&
|
|
|
+ curTime >=
|
|
|
+ item.timeList[pItem.sentIndex].wordsResultList[
|
|
|
+ pItem.wordIndex
|
|
|
+ ].wordBg &&
|
|
|
curTime <= item.timeList[pItem.sentIndex].ed
|
|
|
- ? 'active'
|
|
|
+ ? 'wordActive'
|
|
|
: '',
|
|
|
]"
|
|
|
>{{ pItem.chs }}</span
|
|
@@ -69,9 +82,12 @@
|
|
|
class="NNPE-chs"
|
|
|
style="text-align: left"
|
|
|
:class="[
|
|
|
- curTime >= item.timeList[pItem.sentIndex].bg &&
|
|
|
+ curTime >=
|
|
|
+ item.timeList[pItem.sentIndex].wordsResultList[
|
|
|
+ pItem.wordIndex
|
|
|
+ ].wordBg &&
|
|
|
curTime <= item.timeList[pItem.sentIndex].ed
|
|
|
- ? 'active'
|
|
|
+ ? 'wordActive'
|
|
|
: '',
|
|
|
]"
|
|
|
>{{ item.wordsList[pIndex + 1].chs }}</span
|
|
@@ -90,9 +106,12 @@
|
|
|
<span
|
|
|
class="NNPE-chs"
|
|
|
:class="[
|
|
|
- curTime >= item.timeList[pItem.sentIndex].bg &&
|
|
|
+ curTime >=
|
|
|
+ item.timeList[pItem.sentIndex].wordsResultList[
|
|
|
+ pItem.wordIndex
|
|
|
+ ].wordBg &&
|
|
|
curTime <= item.timeList[pItem.sentIndex].ed
|
|
|
- ? 'active'
|
|
|
+ ? 'wordActive'
|
|
|
: '',
|
|
|
pItem.padding ? 'padding' : '',
|
|
|
]"
|
|
@@ -114,10 +133,17 @@
|
|
|
<img :src="articleImg[index + 1]" v-if="articleImg[index + 1]" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="remarkBox" :class="index == 0 ? 'remark72' : 'remark40'">
|
|
|
+ <div class="remarkBox remark-top">
|
|
|
<RemarkChs :remarkDetail="item.remarkDetail" />
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="NPC-article-empty NPC-article-empty-bottom">
|
|
|
+ <div class="empty-left"></div>
|
|
|
+ <div class="empty-right"></div>
|
|
|
+ </div>
|
|
|
+ <div class="dia-article-record">
|
|
|
+ <Soundrecord @handleWav="handleWav" type="promax" class="luyin-box" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
@@ -128,13 +154,15 @@ import { timeStrToSen } from "@/utils/index";
|
|
|
import AudioLine from "../AudioLine.vue";
|
|
|
import RoleChs from "./RoleChs.vue";
|
|
|
import RemarkChs from "./RemarkChs.vue";
|
|
|
+import Soundrecord from "../Soundrecord.vue";
|
|
|
export default {
|
|
|
name: "DialogueNormalModelChs",
|
|
|
- props: ["curQue"],
|
|
|
+ props: ["curQue", "colorBox"],
|
|
|
components: {
|
|
|
AudioLine,
|
|
|
RoleChs,
|
|
|
RemarkChs,
|
|
|
+ Soundrecord,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -154,6 +182,7 @@ export default {
|
|
|
watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
+ handleWav() {},
|
|
|
getCurTime(curTime) {
|
|
|
this.curTime = curTime * 1000;
|
|
|
},
|
|
@@ -223,8 +252,18 @@ export default {
|
|
|
//获取角色
|
|
|
getRole(dItem) {
|
|
|
let roleIndex = dItem.roleIndex;
|
|
|
- let resArr = this.curQue.roleList.filter((item) => item.id == roleIndex);
|
|
|
- return resArr[0];
|
|
|
+ let resObj = null;
|
|
|
+ let roleList = JSON.parse(JSON.stringify(this.curQue.roleList));
|
|
|
+ for (let i = 0; i < roleList.length; i++) {
|
|
|
+ let item = roleList[i];
|
|
|
+ if (item.id == roleIndex) {
|
|
|
+ resObj = item;
|
|
|
+ resObj.color = this.colorBox[i];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return resObj;
|
|
|
},
|
|
|
//判断是否有padding
|
|
|
judgePad(sItem, wItem, curIndex) {
|
|
@@ -283,6 +322,38 @@ export default {
|
|
|
.NNPE-ArticleView {
|
|
|
width: 100%;
|
|
|
.NPC-sentences-list {
|
|
|
+ .NPC-article-empty {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: flex-start;
|
|
|
+ > div {
|
|
|
+ height: 24px;
|
|
|
+ &.empty-left {
|
|
|
+ width: 553px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-right: 1px rgba(0, 0, 0, 0.1) solid;
|
|
|
+ }
|
|
|
+ &.empty-right {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &-bottom {
|
|
|
+ > div {
|
|
|
+ height: 40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .dia-article-record {
|
|
|
+ width: 100%;
|
|
|
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ .luyin-box {
|
|
|
+ justify-content: start;
|
|
|
+ padding: 8px 12px;
|
|
|
+ height: 40px;
|
|
|
+ width: 280px;
|
|
|
+ justify-content: flex-start;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.NNPE-detail {
|
|
|
clear: both;
|
|
@@ -290,21 +361,20 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
align-items: flex-start;
|
|
|
+ &.active {
|
|
|
+ background: rgba(0, 0, 0, 0.06);
|
|
|
+ }
|
|
|
.article-content {
|
|
|
width: 553px;
|
|
|
box-sizing: border-box;
|
|
|
border-right: 1px rgba(0, 0, 0, 0.1) solid;
|
|
|
- padding: 8px 23px;
|
|
|
- &.paraFirst {
|
|
|
- padding-top: 32px;
|
|
|
- }
|
|
|
+ padding: 8px 0px 8px 23px;
|
|
|
&.paraLast {
|
|
|
- padding-bottom: 32px;
|
|
|
+ padding-bottom: 24px;
|
|
|
}
|
|
|
}
|
|
|
.NNPE-words {
|
|
|
float: left;
|
|
|
- padding: 0 0px 8px 0px;
|
|
|
&-box {
|
|
|
float: left;
|
|
|
> span {
|
|
@@ -328,6 +398,9 @@ export default {
|
|
|
&.active {
|
|
|
background: rgba(60, 200, 99, 0.2);
|
|
|
}
|
|
|
+ &.wordActive {
|
|
|
+ color: #de4444;
|
|
|
+ }
|
|
|
}
|
|
|
&.padding {
|
|
|
padding: 0 3px;
|
|
@@ -361,6 +434,9 @@ export default {
|
|
|
&.active {
|
|
|
background: rgba(60, 200, 99, 0.2);
|
|
|
}
|
|
|
+ &.wordActive {
|
|
|
+ color: #de4444;
|
|
|
+ }
|
|
|
}
|
|
|
&.padding {
|
|
|
padding: 0 3px;
|
|
@@ -397,7 +473,7 @@ export default {
|
|
|
float: left;
|
|
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
box-sizing: border-box;
|
|
|
- padding: 8px 12px 0px 12px;
|
|
|
+ padding: 8px 12px 8px 12px;
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
> img {
|
|
@@ -414,8 +490,8 @@ export default {
|
|
|
&.remark72 {
|
|
|
padding-top: 72px;
|
|
|
}
|
|
|
- &.remark40 {
|
|
|
- padding-top: 40px;
|
|
|
+ &.remark-top {
|
|
|
+ padding-top: 44px;
|
|
|
}
|
|
|
}
|
|
|
}
|