|
|
@@ -1,119 +1,101 @@
|
|
|
import { PaginationRequest, PaginationResponse } from "@/types/common/type";
|
|
|
|
|
|
-/* 登录日志列表row */
|
|
|
-export interface LoginLogItem {
|
|
|
- /*主键 */
|
|
|
+/* 公共日志基础字段 */
|
|
|
+interface BaseLogItem {
|
|
|
id: number;
|
|
|
- /*用户名 */
|
|
|
+ createdAt: string;
|
|
|
+}
|
|
|
+
|
|
|
+/* 登录日志列表row */
|
|
|
+export interface LoginLogItem extends BaseLogItem {
|
|
|
userName: string;
|
|
|
- /*用户姓名(昵称) */
|
|
|
realName: string;
|
|
|
- /*人员组织 */
|
|
|
deptName: string;
|
|
|
- /*设备类型 */
|
|
|
device: string;
|
|
|
- /*类型 1-登录 2-登出 */
|
|
|
type: number;
|
|
|
- /*登录状态:0--失败 1--成功 */
|
|
|
loginStatus: number;
|
|
|
- /*登录IP */
|
|
|
loginIp: string;
|
|
|
- /*登录时间 */
|
|
|
- createdAt: Record<string, unknown>;
|
|
|
}
|
|
|
|
|
|
-/* 登录日志列表请求参数 */
|
|
|
-export interface LoginLogPageRequest extends PaginationRequest {
|
|
|
- queryParam: {
|
|
|
- userName?: LoginLogItem['userName'],
|
|
|
- realName?: LoginLogItem['realName'],
|
|
|
- device?: LoginLogItem['device'],
|
|
|
- /*开始时间 */
|
|
|
- startTime?: string;
|
|
|
- /*结束时间 */
|
|
|
- endTime?: string;
|
|
|
- /*人员组织id */
|
|
|
- deptId?: number;
|
|
|
- date?: string;
|
|
|
- queryType?: string,
|
|
|
- queryTypeContent?: string
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-/* 登录日志接口返回 */
|
|
|
-export type LoginLogRespose = PaginationResponse<LoginLogItem>;
|
|
|
-
|
|
|
/* 操作日志列表row */
|
|
|
-export interface OpreationLogItem {
|
|
|
- /*自增主键 */
|
|
|
- id: number;
|
|
|
- /*操作人 */
|
|
|
+export interface OperationLogItem extends BaseLogItem {
|
|
|
operatorName: string;
|
|
|
- /*用户姓名(昵称) */
|
|
|
realName: string;
|
|
|
- /*IP地址 */
|
|
|
clientIp: string;
|
|
|
- /*应用侧 */
|
|
|
platform: string;
|
|
|
- /*所属模块 */
|
|
|
module: string;
|
|
|
- /*内容 */
|
|
|
content: string;
|
|
|
- /*操作类型 */
|
|
|
operatorType: string;
|
|
|
- /*登录时间 */
|
|
|
- createdAt: string;
|
|
|
- /*操作结果 */
|
|
|
isSuccess: number;
|
|
|
}
|
|
|
|
|
|
-/* 操作日志列表请求参数 */
|
|
|
-export interface OperatinoLogPageRequest extends PaginationRequest {
|
|
|
+/* 系统日志列表row */
|
|
|
+export interface SystemLogItem extends BaseLogItem {
|
|
|
+ eventType: number;
|
|
|
+ eventContent: string;
|
|
|
+}
|
|
|
+
|
|
|
+/* 通用日志查询参数 */
|
|
|
+interface BaseLogRequest extends PaginationRequest {
|
|
|
queryParam: {
|
|
|
- operatorName?: OpreationLogItem['operatorName'],
|
|
|
- realName?: OpreationLogItem['realName'],
|
|
|
- platform?: OpreationLogItem['platform'],
|
|
|
- module?: OpreationLogItem['module'],
|
|
|
- operatorType?: OpreationLogItem['operatorType'],
|
|
|
- /*开始时间 */
|
|
|
startTime?: string;
|
|
|
- /*结束时间 */
|
|
|
endTime?: string;
|
|
|
date?: string;
|
|
|
- queryType?: string,
|
|
|
- queryTypeContent?: string
|
|
|
- }
|
|
|
+ queryType?: string;
|
|
|
+ queryTypeContent?: string;
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
-/* 操作日志接口返回 */
|
|
|
-export type OperationLogRespose = PaginationResponse<OpreationLogItem>;
|
|
|
-
|
|
|
-/* 操作日志详情 */
|
|
|
-export type OpretionPageDetail = Pick<OpreationLogItem, 'module' | 'operatorType' | 'operatorName' | 'clientIp' |'isSuccess' | 'createdAt'> & { parameter: string}
|
|
|
+/* 登录日志列表请求参数 */
|
|
|
+export interface LoginLogPageRequest extends BaseLogRequest {
|
|
|
+ queryParam: BaseLogRequest["queryParam"] & {
|
|
|
+ userName?: string;
|
|
|
+ realName?: string;
|
|
|
+ device?: string;
|
|
|
+ deptId?: number;
|
|
|
+ };
|
|
|
+}
|
|
|
|
|
|
-/* 系统日志列表row */
|
|
|
-export interface SystemLogItem {
|
|
|
- /*主键 */
|
|
|
- id: number;
|
|
|
- /*事件类型 */
|
|
|
- eventType: number;
|
|
|
- /*时间 */
|
|
|
- createdAt: Record<string, unknown>;
|
|
|
- /*事件内容 */
|
|
|
- eventContent: string;
|
|
|
+/* 操作日志列表请求参数 */
|
|
|
+export interface OperationLogPageRequest extends BaseLogRequest {
|
|
|
+ queryParam: BaseLogRequest["queryParam"] & {
|
|
|
+ operatorName?: string;
|
|
|
+ realName?: string;
|
|
|
+ platform?: string;
|
|
|
+ module?: string;
|
|
|
+ operatorType?: string;
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
/* 系统日志列表请求参数 */
|
|
|
-export interface SystemLogRequest extends PaginationRequest {
|
|
|
- queryParam: {
|
|
|
- eventType?: SystemLogItem['eventType'],
|
|
|
- /*开始时间 */
|
|
|
- startTime?: string;
|
|
|
- /*结束时间 */
|
|
|
- endTime?: string;
|
|
|
- date?: string;
|
|
|
- }
|
|
|
+export interface SystemLogRequest extends BaseLogRequest {
|
|
|
+ queryParam: BaseLogRequest["queryParam"] & {
|
|
|
+ eventType?: number;
|
|
|
+ };
|
|
|
+}
|
|
|
+
|
|
|
+/* 登录日志、操作日志、系统日志接口返回 */
|
|
|
+export type LoginLogResponse = PaginationResponse<LoginLogItem>;
|
|
|
+export type OperationLogResponse = PaginationResponse<OperationLogItem>;
|
|
|
+export type SystemLogResponse = PaginationResponse<SystemLogItem>;
|
|
|
+
|
|
|
+/* 操作日志详情 */
|
|
|
+export type OperationPageDetail = Pick<
|
|
|
+ OperationLogItem,
|
|
|
+ "module" | "operatorType" | "operatorName" | "clientIp" | "isSuccess" | "createdAt"
|
|
|
+> & { parameter: string };
|
|
|
+
|
|
|
+/* 通用导出参数 */
|
|
|
+interface BaseExportRequest {
|
|
|
+ startTime?: string;
|
|
|
+ endTime?: string;
|
|
|
}
|
|
|
|
|
|
-/* 系统日志接口返回 */
|
|
|
-export type SystemLogRespose = PaginationResponse<SystemLogItem>;
|
|
|
+/* 登录日志导出参数 */
|
|
|
+export type LoginExport = BaseExportRequest & Partial<Pick<LoginLogItem, "userName" | "realName" | "device" | "deptId">>;
|
|
|
+
|
|
|
+/* 操作日志导出参数 */
|
|
|
+export type OperationExport = BaseExportRequest & Partial<Pick<OperationLogItem, "operatorName" | "realName" | "platform" | "module" | "operatorType">>;
|
|
|
+
|
|
|
+/* 系统日志导出参数 */
|
|
|
+export type SystemExport = BaseExportRequest & Partial<Pick<SystemLogItem, "eventType">>;
|