|
@@ -139,7 +139,7 @@
|
|
|
<span>{{ list3.sentence_list.length }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- <div class="right">
|
|
|
+ <div class="right">
|
|
|
<div
|
|
|
@click="cutPattern(0)"
|
|
|
:class="[lijuPatternIndex == 0 ? 'sele' : '']"
|
|
@@ -152,7 +152,7 @@
|
|
|
>
|
|
|
KWIC模式
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div :class="['liju', lijuPatternIndex == 1 ? 'KWIC_liju' : '']">
|
|
|
<div v-if="lijuPatternIndex == 1" class="sort_dv">
|
|
@@ -554,6 +554,7 @@ export default {
|
|
|
};
|
|
|
this.loading1 = false;
|
|
|
this.list1 = res;
|
|
|
+ console.log(this.list1);
|
|
|
if (res.sentence_list.length > 0) {
|
|
|
this.list1.sentence_list = this.handleExample(res.sentence_list);
|
|
|
this.list1.sentence_list_sort_left = this.handleExample(
|
|
@@ -746,72 +747,39 @@ export default {
|
|
|
list = list.map((item, index) => {
|
|
|
if (type == "left") {
|
|
|
let sentence = JSON.parse(JSON.stringify(item.sentence));
|
|
|
- let arr = sentence.split("");
|
|
|
+ let arr = JSON.parse(JSON.stringify(item.sentence_fc_list));
|
|
|
arr.forEach((items, indexs) => {
|
|
|
- if (item.end_position - item.begin_position > 1) {
|
|
|
- if (
|
|
|
- indexs >= item.begin_position &&
|
|
|
- indexs < item.end_position
|
|
|
- ) {
|
|
|
- arr[
|
|
|
- indexs
|
|
|
- ] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs]}</span>`;
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (indexs == item.begin_position) {
|
|
|
- arr[
|
|
|
- indexs
|
|
|
- ] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs]}</span>`;
|
|
|
- }
|
|
|
+ if (indexs == item.sentence_fc_list_word_index) {
|
|
|
+ arr[
|
|
|
+ indexs
|
|
|
+ ] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs]}</span>`;
|
|
|
}
|
|
|
});
|
|
|
- let data = this.changefiveword(arr, item.begin_position, type);
|
|
|
+ let data = this.changefiveword(arr, item.sentence_fc_list_word_index, type);
|
|
|
item.resArr = data;
|
|
|
} else if (type == "right") {
|
|
|
let sentence = JSON.parse(JSON.stringify(item.sentence));
|
|
|
- let arr = sentence.split("");
|
|
|
+ let arr = JSON.parse(JSON.stringify(item.sentence_fc_list));
|
|
|
arr.forEach((items, indexs) => {
|
|
|
- if (item.end_position - item.begin_position > 1) {
|
|
|
- if (
|
|
|
- indexs >= item.begin_position &&
|
|
|
- indexs < item.end_position
|
|
|
- ) {
|
|
|
- arr[
|
|
|
- indexs
|
|
|
- ] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs]}</span>`;
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (indexs == item.begin_position) {
|
|
|
- arr[
|
|
|
- indexs
|
|
|
- ] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs]}</span>`;
|
|
|
- }
|
|
|
+ if (indexs == item.sentence_fc_list_word_index) {
|
|
|
+ arr[
|
|
|
+ indexs
|
|
|
+ ] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs]}</span>`;
|
|
|
}
|
|
|
});
|
|
|
- let data = this.changefiveword(arr, item.begin_position, type);
|
|
|
+ let data = this.changefiveword(arr, item.sentence_fc_list_word_index, type);
|
|
|
item.resArr = data;
|
|
|
} else if (type == "mid") {
|
|
|
let sentence = JSON.parse(JSON.stringify(item.sentence));
|
|
|
- let arr = sentence.split("");
|
|
|
+ let arr = JSON.parse(JSON.stringify(item.sentence_fc_list));
|
|
|
arr.forEach((items, indexs) => {
|
|
|
- if (item.end_position - item.begin_position > 1) {
|
|
|
- if (
|
|
|
- indexs >= item.begin_position &&
|
|
|
- indexs < item.end_position
|
|
|
- ) {
|
|
|
- arr[
|
|
|
- indexs
|
|
|
- ] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs]}</span>`;
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (indexs == item.begin_position) {
|
|
|
- arr[
|
|
|
- indexs
|
|
|
- ] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs]}</span>`;
|
|
|
- }
|
|
|
+ if (indexs == item.sentence_fc_list_word_index) {
|
|
|
+ arr[
|
|
|
+ indexs
|
|
|
+ ] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs]}</span>`;
|
|
|
}
|
|
|
});
|
|
|
- let data = this.changefiveword(arr, item.begin_position, type);
|
|
|
+ let data = this.changefiveword(arr, item.sentence_fc_list_word_index, type);
|
|
|
item.resArr = data;
|
|
|
} else {
|
|
|
let newsentence = JSON.parse(JSON.stringify(item.sentence));
|
|
@@ -872,23 +840,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changefiveword(arr, index, type) {
|
|
|
- // arr.forEach((item, i) => {
|
|
|
- // if (this.chsFhList.indexOf(item) != -1) {
|
|
|
- // arr[i - 1] = arr[i - 1] + arr[i];
|
|
|
- // arr[i] = "";
|
|
|
- // }
|
|
|
- // });
|
|
|
- // arr.forEach((item, i) => {
|
|
|
- // if (item == "") {
|
|
|
- // arr.splice(i, 1);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // arr.forEach((item, i) => {
|
|
|
- // if (item.indexOf("color") != -1) {
|
|
|
- // index = i;
|
|
|
- // }
|
|
|
- // });
|
|
|
- let str = "";
|
|
|
let num = 6;
|
|
|
let colorIndex = 0;
|
|
|
let colorList = ["#4D7EFF", "#1DAA91", "#A4430F", "#FF5757", "#9031AA"];
|
|
@@ -929,7 +880,6 @@ export default {
|
|
|
} else {
|
|
|
arr3.push(item);
|
|
|
}
|
|
|
- str += item;
|
|
|
});
|
|
|
newarr.push(arr1);
|
|
|
newarr.push(arr2);
|