|
|
@@ -120,7 +120,7 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.pinyin)"
|
|
|
+ @click.stop="viewNotes($event, pItem.pinyin, '', pItem)"
|
|
|
>{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.pinyin : '' }}</span
|
|
|
>
|
|
|
<span
|
|
|
@@ -167,7 +167,7 @@
|
|
|
? attrib.topic_color
|
|
|
: pItem.config.color,
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs)"
|
|
|
+ @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs, pItem)"
|
|
|
>{{ pItem.chs[wIndex] }}</span
|
|
|
></span
|
|
|
>
|
|
|
@@ -185,7 +185,7 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.pinyin)"
|
|
|
+ @click.stop="viewNotes($event, pItem.pinyin, '', pItem)"
|
|
|
>{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.pinyin : '' }}</span
|
|
|
>
|
|
|
</span>
|
|
|
@@ -204,7 +204,9 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, item.wordsList[pIndex + 1].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, item.wordsList[pIndex + 1].pinyin, '', item.wordsList[pIndex + 1])
|
|
|
+ "
|
|
|
>{{
|
|
|
NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
|
|
|
? item.wordsList[pIndex + 1].pinyin
|
|
|
@@ -232,6 +234,8 @@
|
|
|
item.wordsList[pIndex + 1].words
|
|
|
? item.wordsList[pIndex + 1].words
|
|
|
: item.wordsList[pIndex + 1].chs,
|
|
|
+ '',
|
|
|
+ item.wordsList[pIndex + 1],
|
|
|
)
|
|
|
"
|
|
|
>{{ item.wordsList[pIndex + 1].chs }}</span
|
|
|
@@ -250,7 +254,9 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, item.wordsList[pIndex + 1].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, item.wordsList[pIndex + 1].pinyin, '', item.wordsList[pIndex + 1])
|
|
|
+ "
|
|
|
>{{
|
|
|
NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
|
|
|
? item.wordsList[pIndex + 1].pinyin
|
|
|
@@ -282,7 +288,9 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, item.wordsList[pIndex + 2].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, item.wordsList[pIndex + 2].pinyin, '', item.wordsList[pIndex + 2])
|
|
|
+ "
|
|
|
>{{
|
|
|
NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
|
|
|
? item.wordsList[pIndex + 2].pinyin
|
|
|
@@ -310,6 +318,8 @@
|
|
|
item.wordsList[pIndex + 2].words
|
|
|
? item.wordsList[pIndex + 2].words
|
|
|
: item.wordsList[pIndex + 2].chs,
|
|
|
+ '',
|
|
|
+ item.wordsList[pIndex + 2],
|
|
|
)
|
|
|
"
|
|
|
>{{ item.wordsList[pIndex + 2].chs }}</span
|
|
|
@@ -328,7 +338,9 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, item.wordsList[pIndex + 2].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, item.wordsList[pIndex + 2].pinyin, '', item.wordsList[pIndex + 2])
|
|
|
+ "
|
|
|
>{{
|
|
|
NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
|
|
|
? item.wordsList[pIndex + 2].pinyin
|
|
|
@@ -351,7 +363,7 @@
|
|
|
height:
|
|
|
attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.pinyin)"
|
|
|
+ @click.stop="viewNotes($event, pItem.pinyin, '', pItem)"
|
|
|
>{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.pinyin : '' }}</span
|
|
|
>
|
|
|
<span
|
|
|
@@ -399,7 +411,7 @@
|
|
|
? attrib.topic_color
|
|
|
: pItem.config.color,
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs)"
|
|
|
+ @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs, pItem)"
|
|
|
>{{ pItem.chs[wIndex] }}</span
|
|
|
></span
|
|
|
>
|
|
|
@@ -416,7 +428,7 @@
|
|
|
height:
|
|
|
attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.pinyin)"
|
|
|
+ @click.stop="viewNotes($event, pItem.pinyin, '', pItem)"
|
|
|
>{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.pinyin : '' }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -519,7 +531,7 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.pinyin)"
|
|
|
+ @click.stop="viewNotes($event, pItem.pinyin, '', pItem)"
|
|
|
>{{ pItem.pinyin }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -548,7 +560,9 @@
|
|
|
lineHeight:
|
|
|
attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs[wIndex], pItem.chs)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, pItem.words ? pItem.words : pItem.chs[wIndex], pItem.chs, pItem)
|
|
|
+ "
|
|
|
>{{ pItem.chs[wIndex] }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -569,7 +583,7 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.pinyin)"
|
|
|
+ @click.stop="viewNotes($event, pItem.pinyin, '', pItem)"
|
|
|
>{{ pItem.pinyin }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -591,7 +605,9 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, item.sentArr[pIndex + 1].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, item.sentArr[pIndex + 1].pinyin, '', item.sentArr[pIndex + 1])
|
|
|
+ "
|
|
|
>{{ item.sentArr[pIndex + 1].pinyin }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -616,6 +632,8 @@
|
|
|
item.sentArr[pIndex + 1].words
|
|
|
? item.sentArr[pIndex + 1].words
|
|
|
: item.sentArr[pIndex + 1].chs,
|
|
|
+ '',
|
|
|
+ item.sentArr[pIndex + 1],
|
|
|
)
|
|
|
"
|
|
|
>
|
|
|
@@ -642,7 +660,9 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, item.sentArr[pIndex + 1].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, item.sentArr[pIndex + 1].pinyin, '', item.sentArr[pIndex + 1])
|
|
|
+ "
|
|
|
>{{ item.sentArr[pIndex + 1].pinyin }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -671,7 +691,9 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, item.sentArr[pIndex + 2].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, item.sentArr[pIndex + 2].pinyin, '', item.sentArr[pIndex + 2])
|
|
|
+ "
|
|
|
>{{ item.sentArr[pIndex + 2].pinyin }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -696,6 +718,8 @@
|
|
|
item.sentArr[pIndex + 2].words
|
|
|
? item.sentArr[pIndex + 2].words
|
|
|
: item.sentArr[pIndex + 2].chs,
|
|
|
+ '',
|
|
|
+ item.sentArr[pIndex + 2],
|
|
|
)
|
|
|
"
|
|
|
>
|
|
|
@@ -722,7 +746,9 @@
|
|
|
? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
|
|
|
: '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, item.sentArr[pIndex + 1].pinyin)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, item.sentArr[pIndex + 1].pinyin, '', item.sentArr[pIndex + 1])
|
|
|
+ "
|
|
|
>{{ item.sentArr[pIndex + 2].pinyin }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -744,7 +770,7 @@
|
|
|
height:
|
|
|
attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.pinyin)"
|
|
|
+ @click.stop="viewNotes($event, pItem.pinyin, '', pItem)"
|
|
|
>{{ pItem.pinyin }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -773,7 +799,9 @@
|
|
|
lineHeight:
|
|
|
attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs[wIndex], pItem.chs)"
|
|
|
+ @click.stop="
|
|
|
+ viewNotes($event, pItem.words ? pItem.words : pItem.chs[wIndex], pItem.chs, pItem)
|
|
|
+ "
|
|
|
>{{ pItem.chs[wIndex] }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -793,7 +821,7 @@
|
|
|
height:
|
|
|
attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
|
|
|
}"
|
|
|
- @click.stop="viewNotes($event, pItem.pinyin)"
|
|
|
+ @click.stop="viewNotes($event, pItem.pinyin, '', pItem)"
|
|
|
>{{ pItem.pinyin }}</span
|
|
|
>
|
|
|
</template>
|
|
|
@@ -1189,6 +1217,10 @@ export default {
|
|
|
border: wItem.border,
|
|
|
fontWeight: wItem.fontWeight,
|
|
|
},
|
|
|
+ matchWords: wItem.matchWords,
|
|
|
+ matchNotes: wItem.matchNotes,
|
|
|
+ img: wItem.img,
|
|
|
+ imgPosition: wItem.imgPosition,
|
|
|
};
|
|
|
paraArr.push(obj);
|
|
|
if (wItem.pinyin) dhaspinyin = true;
|
|
|
@@ -1252,6 +1284,10 @@ export default {
|
|
|
border: wItem.border,
|
|
|
fontWeight: wItem.fontWeight,
|
|
|
},
|
|
|
+ matchWords: wItem.matchWords,
|
|
|
+ matchNotes: wItem.matchNotes,
|
|
|
+ img: wItem.img,
|
|
|
+ imgPosition: wItem.imgPosition,
|
|
|
};
|
|
|
sentArr.push(obj);
|
|
|
});
|
|
|
@@ -1496,7 +1532,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- viewNotes(e, noteNum, noteNums) {
|
|
|
+ viewNotes(e, noteNum, noteNums, words) {
|
|
|
let _this = this;
|
|
|
_this.clickType = 'note';
|
|
|
_this.activeWord = null;
|
|
|
@@ -1509,6 +1545,17 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.showNoteDetail(e, noteIndex);
|
|
|
+ } else if (words.matchNotes) {
|
|
|
+ // 关联了注释
|
|
|
+ if (_this.NNPEAnnotationList && _this.NNPEAnnotationList.length > 0) {
|
|
|
+ _this.NNPEAnnotationList.forEach((item, indexs) => {
|
|
|
+ let textContent = item.con.replace(/<[^>]*>?/gm, '');
|
|
|
+ if (textContent === words.matchNotes.trim()) {
|
|
|
+ noteIndex = `${String(indexs)}`;
|
|
|
+ this.showNoteDetail(e, noteIndex);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
} else if (this.newWordList.indexOf(noteNum) > -1) {
|
|
|
if (_this.oldHz !== noteNum) {
|
|
|
this.isShow = false;
|
|
|
@@ -1540,7 +1587,7 @@ export default {
|
|
|
} else {
|
|
|
_this.left = left;
|
|
|
}
|
|
|
- } else if (this.newWordList.indexOf(noteNums) > -1) {
|
|
|
+ } else if (noteNums && this.newWordList.indexOf(noteNums) > -1) {
|
|
|
if (_this.oldHz !== noteNums) {
|
|
|
this.isShow = false;
|
|
|
_this.NNPENewWordList.forEach((items) => {
|
|
|
@@ -1571,6 +1618,38 @@ export default {
|
|
|
} else {
|
|
|
_this.left = left;
|
|
|
}
|
|
|
+ } else if (words.matchWords && this.newWordList.indexOf(words.matchWords) > -1) {
|
|
|
+ // 关联了生词
|
|
|
+ if (_this.oldHz !== words.matchWords) {
|
|
|
+ this.isShow = false;
|
|
|
+ _this.NNPENewWordList.forEach((items) => {
|
|
|
+ // item.forEach((items) => {
|
|
|
+ if (items.new_word === words.matchWords) {
|
|
|
+ this.activeWord = items;
|
|
|
+ }
|
|
|
+ // });
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.hz = words.matchWords;
|
|
|
+ }, 50);
|
|
|
+ }
|
|
|
+ _this.clientY = e.clientY;
|
|
|
+ let left = e.clientX;
|
|
|
+ let width = 0;
|
|
|
+
|
|
|
+ if (words.matchWords.length === 1 || words.matchWords.length === 2) {
|
|
|
+ width = 304;
|
|
|
+ } else if (words.matchWords.length === 3 || words.matchWords.length === 4) {
|
|
|
+ width = 432;
|
|
|
+ } else if (words.matchWords.length > 3) {
|
|
|
+ width = 560;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (left - this.bodyLeft > this.contentWidth / 2) {
|
|
|
+ _this.left = left - width + 10;
|
|
|
+ } else {
|
|
|
+ _this.left = left;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
showNoteDetail(e, noteNum) {
|