fix: 告警Severity字典显示

This commit is contained in:
TsMask
2023-11-21 15:16:09 +08:00
parent 3bc4fafde7
commit 129c9085d5
2 changed files with 11 additions and 13 deletions

View File

@@ -5,7 +5,6 @@ import { message, Modal } from 'ant-design-vue/lib';
import { SizeType } from 'ant-design-vue/lib/config-provider';
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/lib/table';
import useUserStore from '@/store/modules/user';
import {
listAct,
updateConfirm,
@@ -171,7 +170,7 @@ let tableColumns: ColumnsType = [
title: t('views.faultManage.activeAlarm.alarmType'),
dataIndex: 'alarmType',
key: 'alarmType',
align: 'left',
align: 'left',
width: 5,
},
{
@@ -190,7 +189,7 @@ let tableColumns: ColumnsType = [
title: t('views.faultManage.activeAlarm.clearType'),
dataIndex: 'clearType',
key: 'clearType',
align: 'left',
align: 'left',
width: 5,
},
{
@@ -204,7 +203,7 @@ let tableColumns: ColumnsType = [
title: t('views.faultManage.activeAlarm.ackState'),
dataIndex: 'ackState',
key: 'ackState',
align: 'left',
align: 'left',
width: 5,
},
{
@@ -492,7 +491,6 @@ function fnGetList(pageNum?: number) {
});
}
const profile = useUserStore().profile;
onMounted(() => {
// 初始字典数据
Promise.allSettled([
@@ -730,9 +728,10 @@ onMounted(() => {
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'origSeverity'">
<a-tag :color="profile.color[record.origSeverity.toLowerCase()]">
{{ record.origSeverity }}
</a-tag>
<DictTag
:options="dict.activeAlarmSeverity"
:value="record.origSeverity"
/>
</template>
<template v-if="column.key === 'alarmType'">
<DictTag