fix:修改设备告警ui

This commit is contained in:
zhaohy
2024-08-20 11:36:32 +08:00
parent bb792158d8
commit cf9854e005
16 changed files with 475 additions and 255 deletions

View File

@@ -142,15 +142,23 @@
infoObject.value = { ...logList.value[0] };
infoObject.value.state = infoObject.value.state.value;
let colorMap = {
1: '#ff7602',
2: '#00a1e6',
3: '#04d919',
4: '#d9001b',
5: '#a6a6a6',
1: 'rgba(191, 205, 226, 1)',
2: 'rgba(243, 97, 99, 1)',
3: 'rgba(41, 196, 154, 1)',
4: 'rgba(217, 0, 27,1)',
5: 'rgba(166, 166, 166,1)',
};
let bgColorMap = {
1: 'rgba(191, 205, 226, 0.1)',
2: 'rgba(243, 97, 99, 0.1)',
3: 'rgba(41, 196, 154, 0.1)',
4: 'rgba(217, 0, 27, 0.1)',
5: 'rgba(166, 166, 166,0.1)',
};
logList.value.forEach((item) => {
item.stateName = item.state.label;
item.color = colorMap[item.state.value];
item.bgColor = bgColorMap[item.state];
item.src = 'state-' + item.state.value;
});
config.value.dataSource = logList.value;