|
@@ -36,11 +36,13 @@
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="result-left-numberclose">
|
|
|
- <span
|
|
|
- style="font-size: 14px; line-height: 22px; color: #333333"
|
|
|
- v-if="searchWord"
|
|
|
- >
|
|
|
- {{ SearchwordNumber }}次匹配
|
|
|
+ <span>
|
|
|
+ <span
|
|
|
+ style="font-size: 14px; line-height: 22px; color: #333333"
|
|
|
+ v-if="searchWordShow"
|
|
|
+ >
|
|
|
+ {{ SearchwordNumber }}次匹配
|
|
|
+ </span>
|
|
|
</span>
|
|
|
<span class="resule-right-btn" @click="clearSelected('all')"
|
|
|
>清除标记</span
|
|
@@ -115,7 +117,7 @@
|
|
|
<span class="precent">{{ item.ratio }}%</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="heji">
|
|
|
+ <div class="heji" @click="allListEvent">
|
|
|
<div class="leftType">
|
|
|
<span class="color"></span>
|
|
|
<span class="type">合计</span>
|
|
@@ -128,16 +130,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tubiao" id="echarts">
|
|
|
- <template v-if="chartIndex != 3">
|
|
|
- <el-switch
|
|
|
- v-model="ratioShow"
|
|
|
- inactive-text="比例"
|
|
|
- :width="26"
|
|
|
- style="margin-left: 24px"
|
|
|
- @change="changeratioShow"
|
|
|
- >
|
|
|
- </el-switch>
|
|
|
- </template>
|
|
|
+ <div style="height: 22px">
|
|
|
+ <template v-if="chartIndex != 3">
|
|
|
+ <el-switch
|
|
|
+ v-model="ratioShow"
|
|
|
+ :inactive-text="ratioShow ? '比例' : '数量'"
|
|
|
+ :width="26"
|
|
|
+ style="margin-left: 24px"
|
|
|
+ @change="changeratioShow"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
|
|
|
<div id="main_echarts" class="main_echarts"></div>
|
|
|
<div class="cut_download">
|
|
@@ -303,58 +307,62 @@
|
|
|
v-for="(word, indexsss) in itemss.text"
|
|
|
:key="indexsss + 'word'"
|
|
|
:class="['word']"
|
|
|
- v-if="word.isShow"
|
|
|
>
|
|
|
- <span
|
|
|
- v-if="pinyinShow"
|
|
|
- :class="['pinyin']"
|
|
|
- :style="{
|
|
|
- fontSize: pinyinFontsize + 'px',
|
|
|
- lineHeight: pinyinLineHeight + 'px',
|
|
|
- }"
|
|
|
- >
|
|
|
- {{ word.pinyin }}
|
|
|
- </span>
|
|
|
- <br v-if="pinyinShow" />
|
|
|
- <span
|
|
|
- class="hanzi"
|
|
|
- :style="{
|
|
|
- fontSize: wordFontsize + 'px',
|
|
|
- lineHeight: wordLineHeight + 'px',
|
|
|
- background: word.color ? word.color : '',
|
|
|
- color: word.color
|
|
|
- ? '#FFFFFF'
|
|
|
- : !xifen
|
|
|
- ? leftNavIndex == 0
|
|
|
- ? seleLevelMapList.indexOf(word.levels.P_G) != -1
|
|
|
- ? levelMap[word.levels.P_G].color
|
|
|
+ <template v-if="word.isShow">
|
|
|
+ <span
|
|
|
+ v-if="pinyinShow"
|
|
|
+ :class="['pinyin']"
|
|
|
+ :style="{
|
|
|
+ fontSize: pinyinFontsize + 'px',
|
|
|
+ lineHeight: pinyinLineHeight + 'px',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ {{ word.pinyin }}
|
|
|
+ </span>
|
|
|
+ <br v-if="pinyinShow" />
|
|
|
+ <span
|
|
|
+ class="hanzi"
|
|
|
+ :style="{
|
|
|
+ fontSize: wordFontsize + 'px',
|
|
|
+ lineHeight: wordLineHeight + 'px',
|
|
|
+ background: word.color ? word.color : '',
|
|
|
+ color: word.color
|
|
|
+ ? '#FFFFFF'
|
|
|
+ : !xifen
|
|
|
+ ? leftNavIndex == 0
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.P_G) !=
|
|
|
+ -1
|
|
|
+ ? levelMap[word.levels.P_G].color
|
|
|
+ : ''
|
|
|
+ : leftNavIndex == 1
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.W_G) !=
|
|
|
+ -1
|
|
|
+ ? levelMap[word.levels.W_G].color
|
|
|
+ : ''
|
|
|
+ : leftNavIndex == 2
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.C_G) !=
|
|
|
+ -1
|
|
|
+ ? levelMap[word.levels.C_G].color
|
|
|
+ : ''
|
|
|
+ : ''
|
|
|
+ : leftNavIndex == 0
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.P_L) != -1
|
|
|
+ ? levelMap[word.levels.P_L].color
|
|
|
: ''
|
|
|
: leftNavIndex == 1
|
|
|
- ? seleLevelMapList.indexOf(word.levels.W_G) != -1
|
|
|
- ? levelMap[word.levels.W_G].color
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.W_L) != -1
|
|
|
+ ? levelMap[word.levels.W_L].color
|
|
|
: ''
|
|
|
: leftNavIndex == 2
|
|
|
- ? seleLevelMapList.indexOf(word.levels.C_G) != -1
|
|
|
- ? levelMap[word.levels.C_G].color
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.C_L) != -1
|
|
|
+ ? levelMap[word.levels.C_L].color
|
|
|
: ''
|
|
|
- : ''
|
|
|
- : leftNavIndex == 0
|
|
|
- ? seleLevelMapList.indexOf(word.levels.P_L) != -1
|
|
|
- ? levelMap[word.levels.P_L].color
|
|
|
- : ''
|
|
|
- : leftNavIndex == 1
|
|
|
- ? seleLevelMapList.indexOf(word.levels.W_L) != -1
|
|
|
- ? levelMap[word.levels.W_L].color
|
|
|
- : ''
|
|
|
- : leftNavIndex == 2
|
|
|
- ? seleLevelMapList.indexOf(word.levels.C_L) != -1
|
|
|
- ? levelMap[word.levels.C_L].color
|
|
|
- : ''
|
|
|
- : '',
|
|
|
- }"
|
|
|
- >
|
|
|
- {{ word.word }}
|
|
|
- </span>
|
|
|
+ : '',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ {{ word.word }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
</span>
|
|
|
</template>
|
|
|
<template v-else>
|
|
@@ -362,58 +370,62 @@
|
|
|
class="word"
|
|
|
v-for="(word, indexsss) in itemss.text"
|
|
|
:key="indexsss + 'word'"
|
|
|
- v-if="word.isShow"
|
|
|
>
|
|
|
- <span
|
|
|
- v-if="pinyinShow"
|
|
|
- :class="['pinyin']"
|
|
|
- :style="{
|
|
|
- fontSize: pinyinFontsize + 'px',
|
|
|
- lineHeight: pinyinLineHeight + 'px',
|
|
|
- }"
|
|
|
- >
|
|
|
- {{ word.pinyin }}
|
|
|
- </span>
|
|
|
- <br v-if="pinyinShow" />
|
|
|
- <span
|
|
|
- class="hanzi"
|
|
|
- :style="{
|
|
|
- fontSize: wordFontsize + 'px',
|
|
|
- lineHeight: wordLineHeight + 'px',
|
|
|
- background: word.color ? word.color : '',
|
|
|
- color: word.color
|
|
|
- ? '#FFFFFF'
|
|
|
- : !xifen
|
|
|
- ? leftNavIndex == 0
|
|
|
- ? seleLevelMapList.indexOf(word.levels.P_G) != -1
|
|
|
- ? levelMap[word.levels.P_G].color
|
|
|
+ <template v-if="word.isShow">
|
|
|
+ <span
|
|
|
+ v-if="pinyinShow"
|
|
|
+ :class="['pinyin']"
|
|
|
+ :style="{
|
|
|
+ fontSize: pinyinFontsize + 'px',
|
|
|
+ lineHeight: pinyinLineHeight + 'px',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ {{ word.pinyin }}
|
|
|
+ </span>
|
|
|
+ <br v-if="pinyinShow" />
|
|
|
+ <span
|
|
|
+ class="hanzi"
|
|
|
+ :style="{
|
|
|
+ fontSize: wordFontsize + 'px',
|
|
|
+ lineHeight: wordLineHeight + 'px',
|
|
|
+ background: word.color ? word.color : '',
|
|
|
+ color: word.color
|
|
|
+ ? '#FFFFFF'
|
|
|
+ : !xifen
|
|
|
+ ? leftNavIndex == 0
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.P_G) !=
|
|
|
+ -1
|
|
|
+ ? levelMap[word.levels.P_G].color
|
|
|
+ : ''
|
|
|
+ : leftNavIndex == 1
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.W_G) !=
|
|
|
+ -1
|
|
|
+ ? levelMap[word.levels.W_G].color
|
|
|
+ : ''
|
|
|
+ : leftNavIndex == 2
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.C_G) !=
|
|
|
+ -1
|
|
|
+ ? levelMap[word.levels.C_G].color
|
|
|
+ : ''
|
|
|
+ : ''
|
|
|
+ : leftNavIndex == 0
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.P_L) != -1
|
|
|
+ ? levelMap[word.levels.P_L].color
|
|
|
: ''
|
|
|
: leftNavIndex == 1
|
|
|
- ? seleLevelMapList.indexOf(word.levels.W_G) != -1
|
|
|
- ? levelMap[word.levels.W_G].color
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.W_L) != -1
|
|
|
+ ? levelMap[word.levels.W_L].color
|
|
|
: ''
|
|
|
: leftNavIndex == 2
|
|
|
- ? seleLevelMapList.indexOf(word.levels.C_G) != -1
|
|
|
- ? levelMap[word.levels.C_G].color
|
|
|
+ ? seleLevelMapList.indexOf(word.levels.C_L) != -1
|
|
|
+ ? levelMap[word.levels.C_L].color
|
|
|
: ''
|
|
|
- : ''
|
|
|
- : leftNavIndex == 0
|
|
|
- ? seleLevelMapList.indexOf(word.levels.P_L) != -1
|
|
|
- ? levelMap[word.levels.P_L].color
|
|
|
- : ''
|
|
|
- : leftNavIndex == 1
|
|
|
- ? seleLevelMapList.indexOf(word.levels.W_L) != -1
|
|
|
- ? levelMap[word.levels.W_L].color
|
|
|
- : ''
|
|
|
- : leftNavIndex == 2
|
|
|
- ? seleLevelMapList.indexOf(word.levels.C_L) != -1
|
|
|
- ? levelMap[word.levels.C_L].color
|
|
|
- : ''
|
|
|
- : '',
|
|
|
- }"
|
|
|
- >
|
|
|
- {{ word.word }}
|
|
|
- </span>
|
|
|
+ : '',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ {{ word.word }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
</span>
|
|
|
</template>
|
|
|
</span>
|
|
@@ -486,6 +498,7 @@ export default {
|
|
|
],
|
|
|
SearchwordNumber: 0,
|
|
|
searchWord: [],
|
|
|
+ searchWordShow: false,
|
|
|
type: "",
|
|
|
headerText: "wordCount",
|
|
|
xifen: false,
|
|
@@ -584,6 +597,17 @@ export default {
|
|
|
let converted = htmlDocx.asBlob(content);
|
|
|
FileSaver.saveAs(converted, "文章.docx");
|
|
|
},
|
|
|
+ // 全部高亮
|
|
|
+ allListEvent() {
|
|
|
+ if (this.seleLevelMapList.length == this.leftList.length) {
|
|
|
+ this.seleLevelMapList = [];
|
|
|
+ } else {
|
|
|
+ this.seleLevelMapList = [];
|
|
|
+ this.leftList.forEach((item) => {
|
|
|
+ this.seleLevelMapList.push(item.name);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
// 选择高亮等级
|
|
|
levelMapListEvent(item) {
|
|
|
this.clearSelected();
|
|
@@ -599,6 +623,12 @@ export default {
|
|
|
data.forEach((item) => {
|
|
|
item.ratio = item.ratio + "%";
|
|
|
});
|
|
|
+ let obj = {
|
|
|
+ name: "合计",
|
|
|
+ ratio: this.allRatio,
|
|
|
+ value: this.allValue + "%",
|
|
|
+ };
|
|
|
+ data.push(obj);
|
|
|
var excelDatas = [
|
|
|
{
|
|
|
tHeader: ["等级", "数量", "占比"],
|
|
@@ -695,6 +725,7 @@ export default {
|
|
|
if (!this.searchVal) {
|
|
|
return;
|
|
|
}
|
|
|
+ this.searchWordShow = true;
|
|
|
this.closelevelMaphighlight();
|
|
|
let index = this.searchWord.indexOf(this.searchVal.toLowerCase());
|
|
|
if (index == -1) {
|
|
@@ -854,7 +885,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
changeratioShow() {
|
|
|
- this.createEcharts("main_echarts", "柱状图", this.leftList, 0);
|
|
|
+ this.createEcharts(
|
|
|
+ "main_echarts",
|
|
|
+ "柱状图",
|
|
|
+ this.leftList,
|
|
|
+ this.chartIndex
|
|
|
+ );
|
|
|
},
|
|
|
// 图表
|
|
|
createEcharts(id, type, data, index) {
|
|
@@ -939,8 +975,12 @@ export default {
|
|
|
{
|
|
|
name: "Access From",
|
|
|
type: "pie",
|
|
|
- radius: ["40%", "70%"],
|
|
|
+ // radius: ["40%", "70%"],
|
|
|
+ radius: ["20%", "50%"],
|
|
|
data: newdata,
|
|
|
+ label: {
|
|
|
+ fontSize: 8,
|
|
|
+ },
|
|
|
itemStyle: {
|
|
|
borderColor: "#f5f5f5",
|
|
|
borderWidth: 5,
|
|
@@ -984,11 +1024,14 @@ export default {
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: "value",
|
|
|
+ axisLabel: {
|
|
|
+ formatter: this.ratioShow ? "{value}%" : "{value}",
|
|
|
+ },
|
|
|
},
|
|
|
grid: {
|
|
|
- left: 1,
|
|
|
- right: 1,
|
|
|
- bottom: 1,
|
|
|
+ left: 20,
|
|
|
+ right: 20,
|
|
|
+ bottom: 0,
|
|
|
containLabel: true,
|
|
|
},
|
|
|
series: [
|
|
@@ -1042,11 +1085,14 @@ export default {
|
|
|
color: "#5470c6",
|
|
|
yAxis: {
|
|
|
type: "value",
|
|
|
+ axisLabel: {
|
|
|
+ formatter: this.ratioShow ? "{value}%" : "{value}",
|
|
|
+ },
|
|
|
},
|
|
|
grid: {
|
|
|
- left: 1,
|
|
|
- right: 1,
|
|
|
- bottom: 1,
|
|
|
+ left: 20,
|
|
|
+ right: 20,
|
|
|
+ bottom: 0,
|
|
|
containLabel: true,
|
|
|
},
|
|
|
|
|
@@ -1182,6 +1228,7 @@ export default {
|
|
|
item.ratio = ((item.value / this.allValue) * 100).toFixed(2);
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
this.allRatio = this.allRatio.toFixed(2);
|
|
|
this.leftList = res.data.result;
|
|
|
|
|
@@ -1208,7 +1255,13 @@ export default {
|
|
|
},
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- this.ArticelData = res.data.result;
|
|
|
+ let newdata = [];
|
|
|
+ res.data.result.forEach((item, i) => {
|
|
|
+ if (item.length != 0) {
|
|
|
+ newdata.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.ArticelData = newdata;
|
|
|
let str = "";
|
|
|
// 合并标点
|
|
|
this.ArticelData.forEach((item) => {
|
|
@@ -1218,8 +1271,12 @@ export default {
|
|
|
if (this.chsFhList.indexOf(itemsss.word) != -1) {
|
|
|
let obj = JSON.parse(JSON.stringify(itemsss));
|
|
|
obj.isShow = true;
|
|
|
- items[index - 1].text.push(obj);
|
|
|
- itemsss.isShow = false;
|
|
|
+ if (index > 0) {
|
|
|
+ items[index - 1].text.push(obj);
|
|
|
+ itemsss.isShow = false;
|
|
|
+ } else {
|
|
|
+ itemsss.isShow = true;
|
|
|
+ }
|
|
|
} else {
|
|
|
itemsss.isShow = true;
|
|
|
}
|
|
@@ -1243,7 +1300,6 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
let arr = [];
|
|
|
- console.log(arr);
|
|
|
this.ArticelData.forEach((item, i) => {
|
|
|
arr.push([]);
|
|
|
item.forEach((items) => {
|
|
@@ -1706,6 +1762,9 @@ export default {
|
|
|
font-size: 14px;
|
|
|
line-height: 22px;
|
|
|
color: #a6a6a6;
|
|
|
+ > div {
|
|
|
+ margin-left: 24px;
|
|
|
+ }
|
|
|
.line {
|
|
|
display: inline-block;
|
|
|
height: 12px;
|