mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-24 05:26:58 +00:00
refactor: 重构代码结构并优化命名一致性
feat(backend): 新增模块示例和路径配置 fix(backend): 修复菜单模型名称唯一性约束 refactor(backend): 重构日志模块和路径配置 style(backend): 统一API方法命名规范 refactor(frontend): 重构API方法命名规范 fix(frontend): 修复权限校验问题 refactor: 移动定时任务测试文件到正确模块 docs: 更新模板文件路径 refactor: 优化日志记录和错误处理 fix: 修复排序默认值问题
This commit is contained in:
@@ -3,7 +3,7 @@ import request from "@/utils/request";
|
||||
const API_PATH = "/application/job";
|
||||
|
||||
const JobAPI = {
|
||||
getJobList(query: JobPageQuery) {
|
||||
listJob(query: JobPageQuery) {
|
||||
return request<ApiResponse<PageResult<JobTable[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
@@ -11,7 +11,7 @@ const JobAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getJobDetail(query: number) {
|
||||
detailJob(query: number) {
|
||||
return request<ApiResponse<JobTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
@@ -75,7 +75,7 @@ const JobAPI = {
|
||||
},
|
||||
|
||||
// 获取定时任务日志详情
|
||||
getJobLogDetail(id: number) {
|
||||
detailJobLog(id: number) {
|
||||
return request<ApiResponse<JobLogDetail>>({
|
||||
url: `${API_PATH}/log/detail/${id}`,
|
||||
method: "get",
|
||||
@@ -83,7 +83,7 @@ const JobAPI = {
|
||||
},
|
||||
|
||||
// 查询定时任务日志列表
|
||||
getJobLogList(query: JobLogPageQuery) {
|
||||
listJobLog(query: JobLogPageQuery) {
|
||||
return request<ApiResponse<PageResult<JobLogTable[]>>>({
|
||||
url: `${API_PATH}/log/list`,
|
||||
method: "get",
|
||||
|
||||
@@ -7,7 +7,7 @@ export const ApplicationAPI = {
|
||||
* 获取应用详情
|
||||
* @param id 应用ID
|
||||
*/
|
||||
getApplicationDetail(id: number) {
|
||||
detailApp(id: number) {
|
||||
return request<ApiResponse<ApplicationInfo>>({
|
||||
url: `${API_PATH}/detail/${id}`,
|
||||
method: "get",
|
||||
@@ -18,7 +18,7 @@ export const ApplicationAPI = {
|
||||
* 查询应用列表
|
||||
* @param query 查询参数
|
||||
*/
|
||||
getApplicationList(query: ApplicationPageQuery) {
|
||||
listApp(query: ApplicationPageQuery) {
|
||||
return request<ApiResponse<PageResult<ApplicationInfo[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
@@ -30,7 +30,7 @@ export const ApplicationAPI = {
|
||||
* 创建应用
|
||||
* @param body 应用信息
|
||||
*/
|
||||
createApplication(body: ApplicationForm) {
|
||||
createApp(body: ApplicationForm) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/create`,
|
||||
method: "post",
|
||||
@@ -43,7 +43,7 @@ export const ApplicationAPI = {
|
||||
* @param id 应用ID
|
||||
* @param body 应用信息
|
||||
*/
|
||||
updateApplication(id: number, body: ApplicationForm) {
|
||||
updateApp(id: number, body: ApplicationForm) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/update/${id}`,
|
||||
method: "put",
|
||||
@@ -55,7 +55,7 @@ export const ApplicationAPI = {
|
||||
* 删除应用
|
||||
* @param body 应用ID数组
|
||||
*/
|
||||
deleteApplication(body: number[]) {
|
||||
deleteApp(body: number[]) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/delete`,
|
||||
method: "delete",
|
||||
@@ -67,7 +67,7 @@ export const ApplicationAPI = {
|
||||
* 批量修改应用状态
|
||||
* @param body 批量操作参数
|
||||
*/
|
||||
batchAvailableApplication(body: BatchType) {
|
||||
batchApp(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: "patch",
|
||||
|
||||
+17
-17
@@ -1,24 +1,24 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
const API_PATH = "/generator/demo";
|
||||
const API_PATH = "/example/demo";
|
||||
|
||||
const ExampleAPI = {
|
||||
getExampleList(query: ExamplePageQuery) {
|
||||
return request<ApiResponse<PageResult<ExampleTable[]>>>({
|
||||
const DemoAPI = {
|
||||
getDemoList(query: DemoPageQuery) {
|
||||
return request<ApiResponse<PageResult<DemoTable[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
},
|
||||
|
||||
getExampleDetail(query: number) {
|
||||
return request<ApiResponse<ExampleTable>>({
|
||||
getDemoDetail(query: number) {
|
||||
return request<ApiResponse<DemoTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
});
|
||||
},
|
||||
|
||||
createExample(body: ExampleForm) {
|
||||
createDemo(body: DemoForm) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/create`,
|
||||
method: "post",
|
||||
@@ -26,7 +26,7 @@ const ExampleAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
updateExample(id: number, body: ExampleForm) {
|
||||
updateDemo(id: number, body: DemoForm) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/update/${id}`,
|
||||
method: "put",
|
||||
@@ -34,7 +34,7 @@ const ExampleAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
deleteExample(body: number[]) {
|
||||
deleteDemo(body: number[]) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/delete`,
|
||||
method: "delete",
|
||||
@@ -42,7 +42,7 @@ const ExampleAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
batchAvailableExample(body: BatchType) {
|
||||
batchDemo(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: "patch",
|
||||
@@ -50,7 +50,7 @@ const ExampleAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
exportExample(body: ExamplePageQuery) {
|
||||
exportDemo(body: DemoPageQuery) {
|
||||
return request<Blob>({
|
||||
url: `${API_PATH}/export`,
|
||||
method: "post",
|
||||
@@ -59,7 +59,7 @@ const ExampleAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
downloadTemplate() {
|
||||
downloadTemplateDemo() {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/download/template`,
|
||||
method: "post",
|
||||
@@ -67,7 +67,7 @@ const ExampleAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
importExample(body: FormData) {
|
||||
importDemo(body: FormData) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/import`,
|
||||
method: "post",
|
||||
@@ -79,9 +79,9 @@ const ExampleAPI = {
|
||||
},
|
||||
};
|
||||
|
||||
export default ExampleAPI;
|
||||
export default DemoAPI;
|
||||
|
||||
export interface ExamplePageQuery extends PageQuery {
|
||||
export interface DemoPageQuery extends PageQuery {
|
||||
/** 示例标题 */
|
||||
name?: string;
|
||||
/** 示例状态 */
|
||||
@@ -94,7 +94,7 @@ export interface ExamplePageQuery extends PageQuery {
|
||||
creator?: number;
|
||||
}
|
||||
|
||||
export interface ExampleTable {
|
||||
export interface DemoTable {
|
||||
index?: number;
|
||||
id?: number;
|
||||
name?: string;
|
||||
@@ -105,7 +105,7 @@ export interface ExampleTable {
|
||||
creator?: creatorType;
|
||||
}
|
||||
|
||||
export interface ExampleForm {
|
||||
export interface DemoForm {
|
||||
id?: number;
|
||||
name?: string;
|
||||
status?: boolean;
|
||||
@@ -31,7 +31,7 @@ const GencodeAPI = {
|
||||
},
|
||||
|
||||
// 查询表详细信息
|
||||
getGenTableDetail(table_id: number) {
|
||||
detailTable(table_id: number) {
|
||||
return request<ApiResponse<GenTableSchema>>({
|
||||
url: `${API_PATH}/detail/${table_id}`,
|
||||
method: "get",
|
||||
|
||||
@@ -4,7 +4,7 @@ const API_PATH = "/monitor/online";
|
||||
|
||||
const OnlineAPI = {
|
||||
// 查询在线用户列表
|
||||
getOnlineList(query: OnlineUserPageQuery) {
|
||||
listOnline(query: OnlineUserPageQuery) {
|
||||
return request<ApiResponse<PageResult<OnlineUserTable[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
|
||||
@@ -7,7 +7,7 @@ export const ResourceAPI = {
|
||||
* 获取目录列表
|
||||
* @param query 查询参数
|
||||
*/
|
||||
getResourceList(query: ResourcePageQuery) {
|
||||
listResource(query: ResourcePageQuery) {
|
||||
return request<ApiResponse<PageResult<ResourceItem[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/utils/request";
|
||||
const API_PATH = "/system/dept";
|
||||
|
||||
const DeptAPI = {
|
||||
getDeptList(query?: DeptPageQuery) {
|
||||
listDept(query?: DeptPageQuery) {
|
||||
return request<ApiResponse<DeptTable[]>>({
|
||||
url: `${API_PATH}/tree`,
|
||||
method: "get",
|
||||
@@ -11,7 +11,7 @@ const DeptAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getDeptDetail(query: number) {
|
||||
detailDept(query: number) {
|
||||
return request<ApiResponse<DeptTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
@@ -42,7 +42,7 @@ const DeptAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
batchAvailableDept(body: BatchType) {
|
||||
batchDept(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: "patch",
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/utils/request";
|
||||
const API_PATH = "/system/dict";
|
||||
|
||||
const DictAPI = {
|
||||
getDictTypeList(query: DictPageQuery) {
|
||||
listDictType(query: DictPageQuery) {
|
||||
return request<ApiResponse<PageResult<DictTable[]>>>({
|
||||
url: `${API_PATH}/type/list`,
|
||||
method: "get",
|
||||
@@ -11,14 +11,14 @@ const DictAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getDictTypeOptionselect() {
|
||||
optionDictType() {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/type/optionselect`,
|
||||
method: "get",
|
||||
});
|
||||
},
|
||||
|
||||
getDictTypeDetail(query: number) {
|
||||
detailDictType(query: number) {
|
||||
return request<ApiResponse<DictTable>>({
|
||||
url: `${API_PATH}/type/detail/${query}`,
|
||||
method: "get",
|
||||
@@ -49,7 +49,7 @@ const DictAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
batchAvailableDict(body: BatchType) {
|
||||
batchDictType(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/type/available/setting`,
|
||||
method: "patch",
|
||||
@@ -66,7 +66,7 @@ const DictAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getDictDataList(query: DictDataPageQuery) {
|
||||
listDictData(query: DictDataPageQuery) {
|
||||
return request<ApiResponse<PageResult<DictDataTable[]>>>({
|
||||
url: `${API_PATH}/data/list`,
|
||||
method: "get",
|
||||
@@ -74,7 +74,7 @@ const DictAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getDictDataDetail(query: number) {
|
||||
detailDictData(query: number) {
|
||||
return request<ApiResponse<DictDataTable>>({
|
||||
url: `${API_PATH}/data/detail/${query}`,
|
||||
method: "get",
|
||||
@@ -105,7 +105,7 @@ const DictAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
batchAvailableDictData(body: BatchType) {
|
||||
batchDictData(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/data/available/setting`,
|
||||
method: "patch",
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/utils/request";
|
||||
const API_PATH = "/system/log";
|
||||
|
||||
const LogAPI = {
|
||||
getLogList(query: LogPageQuery) {
|
||||
listLog(query: LogPageQuery) {
|
||||
return request<ApiResponse<PageResult<LogTable[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
@@ -11,7 +11,7 @@ const LogAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getLogDetail(query: number) {
|
||||
detailLog(query: number) {
|
||||
return request<ApiResponse<LogTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/utils/request";
|
||||
const API_PATH = "/system/menu";
|
||||
|
||||
const MenuAPI = {
|
||||
getMenuList(query?: MenuPageQuery) {
|
||||
listMenu(query?: MenuPageQuery) {
|
||||
return request<ApiResponse<MenuTable[]>>({
|
||||
url: `${API_PATH}/tree`,
|
||||
method: "get",
|
||||
@@ -11,7 +11,7 @@ const MenuAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getMenuDetail(query: number) {
|
||||
detailMenu(query: number) {
|
||||
return request<ApiResponse<MenuTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
@@ -42,7 +42,7 @@ const MenuAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
batchAvailableMenu(body: BatchType) {
|
||||
batchMenu(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: "patch",
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/utils/request";
|
||||
const API_PATH = "/system/notice";
|
||||
|
||||
const NoticeAPI = {
|
||||
getNoticeList(query: NoticePageQuery) {
|
||||
listNotice(query: NoticePageQuery) {
|
||||
return request<ApiResponse<PageResult<NoticeTable[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
@@ -11,14 +11,14 @@ const NoticeAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getNoticeListAvailable() {
|
||||
listNoticeAvailable() {
|
||||
return request<ApiResponse<PageResult<NoticeTable[]>>>({
|
||||
url: `${API_PATH}/available`,
|
||||
method: "get",
|
||||
});
|
||||
},
|
||||
|
||||
getNoticeDetail(query: number) {
|
||||
detailNotice(query: number) {
|
||||
return request<ApiResponse<NoticeTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
@@ -49,7 +49,7 @@ const NoticeAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
batchAvailableNotice(body: BatchType) {
|
||||
batchNotice(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: "patch",
|
||||
|
||||
@@ -19,7 +19,7 @@ const ParamsAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getConfigList(query: ConfigPageQuery) {
|
||||
listParams(query: ConfigPageQuery) {
|
||||
return request<ApiResponse<PageResult<ConfigTable[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
@@ -27,14 +27,14 @@ const ParamsAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getConfigDetail(query: number) {
|
||||
detailParams(query: number) {
|
||||
return request<ApiResponse<ConfigTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
});
|
||||
},
|
||||
|
||||
createConfig(body: ConfigForm) {
|
||||
createParams(body: ConfigForm) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/create`,
|
||||
method: "post",
|
||||
@@ -42,7 +42,7 @@ const ParamsAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
updateConfig(id: number, body: ConfigForm) {
|
||||
updateParams(id: number, body: ConfigForm) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/update/${id}`,
|
||||
method: "put",
|
||||
@@ -50,7 +50,7 @@ const ParamsAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
deleteConfig(body: number[]) {
|
||||
deleteParams(body: number[]) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/delete`,
|
||||
method: "delete",
|
||||
@@ -58,7 +58,7 @@ const ParamsAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
exportConfig(body: ConfigPageQuery) {
|
||||
exportParams(body: ConfigPageQuery) {
|
||||
return request<Blob>({
|
||||
url: `${API_PATH}/export`,
|
||||
method: "post",
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/utils/request";
|
||||
const API_PATH = "/system/position";
|
||||
|
||||
const PositionAPI = {
|
||||
getPositionList(query?: PositionPageQuery) {
|
||||
listPosition(query?: PositionPageQuery) {
|
||||
return request<ApiResponse<PageResult<PositionTable[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
@@ -11,7 +11,7 @@ const PositionAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getPositionDetail(query: number) {
|
||||
detailPosition(query: number) {
|
||||
return request<ApiResponse<PositionTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
@@ -42,7 +42,7 @@ const PositionAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
batchAvailablePosition(body: BatchType) {
|
||||
batchPosition(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: "patch",
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/utils/request";
|
||||
const API_PATH = "/system/role";
|
||||
|
||||
const RoleAPI = {
|
||||
getRoleList(query?: TablePageQuery) {
|
||||
listRole(query?: TablePageQuery) {
|
||||
return request<ApiResponse<PageResult<RoleTable[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
@@ -11,7 +11,7 @@ const RoleAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getRoleDetail(query: number) {
|
||||
detailRole(query: number) {
|
||||
return request<ApiResponse<RoleTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
@@ -42,7 +42,7 @@ const RoleAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
batchAvailableRole(body: BatchType) {
|
||||
batchRole(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: "patch",
|
||||
|
||||
@@ -3,22 +3,22 @@ import request from "@/utils/request";
|
||||
const API_PATH = "/system/tenant";
|
||||
|
||||
const TenantAPI = {
|
||||
list(query: ObjPageQuery) {
|
||||
return request<ApiResponse<PageResult<ObjTable[]>>>({
|
||||
listTenant(query: TenantPageQuery) {
|
||||
return request<ApiResponse<PageResult<TenantTable[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
},
|
||||
|
||||
detail(query: number) {
|
||||
return request<ApiResponse<ObjTable>>({
|
||||
detailTenant(query: number) {
|
||||
return request<ApiResponse<TenantTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
});
|
||||
},
|
||||
|
||||
create(body: ObjForm) {
|
||||
createTenant(body: TenantForm) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/create`,
|
||||
method: "post",
|
||||
@@ -26,7 +26,7 @@ const TenantAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
update(id: number, body: ObjForm) {
|
||||
updateTenant(id: number, body: TenantForm) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/update/${id}`,
|
||||
method: "put",
|
||||
@@ -34,7 +34,7 @@ const TenantAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
delete(body: number[]) {
|
||||
deleteTenant(body: number[]) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/delete`,
|
||||
method: "delete",
|
||||
@@ -42,7 +42,7 @@ const TenantAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
batch(body: BatchType) {
|
||||
batchTenant(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: "patch",
|
||||
@@ -50,7 +50,7 @@ const TenantAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
export(body: ObjPageQuery) {
|
||||
exportTenant(body: TenantPageQuery) {
|
||||
return request<Blob>({
|
||||
url: `${API_PATH}/export`,
|
||||
method: "post",
|
||||
@@ -59,7 +59,7 @@ const TenantAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
download() {
|
||||
downloadTenant() {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/download/template`,
|
||||
method: "post",
|
||||
@@ -67,7 +67,7 @@ const TenantAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
import(body: FormData) {
|
||||
importTenant(body: FormData) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/import`,
|
||||
method: "post",
|
||||
@@ -81,7 +81,7 @@ const TenantAPI = {
|
||||
|
||||
export default TenantAPI;
|
||||
|
||||
export interface ObjPageQuery extends PageQuery {
|
||||
export interface TenantPageQuery extends PageQuery {
|
||||
/** 示例标题 */
|
||||
name?: string;
|
||||
/** 示例状态 */
|
||||
@@ -94,7 +94,7 @@ export interface ObjPageQuery extends PageQuery {
|
||||
creator?: number;
|
||||
}
|
||||
|
||||
export interface ObjTable {
|
||||
export interface TenantTable {
|
||||
index?: number;
|
||||
id?: number;
|
||||
name?: string;
|
||||
@@ -106,7 +106,7 @@ export interface ObjTable {
|
||||
// creator?: creatorType;
|
||||
}
|
||||
|
||||
export interface ObjForm {
|
||||
export interface TenantForm {
|
||||
id?: number;
|
||||
name?: string;
|
||||
code?: string;
|
||||
|
||||
@@ -60,7 +60,7 @@ export const UserAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getUserList(query: UserPageQuery) {
|
||||
listUser(query: UserPageQuery) {
|
||||
return request<ApiResponse<PageResult<UserInfo[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: "get",
|
||||
@@ -68,7 +68,7 @@ export const UserAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getUserDetail(query: number) {
|
||||
detailUser(query: number) {
|
||||
return request<ApiResponse<UserInfo>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: "get",
|
||||
@@ -99,7 +99,7 @@ export const UserAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
batchAvailableUser(body: BatchType) {
|
||||
batchUser(body: BatchType) {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: "patch",
|
||||
@@ -116,7 +116,7 @@ export const UserAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
downloadTemplate() {
|
||||
downloadTemplateUser() {
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/import/template`,
|
||||
method: "post",
|
||||
|
||||
Reference in New Issue
Block a user