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

@@ -111,41 +111,49 @@ 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,
},
{
title: t('views.faultManage.activeAlarm.neName'),
dataIndex: 'neName',
align: 'center',
width: 5,
},
{
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',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.alarmType'),
@@ -164,16 +172,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: 5,
},
{
title: t('views.faultManage.activeAlarm.clearType'),
@@ -190,6 +201,7 @@ let tableColumns: ColumnsType = [
}
return opt.value;
},
width: 5,
},
{
title: t('views.faultManage.activeAlarm.ackState'),
@@ -205,16 +217,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,
},
];
@@ -730,15 +746,15 @@ onMounted(() => {
:selected-keys="[tableState.size as string]"
@click="fnTableSize"
>
<a-menu-item key="default">{{
t('common.size.default')
}}</a-menu-item>
<a-menu-item key="middle">{{
t('common.size.middle')
}}</a-menu-item>
<a-menu-item key="small">{{
t('common.size.small')
}}</a-menu-item>
<a-menu-item key="default">
{{ t('common.size.default') }}
</a-menu-item>
<a-menu-item key="middle">
{{ t('common.size.middle') }}
</a-menu-item>
<a-menu-item key="small">
{{ t('common.size.small') }}
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
@@ -755,11 +771,12 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:row-selection="{
columnWidth: 3,
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'">
@@ -787,6 +804,7 @@ onMounted(() => {
<!-- 详情框 -->
<a-modal
width="800px"
:body-style="{ height: '520px', overflowY: 'scroll' }"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByView"