diff --git a/src/api/monitor.ts b/src/api/monitor.ts index 2ff06e2..48af326 100644 --- a/src/api/monitor.ts +++ b/src/api/monitor.ts @@ -69,22 +69,57 @@ export const deleteUserLoginLogListAPI = (data: { ids: string[] }) => { // ------------------------操作日志相关---------------------------------------- +/**获取操作日志参数 */ +type GetUserOperationParams = { + /**页码 */ + page: number; + /**每页数量 */ + pageSize: number; + /**用户账号 */ + username?: string; + /**用户昵称 */ + nickname?: string; + /**部门ID */ + department_id?: string; + /**操作名称 */ + name?: string; + /**操作状态 */ + status?: number | string; + /**操作类型 */ + type?: number | string; + /**开始时间 */ + startTime?: string | number; + /**结束时间 */ + endTime?: string | number; +}; + /** * 获取用户操作日志 */ -export const getUserOperationsAPI = (params: { - page: number; - pageSize: number; -}) => { +export const getUserOperationsAPI = (params: GetUserOperationParams) => { return http.request>( "GET", "/api/log/operation", { - params + params: filterEmptyObject(params) } ); }; +/** + * 删除操作日志 + * @returns + */ +export const deleteUserOperationsAPI = (id: string) => { + return http.request("delete", `/api/log/delete/operation/${id}`); +}; +/**批量删除操作日志 */ +export const deleteUserOperationsListAPI = (data: { ids: string[] }) => { + return http.request("delete", `/api/log/deleteList/operation`, { + data + }); +}; + // ------------------------服务相关---------------------------------------- /** diff --git a/src/views/monitor/login/utils/hook.tsx b/src/views/monitor/login/utils/hook.tsx index 3b2cb68..294aa3a 100644 --- a/src/views/monitor/login/utils/hook.tsx +++ b/src/views/monitor/login/utils/hook.tsx @@ -108,7 +108,7 @@ export const useLogin = (tableRef: Ref) => { prop: "online", minWidth: 100, cellRenderer: ({ row, props }) => ( - + {row.online ? "在线" : "离线"} ) diff --git a/src/views/monitor/operation/index.vue b/src/views/monitor/operation/index.vue index 4673718..32ccef6 100644 --- a/src/views/monitor/operation/index.vue +++ b/src/views/monitor/operation/index.vue @@ -1,7 +1,7 @@