|
@@ -48,6 +48,7 @@
|
|
|
:mp3Source="'mp3'"
|
|
|
type="audioLine"
|
|
|
:ed="ed"
|
|
|
+ :showEd="showEd"
|
|
|
@emptyEd="emptyEd"
|
|
|
/>
|
|
|
<svg-icon icon-class="icon-wrapper" class="wrapper"></svg-icon>
|
|
@@ -378,10 +379,25 @@ export default {
|
|
|
} else {
|
|
|
this.curTime = curTime * 1000;
|
|
|
}
|
|
|
+ } else if((this.singleModel||this.autoNextSent)&&this.playSentIndex>-1&&this.repeatAfter){
|
|
|
+ let time = curTime * 1000;
|
|
|
+ this.curTime = curTime * 1000;
|
|
|
+ // for(let i=0; i<this.resArr.timeList.length;i++){
|
|
|
+ // if(this.curTime>this.resArr.timeList[i].s&&this.curTime<=this.resArr.timeList[i].e){
|
|
|
+ // this.playSentIndex = i
|
|
|
+ // break
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if (time >= this.resArr.timeList[this.playSentIndex].s || time <= this.resArr.timeList[this.playSentIndex].e) {
|
|
|
+ // this.curTime = this.resArr.timeList[this.playSentIndex].s;
|
|
|
+ this.ed = this.resArr.timeList[this.playSentIndex].e;
|
|
|
+ this.showEd = true
|
|
|
+ // this.$refs.audioLine.onTimeupdateTime(this.resArr.timeList[this.playSentIndex].s / 1000, true);
|
|
|
+ }
|
|
|
}else{
|
|
|
this.curTime = curTime * 1000;
|
|
|
for(let i=0; i<this.resArr.timeList.length;i++){
|
|
|
- if(this.curTime>=this.resArr.timeList[i].s&&this.curTime<this.resArr.timeList[i].e){
|
|
|
+ if(this.curTime>this.resArr.timeList[i].s&&this.curTime<=this.resArr.timeList[i].e){
|
|
|
this.playSentIndex = i
|
|
|
break
|
|
|
}
|
|
@@ -427,6 +443,13 @@ export default {
|
|
|
}else{
|
|
|
if (time>=0) {
|
|
|
this.curTime = time;
|
|
|
+ for(let i=0; i<this.resArr.timeList.length;i++){
|
|
|
+ if(this.curTime>this.resArr.timeList[i].s&&this.curTime<=this.resArr.timeList[i].e){
|
|
|
+ this.playSentIndex = i
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.playSentIndex)
|
|
|
if(ed){
|
|
|
this.ed = ed;
|
|
|
}
|
|
@@ -435,8 +458,15 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- emptyEd() {
|
|
|
+ emptyEd(flag) {
|
|
|
this.ed = undefined;
|
|
|
+ if(flag){
|
|
|
+ this.showEd = false
|
|
|
+ console.log('jieshula ')
|
|
|
+ if(!this.microphoneStatus){
|
|
|
+ this.microphone()
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
//经过每个词,高亮句子
|
|
|
handleMouseover(pItem) {
|
|
@@ -459,7 +489,6 @@ export default {
|
|
|
this.audioc.pause();
|
|
|
if(_this.$refs.audioLine.audio.playing){
|
|
|
_this.$refs.audioLine.PlayAudio()
|
|
|
- _this.showEd = false
|
|
|
}
|
|
|
if (!this.microphoneStatus) {
|
|
|
_this.hasMicro = "";
|
|
@@ -592,6 +621,9 @@ export default {
|
|
|
this.historyLoading = true
|
|
|
this.audio.pause();
|
|
|
this.audioc.pause();
|
|
|
+ if(this.microphoneStatus){
|
|
|
+ this.microphone()
|
|
|
+ }
|
|
|
if(this.$refs.audioLine.audio.playing){
|
|
|
this.$refs.audioLine.PlayAudio()
|
|
|
}
|
|
@@ -626,7 +658,13 @@ export default {
|
|
|
}
|
|
|
getLogin(MethodName, data)
|
|
|
.then((res) => {
|
|
|
-
|
|
|
+ if(this.repeatAfter){
|
|
|
+ if(this.autoNextSent&&this.resArr.timeList[this.playSentIndex+1]){
|
|
|
+ this.playSentIndex = this.playSentIndex+1
|
|
|
+ this.ed = this.resArr.timeList[this.playSentIndex+1].e
|
|
|
+ this.handleChangeTime(this.resArr.timeList[this.playSentIndex+1].s)
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
// 对比
|
|
@@ -635,7 +673,7 @@ export default {
|
|
|
_this.isCompare = true
|
|
|
// let curTime = _this.resArr.timeList[_this.playSentIndex].s
|
|
|
// for(let i=0; i<this.resArr.timeList.length;i++){
|
|
|
- // if(curTime>=this.resArr.timeList[i].s&&curTime<this.resArr.timeList[i].e){
|
|
|
+ // if(curTime>this.resArr.timeList[i].s&&curTime<=this.resArr.timeList[i].e){
|
|
|
// this.playSentIndex = i
|
|
|
// break
|
|
|
// }
|
|
@@ -656,7 +694,6 @@ export default {
|
|
|
_this.audioc.pause();
|
|
|
_this.audioc.load();
|
|
|
_this.handleChangeTime(_this.resArr.timeList[playSentIndex].s,_this.resArr.timeList[playSentIndex].e)
|
|
|
- console.log(playSentIndex)
|
|
|
_this.timeC = setInterval(() => {
|
|
|
if(_this.curTime>=_this.resArr.timeList[playSentIndex].e - 250){
|
|
|
_this.curTime = _this.resArr.timeList[playSentIndex].s
|