|
...
|
...
|
@@ -9,7 +9,7 @@ |
|
|
|
:class="[index + 1 < 4 && '!md:mr-4']"
|
|
|
|
>
|
|
|
|
<template #action>
|
|
|
|
<a-tooltip>
|
|
|
|
<a-tooltip :title="item.tooltip">
|
|
|
|
<Icon :icon="item.icon" :size="20" />
|
|
|
|
</a-tooltip>
|
|
|
|
</template>
|
|
...
|
...
|
@@ -18,9 +18,9 @@ |
|
|
|
<span>平均问答次数</span>
|
|
|
|
<span>{{ formatNumber(statistics.averageCount) }}</span>
|
|
|
|
</div>
|
|
|
|
<SingleLine v-if="index === 1" :option="option" :chartData="dailyCountsData" :seriesColor="seriesColor" height="50px" />
|
|
|
|
<SingleLine v-if="index === 1" :option="lineOption" :chartData="dailyCountsData" :seriesColor="seriesColor" height="50px" />
|
|
|
|
|
|
|
|
<Bar v-if="index === 2" :option="option" :chartData="dailyRejectedCountsData" :seriesColor="seriesColor" height="50px" />
|
|
|
|
<Bar v-if="index === 2" :option="barOption" :chartData="dailyRejectedCountsData" :seriesColor="seriesColor" height="50px" />
|
|
|
|
|
|
|
|
<Trend
|
|
|
|
v-if="index === 3"
|
|
...
|
...
|
@@ -124,6 +124,61 @@ |
|
|
|
right: 5,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
// 分离折线图和柱状图配置
|
|
|
|
const lineOption = ref({
|
|
|
|
tooltip: {
|
|
|
|
trigger: 'axis',
|
|
|
|
formatter: (params) => {
|
|
|
|
const param = params[0];
|
|
|
|
return `${param.name}<br/>问答次数: ${param.value}`;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
type: 'category',
|
|
|
|
data: [], // 由组件内部填充
|
|
|
|
axisLabel: { show: false },
|
|
|
|
boundaryGap: false,
|
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
type: 'value',
|
|
|
|
min: 0,
|
|
|
|
axisLabel: { show: false },
|
|
|
|
},
|
|
|
|
grid: {
|
|
|
|
top: 10,
|
|
|
|
bottom: 10,
|
|
|
|
left: 10,
|
|
|
|
right: 10,
|
|
|
|
containLabel: true,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
const barOption = ref({
|
|
|
|
tooltip: {
|
|
|
|
trigger: 'axis',
|
|
|
|
formatter: (params) => {
|
|
|
|
const param = params[0];
|
|
|
|
return `${param.name}<br/>拒绝次数: ${param.value}`;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
type: 'category',
|
|
|
|
data: [], // 由组件内部填充
|
|
|
|
axisLabel: { show: false },
|
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
type: 'value',
|
|
|
|
min: 0,
|
|
|
|
axisLabel: { show: false },
|
|
|
|
},
|
|
|
|
grid: {
|
|
|
|
top: 10,
|
|
|
|
bottom: 10,
|
|
|
|
left: 10,
|
|
|
|
right: 10,
|
|
|
|
containLabel: true,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
const seriesColor = computed(() => {
|
|
|
|
return getThemeColor.value;
|
|
|
|
});
|
|
...
|
...
|
@@ -143,23 +198,27 @@ |
|
|
|
title: '累计问答次数',
|
|
|
|
icon: 'visit-count|svg',
|
|
|
|
total: totalCount || 0,
|
|
|
|
tooltip: '系统所有问答记录,从2025年7月1日开始的第一次问答至今所有累计:' + totalCount,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '今日问答次数',
|
|
|
|
icon: 'total-sales|svg',
|
|
|
|
total: todayCount || 0,
|
|
|
|
color: 'blue',
|
|
|
|
tooltip: '系统今日进行回答的问题数量:' + todayCount,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '拒绝回答次数',
|
|
|
|
icon: 'download-count|svg',
|
|
|
|
total: rejectedCount || 0,
|
|
|
|
color: 'orange',
|
|
|
|
tooltip: '系统拒绝回答的问题数量总计:' + rejectedCount,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '对比前一日增长同比',
|
|
|
|
icon: 'transaction|svg',
|
|
|
|
total: formatGrowthRate(growthRate),
|
|
|
|
tooltip: '系统对比今天和昨天的数据增长比,计算公式为(今日回答总量-前一日回答总量/前一日回答总量)* 100',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
});
|
...
|
...
|
|