From 06912323196460bb05695e4b6ea7ed288e53d1b4 Mon Sep 17 00:00:00 2001 From: dtsz <314942997@qq.com> Date: Thu, 23 Mar 2023 12:27:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E9=97=AE=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/apiAccessLog/index.ts | 4 +- .../infra/apiAccessLog/apiAccessLog.data.ts | 74 ----- src/views/infra/apiAccessLog/detail.vue | 66 +++++ src/views/infra/apiAccessLog/index.vue | 260 ++++++++++++++---- 4 files changed, 277 insertions(+), 127 deletions(-) delete mode 100644 src/views/infra/apiAccessLog/apiAccessLog.data.ts create mode 100644 src/views/infra/apiAccessLog/detail.vue diff --git a/src/api/infra/apiAccessLog/index.ts b/src/api/infra/apiAccessLog/index.ts index b46199e4b..11cff1caf 100644 --- a/src/api/infra/apiAccessLog/index.ts +++ b/src/api/infra/apiAccessLog/index.ts @@ -40,11 +40,11 @@ export interface ApiAccessLogExportReqVO { } // 查询列表API 访问日志 -export const getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => { +export const getApiAccessLogPageApi = (params: PageParam) => { return request.get({ url: '/infra/api-access-log/page', params }) } // 导出API 访问日志 -export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => { +export const exportApiAccessLogApi = (params) => { return request.download({ url: '/infra/api-access-log/export-excel', params }) } diff --git a/src/views/infra/apiAccessLog/apiAccessLog.data.ts b/src/views/infra/apiAccessLog/apiAccessLog.data.ts deleted file mode 100644 index cb9e97a7e..000000000 --- a/src/views/infra/apiAccessLog/apiAccessLog.data.ts +++ /dev/null @@ -1,74 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '日志编号', - action: true, - actionWidth: '80px', - columns: [ - { - title: '链路追踪', - field: 'traceId', - isTable: false - }, - { - title: '用户编号', - field: 'userId', - isSearch: true - }, - { - title: '用户类型', - field: 'userType', - dictType: DICT_TYPE.USER_TYPE, - dictClass: 'number', - isSearch: true - }, - { - title: '应用名', - field: 'applicationName', - isSearch: true - }, - { - title: '请求方法名', - field: 'requestMethod' - }, - { - title: '请求地址', - field: 'requestUrl', - isSearch: true - }, - { - title: '请求时间', - field: 'beginTime', - formatter: 'formatDate', - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: '执行时长', - field: 'duration', - table: { - slots: { - default: 'duration_default' - } - } - }, - { - title: '操作结果', - field: 'resultCode', - isSearch: true, - table: { - slots: { - default: 'resultCode_default' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/apiAccessLog/detail.vue b/src/views/infra/apiAccessLog/detail.vue new file mode 100644 index 000000000..d70c7ec73 --- /dev/null +++ b/src/views/infra/apiAccessLog/detail.vue @@ -0,0 +1,66 @@ + + + diff --git a/src/views/infra/apiAccessLog/index.vue b/src/views/infra/apiAccessLog/index.vue index 6a09927d7..25cd80e87 100644 --- a/src/views/infra/apiAccessLog/index.vue +++ b/src/views/infra/apiAccessLog/index.vue @@ -1,62 +1,220 @@ +