mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-28 06:57:54 +00:00
refactor(api): 统一详情接口使用路径参数替代查询参数
feat(utils): 新增部门树格式化工具函数 style(components): 调整通知组件样式和内容显示 fix(store): 修复通知公告获取逻辑并添加日志 perf(request): 优化请求拦截器仅对非GET请求显示成功消息 refactor(views): 重构多个模块的删除操作确认逻辑 docs(types): 移除未使用的全局类型定义 style(views): 调整表格列顺序和操作按钮样式 fix(components): 修复部门树组件数据加载和格式化 refactor(api): 重构用户、角色等模块的接口参数类型 style(views): 统一表单选择器宽度和布局
This commit is contained in:
@@ -2,18 +2,17 @@ import request from "@/utils/request";
|
||||
|
||||
const JobAPI = {
|
||||
getJobList(query: JobPageQuery) {
|
||||
return request<ApiResponse<PageResult<JobTable>>>({
|
||||
return request<ApiResponse<PageResult<JobTable[]>>>({
|
||||
url: `/monitor/job/list`,
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
},
|
||||
|
||||
getJobDetail(query: DetailType) {
|
||||
getJobDetail(query: number) {
|
||||
return request<ApiResponse<JobTable>>({
|
||||
url: `/monitor/job/detail`,
|
||||
url: `/monitor/job/detail/${query}`,
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
},
|
||||
|
||||
@@ -33,11 +32,11 @@ const JobAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
deleteJob(query: DeleteType) {
|
||||
deleteJob(body: number[]) {
|
||||
return request<ApiResponse>({
|
||||
url: `/monitor/job/delete`,
|
||||
method: "delete",
|
||||
data: query,
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
@@ -57,7 +56,7 @@ const JobAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
OptionJob(params: JobPageQuery) {
|
||||
OptionJob(params: JobOptionData) {
|
||||
return request<ApiResponse>({
|
||||
url: `/monitor/job/option`,
|
||||
method: "put",
|
||||
@@ -77,7 +76,7 @@ export interface JobPageQuery extends PageQuery {
|
||||
end_time?: string;
|
||||
}
|
||||
|
||||
export interface JobPageQuery extends PageQuery {
|
||||
export interface JobOptionData {
|
||||
id?: number;
|
||||
option?: number; //操作类型 1: 暂停 2: 恢复 3: 重启
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@ const OnlineAPI = {
|
||||
},
|
||||
|
||||
// 强退用户
|
||||
deleteOnline(query: DeleteType) {
|
||||
deleteOnline(body: string) {
|
||||
return request<ApiResponse>({
|
||||
url: `/monitor/online/delete`,
|
||||
method: "delete",
|
||||
data: query,
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user