From cec3b7ab1e3c5bd6c905121405d2fbf1877d11cb Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 8 Sep 2025 23:25:33 +0800 Subject: [PATCH] =?UTF-8?q?reactor=EF=BC=9A=E3=80=90system=20=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=AE=A1=E7=90=86=E3=80=91infra=20=E7=9A=84=20apiAcce?= =?UTF-8?q?ssLog=20=E8=BF=9B=E4=B8=80=E6=AD=A5=E7=BB=9F=E4=B8=80=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/infra/apiAccessLog/data.ts | 12 ++++ .../src/views/infra/apiAccessLog/index.vue | 5 +- .../src/views/infra/apiAccessLog/data.ts | 32 ++------- .../src/views/infra/apiAccessLog/index.vue | 68 +++++++++---------- .../src/views/infra/apiErrorLog/data.ts | 4 +- 5 files changed, 53 insertions(+), 68 deletions(-) diff --git a/apps/web-antd/src/views/infra/apiAccessLog/data.ts b/apps/web-antd/src/views/infra/apiAccessLog/data.ts index 1183a4bbd..9f4235303 100644 --- a/apps/web-antd/src/views/infra/apiAccessLog/data.ts +++ b/apps/web-antd/src/views/infra/apiAccessLog/data.ts @@ -79,14 +79,17 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'id', title: '日志编号', + minWidth: 100, }, { field: 'userId', title: '用户编号', + minWidth: 100, }, { field: 'userType', title: '用户类型', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.USER_TYPE }, @@ -95,28 +98,34 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'applicationName', title: '应用名', + minWidth: 150, }, { field: 'requestMethod', title: '请求方法', + minWidth: 80, }, { field: 'requestUrl', title: '请求地址', + minWidth: 300, }, { field: 'beginTime', title: '请求时间', + minWidth: 180, formatter: 'formatDateTime', }, { field: 'duration', title: '执行时长', + minWidth: 120, formatter: ({ cellValue }) => `${cellValue} ms`, }, { field: 'resultCode', title: '操作结果', + minWidth: 150, formatter: ({ row }) => { return row.resultCode === 0 ? '成功' : `失败(${row.resultMsg})`; }, @@ -124,14 +133,17 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'operateModule', title: '操作模块', + minWidth: 150, }, { field: 'operateName', title: '操作名', + minWidth: 220, }, { field: 'operateType', title: '操作类型', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.INFRA_OPERATE_TYPE }, diff --git a/apps/web-antd/src/views/infra/apiAccessLog/index.vue b/apps/web-antd/src/views/infra/apiAccessLog/index.vue index 4536d32e4..4e4bc183e 100644 --- a/apps/web-antd/src/views/infra/apiAccessLog/index.vue +++ b/apps/web-antd/src/views/infra/apiAccessLog/index.vue @@ -21,7 +21,7 @@ const [DetailModal, detailModalApi] = useVbenModal({ }); /** 刷新表格 */ -function onRefresh() { +function handleRefresh() { gridApi.query(); } @@ -57,6 +57,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, rowConfig: { keyField: 'id', + isHover: true, }, toolbarConfig: { refresh: true, @@ -72,7 +73,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ - +