From 7d1d87a1ac5943ff6b27be738f191ae82e95895b Mon Sep 17 00:00:00 2001 From: dtsz <314942997@qq.com> Date: Tue, 21 Mar 2023 20:18:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infra/apiErrorLog/index.ts | 4 +- .../infra/apiErrorLog/apiErrorLog.data.ts | 76 ----- src/views/infra/apiErrorLog/detail.vue | 76 +++++ src/views/infra/apiErrorLog/index.vue | 311 +++++++++++++----- 4 files changed, 305 insertions(+), 162 deletions(-) delete mode 100644 src/views/infra/apiErrorLog/apiErrorLog.data.ts create mode 100644 src/views/infra/apiErrorLog/detail.vue diff --git a/src/api/infra/apiErrorLog/index.ts b/src/api/infra/apiErrorLog/index.ts index 06515c36..779cfd61 100644 --- a/src/api/infra/apiErrorLog/index.ts +++ b/src/api/infra/apiErrorLog/index.ts @@ -46,7 +46,7 @@ export interface ApiErrorLogExportReqVO { } // 查询列表API 访问日志 -export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => { +export const getApiErrorLogPageApi = (params: PageParam) => { return request.get({ url: '/infra/api-error-log/page', params }) } @@ -58,7 +58,7 @@ export const updateApiErrorLogPageApi = (id: number, processStatus: number) => { } // 导出API 访问日志 -export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => { +export const exportApiErrorLogApi = (params) => { return request.download({ url: '/infra/api-error-log/export-excel', params diff --git a/src/views/infra/apiErrorLog/apiErrorLog.data.ts b/src/views/infra/apiErrorLog/apiErrorLog.data.ts deleted file mode 100644 index a539c167..00000000 --- a/src/views/infra/apiErrorLog/apiErrorLog.data.ts +++ /dev/null @@ -1,76 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '日志编号', - action: true, - actionWidth: '300', - columns: [ - { - title: '链路追踪', - field: 'traceId', - isTable: false - }, - { - title: '用户编号', - field: 'userId', - isSearch: true - }, - { - title: '用户类型', - field: 'userType', - dictType: DICT_TYPE.USER_TYPE, - isSearch: true - }, - { - title: '应用名', - field: 'applicationName', - isSearch: true - }, - { - title: '请求方法名', - field: 'requestMethod' - }, - { - title: '请求地址', - field: 'requestUrl', - isSearch: true - }, - { - title: '异常发生时间', - field: 'exceptionTime', - formatter: 'formatDate', - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: '异常名', - field: 'exceptionName' - }, - { - title: '处理状态', - field: 'processStatus', - dictType: DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '处理人', - field: 'processUserId', - isTable: false - }, - { - title: '处理时间', - field: 'processTime', - formatter: 'formatDate', - isTable: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/apiErrorLog/detail.vue b/src/views/infra/apiErrorLog/detail.vue new file mode 100644 index 00000000..9ede0f1b --- /dev/null +++ b/src/views/infra/apiErrorLog/detail.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/views/infra/apiErrorLog/index.vue b/src/views/infra/apiErrorLog/index.vue index 4193351a..664546cb 100644 --- a/src/views/infra/apiErrorLog/index.vue +++ b/src/views/infra/apiErrorLog/index.vue @@ -1,99 +1,242 @@ +