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

@@ -69,21 +69,25 @@ let tableColumns: ColumnsType = [
title: t('common.rowId'),
dataIndex: 'id',
align: 'center',
width: 1,
},
{
title: t('views.configManage.backupManage.neType'),
dataIndex: 'neType',
align: 'center',
width: 2,
},
{
title: t('views.configManage.backupManage.neID'),
dataIndex: 'neId',
align: 'center',
width: 2,
},
{
title: t('views.configManage.backupManage.fileName'),
dataIndex: 'fileName',
align: 'center',
width: 3,
},
{
title: t('views.configManage.backupManage.createAt'),
@@ -93,11 +97,14 @@ let tableColumns: ColumnsType = [
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 3,
},
{
title: t('common.operate'),
key: 'id',
align: 'center',
fixed: 'right',
width: 2,
},
];
@@ -395,15 +402,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>
@@ -420,7 +427,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: true }"
:scroll="{ x: 1200, y: 400 }"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'id'">

View File

@@ -64,26 +64,31 @@ let tableColumns: ColumnsType = [
title: t('views.configManage.license.neType'),
dataIndex: 'neType',
align: 'center',
width: 2,
},
{
title: t('views.configManage.license.neId'),
dataIndex: 'neId',
align: 'center',
width: 2,
},
{
title: t('views.configManage.license.fileName'),
dataIndex: 'fileName',
align: 'center',
width: 3,
},
{
title: t('views.configManage.license.comment'),
dataIndex: 'comment',
align: 'center',
width: 5,
},
{
title: t('views.configManage.license.createTime'),
dataIndex: 'createdAt',
align: 'center',
width: 2,
},
];
@@ -400,7 +405,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: true }"
:scroll="{ x: 1000 }"
>
</a-table>
</a-card>

View File

@@ -86,51 +86,61 @@ let tableColumns: ColumnsType = [
title: '网元类型',
dataIndex: 'neType',
align: 'center',
width: 3,
},
{
title: '网元内部标识',
dataIndex: 'neId',
align: 'center',
width: 3,
},
{
title: '资源唯一标识',
dataIndex: 'rmUid',
align: 'center',
width: 5,
},
{
title: '网元名称',
dataIndex: 'neName',
align: 'center',
width: 5,
},
{
title: 'IP地址',
dataIndex: 'ip',
align: 'center',
width: 5,
},
{
title: '端口',
dataIndex: 'port',
align: 'center',
width: 3,
},
{
title: '网元虚拟化标识',
dataIndex: 'pvFlag',
align: 'center',
width: 5,
},
{
title: '网元所在省份',
dataIndex: 'province',
align: 'center',
width: 5,
},
{
title: '厂商名称',
dataIndex: 'vendorName',
align: 'center',
width: 5,
},
{
title: '网络标识',
dataIndex: 'dn',
align: 'center',
width: 5,
},
{
title: '修改时间',
@@ -140,11 +150,14 @@ let tableColumns: ColumnsType = [
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 5,
},
{
title: t('common.operate'),
key: 'id',
align: 'center',
fixed: 'right',
width: 5,
},
];
@@ -749,7 +762,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: true,y:400 }"
:scroll="{ x: 2000, y:400 }"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'id'">

View File

@@ -81,34 +81,38 @@ let tableColumns: ColumnsType = [
title: '网元类型',
dataIndex: 'neType',
align: 'center',
width: 2,
},
{
title: '网元内部标识',
dataIndex: 'neId',
align: 'center',
width: 2,
},
{
title: '版本',
dataIndex: 'version',
align: 'center',
width: 2,
},
{
title: '升级前版本',
dataIndex: 'preVersion',
align: 'center',
width: '60px',
width: 2,
},
{
title: '回退前版本',
dataIndex: 'newVersion',
align: 'center',
width: '60px',
width: 2,
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
align: 'center',
width: 2,
},
{
title: '激活时间',
@@ -118,6 +122,7 @@ let tableColumns: ColumnsType = [
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 2,
},
];
@@ -254,7 +259,7 @@ watch(
:loading="tableState.loading"
:data-source="tableState.data"
:size="tableState.size"
:scroll="{ y: 400, x: true }"
:scroll="{ x: 1200, y: 400 }"
:pagination="tablePagination"
>
</a-table>

View File

@@ -76,16 +76,19 @@ let tableColumns: ColumnsType = [
title: t('views.configManage.softwareManage.neType'),
dataIndex: 'neType',
align: 'center',
width: 2,
},
{
title: t('views.configManage.softwareManage.fileName'),
dataIndex: 'fileName',
align: 'center',
width: 2,
},
{
title: t('views.configManage.softwareManage.version'),
dataIndex: 'version',
align: 'center',
width: 2,
},
{
title: t('views.configManage.softwareManage.updateTime'),
@@ -95,16 +98,20 @@ let tableColumns: ColumnsType = [
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 2,
},
{
title: t('views.configManage.softwareManage.description'),
dataIndex: 'comment',
align: 'center',
width: 2,
},
{
title: t('common.operate'),
key: 'id',
align: 'center',
fixed: 'right',
width: 2,
},
];
@@ -691,7 +698,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: true }"
:scroll="{ x: 1200, y: 400 }"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'id'">