|  | @@ -200,7 +200,7 @@
 | 
											
												
													
														|  |                  key="sent-repeatAfter">
 |  |                  key="sent-repeatAfter">
 | 
											
												
													
														|  |              </el-switch>
 |  |              </el-switch>
 | 
											
												
													
														|  |          </div>
 |  |          </div>
 | 
											
												
													
														|  | -        <div class="item" v-if="repeatAfter">
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <div class="item">
 | 
											
												
													
														|  |              <span>单句模式</span>
 |  |              <span>单句模式</span>
 | 
											
												
													
														|  |              <el-switch
 |  |              <el-switch
 | 
											
												
													
														|  |                  v-model="singleModel"
 |  |                  v-model="singleModel"
 | 
											
										
											
												
													
														|  | @@ -210,7 +210,7 @@
 | 
											
												
													
														|  |                  @change="mutualExclusive('singleModel','autoNextSent')">
 |  |                  @change="mutualExclusive('singleModel','autoNextSent')">
 | 
											
												
													
														|  |              </el-switch>
 |  |              </el-switch>
 | 
											
												
													
														|  |          </div>
 |  |          </div>
 | 
											
												
													
														|  | -        <div class="item" v-if="repeatAfter">
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <div class="item">
 | 
											
												
													
														|  |              <span>自动下一句</span>
 |  |              <span>自动下一句</span>
 | 
											
												
													
														|  |              <el-switch
 |  |              <el-switch
 | 
											
												
													
														|  |                  v-model="autoNextSent"
 |  |                  v-model="autoNextSent"
 | 
											
										
											
												
													
														|  | @@ -319,7 +319,8 @@ export default {
 | 
											
												
													
														|  |        ed: undefined,
 |  |        ed: undefined,
 | 
											
												
													
														|  |        showEd: false, //是否看ed的值
 |  |        showEd: false, //是否看ed的值
 | 
											
												
													
														|  |        historyLoading: false,
 |  |        historyLoading: false,
 | 
											
												
													
														|  | -      timeC: null
 |  | 
 | 
											
												
													
														|  | 
 |  | +      timeC: null,
 | 
											
												
													
														|  | 
 |  | +      isCompare: false
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    computed: {
 |  |    computed: {
 | 
											
										
											
												
													
														|  | @@ -344,12 +345,7 @@ export default {
 | 
											
												
													
														|  |      changePlaySent(type){
 |  |      changePlaySent(type){
 | 
											
												
													
														|  |          this.audio.pause();
 |  |          this.audio.pause();
 | 
											
												
													
														|  |          this.audioc.pause();
 |  |          this.audioc.pause();
 | 
											
												
													
														|  | -        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(type==='-'){
 |  |          if(type==='-'){
 | 
											
												
													
														|  |              if(this.playSentIndex>0){
 |  |              if(this.playSentIndex>0){
 | 
											
												
													
														|  |                  this.playSentIndex--
 |  |                  this.playSentIndex--
 | 
											
										
											
												
													
														|  | @@ -366,7 +362,24 @@ export default {
 | 
											
												
													
														|  |          this.handleChangeTime(this.resArr.timeList[this.playSentIndex].s)
 |  |          this.handleChangeTime(this.resArr.timeList[this.playSentIndex].s)
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      getCurTime(curTime) {
 |  |      getCurTime(curTime) {
 | 
											
												
													
														|  | -      this.curTime = curTime * 1000;  
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if(this.isCompare){
 | 
											
												
													
														|  | 
 |  | +            let time = curTime * 1000;
 | 
											
												
													
														|  | 
 |  | +            if (time >= this.resArr.timeList[this.playSentIndex].e || time <= this.resArr.timeList[this.playSentIndex].s) {
 | 
											
												
													
														|  | 
 |  | +                // this.curTime = this.resArr.timeList[this.playSentIndex].s;
 | 
											
												
													
														|  | 
 |  | +                // this.$refs.audioLine.onTimeupdateTime(_this.currSent.bg / 1000, true);
 | 
											
												
													
														|  | 
 |  | +            } else {
 | 
											
												
													
														|  | 
 |  | +                this.curTime = curTime * 1000;
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +        }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){
 | 
											
												
													
														|  | 
 |  | +                    this.playSentIndex = i
 | 
											
												
													
														|  | 
 |  | +                    break
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +      
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      returnCurrentTime(){
 |  |      returnCurrentTime(){
 | 
											
												
													
														|  |          return this.curTime
 |  |          return this.curTime
 | 
											
										
											
												
													
														|  | @@ -465,12 +478,6 @@ export default {
 | 
											
												
													
														|  |          _this.recordFile++;
 |  |          _this.recordFile++;
 | 
											
												
													
														|  |          _this.selectIndex = _this.recordList.length - 1;
 |  |          _this.selectIndex = _this.recordList.length - 1;
 | 
											
												
													
														|  |        } else {
 |  |        } else {
 | 
											
												
													
														|  | -        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
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  |          this.hasMicro = "normal";
 |  |          this.hasMicro = "normal";
 | 
											
												
													
														|  |          this.recorder.stop();
 |  |          this.recorder.stop();
 | 
											
												
													
														|  |          clearInterval(_this.timer);
 |  |          clearInterval(_this.timer);
 | 
											
										
											
												
													
														|  | @@ -617,15 +624,16 @@ export default {
 | 
											
												
													
														|  |      // 对比
 |  |      // 对比
 | 
											
												
													
														|  |      compare(){
 |  |      compare(){
 | 
											
												
													
														|  |          let _this = this;
 |  |          let _this = this;
 | 
											
												
													
														|  | -        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){
 |  | 
 | 
											
												
													
														|  | -                this.playSentIndex = i
 |  | 
 | 
											
												
													
														|  | -                break
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -        let playSentIndex = _this.playSentIndex
 |  | 
 | 
											
												
													
														|  | -        if(this.playSentIndex===-1){
 |  | 
 | 
											
												
													
														|  | 
 |  | +        _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){
 | 
											
												
													
														|  | 
 |  | +        //         this.playSentIndex = i
 | 
											
												
													
														|  | 
 |  | +        //         break
 | 
											
												
													
														|  | 
 |  | +        //     }
 | 
											
												
													
														|  | 
 |  | +        // }
 | 
											
												
													
														|  | 
 |  | +        let playSentIndex = JSON.parse(JSON.stringify(_this.playSentIndex))
 | 
											
												
													
														|  | 
 |  | +        if(playSentIndex===-1){
 | 
											
												
													
														|  |              this.$message.warning('请先选择要对比的句子')
 |  |              this.$message.warning('请先选择要对比的句子')
 | 
											
												
													
														|  |              return
 |  |              return
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
										
											
												
													
														|  | @@ -639,11 +647,11 @@ export default {
 | 
											
												
													
														|  |          } else {
 |  |          } else {
 | 
											
												
													
														|  |              _this.audioc.pause();
 |  |              _this.audioc.pause();
 | 
											
												
													
														|  |              _this.audioc.load();
 |  |              _this.audioc.load();
 | 
											
												
													
														|  | -            _this.curTime = _this.resArr.timeList[playSentIndex].s
 |  | 
 | 
											
												
													
														|  |              _this.handleChangeTime(_this.resArr.timeList[playSentIndex].s,_this.resArr.timeList[playSentIndex].e)
 |  |              _this.handleChangeTime(_this.resArr.timeList[playSentIndex].s,_this.resArr.timeList[playSentIndex].e)
 | 
											
												
													
														|  |              console.log(playSentIndex)
 |  |              console.log(playSentIndex)
 | 
											
												
													
														|  |              _this.timeC = setInterval(() => {
 |  |              _this.timeC = setInterval(() => {
 | 
											
												
													
														|  | -                if(_this.curTime>=_this.resArr.timeList[playSentIndex].e){
 |  | 
 | 
											
												
													
														|  | 
 |  | +                if(_this.curTime>=_this.resArr.timeList[playSentIndex].e - 250){
 | 
											
												
													
														|  | 
 |  | +                    _this.curTime = _this.resArr.timeList[playSentIndex].s
 | 
											
												
													
														|  |                      clearInterval(_this.timeC)
 |  |                      clearInterval(_this.timeC)
 | 
											
												
													
														|  |                      _this.playWavdata()
 |  |                      _this.playWavdata()
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
										
											
												
													
														|  | @@ -654,6 +662,9 @@ export default {
 | 
											
												
													
														|  |          let _this = this;
 |  |          let _this = this;
 | 
											
												
													
														|  |          _this.audioc.src = _this.wavblob;
 |  |          _this.audioc.src = _this.wavblob;
 | 
											
												
													
														|  |          _this.audioc.play();
 |  |          _this.audioc.play();
 | 
											
												
													
														|  | 
 |  | +        _this.audioc.addEventListener("ended", function () {
 | 
											
												
													
														|  | 
 |  | +            _this.isCompare = false
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    //生命周期 - 创建完成(可以访问当前this实例)
 |  |    //生命周期 - 创建完成(可以访问当前this实例)
 |