fix: 告警等级名称展示错误 主页告警列表默认展示20条

develop
时启龙 2024-10-29 17:44:58 +08:00
parent 69b7be76f6
commit 2af63eb68c
3 changed files with 11 additions and 11 deletions

View File

@ -22,7 +22,7 @@ import LineCharts from './echarts/LineCharts.vue'
import ItemCard from './ItemCard.vue'
import { getSevenDayWarnTrend } from 'services/system/dashboard'
import echarts from '@cmp/cmp-echarts/hooks/echarts'
export const colorMap = ['rgba(255, 0, 0, 1)', 'rgba(245, 167, 45, 1)', 'rgba(18, 185, 242, 1)', 'rgba(24, 144, 255, 1)']
export const colorMap = ['rgba(24, 144, 255, 1)', 'rgba(18, 185, 242, 1)', 'rgba(245, 167, 45, 1)', 'rgba(255, 0, 0, 1)', , ,]
const chartSetting = {
color: colorMap,
legend: {
@ -37,7 +37,7 @@ export default {
setup() {
const countData = ref([
{
name: '紧急告警',
name: '严重告警',
value: 0
},
{
@ -49,7 +49,7 @@ export default {
value: 0
},
{
name: '提示告警',
name: '警告告警',
value: 0
}
])
@ -62,10 +62,10 @@ export default {
if (!res.success) return
const names = Object.keys(res.data)
const nameMap = {
1: '紧急告警',
2: '重要告警',
3: '次要告警',
4: '提示告警'
4: '严重告警',
3: '重要告警',
2: '次要告警',
1: '警告告警'
}
if (!names.length) return
//

View File

@ -19,7 +19,7 @@ export default {
loaded: false,
todayAlarmData: [
{
name: '紧急告警',
name: '严重告警',
value: 0
},
{
@ -31,7 +31,7 @@ export default {
value: 0
},
{
name: '提示告警',
name: '警告告警',
value: 0
}
],

View File

@ -53,7 +53,7 @@ export default {
tableList: [],
params: {
page: 1,
rows: 10
rows: 20
},
total: 0,
dialog: {
@ -89,7 +89,7 @@ export default {
icon: 次要
},
1: {
text: '常规告警',
text: '警告告警',
icon: 常规
}
}