关联告警趋势和关联告警列表

This commit is contained in:
mmc
2026-07-20 16:16:49 +08:00
parent c602f08a98
commit a3b30e1f83
3 changed files with 128 additions and 31 deletions

View File

@@ -11,7 +11,7 @@ import {
ExclamationOutlined
} from '@ant-design/icons';
import dayjs from 'dayjs';
import { errorLevelOptions, exportTable } from "../../lib/utils.js"
import { errorLevelOptions, exportTable, levelColorMap } from "../../lib/utils.js"
// 接口引入
import {
@@ -31,22 +31,9 @@ import { RootState } from '@/src/store/index.js';
const { RangePicker } = DatePicker;
const { Text } = Typography;
const { Option } = Select;
const levelColor = Object.keys(alarmLevelConfig).reduce((map, key) => {
map[key] = alarmLevelConfig[key].color;
return map;
}, {});
const levelText = Object.keys(alarmLevelConfig).reduce((map, key) => {
map[key] = alarmLevelConfig[key].description;
return map;
}, {});
// 级别颜色配置
const levelColorMap = {
ERROR: '#FF4D4F', // 错误 红
WARNING: '#FA8C16', // 警告 橙
INFO: '#1890FF', // 信息 蓝
};
// 快速根据 value 获取 label
const getLevelLabel = (val) => {
@@ -148,6 +135,8 @@ export default function AlarmCenterPage() {
closed: 0,
});
// ====================== 获取列表 ======================
const fetchList = async () => {
setLoading(true);