From 58ed3bfc2e17d56bdf5a61ec39be1c13e5ae286f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 8 Sep 2025 23:42:43 +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=20apiErro?= =?UTF-8?q?rLog=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/apiErrorLog/data.ts | 11 +- .../src/views/infra/apiErrorLog/index.vue | 25 ++-- .../src/views/infra/apiErrorLog/data.ts | 48 +------ .../src/views/infra/apiErrorLog/index.vue | 121 +++++++++++------- 4 files changed, 103 insertions(+), 102 deletions(-) diff --git a/apps/web-antd/src/views/infra/apiErrorLog/data.ts b/apps/web-antd/src/views/infra/apiErrorLog/data.ts index 201c8911f..89f886ee3 100644 --- a/apps/web-antd/src/views/infra/apiErrorLog/data.ts +++ b/apps/web-antd/src/views/infra/apiErrorLog/data.ts @@ -77,14 +77,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 }, @@ -93,27 +96,33 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'applicationName', title: '应用名', + minWidth: 150, }, { field: 'requestMethod', title: '请求方法', + minWidth: 80, }, { field: 'requestUrl', title: '请求地址', + minWidth: 200, }, { field: 'exceptionTime', title: '异常发生时间', + minWidth: 180, formatter: 'formatDateTime', }, { field: 'exceptionName', title: '异常名', + minWidth: 180, }, { field: 'processStatus', title: '处理状态', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS }, @@ -121,7 +130,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { }, { title: '操作', - width: 200, + minWidth: 200, fixed: 'right', slots: { default: 'actions' }, }, diff --git a/apps/web-antd/src/views/infra/apiErrorLog/index.vue b/apps/web-antd/src/views/infra/apiErrorLog/index.vue index fc4215a7c..c84d0d44e 100644 --- a/apps/web-antd/src/views/infra/apiErrorLog/index.vue +++ b/apps/web-antd/src/views/infra/apiErrorLog/index.vue @@ -25,7 +25,7 @@ const [DetailModal, detailModalApi] = useVbenModal({ }); /** 刷新表格 */ -function onRefresh() { +function handleRefresh() { gridApi.query(); } @@ -42,14 +42,20 @@ function handleDetail(row: InfraApiErrorLogApi.ApiErrorLog) { /** 处理已处理 / 已忽略的操作 */ async function handleProcess(id: number, processStatus: number) { - confirm({ + await confirm({ content: `确认标记为${InfraApiErrorLogProcessStatusEnum.DONE ? '已处理' : '已忽略'}?`, - }).then(async () => { - await updateApiErrorLogStatus(id, processStatus); - // 关闭并提示 - message.success($t('ui.actionMessage.operationSuccess')); - onRefresh(); }); + const hideLoading = message.loading({ + content: '正在处理中...', + duration: 0, + }); + try { + await updateApiErrorLogStatus(id, processStatus); + message.success($t('ui.actionMessage.operationSuccess')); + handleRefresh(); + } finally { + hideLoading(); + } } const [Grid, gridApi] = useVbenVxeGrid({ @@ -73,6 +79,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, rowConfig: { keyField: 'id', + isHover: true, }, toolbarConfig: { refresh: true, @@ -88,7 +95,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ - +