gaoluyang
2026-06-24 712aa51536236d43e87273e4ce45ac5691dffad8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script lang="ts" setup>
import type { ImManagerStatisticsApi } from '#/api/im/manager/statistics';
 
import { onMounted, ref } from 'vue';
 
import { Page } from '..\..\..\..\packages\effects\common-ui\src';
 
import { getStatisticsOverview } from '#/api/im/manager/statistics';
 
import {
  DistributionChart,
  OverviewCards,
  TrendChart,
} from './components';
 
defineOptions({ name: 'ImManagerStatistics' });
 
const overview = ref<ImManagerStatisticsApi.Overview>();
 
/** 加载概览数据 */
async function loadOverview() {
  overview.value = await getStatisticsOverview();
}
 
onMounted(loadOverview);
</script>
 
<template>
  <Page auto-content-height>
    <div class="space-y-4">
      <OverviewCards v-if="overview" :overview="overview" />
 
      <div class="grid grid-cols-2 gap-4 max-xl:grid-cols-1">
        <TrendChart type="message" />
        <TrendChart type="user" />
      </div>
 
      <div class="grid grid-cols-3 gap-4 max-2xl:grid-cols-2 max-xl:grid-cols-1">
        <DistributionChart type="messageType" />
        <DistributionChart type="groupSize" />
        <DistributionChart type="topSenders" />
      </div>
    </div>
  </Page>
</template>