|
@@ -17,10 +17,10 @@
|
|
|
>词汇</span
|
|
|
>
|
|
|
</div>
|
|
|
- <el-radio-group v-model="headText">
|
|
|
+ <!-- <el-radio-group v-model="headText">
|
|
|
<el-radio :label="1">词头</el-radio>
|
|
|
<el-radio :label="2">文本</el-radio>
|
|
|
- </el-radio-group>
|
|
|
+ </el-radio-group> -->
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
<div class="seek">
|
|
@@ -88,11 +88,11 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="freq" label="频数" width="108" sortable>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="" label="比例" width="110" sortable>
|
|
|
- <template slot-scope="item">
|
|
|
+ <el-table-column prop="textRatio" label="比例" width="110" sortable>
|
|
|
+ <!-- <template slot-scope="item">
|
|
|
<span v-if="headText == 1">{{ item.row.wordRatio }}%</span>
|
|
|
<span v-else>{{ item.row.textRatio }}%</span>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="" label="备注">
|
|
|
<template slot-scope="item">
|
|
@@ -103,8 +103,10 @@
|
|
|
class="beizhu"
|
|
|
style="margin-right: 10px"
|
|
|
>
|
|
|
- <span style="font-size: 18px; font-weight: 400">
|
|
|
- {{ items.word }}
|
|
|
+ <span
|
|
|
+ style="font-size: 18px; font-weight: 400"
|
|
|
+ v-html="items.word"
|
|
|
+ >
|
|
|
</span>
|
|
|
<span
|
|
|
:style="{
|
|
@@ -168,6 +170,8 @@ export default {
|
|
|
searchType: null,
|
|
|
levelMap: null,
|
|
|
loading: false,
|
|
|
+ sortType: null,
|
|
|
+ sortField: null,
|
|
|
};
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
@@ -176,11 +180,6 @@ export default {
|
|
|
watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
- handleSizeChange(val) {
|
|
|
- this.page = 1;
|
|
|
- this.pageSize = val;
|
|
|
- this.getlist();
|
|
|
- },
|
|
|
handleCurrentChange(val) {
|
|
|
this.page = val;
|
|
|
this.getlist();
|
|
@@ -195,8 +194,8 @@ export default {
|
|
|
partitionKey: this.partitionKey,
|
|
|
searchType: this.typeIndex,
|
|
|
word: this.keyword,
|
|
|
- sortField: null,
|
|
|
- sortType: null,
|
|
|
+ sortField: this.sortField,
|
|
|
+ sortType: this.sortType,
|
|
|
},
|
|
|
})
|
|
|
.then((res) => {
|
|
@@ -218,7 +217,26 @@ export default {
|
|
|
this.page = 1;
|
|
|
this.getlist();
|
|
|
},
|
|
|
- sort_change(column) {},
|
|
|
+ sort_change(column) {
|
|
|
+ console.log(column);
|
|
|
+ if (column.prop == "pinyin") {
|
|
|
+ this.sortField = "pin_yin";
|
|
|
+ } else if (column.prop == "gradeName") {
|
|
|
+ this.sortField = "grade_id";
|
|
|
+ } else if (column.prop == "levelName") {
|
|
|
+ this.sortField = "level_id";
|
|
|
+ } else if (column.prop == "textRatio") {
|
|
|
+ this.sortField = "text_ratio";
|
|
|
+ } else {
|
|
|
+ this.sortField = column.prop;
|
|
|
+ }
|
|
|
+ if (column.order == "descending") {
|
|
|
+ this.sortType = 1;
|
|
|
+ } else {
|
|
|
+ this.sortType = 0;
|
|
|
+ }
|
|
|
+ this.getlist();
|
|
|
+ },
|
|
|
cutType(index) {
|
|
|
this.typeIndex = index;
|
|
|
this.page1getdata();
|