数据统计
This commit is contained in:
@@ -6,13 +6,8 @@
|
|||||||
<div class="item_num">{{ Number(info.recordSum) }}</div>
|
<div class="item_num">{{ Number(info.recordSum) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="item_name">群聊敏感词</div>
|
<div class="item_name">本月群聊敏感词</div>
|
||||||
<div class="item_num">{{ Number(info.groupRecordSum) }}</div>
|
<div class="item_num">{{ Number(info.recordNowMonthSum) }}</div>
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<div class="item_name">私聊敏感词</div>
|
|
||||||
<div class="item_num">{{ Number(info.personRecordSum) }}</div>
|
|
||||||
<!-- <img src="../img/down.png" alt="" class="imgs" v-show="info.personRecordSum !=0"> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -29,7 +24,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="head">
|
<div class="head">
|
||||||
<span>单聊敏感词统计</span>
|
<span>敏感词分类统计</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="groups_box">
|
<div class="groups_box">
|
||||||
<div id="user" v-if="userData.length > 0"></div>
|
<div id="user" v-if="userData.length > 0"></div>
|
||||||
@@ -70,7 +65,7 @@ export default {
|
|||||||
getData() {
|
getData() {
|
||||||
this.$http
|
this.$http
|
||||||
.post(
|
.post(
|
||||||
`/app/appsessionarchivekeywordrecord/getKeywordRecordStatistic?departmentId=${this.departmentId}`
|
`/app/appsessionarchivekeywordrecord/getKeywordRecordStatisticForXbot?departmentId=${this.departmentId}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
@@ -78,16 +73,16 @@ export default {
|
|||||||
var groupMonth = res.data.groupRecordListMap.map((e) => e.dateDay);
|
var groupMonth = res.data.groupRecordListMap.map((e) => e.dateDay);
|
||||||
this.groupData = res.data.groupRecordListMap.map((e) => e.cnt);
|
this.groupData = res.data.groupRecordListMap.map((e) => e.cnt);
|
||||||
|
|
||||||
var userMonth = res.data.personRecordListMap.map((e) => e.dateDay);
|
// var userMonth = res.data.personRecordListMap.map((e) => e.dateDay);
|
||||||
this.userData = res.data.personRecordListMap.map((e) => e.cnt);
|
this.userData = res.data.typeListMap.map((e) => e.c);
|
||||||
|
var wordNameList = res.data.typeListMap.map((e) => e.word_name);
|
||||||
res.data.wordNames.map((item) => {
|
res.data.wordNames.map((item) => {
|
||||||
var i = { name: item.wordName, value: item.wordCount };
|
var i = { name: item.wordName, value: item.wordCount };
|
||||||
this.wordData.push(i);
|
this.wordData.push(i);
|
||||||
});
|
});
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.getGroupEcharts(groupMonth, this.groupData);
|
this.getGroupEcharts(groupMonth, this.groupData);
|
||||||
this.getUserEcharts(userMonth, this.userData);
|
this.getUserEcharts(wordNameList, this.userData);
|
||||||
if (this.wordData) {
|
if (this.wordData) {
|
||||||
this.getKeyWordEcharts(this.wordData);
|
this.getKeyWordEcharts(this.wordData);
|
||||||
}
|
}
|
||||||
@@ -159,65 +154,38 @@ export default {
|
|||||||
option && groupChart.setOption(option);
|
option && groupChart.setOption(option);
|
||||||
},
|
},
|
||||||
getUserEcharts(userMonth, userData) {
|
getUserEcharts(userMonth, userData) {
|
||||||
|
console.log(userMonth, userData)
|
||||||
let userDom = document.getElementById("user");
|
let userDom = document.getElementById("user");
|
||||||
let userChart = echarts.init(userDom);
|
let userChart = echarts.init(userDom);
|
||||||
|
|
||||||
let option = {
|
let option = {
|
||||||
tooltip: {
|
|
||||||
trigger: "axis",
|
|
||||||
},
|
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: "category",
|
type: 'category',
|
||||||
data: userMonth,
|
data: userMonth
|
||||||
axisTick: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: "value",
|
type: 'value'
|
||||||
axisLine: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
axisTick: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
x: 50,
|
|
||||||
y: 50,
|
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: userData,
|
|
||||||
type: "line",
|
|
||||||
lineStyle: {
|
|
||||||
color: "#3975C6", // 折线线条颜色
|
|
||||||
},
|
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#3975C6", // 折角颜色
|
normal: {
|
||||||
|
color: ['#0072FF'],
|
||||||
|
label: {
|
||||||
|
show: true, //开启显示数值
|
||||||
|
position: 'top', //数值在上方显示
|
||||||
|
textStyle: { //数值样式
|
||||||
|
color: '#919191', //字体颜色
|
||||||
|
fontSize: 14 //字体大小
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
areaStyle: {
|
data: userData,
|
||||||
color: {
|
type: 'bar',
|
||||||
type: "linear",
|
barWidth : 20,
|
||||||
x: 0,
|
}
|
||||||
y: 0,
|
]
|
||||||
x2: 0,
|
|
||||||
y2: 1,
|
|
||||||
colorStops: [
|
|
||||||
// 渐变颜色
|
|
||||||
{
|
|
||||||
offset: 0,
|
|
||||||
color: "#2891ff33",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
offset: 1,
|
|
||||||
color: "#2891ff00",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
global: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
option && userChart.setOption(option);
|
option && userChart.setOption(option);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user