|
@@ -34,7 +34,7 @@
|
|
|
/>
|
|
|
<div class="Highlight" v-if="item.hzDetail.hz_json">
|
|
|
<div class="play_audio">
|
|
|
- <img src="../../assets/teacherdev/speaker-one.png" alt="" />
|
|
|
+ <!-- <img src="../../assets/teacherdev/speaker-one.png" alt="" /> -->
|
|
|
<span>{{ item.pinyin }}</span>
|
|
|
</div>
|
|
|
<div v-for="(items, indexs) in item.hzDetail.hz_json.medians.length" :key="'row' + indexs" class="row">
|
|
@@ -149,14 +149,28 @@
|
|
|
<!--
|
|
|
:class="['speaker-' + sizeIndex + '-' + pinyinShow]"
|
|
|
-->
|
|
|
- <img src="../../assets/teacherdev/speaker-one.png" alt="" />
|
|
|
+ <!-- <img src="../../assets/teacherdev/speaker-one.png" alt="" /> -->
|
|
|
<div class="words">
|
|
|
- <span
|
|
|
- :style="{
|
|
|
- fontSize: conSize + 'px'
|
|
|
- }"
|
|
|
- v-html="item.res"
|
|
|
- ></span>
|
|
|
+ <template v-if="item.sentence_fc_list_style.length>1">
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ fontSize: conSize + 'px',
|
|
|
+ padding: fenciShow?'0 2px':''
|
|
|
+ }"
|
|
|
+ v-for="(items,indexs) in item.sentence_fc_list_style"
|
|
|
+ :key="indexs"
|
|
|
+ v-html="items"
|
|
|
+ ></span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ fontSize: conSize + 'px',
|
|
|
+ padding: fenciShow?'0 2px':''
|
|
|
+ }"
|
|
|
+ v-html="item.res"
|
|
|
+ ></span>
|
|
|
+ </template>
|
|
|
<template v-if="shiyiShow && item.word_definition_list.length > 0">
|
|
|
<span class="shiyi">
|
|
|
(
|
|
@@ -213,7 +227,7 @@
|
|
|
<template v-if="indexs===0&&KWIC_sortIndex === 0">
|
|
|
<el-tooltip effect="dark" placement="bottom" style="display:inline">
|
|
|
<div slot="content">
|
|
|
- {{item.adjoin_fc_frequency_list_left[indext]}}
|
|
|
+ {{item.adjoin_fc_frequency_list_left&&item.adjoin_fc_frequency_list_left[indext]?item.adjoin_fc_frequency_list_left[indext]:1}}
|
|
|
</div>
|
|
|
<div class="">
|
|
|
<span v-html="txts"></span>
|
|
@@ -223,7 +237,7 @@
|
|
|
<template v-else-if="indexs===2&&KWIC_sortIndex === 2">
|
|
|
<el-tooltip effect="dark" placement="bottom" style="display:inline">
|
|
|
<div slot="content">
|
|
|
- {{item.adjoin_fc_frequency_list_right[indext]}}
|
|
|
+ {{item.adjoin_fc_frequency_list_right&&item.adjoin_fc_frequency_list_right[indext]?item.adjoin_fc_frequency_list_right[indext]:1}}
|
|
|
</div>
|
|
|
<div class="">
|
|
|
<span v-html="txts"></span>
|
|
@@ -334,7 +348,7 @@ export default {
|
|
|
page: 1,
|
|
|
pageSize: 30,
|
|
|
shiyiShow: true,
|
|
|
- fenciShow: true,
|
|
|
+ fenciShow: false,
|
|
|
pinyinShow: true,
|
|
|
JFIndex: 0,
|
|
|
hzData: [],
|
|
@@ -637,9 +651,7 @@ export default {
|
|
|
item.book_name = item.definition.replace(/<i>/g, "").replace(/<\/i>/g, "");
|
|
|
});
|
|
|
// 清理脏数据
|
|
|
- if(this.patternIndex === 1){
|
|
|
- this.removeRubbishData(res);
|
|
|
- }
|
|
|
+ this.removeRubbishData(res);
|
|
|
if(res.stat_list_word_definition.length===0){
|
|
|
this.rightTopIndex = 1
|
|
|
}
|
|
@@ -694,7 +706,6 @@ export default {
|
|
|
let data = this.changefiveword(arr, item.sentence_fc_list_word_index, type);
|
|
|
item.resArr = data;
|
|
|
item.adjoin_fc_frequency_list_left = item.adjoin_fc_frequency_list.splice(0,item.sentence_fc_list_word_index)
|
|
|
- item.adjoin_fc_frequency_list_right = item.adjoin_fc_frequency_list.splice(item.sentence_fc_list_word_index)
|
|
|
} else if (type == 'right') {
|
|
|
let sentence = JSON.parse(JSON.stringify(item.sentence));
|
|
|
let arr = JSON.parse(JSON.stringify(item.sentence_fc_list));
|
|
@@ -705,8 +716,7 @@ export default {
|
|
|
});
|
|
|
let data = this.changefiveword(arr, item.sentence_fc_list_word_index, type);
|
|
|
item.resArr = data;
|
|
|
- item.adjoin_fc_frequency_list_left = item.adjoin_fc_frequency_list.splice(0,item.sentence_fc_list_word_index)
|
|
|
- item.adjoin_fc_frequency_list_right = item.adjoin_fc_frequency_list.splice(item.sentence_fc_list_word_index)
|
|
|
+ item.adjoin_fc_frequency_list_right = item.adjoin_fc_frequency_list.splice(item.sentence_fc_list_word_index+1)
|
|
|
} else if (type == 'mid') {
|
|
|
let sentence = JSON.parse(JSON.stringify(item.sentence));
|
|
|
let arr = JSON.parse(JSON.stringify(item.sentence_fc_list));
|
|
@@ -717,10 +727,9 @@ export default {
|
|
|
});
|
|
|
let data = this.changefiveword(arr, item.sentence_fc_list_word_index, type);
|
|
|
item.resArr = data;
|
|
|
- item.adjoin_fc_frequency_list_left = item.adjoin_fc_frequency_list.splice(0,item.sentence_fc_list_word_index)
|
|
|
- item.adjoin_fc_frequency_list_right = item.adjoin_fc_frequency_list.splice(item.sentence_fc_list_word_index)
|
|
|
} else {
|
|
|
this.scoreAHitNumber += item.position_list.length;
|
|
|
+ let sentence_fc_list_style = []
|
|
|
let newsentence = JSON.parse(JSON.stringify(item.sentence));
|
|
|
let res = '';
|
|
|
for (let i = 0; i < item.position_list.length; i++) {
|
|
@@ -747,6 +756,14 @@ export default {
|
|
|
res += part1 + '<span style="color:#DE4444;">' + part2 + '</span>' + part3;
|
|
|
}
|
|
|
item.res = res;
|
|
|
+ item.sentence_fc_list.forEach((items,indexs)=>{
|
|
|
+ if(item.sentence_fc_list_word_index_list.indexOf(indexs)>-1){
|
|
|
+ sentence_fc_list_style.push('<span style="color:#DE4444;">' + items + '</span>')
|
|
|
+ }else{
|
|
|
+ sentence_fc_list_style.push(items)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ item.sentence_fc_list_style = sentence_fc_list_style
|
|
|
}
|
|
|
return item;
|
|
|
});
|
|
@@ -807,12 +824,12 @@ export default {
|
|
|
// 删除脏数据
|
|
|
removeRubbishData(data) {
|
|
|
if(data.sentence_list.length>0){
|
|
|
- for (let i = data.sentence_list.length - 1; i--; ) {
|
|
|
- if (data.sentence_list[i].sentence_fc_list.length <= 1) {
|
|
|
+ for (let i = data.sentence_list.length; i--; ) {
|
|
|
+ if (data.sentence_list[i].sentence_fc_list.length <= 1||data.sentence_list[i].sentence_fc_list_word_index===-1) {
|
|
|
data.sentence_list.splice(i, 1);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|