diff --git a/packages/xbot/AppAiStatistics/AppAiStatistics.vue b/packages/xbot/AppAiStatistics/AppAiStatistics.vue index b9d65333..38fbe1c2 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;">
- + +
+ 问答分类统计 +
+
+ +
+
+
+ 问答分类词云 +
+
+ +
+
+ @@ -123,7 +138,7 @@ export default { return [ {prop: "rank", label: '排名', align: "center", width: "80px"}, {prop: "roomName", label: '群名称', align: "center"}, - {prop: "ownerName", label: '群主', align: "center", width: "100px"}, + // {prop: "ownerName", label: '群主', align: "center", width: "100px"}, {prop: "c", label: '触发数', align: "center", width: "100px"}, ] }, @@ -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,39 @@ 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, index) => { + if(index < 10) { + 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 +438,7 @@ export default { height: 100%; } .chart-content { - height: calc(100% - 140px); + // height: calc(100% - 140px); } :deep .ai-table { @@ -427,7 +453,7 @@ export default { padding: 16px; box-sizing: border-box; margin-top: 6px; - height: 100%; + // height: 300px; .chart { width: 100%;