feat(系统配置): 重构系统配置模块为参数管理模块

refactor(代码生成): 重构代码生成相关组件和路由路径

feat(WebSocket): 添加WebSocket支持并配置Nginx代理

fix(用户管理): 移除超级管理员过滤并调整用户数据

feat(定时任务): 完善定时任务日志功能并添加相关API

style(前端): 优化AI助手界面样式和提示文本

chore(初始化数据): 清理和更新系统初始化数据

perf(前端): 优化表格操作列宽度和按钮样式

docs(注释): 更新控制器注释以反映模块变更
This commit is contained in:
zhangtao
2025-09-11 02:06:11 +08:00
parent 6bd474eb4f
commit ea4e35fd14
45 changed files with 1872 additions and 1637 deletions
+113 -4
View File
@@ -63,6 +63,59 @@ const JobAPI = {
data: params,
});
},
// 获取定时任务运行日志(实时状态)
getJobRunLog() {
return request<ApiResponse<JobRunLog[]>>({
url: `/monitor/job/log`,
method: "get",
});
},
// 获取定时任务日志详情
getJobLogDetail(id: number) {
return request<ApiResponse<JobLogDetail>>({
url: `/monitor/job/log/detail/${id}`,
method: "get",
});
},
// 查询定时任务日志列表
getJobLogList(query: JobLogPageQuery) {
return request<ApiResponse<PageResult<JobLogTable[]>>>({
url: `/monitor/job/log/list`,
method: "get",
params: query,
});
},
// 删除定时任务日志
deleteJobLog(ids: number[]) {
return request<ApiResponse>({
url: `/monitor/job/log/delete`,
method: "delete",
data: ids,
});
},
// 清空定时任务日志
clearJobLog() {
return request<ApiResponse>({
url: `/monitor/job/log/clear`,
method: "delete",
});
},
// 导出定时任务日志
exportJobLog(query: JobLogPageQuery) {
return request<Blob>({
url: `/monitor/job/log/export`,
method: "post",
data: query,
responseType: "blob",
});
},
};
export default JobAPI;
@@ -76,6 +129,14 @@ export interface JobPageQuery extends PageQuery {
end_time?: string;
}
export interface JobLogPageQuery extends PageQuery {
status?: boolean;
/** 开始时间 */
start_time?: string;
/** 结束时间 */
end_time?: string;
}
export interface JobOptionData {
id?: number;
option?: number; //操作类型 1: 暂停 2: 恢复 3: 重启
@@ -83,8 +144,8 @@ export interface JobOptionData {
export interface JobTable {
index?: number;
id?: number;
name?: string;
id: number;
name: string;
func?: string;
trigger?: string;
args?: string;
@@ -97,7 +158,6 @@ export interface JobTable {
start_date?: string;
end_date?: string;
status?: boolean;
message?: string;
description?: string;
created_at?: string;
updated_at?: string;
@@ -119,6 +179,55 @@ export interface JobForm {
start_date?: string;
end_date?: string;
status?: boolean;
message?: string;
description?: string;
}
// 定时任务运行日志接口(对应Scheduler实时状态)
export interface JobRunLog {
id: string;
name: string;
trigger: string;
executor: string;
func: string;
func_ref: string;
args: any[];
kwargs: any;
misfire_grace_time: number;
coalesce: boolean;
max_instances: number;
next_run_time: string;
state: string;
}
// 定时任务日志详情接口(对应数据库日志表)
export interface JobLogDetail {
id: number;
job_name: string;
job_group: string;
job_executor: string;
invoke_target: string;
job_args?: string;
job_kwargs?: string;
job_trigger?: string;
job_message?: string;
status: boolean;
exception_info?: string;
create_time: string;
}
// 定时任务日志列表接口(对应数据库日志表)
export interface JobLogTable {
index?: number;
id: number;
job_name: string;
job_group: string;
job_executor: string;
invoke_target: string;
job_args?: string;
job_kwargs?: string;
job_trigger?: string;
job_message?: string;
status: boolean;
exception_info?: string;
create_time: string;
}
+8 -8
View File
@@ -3,7 +3,7 @@ import request from "@/utils/request";
const ConfigAPI = {
uploadFile(body: any) {
return request<ApiResponse<UploadFilePath>>({
url: `/system/config/upload`,
url: `/system/param/upload`,
method: "post",
data: body,
headers: { "Content-Type": "multipart/form-data" },
@@ -12,14 +12,14 @@ const ConfigAPI = {
getInitConfig() {
return request<ApiResponse<ConfigTable[]>>({
url: `/system/config/info`,
url: `/system/param/info`,
method: "get",
});
},
getConfigList(query: ConfigPageQuery) {
return request<ApiResponse<PageResult<ConfigTable[]>>>({
url: `/system/config/list`,
url: `/system/param/list`,
method: "get",
params: query,
});
@@ -27,14 +27,14 @@ const ConfigAPI = {
getConfigDetail(query: number) {
return request<ApiResponse<ConfigTable>>({
url: `/system/config/detail/${query}`,
url: `/system/param/detail/${query}`,
method: "get",
});
},
createConfig(body: ConfigForm) {
return request<ApiResponse>({
url: `/system/config/create`,
url: `/system/param/create`,
method: "post",
data: body,
});
@@ -42,7 +42,7 @@ const ConfigAPI = {
updateConfig(id: number, body: ConfigForm) {
return request<ApiResponse>({
url: `/system/config/update/${id}`,
url: `/system/param/update/${id}`,
method: "put",
data: body,
});
@@ -50,7 +50,7 @@ const ConfigAPI = {
deleteConfig(body: number[]) {
return request<ApiResponse>({
url: `/system/config/delete`,
url: `/system/param/delete`,
method: "delete",
data: body,
});
@@ -58,7 +58,7 @@ const ConfigAPI = {
exportConfig(body: ConfigPageQuery) {
return request<Blob>({
url: `/system/config/export`,
url: `/system/param/export`,
method: "post",
data: body,
responseType: "blob",