import http from '@/api'
import { OperLogVO, OperLogQuery } from '@/api/interface/monitor/operlog'
/**
 * @name 查询操作日志记录列表
 * @param query 参数
 * @returns 返回列表
 */
export const listOperLogApi = (query: OperLogQuery) => {
  return http.get<OperLogVO[]>('/monitor/operlog/list', query, { loading: false })
}

/**
 * @name 查询操作日志记录详细
 * @param operId operId
 * @returns returns
 */
export const getOperLogApi = (operId: string | number) => {
  return http.get<OperLogVO>(`/monitor/operlog/${operId}`)
}

/**
 * @name 删除操作日志记录
 * @param operId operId
 * @returns returns
 */
export const delOperLogApi = (operId: string | number | Array<string | number>) => {
  return http.delete<any>(`/monitor/operlog/${operId}`)
}

/**
 * @name 导出数据
 * @returns returns
 */
export const exportOperLogApi = (data: any) => {
  return http.downloadPost('/monitor/operlog/export', data)
}

/**
 * @name 清空操作日志
 */
export const cleanOperlogApi = () => {
  return http.delete<any>(`/monitor/operlog/clean`)
}
