feat: 操作日志
This commit is contained in:
31
apps/web-antd/src/api/monitor/operlog/index.ts
Normal file
31
apps/web-antd/src/api/monitor/operlog/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { OperationLog } from './model';
|
||||
|
||||
import type { IDS, PageQuery, PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
enum Api {
|
||||
operLogClean = '/monitor/operlog/clean',
|
||||
operLogExport = '/monitor/operlog/export',
|
||||
operLogList = '/monitor/operlog/list',
|
||||
root = '/monitor/operlog',
|
||||
}
|
||||
|
||||
export function operLogList(params?: PageQuery) {
|
||||
return requestClient.get<PageResult<OperationLog>>(Api.operLogList, {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
export function operLogDelete(operIds: IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`${Api.root}/${operIds}`);
|
||||
}
|
||||
|
||||
export function operLogClean() {
|
||||
return requestClient.deleteWithMsg<void>(Api.operLogClean);
|
||||
}
|
||||
|
||||
export function operLogExport(data: any) {
|
||||
return commonExport(Api.operLogExport, data);
|
||||
}
|
21
apps/web-antd/src/api/monitor/operlog/model.d.ts
vendored
Normal file
21
apps/web-antd/src/api/monitor/operlog/model.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
export interface OperationLog {
|
||||
operId: string;
|
||||
tenantId: string;
|
||||
title: string;
|
||||
businessType: number;
|
||||
businessTypes?: any;
|
||||
method: string;
|
||||
requestMethod: string;
|
||||
operatorType: number;
|
||||
operName: string;
|
||||
deptName: string;
|
||||
operUrl: string;
|
||||
operIp: string;
|
||||
operLocation: string;
|
||||
operParam: string;
|
||||
jsonResult: string;
|
||||
status: number;
|
||||
errorMsg: string;
|
||||
operTime: string;
|
||||
costTime: number;
|
||||
}
|
Reference in New Issue
Block a user