From ce41fe7e26945874f02ebf4959294b10ef9ac7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Wed, 18 Mar 2026 22:37:47 +0800 Subject: [PATCH] feat: add frontend API integration for operation log --- novalon-manage-web/src/api/operationLog.ts | 41 +++++++++++++++++++ .../src/views/audit/OperationLog.vue | 18 ++++---- 2 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 novalon-manage-web/src/api/operationLog.ts diff --git a/novalon-manage-web/src/api/operationLog.ts b/novalon-manage-web/src/api/operationLog.ts new file mode 100644 index 0000000..4460d66 --- /dev/null +++ b/novalon-manage-web/src/api/operationLog.ts @@ -0,0 +1,41 @@ +import request from '@/utils/request' + +export interface OperationLog { + id?: number + username?: string + operation?: string + method?: string + params?: string + result?: string + ip?: string + duration?: number + status?: string + errorMsg?: string + createdAt?: string +} + +export interface PageResponse { + content: T[] + totalPages: number + totalElements: number + currentPage: number + size: number +} + +export const operationLogApi = { + getAll: () => request.get('/logs/operation'), + + getById: (id: number) => request.get(`/logs/operation/${id}`), + + getPage: (params: { + page?: number + size?: number + sort?: string + order?: string + keyword?: string + }) => request.get>('/logs/operation/page', { params }), + + getCount: () => request.get('/logs/operation/count'), + + create: (data: Partial) => request.post('/logs/operation', data) +} \ No newline at end of file diff --git a/novalon-manage-web/src/views/audit/OperationLog.vue b/novalon-manage-web/src/views/audit/OperationLog.vue index 7d0d4ab..2298b20 100644 --- a/novalon-manage-web/src/views/audit/OperationLog.vue +++ b/novalon-manage-web/src/views/audit/OperationLog.vue @@ -91,10 +91,10 @@