fix: 告警事件导出异常/告警ID列移除

This commit is contained in:
TsMask
2025-03-21 16:17:35 +08:00
parent 29f5e41976
commit 8a612e0760
3 changed files with 70 additions and 151 deletions

View File

@@ -145,66 +145,54 @@ let alarmTableState: TabeStateType = reactive({
let tableColumns: ColumnsType = [
{
title: t('views.faultManage.activeAlarm.origLevel'),
align: 'center',
align: 'left',
key: 'origSeverity',
dataIndex: 'origSeverity',
width: 5,
width: 100,
},
{
title: t('views.faultManage.activeAlarm.alarmTitle'),
dataIndex: 'alarmTitle',
align: 'left',
width: 5,
width: 200,
},
{
title: t('views.faultManage.activeAlarm.neType'),
dataIndex: 'neType',
align: 'center',
width: 5,
align: 'left',
width: 100,
},
{
title: t('views.faultManage.activeAlarm.eventTime'),
dataIndex: 'eventTime',
align: 'center',
align: 'left',
sorter: (a: any, b: any) => 1,
width: 5,
width: 150,
},
{
title: t('views.faultManage.activeAlarm.alarmCode'),
dataIndex: 'alarmCode',
align: 'center',
width: 5,
align: 'left',
width: 100,
},
{
title: t('views.faultManage.activeAlarm.alarmType'),
dataIndex: 'alarmType',
key: 'alarmType',
align: 'left',
width: 5,
width: 120,
},
{
title: t('views.faultManage.activeAlarm.neName'),
dataIndex: 'neName',
align: 'center',
width: 5,
align: 'left',
width: 100,
},
{
title: t('views.faultManage.activeAlarm.neId'),
dataIndex: 'neId',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.pvFlag'),
dataIndex: 'pvFlag',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.alarmId'),
dataIndex: 'alarmId',
align: 'center',
width: 5,
align: 'left',
width: 100,
},
{
@@ -212,20 +200,20 @@ let tableColumns: ColumnsType = [
dataIndex: 'ackState',
key: 'ackState',
align: 'left',
width: 5,
width: 100,
},
{
title: t('views.faultManage.activeAlarm.ackUser'),
dataIndex: 'ackUser',
align: 'left',
width: 5,
width: 100,
},
{
title: t('common.operate'),
key: 'alarm_id',
align: 'center',
align: 'left',
fixed: 'right',
width: 5,
width: 100,
},
];
@@ -1022,12 +1010,12 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:row-selection="{
columnWidth: 2,
columnWidth: 48,
selectedRowKeys: state.selectedRowKeys,
onChange: onSelectChange,
}"
:pagination="tablePagination"
:scroll="{ x: 2500, y: 400 }"
:scroll="{ x: tableColumns.length * 150, y: 400 }"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'origSeverity'">
@@ -1212,15 +1200,7 @@ onMounted(() => {
>
{{ modalState.from.alarmType }}
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.pvFlag')"
name="pvFlag"
>
{{ modalState.from.pvFlag }}
</a-form-item>
</a-col>
</a-col>
</a-row>
<a-form-item
@@ -1230,18 +1210,8 @@ onMounted(() => {
>
{{ modalState.from.locationInfo }}
</a-form-item>
<a-row> </a-row>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.province')"
name="province"
>
{{ modalState.from.province }}
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.origLevel')"
@@ -1290,7 +1260,7 @@ onMounted(() => {
:label="t('views.faultManage.activeAlarm.ackState')"
name="ackState"
>
{{ modalState.from.ackState }}
<DictTag :options="dict.activeAckState" :value="modalState.from.ackState" />
</a-form-item>
</a-col>
</a-row>

View File

@@ -118,61 +118,47 @@ let tableState: TabeStateType = reactive({
/**表格字段列 */
let tableColumns: ColumnsType = [
{
title: t('views.faultManage.activeAlarm.alarmId'),
dataIndex: 'alarmId',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.neId'),
dataIndex: 'neId',
align: 'center',
width: 5,
align: 'left',
width: 150,
},
{
title: t('views.faultManage.activeAlarm.neName'),
dataIndex: 'neName',
align: 'center',
width: 5,
align: 'left',
width: 150,
},
{
title: t('views.faultManage.activeAlarm.neType'),
dataIndex: 'neType',
align: 'center',
width: 5,
align: 'left',
width: 150,
},
{
title: t('views.faultManage.activeAlarm.alarmCode'),
dataIndex: 'alarmCode',
align: 'center',
width: 5,
align: 'left',
width: 100,
},
{
title: t('views.faultManage.activeAlarm.alarmTitle'),
dataIndex: 'alarmTitle',
align: 'left',
width: 5,
width: 200,
},
{
title: t('views.faultManage.activeAlarm.eventTime'),
dataIndex: 'eventTime',
align: 'center',
sorter: (a: any, b: any) => 1,
width: 5,
},
{
title: t('views.faultManage.activeAlarm.pvFlag'),
dataIndex: 'pvFlag',
align: 'center',
width: 5,
align: 'left',
width: 200,
},
{
title: t('common.operate'),
key: 'alarm_id',
align: 'center',
fixed: 'right',
width: 5,
align: 'left',
},
];
@@ -316,7 +302,7 @@ function mapKeysWithReduce(data: any, titleMapping: any) {
const title = titleMapping[key] || key;
newItem[title] = item[key];
return newItem;
});
}, {});
});
}
@@ -626,7 +612,7 @@ onMounted(() => {
</a-dropdown>
</a-tooltip>
<TableColumnsDnd
cache-id="alarmActive"
cache-id="alarmEvent"
:columns="tableColumns"
v-model:columns-dnd="tableColumnsDnd"
></TableColumnsDnd>

View File

@@ -122,108 +122,96 @@ let tableState: TabeStateType = reactive({
/**表格字段列 */
let tableColumns: ColumnsType = [
{
title: t('views.faultManage.activeAlarm.alarmId'),
dataIndex: 'alarmId',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.neId'),
dataIndex: 'neId',
align: 'center',
width: 5,
align: 'left',
width: 100,
},
{
title: t('views.faultManage.activeAlarm.neName'),
dataIndex: 'neName',
align: 'center',
width: 5,
align: 'left',
width: 100,
},
{
title: t('views.faultManage.activeAlarm.neType'),
dataIndex: 'neType',
align: 'center',
width: 5,
align: 'left',
width: 100,
},
{
title: t('views.faultManage.activeAlarm.origLevel'),
align: 'left',
dataIndex: 'origSeverity',
key: 'origSeverity',
width: 5,
width: 100,
},
{
title: t('views.faultManage.activeAlarm.alarmCode'),
dataIndex: 'alarmCode',
align: 'center',
width: 5,
align: 'left',
width: 100,
},
{
title: t('views.faultManage.activeAlarm.alarmTitle'),
dataIndex: 'alarmTitle',
align: 'left',
width: 5,
width: 200,
},
{
title: t('views.faultManage.activeAlarm.eventTime'),
dataIndex: 'eventTime',
align: 'center',
align: 'left',
sorter: (a: any, b: any) => 1,
width: 5,
width: 150,
},
{
title: t('views.faultManage.activeAlarm.alarmType'),
dataIndex: 'alarmType',
key: 'alarmType',
align: 'left',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.pvFlag'),
dataIndex: 'pvFlag',
align: 'center',
width: 5,
width: 120,
},
{
title: t('views.faultManage.activeAlarm.clearUser'),
dataIndex: 'clearUser',
align: 'left',
width: 5,
width: 100,
},
{
title: t('views.faultManage.activeAlarm.clearType'),
dataIndex: 'clearType',
key: 'clearType',
align: 'left',
width: 5,
width: 120,
},
{
title: t('views.faultManage.activeAlarm.clearTime'),
dataIndex: 'clearTime',
align: 'left',
sorter: (a: any, b: any) => 1,
width: 5,
width: 150,
},
{
title: t('views.faultManage.activeAlarm.ackState'),
dataIndex: 'ackState',
key: 'ackState',
align: 'left',
width: 5,
width: 100,
},
{
title: t('views.faultManage.activeAlarm.ackUser'),
dataIndex: 'ackUser',
align: 'left',
width: 5,
width: 100,
},
{
title: t('common.operate'),
key: 'alarm_id',
align: 'center',
align: 'left',
fixed: 'right',
width: 5,
width: 120,
},
];
@@ -648,7 +636,7 @@ onMounted(() => {
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.alarmCode')"
@@ -688,22 +676,7 @@ onMounted(() => {
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.pvFlag')"
name="pv_flag"
>
<a-select
v-model:value="queryParams.pv_flag"
:placeholder="t('common.selectPlease')"
:options="[
{ label: 'PNF', value: 'PNF' },
{ label: 'VNF', value: 'VNF' },
]"
/>
</a-form-item>
</a-col>
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.alarmType')"
@@ -804,12 +777,12 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:row-selection="{
columnWidth: 3,
columnWidth: 48,
selectedRowKeys: state.selectedRowKeys,
onChange: onSelectChange,
}"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 120, y: 400 }"
:scroll="{ x: tableColumns.length * 150, y: 400 }"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'origSeverity'">
@@ -863,6 +836,7 @@ onMounted(() => {
@ok="fnModalOk"
:ok-text="t('views.faultManage.activeAlarm.confirm')"
@cancel="fnModalCancel"
:footer="null"
>
<a-form
name="modalStateFrom"
@@ -946,15 +920,6 @@ onMounted(() => {
</a-row>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.pvFlag')"
name="pvFlag"
>
{{ modalState.from.pvFlag }}
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.alarmType')"
@@ -973,14 +938,6 @@ onMounted(() => {
{{ modalState.from.locationInfo }}
</a-form-item>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.province')"
name="province"
>
{{ modalState.from.province }}
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.origLevel')"
@@ -1019,7 +976,10 @@ onMounted(() => {
:label="t('views.faultManage.activeAlarm.clearType')"
name="clearType"
>
{{ modalState.from.clearType }}
<DictTag
:options="dict.activeClearType"
:value="modalState.from.clearType"
/>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
@@ -1046,7 +1006,10 @@ onMounted(() => {
:label="t('views.faultManage.activeAlarm.ackState')"
name="ackState"
>
{{ modalState.from.ackState }}
<DictTag
:options="dict.activeAckState"
:value="modalState.from.ackState"
/>
</a-form-item>
</a-col>
</a-row>