海口龙华志愿者后端管理页面
zhouxiantao
8 days ago 4def10e6567cf651ae333a2a65c497e717c06403
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
import React from 'react';
import { Card, Row, Col } from 'antd';
import ReactECharts from 'echarts-for-react';
 
const StatisticsTrends = () => {
  // 积分趋势图表配置
  const pointsTrendOption = {
    title: {
      text: '积分趋势分析',
      left: 'center',
    },
    tooltip: {
      trigger: 'axis',
    },
    legend: {
      data: ['积分总数', '新增积分', '使用积分'],
      bottom: 10,
    },
    xAxis: {
      type: 'category',
      data: ['1月', '2月', '3月', '4月', '5月', '6月'],
    },
    yAxis: {
      type: 'value',
    },
    series: [
      {
        name: '积分总数',
        type: 'line',
        data: [12000, 15000, 18000, 22000, 28000, 35000],
        smooth: true,
        itemStyle: {
          color: '#1890ff',
        },
      },
      {
        name: '新增积分',
        type: 'bar',
        data: [3000, 3500, 4000, 4500, 5000, 5500],
        itemStyle: {
          color: '#52c41a',
        },
      },
      {
        name: '使用积分',
        type: 'bar',
        data: [1000, 1200, 1500, 1800, 2000, 2200],
        itemStyle: {
          color: '#ff4d4f',
        },
      },
    ],
  };
 
  // 活动参与趋势图表配置
  const activityTrendOption = {
    title: {
      text: '活动参与趋势',
      left: 'center',
    },
    tooltip: {
      trigger: 'axis',
    },
    xAxis: {
      type: 'category',
      data: ['1月', '2月', '3月', '4月', '5月', '6月'],
    },
    yAxis: {
      type: 'value',
    },
    series: [
      {
        name: '参与人数',
        type: 'line',
        data: [150, 180, 220, 280, 320, 380],
        smooth: true,
        itemStyle: {
          color: '#722ed1',
        },
        areaStyle: {
          color: {
            type: 'linear',
            x: 0,
            y: 0,
            x2: 0,
            y2: 1,
            colorStops: [
              { offset: 0, color: 'rgba(114, 46, 209, 0.3)' },
              { offset: 1, color: 'rgba(114, 46, 209, 0.1)' },
            ],
          },
        },
      },
    ],
  };
 
  // 志愿者增长趋势图表配置
  const volunteerGrowthOption = {
    title: {
      text: '志愿者增长趋势',
      left: 'center',
    },
    tooltip: {
      trigger: 'axis',
    },
    xAxis: {
      type: 'category',
      data: ['1月', '2月', '3月', '4月', '5月', '6月'],
    },
    yAxis: {
      type: 'value',
    },
    series: [
      {
        name: '志愿者总数',
        type: 'line',
        data: [800, 900, 1000, 1100, 1200, 1250],
        smooth: true,
        itemStyle: {
          color: '#faad14',
        },
      },
      {
        name: '新增志愿者',
        type: 'bar',
        data: [50, 60, 70, 80, 90, 100],
        itemStyle: {
          color: '#13c2c2',
        },
      },
    ],
  };
 
  // 活动类型分布图表配置
  const activityTypeOption = {
    title: {
      text: '活动类型分布',
      left: 'center',
    },
    tooltip: {
      trigger: 'item',
    },
    series: [
      {
        name: '活动类型',
        type: 'pie',
        radius: '50%',
        data: [
          { value: 45, name: '社区服务' },
          { value: 30, name: '环保活动' },
          { value: 15, name: '敬老助残' },
          { value: 10, name: '其他活动' },
        ],
        emphasis: {
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)',
          },
        },
      },
    ],
  };
 
  return (
    <div>
      <div className="page-header">
        <h1 className="page-title">趋势分析</h1>
        <p className="page-description">分析志愿者服务的各项数据趋势</p>
      </div>
 
      <Row gutter={[16, 16]}>
        <Col xs={24} lg={12}>
          <Card>
            <ReactECharts option={pointsTrendOption} style={{ height: 400 }} />
          </Card>
        </Col>
        <Col xs={24} lg={12}>
          <Card>
            <ReactECharts option={activityTrendOption} style={{ height: 400 }} />
          </Card>
        </Col>
      </Row>
 
      <Row gutter={[16, 16]} style={{ marginTop: 16 }}>
        <Col xs={24} lg={12}>
          <Card>
            <ReactECharts option={volunteerGrowthOption} style={{ height: 400 }} />
          </Card>
        </Col>
        <Col xs={24} lg={12}>
          <Card>
            <ReactECharts option={activityTypeOption} style={{ height: 400 }} />
          </Card>
        </Col>
      </Row>
    </div>
  );
};
 
export default StatisticsTrends;