style: 数据列表列宽固定操作

This commit is contained in:
TsMask
2023-11-01 19:16:32 +08:00
parent 6cfe080a94
commit e97943bf10
7 changed files with 112 additions and 30 deletions

View File

@@ -122,42 +122,50 @@ let tableColumns: ColumnsType = [
title: t('views.faultManage.activeAlarm.alarmId'),
dataIndex: 'alarmId',
align: 'center',
width: 8,
},
{
title: t('views.faultManage.activeAlarm.neId'),
dataIndex: 'neId',
align: 'center',
width: 8,
},
{
title: t('views.faultManage.activeAlarm.neName'),
dataIndex: 'neName',
align: 'center',
width: 8,
},
{
title: t('views.faultManage.activeAlarm.neType'),
dataIndex: 'neType',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.origLevel'),
align: 'center',
key: 'origSeverity',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.alarmCode'),
dataIndex: 'alarmCode',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.alarmTitle'),
dataIndex: 'alarmTitle',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.eventTime'),
dataIndex: 'eventTime',
align: 'center',
sorter: true,
sorter: (a: any, b: any) => 1,
width: 8,
},
{
title: t('views.faultManage.activeAlarm.alarmType'),
@@ -176,16 +184,19 @@ let tableColumns: ColumnsType = [
}
return opt.value;
},
width: 5,
},
{
title: t('views.faultManage.activeAlarm.pvFlag'),
dataIndex: 'pvFlag',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.clearUser'),
dataIndex: 'clearUser',
align: 'center',
width: 10,
},
{
title: t('views.faultManage.activeAlarm.clearType'),
@@ -202,6 +213,7 @@ let tableColumns: ColumnsType = [
}
return opt.value;
},
width: 5,
},
{
title: t('views.faultManage.activeAlarm.ackState'),
@@ -217,16 +229,20 @@ let tableColumns: ColumnsType = [
}
return opt.value;
},
width: 5,
},
{
title: t('views.faultManage.activeAlarm.ackUser'),
dataIndex: 'ackUser',
align: 'center',
width: 5,
},
{
title: t('common.operate'),
key: 'alarm_id',
align: 'center',
fixed: 'right',
width: 5,
},
];
@@ -239,52 +255,61 @@ let alarmTableColumns: ColumnsType = [
title: t('views.faultManage.activeAlarm.alarmTitle'),
dataIndex: '告警名称',
align: 'center',
width: 3,
},
{
title: t('views.faultManage.activeAlarm.locationInfo'),
dataIndex: '告警定位信息',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.addInfo'),
dataIndex: '告警帮助信息',
align: 'center',
width: 8,
},
{
title: t('views.faultManage.activeAlarm.alarmType'),
dataIndex: '告警类型',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.origLevel'),
dataIndex: '告警级别',
align: 'center',
width: 3,
},
{
title: t('views.faultManage.activeAlarm.alarmCode'),
dataIndex: '告警编号',
align: 'center',
width: 3,
},
{
title: t('views.faultManage.activeAlarm.specificProblem'),
dataIndex: '告警问题原因',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.clearType'),
dataIndex: '清除类型',
align: 'center',
width: 3,
},
{
title: t('views.faultManage.activeAlarm.realTitle'),
dataIndex: '英文标题',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.objectNf'),
dataIndex: '适用网元',
align: 'center',
width: 2,
},
];
@@ -986,7 +1011,7 @@ onMounted(() => {
:data-source="alarmTableState.data"
:size="alarmTableState.size"
:pagination="false"
:scroll="{ x: true, y: 450 }"
:scroll="{ x: 2000, y: 560 }"
>
</a-table>
</a-drawer>
@@ -1001,11 +1026,12 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:row-selection="{
columnWidth: 2,
selectedRowKeys: state.selectedRowKeys,
onChange: onSelectChange,
}"
:pagination="tablePagination"
:scroll="{ x: true }"
:scroll="{ x: 2000, y: 400 }"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'origSeverity'">
@@ -1044,6 +1070,7 @@ onMounted(() => {
<!-- 详情框 -->
<a-modal
width="800px"
:body-style="{ height: '520px', overflowY: 'scroll' }"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByView"