From 212413ae5f79eca367526016e322d1f3eace64e2 Mon Sep 17 00:00:00 2001 From: liuye Date: Mon, 5 Feb 2024 10:34:56 +0800 Subject: [PATCH] =?UTF-8?q?AI=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xbot/AppAiStatistics/AppAiStatistics.vue | 78 ++++++++++++------- 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/packages/xbot/AppAiStatistics/AppAiStatistics.vue b/packages/xbot/AppAiStatistics/AppAiStatistics.vue index b9d65333..ca75f477 100644 --- a/packages/xbot/AppAiStatistics/AppAiStatistics.vue +++ b/packages/xbot/AppAiStatistics/AppAiStatistics.vue @@ -43,7 +43,7 @@
AI调用趋势图 -
+
@@ -52,12 +52,27 @@ :tableData="tableData" :col-configs="colConfigs" :isShowPagination="false" - style="margin-top: 6px; width: 100%;"> + style="margin-top: 6px; width: 100%; height: 280px;">
- + +
+ 问答分类统计 +
+
+ +
+
+
+ 问答分类词云 +
+
+ +
+
+ @@ -169,20 +184,11 @@ export default { this.trendChartInit(trendX, this.trendData) }) } - - // this.info.ranking.map((item, index)=> { - // if(index < 100) { - // item.rank = index+1 - // this.tableData.push(item) - // } - // }) - } }) this.instance.post('/app/appmasssendingtaskbaidu/statistics3', null, { params: { - // deptFullId: departmentId, areaId: this.areaId, type: this.type, startTime: this.startTime, @@ -191,19 +197,6 @@ export default { }).then(res => { if (res?.data) { this.info.ranking = res.data.ranking - // var trendX = [] - // this.totalEcount = 0 - // this.info.trend.map((item) => { - // trendX.push(item.ymd) - // this.totalEcount = this.totalEcount + item.ecount - // this.trendData.push(item.ecount) - // }) - // if(this.trendData.length) { - // this.$nextTick(() => { - // this.trendChartInit(trendX, this.trendData) - // }) - // } - this.info.ranking.map((item, index)=> { if(index < 100) { item.rank = index+1 @@ -213,6 +206,37 @@ export default { } }) + + this.instance.post('/app/appmasssendingtaskbaidu/statistics5', null, { + params: { + areaId: this.areaId, + type: this.type, + startTime: this.startTime, + endTime: this.endTime, + } + }).then(res => { + if (res?.data) { + if(res.data.length) { + var barX = [] + res.data.map((item) => { + barX.push(item.tag) + this.barData.push(item.c) + var i = { name: item.tag, value: item.c }; + this.wordData.push(i); + }) + if(this.barData.length) { + this.$nextTick(() => { + this.barChartInit(barX, this.barData) + }) + } + if(this.wordData.length) { + this.$nextTick(() => { + this.wordChartInit(this.wordData) + }) + } + } + } + }) }, trendChartInit(xData, yData) { this.trendChart = echarts.init(document.getElementById('trendChart')) @@ -412,7 +436,7 @@ export default { height: 100%; } .chart-content { - height: calc(100% - 140px); + // height: calc(100% - 140px); } :deep .ai-table { @@ -427,7 +451,7 @@ export default { padding: 16px; box-sizing: border-box; margin-top: 6px; - height: 100%; + // height: 300px; .chart { width: 100%;