mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-27 14:57:08 +08:00
feat: 新增系统日志管理(登录日志、操作日志)
This commit is contained in:
@@ -2,9 +2,11 @@ export * from './area'
|
||||
export * from './auth'
|
||||
export * from './common'
|
||||
export * from './monitor'
|
||||
export * from './system'
|
||||
|
||||
export * from './area/type'
|
||||
export * from './auth/type'
|
||||
export * from './common/type'
|
||||
export * from './monitor/type'
|
||||
export * from './system/type'
|
||||
|
||||
|
1
src/apis/system/index.ts
Normal file
1
src/apis/system/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './log'
|
14
src/apis/system/log.ts
Normal file
14
src/apis/system/log.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import http from '@/utils/http'
|
||||
import type * as System from './type'
|
||||
|
||||
const BASE_URL = '/system/log'
|
||||
|
||||
/** @desc 查询日志列表 */
|
||||
export function listLog(query: System.LogQuery) {
|
||||
return http.get<PageRes<System.LogResp[]>>(`${BASE_URL}`, query)
|
||||
}
|
||||
|
||||
/** @desc 查询日志详情 */
|
||||
export function getLog(id: string) {
|
||||
return http.get<System.LogDetailResp>(`${BASE_URL}/${id}`)
|
||||
}
|
33
src/apis/system/type.ts
Normal file
33
src/apis/system/type.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/** 系统日志类型 */
|
||||
export interface LogResp {
|
||||
id: string
|
||||
description: string
|
||||
module: string
|
||||
timeTaken: number
|
||||
ip: string
|
||||
address: string
|
||||
browser: string
|
||||
os: string
|
||||
status: number
|
||||
errorMsg: string
|
||||
createUserString: string
|
||||
createTime: string
|
||||
}
|
||||
export interface LogDetailResp extends LogResp {
|
||||
traceId: string
|
||||
requestUrl: string
|
||||
requestMethod: string
|
||||
requestHeaders: string
|
||||
requestBody: string
|
||||
statusCode: number
|
||||
responseHeaders: string
|
||||
responseBody: string
|
||||
}
|
||||
export interface LogQuery extends PageQuery {
|
||||
description?: string
|
||||
module?: string
|
||||
ip?: string
|
||||
createUserString?: string
|
||||
createTime?: string
|
||||
status?: number
|
||||
}
|
Reference in New Issue
Block a user