feat: 重构前端项目结构并优化代码

refactor: 迁移前端资源文件至web目录
feat: 新增多种图标资源
style: 统一代码风格和格式化配置
docs: 更新README和文档说明
chore: 更新依赖和配置文件
fix: 修复部分类型定义和枚举
perf: 优化路由和组件加载逻辑
This commit is contained in:
zhangtao
2026-05-01 01:01:17 +08:00
parent 1355a09441
commit 80263e98e1
887 changed files with 116349 additions and 33825 deletions
+85
View File
@@ -0,0 +1,85 @@
import request from '@/utils/http';
const API_PATH = '/system/log';
const LogAPI = {
/**
* 获取日志列表
* @param query 查询参数
* @returns 日志列表
*/
listLog(query: LogPageQuery) {
return request<PageResult<LogTable[]>>({
url: `${API_PATH}/list`,
method: 'get',
params: query,
});
},
/**
* 获取日志详情
* @param query 日志ID
* @returns 日志详情
*/
detailLog(query: number) {
return request<ApiResponse<LogTable>>({
url: `${API_PATH}/detail/${query}`,
method: 'get',
});
},
/**
* 删除日志
* @param body 日志ID列表
*/
deleteLog(body: number[]) {
return request({
url: `${API_PATH}/delete`,
method: 'delete',
data: body,
});
},
/**
* 导出日志
* @param body 查询参数
* @returns 日志导出文件
*/
exportLog(body: LogPageQuery) {
return request<ApiResponse<Blob>>({
url: `${API_PATH}/export`,
method: 'post',
data: body,
responseType: 'blob',
});
},
};
export default LogAPI;
export interface LogPageQuery extends PageQuery {
type?: number;
request_path?: string;
creator_name?: string;
created_time?: string[];
updated_time?: string[];
created_id?: number;
updated_id?: number;
}
export interface LogTable extends BaseType {
type?: number; // 1 登录日志 2 操作日志
request_path?: string;
request_method?: string;
request_ip?: string;
login_location?: string;
request_browser?: string;
request_os?: string;
response_code?: number;
request_payload?: string;
response_json?: string;
process_time?: string;
created_by?: CommonType;
updated_by?: CommonType;
deleted_by?: CommonType;
}