fix: MML日志列表显示

This commit is contained in:
TsMask
2025-08-05 17:28:03 +08:00
parent 7901b34c04
commit 67dc3a0389
3 changed files with 19 additions and 80 deletions

View File

@@ -6,7 +6,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { parseDateToStr } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listMML } from '@/api/logManage/mml';
import { mmlLogList } from '@/api/tool/mml';
import useI18n from '@/hooks/useI18n';
const { t } = useI18n();
@@ -16,7 +16,7 @@ let queryRangePicker = ref<[string, string]>(['', '']);
/**查询参数 */
let queryParams = reactive({
/**登录账号 */
accountName: '',
user: '',
/**记录时间 */
beginTime: '',
endTime: '',
@@ -105,8 +105,8 @@ let tableColumns: ColumnsType = reactive([
},
{
title: t('views.logManage.mml.MML'),
dataIndex: 'mml',
key: 'mml',
dataIndex: 'command',
key: 'command',
align: 'left',
ellipsis: true,
},
@@ -157,8 +157,8 @@ function fnGetList(pageNum?: number) {
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listMML(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
mmlLogList(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
@@ -192,13 +192,11 @@ onMounted(() => {
<a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16">
<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="user">
<a-input
v-model:value="queryParams.accountName"
v-model:value="queryParams.user"
:allow-clear="true"
:placeholder="t('common.inputPlease')"
></a-input>
</a-form-item>
</a-col>
@@ -294,7 +292,7 @@ onMounted(() => {
:loading="tableState.loading"
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:pagination="tablePagination"
>
<template #bodyCell="{ column, record }">
<!-- <template v-if="column.key === 'mml'">