style: MML日志管理页面排版

This commit is contained in:
TsMask
2024-01-10 16:30:47 +08:00
parent f848089742
commit 0fafe3f388

View File

@@ -66,49 +66,49 @@ let tableColumns: ColumnsType = [
{ {
title: t('common.rowId'), title: t('common.rowId'),
dataIndex: 'id', dataIndex: 'id',
align: 'center', align: 'left',
width: 2, width: 100,
}, },
{ {
title: t('views.logManage.mml.account'), title: t('views.logManage.mml.account'),
dataIndex: 'user', dataIndex: 'user',
align: 'center', align: 'left',
width: 3, width: 100,
}, },
{ {
title: t('views.logManage.mml.ip'), title: t('views.logManage.mml.ip'),
dataIndex: 'ip', dataIndex: 'ip',
align: 'center', align: 'left',
width: 3, width: 100,
}, },
{ {
title: t('views.logManage.mml.type'), title: t('views.logManage.mml.type'),
dataIndex: 'neType', dataIndex: 'neType',
align: 'center', align: 'left',
width: 3, width: 100,
}, },
{ {
title: t('views.logManage.mml.neId'), title: t('views.logManage.mml.neId'),
dataIndex: 'neId', dataIndex: 'neId',
align: 'center', align: 'left',
width: 3, width: 100,
},
{
title: t('views.logManage.mml.logTime'),
dataIndex: 'logTime',
align: 'left',
width: 150,
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
}, },
{ {
title: t('views.logManage.mml.MML'), title: t('views.logManage.mml.MML'),
dataIndex: 'mml', dataIndex: 'mml',
key: 'mml', key: 'mml',
align: 'left', align: 'left',
width: 5, width: 200,
},
{
title: t('views.logManage.mml.logTime'),
dataIndex: 'logTime',
align: 'center',
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 3,
}, },
]; ];
@@ -149,7 +149,7 @@ function fnTableSize({ key }: MenuInfo) {
function fnGetList(pageNum?: number) { function fnGetList(pageNum?: number) {
if (tableState.loading) return; if (tableState.loading) return;
tableState.loading = true; tableState.loading = true;
if(pageNum){ if (pageNum) {
queryParams.pageNum = pageNum; queryParams.pageNum = pageNum;
} }
if (!queryRangePicker.value) { if (!queryRangePicker.value) {
@@ -183,7 +183,10 @@ onMounted(() => {
<a-form :model="queryParams" name="queryParams" layout="horizontal"> <a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.logManage.mml.account')" name="accountName"> <a-form-item
:label="t('views.logManage.mml.account')"
name="accountName"
>
<a-input <a-input
v-model:value="queryParams.accountName" v-model:value="queryParams.accountName"
:allow-clear="true" :allow-clear="true"
@@ -191,7 +194,10 @@ onMounted(() => {
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="8" :md="12" :xs="24"> <a-col :lg="8" :md="12" :xs="24">
<a-form-item :label="t('views.logManage.mml.logTime')" name="queryRangePicker"> <a-form-item
:label="t('views.logManage.mml.logTime')"
name="queryRangePicker"
>
<a-range-picker <a-range-picker
v-model:value="queryRangePicker" v-model:value="queryRangePicker"
allow-clear allow-clear
@@ -280,7 +286,7 @@ onMounted(() => {
:data-source="tableState.data" :data-source="tableState.data"
:size="tableState.size" :size="tableState.size"
:pagination="tablePagination" :pagination="tablePagination"
:scroll="{ x: 1000, y: 400 }" :scroll="{ x: tableColumns.length * 100 }"
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'mml'"> <template v-if="column.key === 'mml'">
@@ -300,7 +306,7 @@ onMounted(() => {
padding: 0 24px; padding: 0 24px;
} }
.mmlText { .mmlText {
// max-width: 800px; sdf // max-width: 800px; sdf
cursor: pointer; cursor: pointer;
} }
</style> </style>