From 049965f51ba9c0d25044a9ca7af5d1a3465800b3 Mon Sep 17 00:00:00 2001 From: chenxing Date: Thu, 20 Aug 2026 10:23:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=80=E6=94=BE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/apiDefinitions.ts | 2 + src/api/globals.d.ts | 147 +++++++++++++++++ src/assets/config/menu.ts | 1 + src/router/routes.ts | 8 + src/views/ApiLog.vue | 15 -- src/views/oapilog/OapiLogDetailModal.vue | 136 ++++++++++++++++ src/views/oapilog/OapiLogList.vue | 199 +++++++++++++++++++++++ 7 files changed, 493 insertions(+), 15 deletions(-) delete mode 100644 src/views/ApiLog.vue create mode 100644 src/views/oapilog/OapiLogDetailModal.vue create mode 100644 src/views/oapilog/OapiLogList.vue diff --git a/src/api/apiDefinitions.ts b/src/api/apiDefinitions.ts index 0cf3f17..626f4d8 100644 --- a/src/api/apiDefinitions.ts +++ b/src/api/apiDefinitions.ts @@ -81,6 +81,8 @@ export default { 'PushSubscription.download': ['GET', '/api/push/Download/{id}'], 'SysOperationLog.operationLogList': ['GET', '/api/oplog/List'], 'SysOperationLog.operationLogDownload': ['GET', '/api/oplog/Download/{id}'], + 'SysOapiLog.oapiLogList': ['GET', '/api/oapilog/List'], + 'SysOapiLog.oapiLogDownload': ['GET', '/api/oapilog/Download/{id}'], 'Identity.current': ['GET', '/api/identity/current'], 'Identity.available': ['GET', '/api/identity/available'], 'GroupAuthz.userRoles': ['GET', '/api/groupauthz/UserRoles'], diff --git a/src/api/globals.d.ts b/src/api/globals.d.ts index 8c472fe..c6676b3 100644 --- a/src/api/globals.d.ts +++ b/src/api/globals.d.ts @@ -58,6 +58,19 @@ export interface SysOperationLogQuery { startTime?: string; endTime?: string; } +export interface SysOapiLogQuery { + logLevel?: number; + callerAppKey?: number; + callerAppName?: string; + requestUri?: string; + requestIp?: string; + operationType?: string; + statusCode?: number; + success?: boolean; + keyword?: string; + startTime?: string; + endTime?: string; +} export interface SysAppRoleQuery { name?: string; appId?: number; @@ -368,6 +381,32 @@ export interface BasePageResultSysOperationLogListVo { totalPages?: number; hasNext?: boolean; } +export interface SysOapiLogListVo { + id?: number; + logLevel?: number; + callerAppKey?: number; + callerAppName?: string; + requestIp?: string; + requestUri?: string; + requestMethod?: string; + operationType?: string; + classMethod?: string; + operationDesc?: string; + requestParams?: string; + statusCode?: number; + costTime?: number; + userAgent?: string; + errorMsg?: string; + createTime?: string; +} +export interface BasePageResultSysOapiLogListVo { + total?: number; + content?: SysOapiLogListVo[]; + pageIndex?: number; + pageSize?: number; + totalPages?: number; + hasNext?: boolean; +} export interface UserRoleVo { id?: number; name?: string; @@ -5244,6 +5283,114 @@ declare global { config: Config ): Alova2Method; }; + SysOapiLog: { + /** + * --- + * + * [GET] 开放接口日志分页查询 + * + * **path:** /api/oapilog/List + * + * --- + * + * **Query Parameters** + * ```ts + * type QueryParameters = { + * query: { + * logLevel?: number + * callerAppKey?: number + * callerAppName?: string + * requestUri?: string + * requestIp?: string + * operationType?: string + * statusCode?: number + * success?: boolean + * keyword?: string + * startTime?: string + * endTime?: string + * } + * pageQuery: { + * pageIndex?: number + * pageSize?: number + * keyword?: string + * } + * } + * ``` + * + * --- + * + * **Response** + * ```ts + * type Response = { + * total?: number + * content?: Array<{ + * id?: number + * logLevel?: number + * callerAppKey?: number + * callerAppName?: string + * requestIp?: string + * requestUri?: string + * requestMethod?: string + * operationType?: string + * classMethod?: string + * operationDesc?: string + * requestParams?: string + * statusCode?: number + * costTime?: number + * userAgent?: string + * errorMsg?: string + * createTime?: string + * }> + * pageIndex?: number + * pageSize?: number + * totalPages?: number + * hasNext?: boolean + * } + * ``` + */ + oapiLogList< + Config extends Alova2MethodConfig & { + params: { + query: SysOapiLogQuery; + pageQuery: BasePageQuery; + }; + } + >( + config: Config + ): Alova2Method; + /** + * --- + * + * [GET] 下载开放接口日志响应原文 + * + * **path:** /api/oapilog/Download/{id} + * + * --- + * + * **Path Parameters** + * ```ts + * type PathParameters = { + * id: number + * } + * ``` + * + * --- + * + * **Response** + * ```ts + * type Response = Blob + * ``` + */ + oapiLogDownload< + Config extends Alova2MethodConfig & { + pathParams: { + id: number; + }; + } + >( + config: Config + ): Alova2Method; + }; SignKeyInternal: { /** * --- diff --git a/src/assets/config/menu.ts b/src/assets/config/menu.ts index fa3dd8a..b136c6b 100644 --- a/src/assets/config/menu.ts +++ b/src/assets/config/menu.ts @@ -59,6 +59,7 @@ export function getMenuList(): Promise { childState: true, children: [ { id: 53, modId: 1111, name: "操作日志", page: "/oplog" }, + { id: 56, modId: 1114, name: "开放接口日志", page: "/oapilog" }, { id: 54, modId: 1112, name: "推送日志", page: "/push-log" }, { id: 55, modId: 1113, name: "测试推送", page: "/push-test" }, ], diff --git a/src/router/routes.ts b/src/router/routes.ts index ffbd25e..037bea3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -9,6 +9,7 @@ import RoleManage from "@/views/role-authz/RoleManage.vue"; import GroupAuth from "@/views/GroupAuth.vue"; import PermissionView from "@/views/PermissionView.vue"; import OperationLogList from "@/views/oplog/OperationLogList.vue"; +import OapiLogList from "@/views/oapilog/OapiLogList.vue"; import PushLog from "@/views/push/PushLog.vue"; import PushTest from "@/views/push/PushTest.vue"; @@ -110,6 +111,13 @@ const routes: RouteRecordRaw[] = [ component: OperationLogList, meta: { title: "操作日志", icon: "icon-list", modId: 1111, keepAlive: true }, }, + // ===== 开放接口日志 ===== + { + path: "/oapilog", + name: "OapiLogList", + component: OapiLogList, + meta: { title: "开放接口日志", icon: "icon-list", modId: 1114, keepAlive: true }, + }, ]; export default routes; diff --git a/src/views/ApiLog.vue b/src/views/ApiLog.vue deleted file mode 100644 index 297aaf5..0000000 --- a/src/views/ApiLog.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/src/views/oapilog/OapiLogDetailModal.vue b/src/views/oapilog/OapiLogDetailModal.vue new file mode 100644 index 0000000..6cca847 --- /dev/null +++ b/src/views/oapilog/OapiLogDetailModal.vue @@ -0,0 +1,136 @@ + + + + + diff --git a/src/views/oapilog/OapiLogList.vue b/src/views/oapilog/OapiLogList.vue new file mode 100644 index 0000000..7a5b47d --- /dev/null +++ b/src/views/oapilog/OapiLogList.vue @@ -0,0 +1,199 @@ + + + + +