中英文切换

This commit is contained in:
mmc
2026-08-14 09:02:52 +08:00
parent a8af55a856
commit 62b03bba03
94 changed files with 19723 additions and 2766 deletions

View File

@@ -41,8 +41,8 @@ const AlarmStatistics = () => {
const chart = echarts.init(barChartRef.current);
const option = {
title: { text: '近7天告警趋势', textStyle: { fontSize: 14 } },
xAxis: { type: 'category', data: ['1日', '2日', '3日', '4日', '5日', '6日', '7日'] },
title: { text: t('alerts.sevenDayTrend'), textStyle: { fontSize: 14 } },
xAxis: { type: 'category', data: [t('devices.daySuffix', { day: 1 }), t('devices.daySuffix', { day: 2 }), t('devices.daySuffix', { day: 3 }), t('devices.daySuffix', { day: 4 }), t('devices.daySuffix', { day: 5 }), t('devices.daySuffix', { day: 6 }), t('devices.daySuffix', { day: 7 })] },
yAxis: { type: 'value' },
series: [{
data: [5, 8, 12, 9, 15, 7, statData.total || 2],
@@ -66,14 +66,14 @@ const AlarmStatistics = () => {
const chart = echarts.init(pieChartRef.current);
const pieData = [
{ value: statData.levelStats?.[1] || 0, name: '严重告警' },
{ value: statData.levelStats?.[2] || 0, name: '重要告警' },
{ value: statData.levelStats?.[3] || 0, name: '一般告警' },
{ value: statData.levelStats?.[4] || 0, name: '提示告警' },
{ value: statData.levelStats?.[1] || 0, name: t('alerts.criticalAlert') },
{ value: statData.levelStats?.[2] || 0, name: t('alerts.importantAlert') },
{ value: statData.levelStats?.[3] || 0, name: t('alerts.generalAlert') },
{ value: statData.levelStats?.[4] || 0, name: t('alerts.infoAlert') },
].filter(i => i.value > 0);
const option = {
title: { text: '告警级别分布' },
title: { text: t('alerts.alertLevelDistribution') },
tooltip: { trigger: 'item' },
legend: { bottom: 0 },
series: [{
@@ -119,7 +119,7 @@ const AlarmStatistics = () => {
<ExclamationCircleOutlined style={{ fontSize: 24, color: '#F53F3F' }} />
</div>
<div>
<div style={{ fontSize: 14, color: '#4E5969' }}>严重告警</div>
<div style={{ fontSize: 14, color: '#4E5969' }}>{t('alerts.criticalAlert')}</div>
<div style={{ fontSize: 24, fontWeight: 700 }}>{statData.levelStats?.[1] || 0}</div>
</div>
</Space>