mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-11 00:31:09 +08:00
重构项目中所有使用requestClient的API调用,替换为alovaInstance 移除已废弃的旧版上传组件及相关代码 调整上传组件类型定义以适配antdv-next更新 优化上传逻辑,移除不必要的进度事件和取消信号 更新类型定义文件,迁移axios配置到alova类型
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import type { OperationLog } from './model';
|
|
|
|
import type { IDS, PageQuery, PageResult } from '#/api/common';
|
|
|
|
import { commonExport } from '#/api/helper';
|
|
import { alovaInstance } from '#/utils/http';
|
|
|
|
enum Api {
|
|
operLogClean = '/monitor/operlog/clean',
|
|
operLogExport = '/monitor/operlog/export',
|
|
operLogList = '/monitor/operlog/list',
|
|
root = '/monitor/operlog',
|
|
}
|
|
|
|
/**
|
|
* 操作日志分页
|
|
* @param params 查询参数
|
|
* @returns 分页结果
|
|
*/
|
|
export function operLogList(params?: PageQuery) {
|
|
return alovaInstance.get<PageResult<OperationLog>>(Api.operLogList, {
|
|
params,
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 删除操作日志
|
|
* @param operIds id/ids
|
|
*/
|
|
export function operLogDelete(operIds: IDS) {
|
|
return alovaInstance.deleteWithMsg<void>(`${Api.root}/${operIds}`);
|
|
}
|
|
|
|
/**
|
|
* 清空全部分页日志
|
|
*/
|
|
export function operLogClean() {
|
|
return alovaInstance.deleteWithMsg<void>(Api.operLogClean);
|
|
}
|
|
|
|
/**
|
|
* 导出操作日志
|
|
* @param data 查询参数
|
|
*/
|
|
export function operLogExport(data: Partial<OperationLog>) {
|
|
return commonExport(Api.operLogExport, data);
|
|
}
|