style: 调整MML执行日志表格样式

This commit is contained in:
TsMask
2024-11-08 16:04:51 +08:00
parent df7c455881
commit 414afea783

View File

@@ -62,12 +62,12 @@ let tableState: TabeStateType = reactive({
}); });
/**表格字段列 */ /**表格字段列 */
let tableColumns: ColumnsType = [ let tableColumns: ColumnsType = reactive([
{ {
title: t('common.rowId'), title: t('common.rowId'),
dataIndex: 'id', dataIndex: 'id',
align: 'left', align: 'left',
width: 100, width: 80,
}, },
{ {
title: t('views.logManage.mml.account'), title: t('views.logManage.mml.account'),
@@ -108,9 +108,9 @@ let tableColumns: ColumnsType = [
dataIndex: 'mml', dataIndex: 'mml',
key: 'mml', key: 'mml',
align: 'left', align: 'left',
width: 200, ellipsis: true,
}, },
]; ]);
/**表格分页器参数 */ /**表格分页器参数 */
let tablePagination = reactive({ let tablePagination = reactive({
@@ -161,7 +161,11 @@ function fnGetList(pageNum?: number) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tablePagination.total = res.total; tablePagination.total = res.total;
tableState.data = res.rows; tableState.data = res.rows;
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) { if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
queryParams.pageNum !== 1
) {
tableState.loading = false; tableState.loading = false;
fnGetList(queryParams.pageNum - 1); fnGetList(queryParams.pageNum - 1);
} }
@@ -289,16 +293,15 @@ onMounted(() => {
:loading="tableState.loading" :loading="tableState.loading"
:data-source="tableState.data" :data-source="tableState.data"
:size="tableState.size" :size="tableState.size"
:pagination="tablePagination" :pagination="tablePagination"
: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'">
<a-tooltip placement="topLeft"> <a-tooltip placement="topLeft">
<template #title>{{ record.result }}</template> <template #title>{{ record.result }}</template>
<div class="mmlText">{{ record.mml }}</div> <div class="mmlText">{{ record.mml }}</div>
</a-tooltip> </a-tooltip>
</template> </template> -->
</template> </template>
</a-table> </a-table>
</a-card> </a-card>