From 2d4e7e7d084bffed8406faa9e96214ec81e2812c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 22 Mar 2023 22:40:56 +0800 Subject: [PATCH] =?UTF-8?q?Vue3=20=E9=87=8D=E6=9E=84=EF=BC=9AREVIEW=20?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infra/apiErrorLog/index.ts | 24 +---- .../{detail.vue => ApiErrorLogDetail.vue} | 21 +++-- src/views/infra/apiErrorLog/index.vue | 88 ++++++++++--------- 3 files changed, 62 insertions(+), 71 deletions(-) rename src/views/infra/apiErrorLog/{detail.vue => ApiErrorLogDetail.vue} (80%) diff --git a/src/api/infra/apiErrorLog/index.ts b/src/api/infra/apiErrorLog/index.ts index 779cfd61..59ee2143 100644 --- a/src/api/infra/apiErrorLog/index.ts +++ b/src/api/infra/apiErrorLog/index.ts @@ -27,38 +27,20 @@ export interface ApiErrorLogVO { createTime: Date } -export interface ApiErrorLogPageReqVO extends PageParam { - userId?: number - userType?: number - applicationName?: string - requestUrl?: string - exceptionTime?: Date[] - processStatus: number -} - -export interface ApiErrorLogExportReqVO { - userId?: number - userType?: number - applicationName?: string - requestUrl?: string - exceptionTime?: Date[] - processStatus: number -} - // 查询列表API 访问日志 -export const getApiErrorLogPageApi = (params: PageParam) => { +export const getApiErrorLogPage = (params: PageParam) => { return request.get({ url: '/infra/api-error-log/page', params }) } // 更新 API 错误日志的处理状态 -export const updateApiErrorLogPageApi = (id: number, processStatus: number) => { +export const updateApiErrorLogPage = (id: number, processStatus: number) => { return request.put({ url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus }) } // 导出API 访问日志 -export const exportApiErrorLogApi = (params) => { +export const exportApiErrorLog = (params) => { return request.download({ url: '/infra/api-error-log/export-excel', params diff --git a/src/views/infra/apiErrorLog/detail.vue b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue similarity index 80% rename from src/views/infra/apiErrorLog/detail.vue rename to src/views/infra/apiErrorLog/ApiErrorLogDetail.vue index 9ede0f1b..479c4c4b 100644 --- a/src/views/infra/apiErrorLog/detail.vue +++ b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue @@ -10,13 +10,18 @@ {{ detailData.applicationName }} - - {{ detailData.userId }} | + + {{ detailData.userId }} - | {{ detailData.userIp }} | {{ detailData.userAgent }} + + + {{ detailData.userIp }} + + + {{ detailData.userAgent }} - {{ detailData.requestMethod }} | {{ detailData.requestUrl }} + {{ detailData.requestMethod }} {{ detailData.requestUrl }} {{ detailData.requestParams }} @@ -27,7 +32,7 @@ {{ detailData.exceptionName }} - + - diff --git a/src/views/infra/apiErrorLog/index.vue b/src/views/infra/apiErrorLog/index.vue index 664546cb..1108651a 100644 --- a/src/views/infra/apiErrorLog/index.vue +++ b/src/views/infra/apiErrorLog/index.vue @@ -1,5 +1,5 @@ - - - - - - - + + + + + - + - - + - +