|  | @@ -57,6 +57,7 @@
 | 
	
		
			
				|  |  |                      <template v-if="pItem.isShow">
 | 
	
		
			
				|  |  |                        <template
 | 
	
		
			
				|  |  |                          v-if="
 | 
	
		
			
				|  |  | +                          item.wordsList[pIndex + 1] &&
 | 
	
		
			
				|  |  |                            item.wordsList[pIndex + 1].chs &&
 | 
	
		
			
				|  |  |                            chsFhList.indexOf(item.wordsList[pIndex + 1].chs) > -1
 | 
	
		
			
				|  |  |                          "
 | 
	
	
		
			
				|  | @@ -127,9 +128,12 @@
 | 
	
		
			
				|  |  |                              pItem.padding ? 'padding' : '',
 | 
	
		
			
				|  |  |                              pItem.className ? pItem.className : '',
 | 
	
		
			
				|  |  |                            ]"
 | 
	
		
			
				|  |  | +                          @click="viewNotes($event, pItem.pinyin)"
 | 
	
		
			
				|  |  |                            >{{ pItem.pinyin }}</span
 | 
	
		
			
				|  |  |                          >
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                          <span
 | 
	
		
			
				|  |  | +                          v-if="pItem.chs != '#'"
 | 
	
		
			
				|  |  |                            class="NNPE-chs"
 | 
	
		
			
				|  |  |                            :class="[
 | 
	
		
			
				|  |  |                              item.timeList.length > 0 &&
 | 
	
	
		
			
				|  | @@ -209,6 +213,28 @@ export default {
 | 
	
		
			
				|  |  |        curTime: 0, //单位s
 | 
	
		
			
				|  |  |        chsFhList: [",", "。", "“", ":", "》", "《", "?", "!", ";"],
 | 
	
		
			
				|  |  |        enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
 | 
	
		
			
				|  |  | +      NumberList: [
 | 
	
		
			
				|  |  | +        "①",
 | 
	
		
			
				|  |  | +        "②",
 | 
	
		
			
				|  |  | +        "③",
 | 
	
		
			
				|  |  | +        "④",
 | 
	
		
			
				|  |  | +        "⑤",
 | 
	
		
			
				|  |  | +        "⑥",
 | 
	
		
			
				|  |  | +        "⑦",
 | 
	
		
			
				|  |  | +        "⑧",
 | 
	
		
			
				|  |  | +        "⑨",
 | 
	
		
			
				|  |  | +        "⑩",
 | 
	
		
			
				|  |  | +        "⑪",
 | 
	
		
			
				|  |  | +        "⑫",
 | 
	
		
			
				|  |  | +        "⑬",
 | 
	
		
			
				|  |  | +        "⑭",
 | 
	
		
			
				|  |  | +        "⑮",
 | 
	
		
			
				|  |  | +        "⑯",
 | 
	
		
			
				|  |  | +        "⑰",
 | 
	
		
			
				|  |  | +        "⑱",
 | 
	
		
			
				|  |  | +        "⑲",
 | 
	
		
			
				|  |  | +        "⑳",
 | 
	
		
			
				|  |  | +      ],
 | 
	
		
			
				|  |  |        newWords: ["鱼", "辩礼义"],
 | 
	
		
			
				|  |  |        oldHz: "",
 | 
	
		
			
				|  |  |        hz: "",
 | 
	
	
		
			
				|  | @@ -216,10 +242,44 @@ export default {
 | 
	
		
			
				|  |  |        left: 0,
 | 
	
		
			
				|  |  |        articleImg: {}, // 文章图片
 | 
	
		
			
				|  |  |        isHasRemark: false,
 | 
	
		
			
				|  |  | +      isNoteShow: false,
 | 
	
		
			
				|  |  | +      noteNum: "",
 | 
	
		
			
				|  |  | +      oldNoteNum: "",
 | 
	
		
			
				|  |  | +      clientY: 0,
 | 
	
		
			
				|  |  | +      top: 0,
 | 
	
		
			
				|  |  | +      left: 0,
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    computed: {},
 | 
	
		
			
				|  |  | -  watch: {},
 | 
	
		
			
				|  |  | +  watch: {
 | 
	
		
			
				|  |  | +    noteNum: {
 | 
	
		
			
				|  |  | +      handler: function (val, oldVal) {
 | 
	
		
			
				|  |  | +        let _this = this;
 | 
	
		
			
				|  |  | +        if (val) {
 | 
	
		
			
				|  |  | +          _this.handleNote(val);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      // 深度观察监听
 | 
	
		
			
				|  |  | +      deep: true,
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    isNoteShow: {
 | 
	
		
			
				|  |  | +      handler: function (val, oldVal) {
 | 
	
		
			
				|  |  | +        let _this = this;
 | 
	
		
			
				|  |  | +        if (val) {
 | 
	
		
			
				|  |  | +          setTimeout(() => {
 | 
	
		
			
				|  |  | +            _this.cardHeight = _this.$refs.wordcard.offsetHeight;
 | 
	
		
			
				|  |  | +            if (_this.screenHeight - _this.clientY > _this.cardHeight) {
 | 
	
		
			
				|  |  | +              _this.top = _this.clientY + 20;
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +              _this.top = _this.clientY - _this.cardHeight - 30;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          }, 50);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      // 深度观察监听
 | 
	
		
			
				|  |  | +      deep: true,
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  |    //方法集合
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      handleWav() {},
 | 
	
	
		
			
				|  | @@ -241,7 +301,7 @@ export default {
 | 
	
		
			
				|  |  |          dItem.wordsList.forEach((sItem, sIndex) => {
 | 
	
		
			
				|  |  |            sItem.forEach((wItem, wIndex) => {
 | 
	
		
			
				|  |  |              //this.judgePad(sItem, wItem, wIndex);
 | 
	
		
			
				|  |  | -            this.mergeWordSymbol(sItem, wItem, wIndex);
 | 
	
		
			
				|  |  | +            this.mergeWordSymbol(wItem, wIndex);
 | 
	
		
			
				|  |  |              let obj = {
 | 
	
		
			
				|  |  |                paraIndex: dIndex, //段落索引
 | 
	
		
			
				|  |  |                sentIndex: sIndex, //在段落中句子索引
 | 
	
	
		
			
				|  | @@ -290,14 +350,11 @@ export default {
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //词和标点合一起
 | 
	
		
			
				|  |  | -    mergeWordSymbol(sItem, wItem, curIndex) {
 | 
	
		
			
				|  |  | -      let leg = sItem.length;
 | 
	
		
			
				|  |  | -      if (curIndex < leg - 1) {
 | 
	
		
			
				|  |  | -        if (this.chsFhList.indexOf(wItem.chs) > -1) {
 | 
	
		
			
				|  |  | -          wItem.isShow = false;
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -          wItem.isShow = true;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +    mergeWordSymbol(wItem, curIndex) {
 | 
	
		
			
				|  |  | +      if (this.chsFhList.indexOf(wItem.chs) > -1) {
 | 
	
		
			
				|  |  | +        wItem.isShow = false;
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        wItem.isShow = true;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //获取角色
 | 
	
	
		
			
				|  | @@ -346,8 +403,54 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //点击播放某个句子
 | 
	
		
			
				|  |  |      handleChangeTime(time) {
 | 
	
		
			
				|  |  | -      this.curTime = time;
 | 
	
		
			
				|  |  | -      this.$refs.audioLine.onTimeupdateTime(time / 1000);
 | 
	
		
			
				|  |  | +      if (item.timeList && item.timeList.length > 0) {
 | 
	
		
			
				|  |  | +        this.curTime = time;
 | 
	
		
			
				|  |  | +        this.$refs.audioLine.onTimeupdateTime(time / 1000);
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    viewNotes(e, noteNum) {
 | 
	
		
			
				|  |  | +      let _this = this;
 | 
	
		
			
				|  |  | +      let noteIndex = "";
 | 
	
		
			
				|  |  | +      if (_this.NumberList.indexOf(noteNum) > -1) {
 | 
	
		
			
				|  |  | +        for (let i = 0; i < _this.NumberList.length; i++) {
 | 
	
		
			
				|  |  | +          if (_this.NumberList[i] == noteNum) {
 | 
	
		
			
				|  |  | +            _this.noteIndex = "" + i + "";
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.showNoteDetail(e, noteIndex);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    showNoteDetail(e, noteNum) {
 | 
	
		
			
				|  |  | +      let _this = this;
 | 
	
		
			
				|  |  | +      if (_this.oldNoteNum != noteNum) {
 | 
	
		
			
				|  |  | +        this.isNoteShow = false;
 | 
	
		
			
				|  |  | +        setTimeout(() => {
 | 
	
		
			
				|  |  | +          _this.noteNum = noteNum;
 | 
	
		
			
				|  |  | +        }, 50);
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      _this.clientY = e.clientY;
 | 
	
		
			
				|  |  | +      let left = e.clientX;
 | 
	
		
			
				|  |  | +      let width = 0;
 | 
	
		
			
				|  |  | +      if (item.chs.length == 1 || item.chs.length == 2) {
 | 
	
		
			
				|  |  | +        width = 304;
 | 
	
		
			
				|  |  | +      } else if (item.chs.length == 3 || item.chs.length == 4) {
 | 
	
		
			
				|  |  | +        width = 432;
 | 
	
		
			
				|  |  | +      } else if (item.chs.length > 3) {
 | 
	
		
			
				|  |  | +        width = 560;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (left - this.bodyLeft > this.contentWidth / 2) {
 | 
	
		
			
				|  |  | +        _this.left = left - width + 10;
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        _this.left = left;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 处理分词数据
 | 
	
		
			
				|  |  | +    handleNote(val) {
 | 
	
		
			
				|  |  | +      let _this = this;
 | 
	
		
			
				|  |  | +      _this.isNoteShow = true;
 | 
	
		
			
				|  |  | +      _this.oldNoteNum = val;
 | 
	
		
			
				|  |  | +      //this.
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    //生命周期 - 创建完成(可以访问当前this实例)
 |