|
|
|
@ -9,17 +9,24 @@ const statusOptions = [
|
|
|
|
{ label: '环保事件', value: 'incident' },
|
|
|
|
{ label: '环保事件', value: 'incident' },
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const CardTitle = ({ children }) => (
|
|
|
|
|
|
|
|
<div className={styles.cardTitle}>
|
|
|
|
|
|
|
|
<span className={styles.cardTitleIcon} />
|
|
|
|
|
|
|
|
{children}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const StatisticsAnalysis = () => {
|
|
|
|
const StatisticsAnalysis = () => {
|
|
|
|
const activityTypeOption = useMemo(
|
|
|
|
const activityTypeOption = useMemo(
|
|
|
|
() => ({
|
|
|
|
() => ({
|
|
|
|
color: ['#6abdfc', '#a585ff', '#fa8c16', '#ff6b6b'],
|
|
|
|
color: ['#1cd863', '#39a6ff', '#ffa74f', '#be70f0'],
|
|
|
|
tooltip: { trigger: 'item' },
|
|
|
|
// tooltip: { trigger: 'item' },
|
|
|
|
legend: { orient: 'vertical', left: '70%' },
|
|
|
|
// legend: { orient: 'vertical', left: '70%' },
|
|
|
|
series: [
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: 'pie',
|
|
|
|
type: 'pie',
|
|
|
|
radius: ['30%', '60%'],
|
|
|
|
radius: ['30%', '60%'],
|
|
|
|
center: ['35%', '50%'],
|
|
|
|
center: ['50%', '50%'],
|
|
|
|
label: { formatter: '{b}: {d}%' },
|
|
|
|
label: { formatter: '{b}: {d}%' },
|
|
|
|
data: [
|
|
|
|
data: [
|
|
|
|
{ value: 30, name: '培训' },
|
|
|
|
{ value: 30, name: '培训' },
|
|
|
|
@ -35,18 +42,20 @@ const StatisticsAnalysis = () => {
|
|
|
|
|
|
|
|
|
|
|
|
const participationOption = useMemo(
|
|
|
|
const participationOption = useMemo(
|
|
|
|
() => ({
|
|
|
|
() => ({
|
|
|
|
color: ['#6ee7d8', '#8fd0ff'],
|
|
|
|
color: ['#AAFFE1', '#009DFF'],
|
|
|
|
tooltip: { trigger: 'axis' },
|
|
|
|
tooltip: { trigger: 'axis' },
|
|
|
|
grid: { left: 80, right: 30, top: 30, bottom: 30 },
|
|
|
|
grid: { left: 80, right: 30, top: 30, bottom: 30 },
|
|
|
|
xAxis: {
|
|
|
|
xAxis: {
|
|
|
|
type: 'value',
|
|
|
|
type: 'value',
|
|
|
|
boundaryGap: [0, 0.1],
|
|
|
|
boundaryGap: [0, 0.1],
|
|
|
|
axisLine: { lineStyle: { color: '#d8dfe6' } },
|
|
|
|
axisLine: { lineStyle: { color: '#d8dfe6' } },
|
|
|
|
|
|
|
|
axisLabel: { color: '#333' },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
yAxis: {
|
|
|
|
type: 'category',
|
|
|
|
type: 'category',
|
|
|
|
data: ['xxx部门', 'xxx部门', 'xxx部门', 'xxx部门', 'xxx部门', 'xxx部门'],
|
|
|
|
data: ['xxx部门', 'xxx部门', 'xxx部门', 'xxx部门', 'xxx部门', 'xxx部门'],
|
|
|
|
axisLine: { lineStyle: { color: '#d8dfe6' } },
|
|
|
|
axisLine: { lineStyle: { color: '#d8dfe6' } },
|
|
|
|
|
|
|
|
axisLabel: { color: '#333' },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
series: [
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -54,6 +63,19 @@ const StatisticsAnalysis = () => {
|
|
|
|
type: 'bar',
|
|
|
|
type: 'bar',
|
|
|
|
barWidth: 16,
|
|
|
|
barWidth: 16,
|
|
|
|
data: [92, 88, 74, 56, 48, 30],
|
|
|
|
data: [92, 88, 74, 56, 48, 30],
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
color: {
|
|
|
|
|
|
|
|
type: 'linear',
|
|
|
|
|
|
|
|
x: 0,
|
|
|
|
|
|
|
|
y: 0,
|
|
|
|
|
|
|
|
x2: 1,
|
|
|
|
|
|
|
|
y2: 0,
|
|
|
|
|
|
|
|
colorStops: [
|
|
|
|
|
|
|
|
{ offset: 0, color: '#AAFFE1' },
|
|
|
|
|
|
|
|
{ offset: 1, color: '#009DFF' },
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
label: { show: false },
|
|
|
|
label: { show: false },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -64,13 +86,13 @@ const StatisticsAnalysis = () => {
|
|
|
|
const incidentTypeOption = useMemo(
|
|
|
|
const incidentTypeOption = useMemo(
|
|
|
|
() => ({
|
|
|
|
() => ({
|
|
|
|
color: ['#4b7bff', '#5fd6f1', '#2fd192', '#ff9f7f', '#e85d8b', '#5e6ce6'],
|
|
|
|
color: ['#4b7bff', '#5fd6f1', '#2fd192', '#ff9f7f', '#e85d8b', '#5e6ce6'],
|
|
|
|
tooltip: { trigger: 'item' },
|
|
|
|
// tooltip: { trigger: 'item' },
|
|
|
|
legend: { orient: 'vertical', right: 10, top: 'middle' },
|
|
|
|
// legend: { orient: 'vertical', right: 10, top: 'middle' },
|
|
|
|
series: [
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: 'pie',
|
|
|
|
type: 'pie',
|
|
|
|
radius: ['40%', '65%'],
|
|
|
|
radius: ['0%', '65%'],
|
|
|
|
center: ['40%', '50%'],
|
|
|
|
center: ['50%', '50%'],
|
|
|
|
label: { formatter: '{b} {d}%' },
|
|
|
|
label: { formatter: '{b} {d}%' },
|
|
|
|
data: [
|
|
|
|
data: [
|
|
|
|
{ value: 45, name: 'xxx2' },
|
|
|
|
{ value: 45, name: 'xxx2' },
|
|
|
|
@ -89,12 +111,12 @@ const StatisticsAnalysis = () => {
|
|
|
|
const trendOption = useMemo(
|
|
|
|
const trendOption = useMemo(
|
|
|
|
() => ({
|
|
|
|
() => ({
|
|
|
|
color: ['#6abdfc', '#f7a35c'],
|
|
|
|
color: ['#6abdfc', '#f7a35c'],
|
|
|
|
tooltip: { trigger: 'axis' },
|
|
|
|
// tooltip: { trigger: 'axis' },
|
|
|
|
grid: { left: 50, right: 50, top: 30, bottom: 40 },
|
|
|
|
grid: { left: 50, right: 50, top: 30, bottom: 40 },
|
|
|
|
xAxis: [{ type: 'category', data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] }],
|
|
|
|
xAxis: [{ type: 'category', axisLabel: { color: '#333' }, data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] }],
|
|
|
|
yAxis: [
|
|
|
|
yAxis: [
|
|
|
|
{ type: 'value', name: '活动数', axisLine: { lineStyle: { color: '#d8dfe6' } } },
|
|
|
|
{ type: 'value', name: '活动数', axisLabel: { color: '#333' }, axisLine: { lineStyle: { color: '#d8dfe6' } } },
|
|
|
|
{ type: 'value', name: '参与率', axisLine: { lineStyle: { color: '#d8dfe6' } } },
|
|
|
|
{ type: 'value', name: '参与率', axisLabel: { color: '#333' }, axisLine: { lineStyle: { color: '#d8dfe6' } } },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
series: [
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -108,7 +130,7 @@ const StatisticsAnalysis = () => {
|
|
|
|
type: 'line',
|
|
|
|
type: 'line',
|
|
|
|
yAxisIndex: 1,
|
|
|
|
yAxisIndex: 1,
|
|
|
|
data: [55, 60, 58, 63, 60, 62, 65, 63, 64, 68, 66, 70],
|
|
|
|
data: [55, 60, 58, 63, 60, 62, 65, 63, 64, 68, 66, 70],
|
|
|
|
smooth: true,
|
|
|
|
smooth: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
@ -147,26 +169,26 @@ const StatisticsAnalysis = () => {
|
|
|
|
|
|
|
|
|
|
|
|
<div className={styles.rowThree}>
|
|
|
|
<div className={styles.rowThree}>
|
|
|
|
<div className={styles.card}>
|
|
|
|
<div className={styles.card}>
|
|
|
|
<div className={styles.cardTitle}>活动类型分布</div>
|
|
|
|
<CardTitle>活动类型分布</CardTitle>
|
|
|
|
<ReactECharts option={activityTypeOption} style={{ height: 240 }} />
|
|
|
|
<ReactECharts option={activityTypeOption} style={{ height: 240 }} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={styles.card}>
|
|
|
|
<div className={styles.card}>
|
|
|
|
<div className={styles.cardTitle}>活动参与热度</div>
|
|
|
|
<CardTitle>活动参与热度</CardTitle>
|
|
|
|
<ReactECharts option={participationOption} style={{ height: 240 }} />
|
|
|
|
<ReactECharts option={participationOption} style={{ height: 240 }} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={styles.card}>
|
|
|
|
<div className={styles.card}>
|
|
|
|
<div className={styles.cardTitle}>事件类型分布</div>
|
|
|
|
<CardTitle>事件类型分布</CardTitle>
|
|
|
|
<ReactECharts option={incidentTypeOption} style={{ height: 240 }} />
|
|
|
|
<ReactECharts option={incidentTypeOption} style={{ height: 240 }} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className={styles.rowTwo}>
|
|
|
|
<div className={styles.rowTwo}>
|
|
|
|
<div className={styles.cardWide}>
|
|
|
|
<div className={styles.cardWide}>
|
|
|
|
<div className={styles.cardTitle}>月度活动趋势</div>
|
|
|
|
<CardTitle>月度活动趋势</CardTitle>
|
|
|
|
<ReactECharts option={trendOption} style={{ height: 240 }} />
|
|
|
|
<ReactECharts option={trendOption} style={{ height: 240 }} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={styles.card}>
|
|
|
|
<div className={styles.card}>
|
|
|
|
<div className={styles.cardTitle}>事件部门分布</div>
|
|
|
|
<CardTitle>事件部门分布</CardTitle>
|
|
|
|
<ReactECharts option={departmentOption} style={{ height: 240 }} />
|
|
|
|
<ReactECharts option={departmentOption} style={{ height: 240 }} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|