功能:告警级别调整为四级(轻微/普通/重要/紧急)并更新颜色

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-18 16:32:57 +08:00
parent 8d5f2f138d
commit 67085ffcfc
2 changed files with 7 additions and 5 deletions

View File

@@ -21,9 +21,10 @@ export const ALERT_STATUS_OPTIONS = [
/** 告警级别选项 */
export const ALERT_LEVEL_OPTIONS = [
{ label: '', value: 'low' },
{ label: '', value: 'medium' },
{ label: '', value: 'high' },
{ label: '轻微', value: 'low' },
{ label: '普通', value: 'medium' },
{ label: '重要', value: 'high' },
{ label: '紧急', value: 'critical' },
];
/** 列表的搜索表单 */

View File

@@ -93,8 +93,9 @@ function getLevelText(level?: string) {
function getLevelColor(level?: string) {
const colorMap: Record<string, string> = {
low: 'green',
medium: 'orange',
high: 'red',
medium: 'blue',
high: 'orange',
critical: 'red',
};
return level ? colorMap[level] || 'default' : 'default';
}