2026-03-26 20:18:20 +08:00
|
|
|
|
import { SYSTEM_SERVICE_PREFIX } from '@/constants/service';
|
|
|
|
|
|
import { request } from '../request';
|
2026-04-23 09:05:55 +08:00
|
|
|
|
import {
|
|
|
|
|
|
type ServiceRequestResult,
|
|
|
|
|
|
mapServiceResult,
|
|
|
|
|
|
normalizeNullableStringId,
|
|
|
|
|
|
normalizeStringId,
|
|
|
|
|
|
safeJsonRequestConfig
|
|
|
|
|
|
} from './shared';
|
2026-04-10 16:30:42 +08:00
|
|
|
|
import UserManagementRelationQueryReqVO = Api.SystemManage.UserManagementRelationQueryReqVO;
|
2026-03-26 20:18:20 +08:00
|
|
|
|
|
|
|
|
|
|
const ROLE_PREFIX = `${SYSTEM_SERVICE_PREFIX}/role`;
|
|
|
|
|
|
const MENU_PREFIX = `${SYSTEM_SERVICE_PREFIX}/menu`;
|
|
|
|
|
|
const PERMISSION_PREFIX = `${SYSTEM_SERVICE_PREFIX}/permission`;
|
|
|
|
|
|
const USER_PREFIX = `${SYSTEM_SERVICE_PREFIX}/user`;
|
|
|
|
|
|
const DEPT_PREFIX = `${SYSTEM_SERVICE_PREFIX}/dept`;
|
|
|
|
|
|
const POST_PREFIX = `${SYSTEM_SERVICE_PREFIX}/post`;
|
|
|
|
|
|
const ORG_LEADER_PREFIX = `${SYSTEM_SERVICE_PREFIX}/org-leader`;
|
2026-04-10 16:30:42 +08:00
|
|
|
|
const USER_MANAGEMENT_RELATION_PREFIX = `${SYSTEM_SERVICE_PREFIX}/user-management-relation`;
|
2026-03-26 20:18:20 +08:00
|
|
|
|
|
|
|
|
|
|
function createRolePageQuery(params?: Api.SystemManage.RoleSearchParams) {
|
|
|
|
|
|
const query = new URLSearchParams();
|
|
|
|
|
|
|
|
|
|
|
|
if (!params) {
|
|
|
|
|
|
return query.toString();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (params.pageNo !== undefined) {
|
|
|
|
|
|
query.append('pageNo', String(params.pageNo));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (params.pageSize !== undefined) {
|
|
|
|
|
|
query.append('pageSize', String(params.pageSize));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (params.name) {
|
|
|
|
|
|
query.append('name', params.name);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (params.code) {
|
|
|
|
|
|
query.append('code', params.code);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (params.status !== undefined) {
|
|
|
|
|
|
query.append('status', String(params.status));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
params.createTime?.forEach(item => {
|
|
|
|
|
|
if (item) {
|
|
|
|
|
|
query.append('createTime', item);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-04-23 09:05:55 +08:00
|
|
|
|
if (params.scopeType) {
|
|
|
|
|
|
query.append('scopeType', params.scopeType);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (params.objectType) {
|
|
|
|
|
|
query.append('objectType', params.objectType);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-26 20:18:20 +08:00
|
|
|
|
return query.toString();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-23 09:05:55 +08:00
|
|
|
|
function createBatchDeleteQuery(ids: Array<string | number>) {
|
2026-03-26 20:18:20 +08:00
|
|
|
|
const query = new URLSearchParams();
|
|
|
|
|
|
|
|
|
|
|
|
ids.forEach(id => {
|
|
|
|
|
|
query.append('ids', String(id));
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return query.toString();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-23 09:05:55 +08:00
|
|
|
|
type UserSimpleResponse = Omit<Api.SystemManage.UserSimple, 'id'> & {
|
|
|
|
|
|
id: string | number;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
type RoleResponse = Omit<Api.SystemManage.Role, 'id'> & {
|
|
|
|
|
|
id: string | number;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
type RolePageResponse = Api.SystemManage.PageResult<RoleResponse>;
|
|
|
|
|
|
|
|
|
|
|
|
type RoleSimpleResponse = Omit<Api.SystemManage.RoleSimple, 'id'> & {
|
|
|
|
|
|
id: string | number;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
type MenuResponse = Omit<Api.SystemManage.Menu, 'id' | 'parentId' | 'children'> & {
|
|
|
|
|
|
id: string | number;
|
|
|
|
|
|
parentId: string | number;
|
|
|
|
|
|
children?: MenuResponse[] | null;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
type MenuSimpleResponse = Omit<Api.SystemManage.MenuSimple, 'id' | 'parentId' | 'children'> & {
|
|
|
|
|
|
id: string | number;
|
|
|
|
|
|
parentId: string | number;
|
|
|
|
|
|
children?: MenuSimpleResponse[] | null;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
type UserManagementRelationResponse = Omit<
|
|
|
|
|
|
Api.SystemManage.UserManagementRelation,
|
|
|
|
|
|
'id' | 'managerUserId' | 'subordinateUserId'
|
|
|
|
|
|
> & {
|
|
|
|
|
|
id: string | number | null;
|
|
|
|
|
|
managerUserId: string | number | null;
|
|
|
|
|
|
subordinateUserId: string | number | null;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
type UserManagementRelationTreeResponse = Omit<
|
|
|
|
|
|
Api.SystemManage.UserManagementRelationTreeRespVO,
|
|
|
|
|
|
'id' | 'userId' | 'managerUserId' | 'children'
|
|
|
|
|
|
> & {
|
|
|
|
|
|
id: string | number | null;
|
|
|
|
|
|
userId: string | number;
|
|
|
|
|
|
managerUserId: string | number | null;
|
|
|
|
|
|
children?: UserManagementRelationTreeResponse[] | null;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function normalizeUserSimple(user: UserSimpleResponse): Api.SystemManage.UserSimple {
|
|
|
|
|
|
return {
|
|
|
|
|
|
...user,
|
|
|
|
|
|
id: normalizeStringId(user.id)
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function normalizeRole(role: RoleResponse): Api.SystemManage.Role {
|
|
|
|
|
|
return {
|
|
|
|
|
|
...role,
|
|
|
|
|
|
id: normalizeStringId(role.id)
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function normalizeRoleSimple(role: RoleSimpleResponse): Api.SystemManage.RoleSimple {
|
|
|
|
|
|
return {
|
|
|
|
|
|
...role,
|
|
|
|
|
|
id: normalizeStringId(role.id)
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function normalizeMenu(menu: MenuResponse): Api.SystemManage.Menu {
|
|
|
|
|
|
return {
|
|
|
|
|
|
...menu,
|
|
|
|
|
|
id: normalizeStringId(menu.id),
|
|
|
|
|
|
parentId: normalizeStringId(menu.parentId),
|
|
|
|
|
|
children: menu.children?.map(normalizeMenu) ?? null
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function normalizeMenuSimple(menu: MenuSimpleResponse): Api.SystemManage.MenuSimple {
|
|
|
|
|
|
return {
|
|
|
|
|
|
...menu,
|
|
|
|
|
|
id: normalizeStringId(menu.id),
|
|
|
|
|
|
parentId: normalizeStringId(menu.parentId),
|
|
|
|
|
|
children: menu.children?.map(normalizeMenuSimple) ?? null
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function normalizeUserManagementRelation(
|
|
|
|
|
|
relation: UserManagementRelationResponse
|
|
|
|
|
|
): Api.SystemManage.UserManagementRelation {
|
|
|
|
|
|
return {
|
|
|
|
|
|
...relation,
|
|
|
|
|
|
id: normalizeNullableStringId(relation.id),
|
|
|
|
|
|
managerUserId: normalizeNullableStringId(relation.managerUserId),
|
|
|
|
|
|
subordinateUserId: normalizeNullableStringId(relation.subordinateUserId)
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function normalizeUserManagementRelationTree(
|
|
|
|
|
|
relation: UserManagementRelationTreeResponse
|
|
|
|
|
|
): Api.SystemManage.UserManagementRelationTreeRespVO {
|
|
|
|
|
|
return {
|
|
|
|
|
|
...relation,
|
|
|
|
|
|
id: normalizeNullableStringId(relation.id),
|
|
|
|
|
|
userId: normalizeStringId(relation.userId),
|
|
|
|
|
|
managerUserId: normalizeNullableStringId(relation.managerUserId),
|
|
|
|
|
|
children: relation.children?.map(normalizeUserManagementRelationTree) ?? null
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-26 20:18:20 +08:00
|
|
|
|
/** 获取角色分页 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export async function fetchGetRolePage(params?: Api.SystemManage.RoleSearchParams) {
|
2026-03-26 20:18:20 +08:00
|
|
|
|
const query = createRolePageQuery(params);
|
|
|
|
|
|
|
2026-04-23 09:05:55 +08:00
|
|
|
|
const result = await request<RolePageResponse>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: query ? `${ROLE_PREFIX}/page?${query}` : `${ROLE_PREFIX}/page`,
|
|
|
|
|
|
method: 'get'
|
|
|
|
|
|
});
|
2026-04-23 09:05:55 +08:00
|
|
|
|
|
|
|
|
|
|
return mapServiceResult(result as ServiceRequestResult<RolePageResponse>, data => ({
|
|
|
|
|
|
...data,
|
|
|
|
|
|
list: data.list.map(normalizeRole)
|
|
|
|
|
|
}));
|
2026-03-26 20:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 为兼容旧代码保留原函数名 */
|
|
|
|
|
|
export const fetchGetRoleList = fetchGetRolePage;
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取角色详情 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export async function fetchGetRole(id: string) {
|
|
|
|
|
|
const result = await request<RoleResponse>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: `${ROLE_PREFIX}/get`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
2026-04-23 09:05:55 +08:00
|
|
|
|
|
|
|
|
|
|
return mapServiceResult(result as ServiceRequestResult<RoleResponse>, normalizeRole);
|
2026-03-26 20:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 创建角色 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export async function fetchCreateRole(data: Api.SystemManage.SaveRoleParams) {
|
|
|
|
|
|
const result = await request<string | number>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: `${ROLE_PREFIX}/create`,
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
2026-04-23 09:05:55 +08:00
|
|
|
|
|
|
|
|
|
|
return mapServiceResult(result as ServiceRequestResult<string | number>, normalizeStringId);
|
2026-03-26 20:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 更新角色 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export function fetchUpdateRole(
|
|
|
|
|
|
data: { id: string } & Omit<Api.SystemManage.SaveRoleParams, 'scopeType' | 'objectType'>
|
|
|
|
|
|
) {
|
2026-03-26 20:18:20 +08:00
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${ROLE_PREFIX}/update`,
|
|
|
|
|
|
method: 'put',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除角色 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export function fetchDeleteRole(id: string) {
|
2026-03-26 20:18:20 +08:00
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${ROLE_PREFIX}/delete`,
|
|
|
|
|
|
method: 'delete',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 批量删除角色 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export function fetchBatchDeleteRole(ids: string[]) {
|
2026-03-26 20:18:20 +08:00
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${ROLE_PREFIX}/delete-list?${createBatchDeleteQuery(ids)}`,
|
|
|
|
|
|
method: 'delete'
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取全部角色
|
|
|
|
|
|
*
|
|
|
|
|
|
* 为当前用户页面保留 `roleName / roleCode` 字段,直到该页面完成重构
|
|
|
|
|
|
*/
|
|
|
|
|
|
export async function fetchGetAllRoles(): Promise<ServiceRequestResult<Api.SystemManage.AllRole[]>> {
|
2026-04-23 09:05:55 +08:00
|
|
|
|
const result = await request<RoleSimpleResponse[]>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: `${ROLE_PREFIX}/simple-list`,
|
|
|
|
|
|
method: 'get'
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (result.error || !result.data) {
|
|
|
|
|
|
return result as ServiceRequestResult<Api.SystemManage.AllRole[]>;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
...result,
|
2026-04-23 09:05:55 +08:00
|
|
|
|
data: result.data.map(item => {
|
|
|
|
|
|
const role = normalizeRoleSimple(item);
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
...role,
|
|
|
|
|
|
roleName: role.name,
|
|
|
|
|
|
roleCode: role.code
|
|
|
|
|
|
};
|
|
|
|
|
|
})
|
2026-03-26 20:18:20 +08:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取启用状态的角色简表 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export async function fetchGetRoleSimpleList(params?: Api.SystemManage.ScopeQueryParams) {
|
|
|
|
|
|
const result = await request<RoleSimpleResponse[]>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: `${ROLE_PREFIX}/simple-list`,
|
2026-04-23 09:05:55 +08:00
|
|
|
|
method: 'get',
|
|
|
|
|
|
params
|
2026-03-26 20:18:20 +08:00
|
|
|
|
});
|
2026-04-23 09:05:55 +08:00
|
|
|
|
|
|
|
|
|
|
return mapServiceResult(result as ServiceRequestResult<RoleSimpleResponse[]>, data => data.map(normalizeRoleSimple));
|
2026-03-26 20:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取部门列表 */
|
|
|
|
|
|
export function fetchGetDeptList(params?: Api.SystemManage.DeptSearchParams) {
|
|
|
|
|
|
return request<Api.SystemManage.DeptList>({
|
|
|
|
|
|
url: `${DEPT_PREFIX}/list`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取部门简表 */
|
|
|
|
|
|
export function fetchGetDeptSimpleList() {
|
|
|
|
|
|
return request<Api.SystemManage.DeptSimpleList>({
|
|
|
|
|
|
url: `${DEPT_PREFIX}/simple-list`,
|
|
|
|
|
|
method: 'get'
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 创建部门 */
|
|
|
|
|
|
export function fetchCreateDept(data: Api.SystemManage.SaveDeptParams) {
|
|
|
|
|
|
return request<number>({
|
|
|
|
|
|
url: `${DEPT_PREFIX}/create`,
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 更新部门 */
|
|
|
|
|
|
export function fetchUpdateDept(data: { id: number } & Api.SystemManage.SaveDeptParams) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${DEPT_PREFIX}/update`,
|
|
|
|
|
|
method: 'put',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除部门 */
|
|
|
|
|
|
export function fetchDeleteDept(id: number) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${DEPT_PREFIX}/delete`,
|
|
|
|
|
|
method: 'delete',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 根据部门获取组织负责人关系 */
|
|
|
|
|
|
export function fetchGetOrgLeaderListByDept(deptId: number) {
|
|
|
|
|
|
return request<Api.SystemManage.OrgLeaderRelationList>({
|
|
|
|
|
|
url: `${ORG_LEADER_PREFIX}/list-by-dept`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: { deptId }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取组织负责人的候选用户 */
|
|
|
|
|
|
export function fetchGetOrgLeaderCandidateUsers(deptId: number) {
|
|
|
|
|
|
return request<Api.SystemManage.OrgLeaderCandidateUserList>({
|
|
|
|
|
|
url: `${ORG_LEADER_PREFIX}/candidate-users`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: { deptId }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 创建组织负责人关系 */
|
|
|
|
|
|
export function fetchCreateOrgLeaderRelation(data: Api.SystemManage.SaveOrgLeaderRelationParams) {
|
|
|
|
|
|
return request<number>({
|
|
|
|
|
|
url: `${ORG_LEADER_PREFIX}/create`,
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 更新组织负责人关系 */
|
|
|
|
|
|
export function fetchUpdateOrgLeaderRelation(data: { id: number } & Api.SystemManage.SaveOrgLeaderRelationParams) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${ORG_LEADER_PREFIX}/update`,
|
|
|
|
|
|
method: 'put',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除组织负责人关系 */
|
|
|
|
|
|
export function fetchDeleteOrgLeaderRelation(id: number) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${ORG_LEADER_PREFIX}/delete`,
|
|
|
|
|
|
method: 'delete',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取启用状态的岗位简表 */
|
|
|
|
|
|
export function fetchGetPostSimpleList() {
|
|
|
|
|
|
return request<Api.SystemManage.PostSimpleList>({
|
|
|
|
|
|
url: `${POST_PREFIX}/simple-list`,
|
|
|
|
|
|
method: 'get'
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-03 13:42:55 +08:00
|
|
|
|
/** 获取岗位分页 */
|
|
|
|
|
|
export function fetchGetPostPage(params?: Api.SystemManage.PostSearchParams) {
|
|
|
|
|
|
return request<Api.SystemManage.PostList>({
|
|
|
|
|
|
url: `${POST_PREFIX}/page`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取岗位详情 */
|
|
|
|
|
|
export function fetchGetPost(id: number) {
|
|
|
|
|
|
return request<Api.SystemManage.Post>({
|
|
|
|
|
|
url: `${POST_PREFIX}/get`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 创建岗位 */
|
|
|
|
|
|
export function fetchCreatePost(data: Api.SystemManage.SavePostParams) {
|
|
|
|
|
|
return request<number>({
|
|
|
|
|
|
url: `${POST_PREFIX}/create`,
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 更新岗位 */
|
|
|
|
|
|
export function fetchUpdatePost(data: { id: number } & Api.SystemManage.SavePostParams) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${POST_PREFIX}/update`,
|
|
|
|
|
|
method: 'put',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除岗位 */
|
|
|
|
|
|
export function fetchDeletePost(id: number) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${POST_PREFIX}/delete`,
|
|
|
|
|
|
method: 'delete',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 批量删除岗位 */
|
|
|
|
|
|
export function fetchBatchDeletePost(ids: number[]) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${POST_PREFIX}/delete-list?${createBatchDeleteQuery(ids)}`,
|
|
|
|
|
|
method: 'delete'
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-10 16:30:42 +08:00
|
|
|
|
/** 获取用户简单列表(用于用户选择下拉框) */
|
|
|
|
|
|
export function fetchGetUserSimpleList() {
|
2026-04-23 09:05:55 +08:00
|
|
|
|
return request<UserSimpleResponse[]>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-04-10 16:30:42 +08:00
|
|
|
|
url: `${USER_PREFIX}/simple-list`,
|
|
|
|
|
|
method: 'get'
|
2026-04-23 09:05:55 +08:00
|
|
|
|
}).then(result =>
|
|
|
|
|
|
mapServiceResult(result as ServiceRequestResult<UserSimpleResponse[]>, data => data.map(normalizeUserSimple))
|
|
|
|
|
|
);
|
2026-04-10 16:30:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-26 20:18:20 +08:00
|
|
|
|
/** 获取用户分页 */
|
|
|
|
|
|
export function fetchGetUserPage(params?: Api.SystemManage.UserSearchParams) {
|
|
|
|
|
|
return request<Api.SystemManage.UserList>({
|
|
|
|
|
|
url: `${USER_PREFIX}/page`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 为兼容旧代码保留原函数名 */
|
|
|
|
|
|
export const fetchGetUserList = fetchGetUserPage;
|
|
|
|
|
|
|
2026-04-14 16:33:47 +08:00
|
|
|
|
/** 通过部门id获取用户详情 */
|
|
|
|
|
|
export function fetchGetUserListByDeptId(deptId: any) {
|
2026-04-23 09:05:55 +08:00
|
|
|
|
return request<UserSimpleResponse[]>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-04-14 16:33:47 +08:00
|
|
|
|
url: `${USER_PREFIX}/list-by-dept-id`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: { deptId }
|
2026-04-23 09:05:55 +08:00
|
|
|
|
}).then(result =>
|
|
|
|
|
|
mapServiceResult(result as ServiceRequestResult<UserSimpleResponse[]>, data => data.map(normalizeUserSimple))
|
|
|
|
|
|
);
|
2026-04-14 16:33:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-26 20:18:20 +08:00
|
|
|
|
/** 获取用户详情 */
|
|
|
|
|
|
export function fetchGetUser(id: number) {
|
|
|
|
|
|
return request<Api.SystemManage.User>({
|
|
|
|
|
|
url: `${USER_PREFIX}/get`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 创建用户 */
|
|
|
|
|
|
export function fetchCreateUser(data: Api.SystemManage.SaveUserParams) {
|
|
|
|
|
|
return request<number>({
|
|
|
|
|
|
url: `${USER_PREFIX}/create`,
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 更新用户 */
|
|
|
|
|
|
export function fetchUpdateUser(data: { id: number } & Api.SystemManage.SaveUserParams) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${USER_PREFIX}/update`,
|
|
|
|
|
|
method: 'put',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 更新用户状态 */
|
|
|
|
|
|
export function fetchUpdateUserStatus(data: Api.SystemManage.UpdateUserStatusParams) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${USER_PREFIX}/update-status`,
|
|
|
|
|
|
method: 'put',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 重置用户密码 */
|
|
|
|
|
|
export function fetchUpdateUserPassword(data: Api.SystemManage.UpdateUserPasswordParams) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${USER_PREFIX}/update-password`,
|
|
|
|
|
|
method: 'put',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除用户 */
|
|
|
|
|
|
export function fetchDeleteUser(id: number) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${USER_PREFIX}/delete`,
|
|
|
|
|
|
method: 'delete',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 批量删除用户 */
|
|
|
|
|
|
export function fetchBatchDeleteUser(ids: number[]) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${USER_PREFIX}/delete-list?${createBatchDeleteQuery(ids)}`,
|
|
|
|
|
|
method: 'delete'
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取菜单列表 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export async function fetchGetMenuList(params?: Api.SystemManage.MenuSearchParams) {
|
|
|
|
|
|
const result = await request<MenuResponse[]>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: `${MENU_PREFIX}/list`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params
|
|
|
|
|
|
});
|
2026-04-23 09:05:55 +08:00
|
|
|
|
|
|
|
|
|
|
return mapServiceResult(result as ServiceRequestResult<MenuResponse[]>, data => data.map(normalizeMenu));
|
2026-03-26 20:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取菜单详情 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export async function fetchGetMenu(id: string) {
|
|
|
|
|
|
const result = await request<MenuResponse>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: `${MENU_PREFIX}/get`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
2026-04-23 09:05:55 +08:00
|
|
|
|
|
|
|
|
|
|
return mapServiceResult(result as ServiceRequestResult<MenuResponse>, normalizeMenu);
|
2026-03-26 20:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 创建菜单 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export async function fetchCreateMenu(data: Api.SystemManage.SaveMenuParams) {
|
|
|
|
|
|
const result = await request<string | number>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: `${MENU_PREFIX}/create`,
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
2026-04-23 09:05:55 +08:00
|
|
|
|
|
|
|
|
|
|
return mapServiceResult(result as ServiceRequestResult<string | number>, normalizeStringId);
|
2026-03-26 20:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 更新菜单 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export function fetchUpdateMenu(
|
|
|
|
|
|
data: { id: string } & Omit<Api.SystemManage.SaveMenuParams, 'scopeType' | 'objectType'>
|
|
|
|
|
|
) {
|
2026-03-26 20:18:20 +08:00
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${MENU_PREFIX}/update`,
|
|
|
|
|
|
method: 'put',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除菜单 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export function fetchDeleteMenu(id: string) {
|
2026-03-26 20:18:20 +08:00
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${MENU_PREFIX}/delete`,
|
|
|
|
|
|
method: 'delete',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 批量删除菜单 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export function fetchBatchDeleteMenu(ids: string[]) {
|
2026-03-26 20:18:20 +08:00
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${MENU_PREFIX}/delete-list?${createBatchDeleteQuery(ids)}`,
|
|
|
|
|
|
method: 'delete'
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取启用状态的菜单简表 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export async function fetchGetMenuSimpleList(params?: Api.SystemManage.ScopeQueryParams) {
|
|
|
|
|
|
const result = await request<MenuSimpleResponse[]>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: `${MENU_PREFIX}/simple-list`,
|
2026-04-23 09:05:55 +08:00
|
|
|
|
method: 'get',
|
|
|
|
|
|
params
|
2026-03-26 20:18:20 +08:00
|
|
|
|
});
|
2026-04-23 09:05:55 +08:00
|
|
|
|
|
|
|
|
|
|
return mapServiceResult(result as ServiceRequestResult<MenuSimpleResponse[]>, data => data.map(normalizeMenuSimple));
|
2026-03-26 20:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取角色关联的菜单 ID 列表 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export async function fetchGetRoleMenuIds(roleId: string) {
|
|
|
|
|
|
const result = await request<Array<string | number>>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: `${PERMISSION_PREFIX}/list-role-menus`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: { roleId }
|
|
|
|
|
|
});
|
2026-04-23 09:05:55 +08:00
|
|
|
|
|
|
|
|
|
|
return mapServiceResult(result as ServiceRequestResult<Array<string | number>>, data => data.map(normalizeStringId));
|
2026-03-26 20:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 分配角色菜单 */
|
|
|
|
|
|
export function fetchAssignRoleMenus(data: Api.SystemManage.AssignRoleMenuParams) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${PERMISSION_PREFIX}/assign-role-menu`,
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取用户关联的角色 ID 列表 */
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export async function fetchGetUserRoleIds(userId: number) {
|
|
|
|
|
|
const result = await request<Array<string | number>>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-03-26 20:18:20 +08:00
|
|
|
|
url: `${PERMISSION_PREFIX}/list-user-roles`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: { userId }
|
|
|
|
|
|
});
|
2026-04-23 09:05:55 +08:00
|
|
|
|
|
|
|
|
|
|
return mapServiceResult(result as ServiceRequestResult<Array<string | number>>, data => data.map(normalizeStringId));
|
2026-03-26 20:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 分配用户角色 */
|
|
|
|
|
|
export function fetchAssignUserRoles(data: Api.SystemManage.AssignUserRoleParams) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${PERMISSION_PREFIX}/assign-user-role`,
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2026-04-10 16:30:42 +08:00
|
|
|
|
|
2026-04-15 20:58:00 +08:00
|
|
|
|
// ==================== 用户管理链路相关 API ====================
|
2026-04-10 16:30:42 +08:00
|
|
|
|
/**
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 获取用户管理链路树形结构
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
|
|
|
|
|
* 用于树形控件展示,包含用户的上下级层级关系
|
|
|
|
|
|
* 树形结构特点:
|
|
|
|
|
|
* - 根节点:最高领导,没有上级
|
|
|
|
|
|
* - 中间节点:有上级也有下级
|
|
|
|
|
|
* - 叶子节点:基层员工,没有下级
|
|
|
|
|
|
*/
|
2026-04-14 16:33:47 +08:00
|
|
|
|
export function fetchGetUserManagementRelationTree(query: UserManagementRelationQueryReqVO) {
|
2026-04-23 09:05:55 +08:00
|
|
|
|
return request<UserManagementRelationTreeResponse[]>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-04-10 16:30:42 +08:00
|
|
|
|
url: `${USER_MANAGEMENT_RELATION_PREFIX}/tree`,
|
2026-04-14 16:33:47 +08:00
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: query
|
2026-04-23 09:05:55 +08:00
|
|
|
|
}).then(result =>
|
|
|
|
|
|
mapServiceResult(result as ServiceRequestResult<UserManagementRelationTreeResponse[]>, data =>
|
|
|
|
|
|
data.map(normalizeUserManagementRelationTree)
|
|
|
|
|
|
)
|
|
|
|
|
|
);
|
2026-04-10 16:30:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 通过搜索框的查询条件,获取用户管理链路树形结构
|
2026-04-10 16:30:42 +08:00
|
|
|
|
* 用于树形控件展示,包含用户的上下级层级关系
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function fetchGetUserManagementRelationQuery(query: UserManagementRelationQueryReqVO) {
|
2026-04-23 09:05:55 +08:00
|
|
|
|
return request<UserManagementRelationTreeResponse[]>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-04-10 16:30:42 +08:00
|
|
|
|
url: `${USER_MANAGEMENT_RELATION_PREFIX}/query`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: query
|
2026-04-23 09:05:55 +08:00
|
|
|
|
}).then(result =>
|
|
|
|
|
|
mapServiceResult(result as ServiceRequestResult<UserManagementRelationTreeResponse[]>, data =>
|
|
|
|
|
|
data.map(normalizeUserManagementRelationTree)
|
|
|
|
|
|
)
|
|
|
|
|
|
);
|
2026-04-10 16:30:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 获取用户管理链路详情
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 根据主键 ID 查询单条用户管理链路记录
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
|
|
|
|
|
* @param id 关系记录主键 ID
|
|
|
|
|
|
*/
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export function fetchGetUserManagementRelation(id: string) {
|
|
|
|
|
|
return request<UserManagementRelationResponse>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-04-10 16:30:42 +08:00
|
|
|
|
url: `${USER_MANAGEMENT_RELATION_PREFIX}/get`,
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
params: { id }
|
2026-04-23 09:05:55 +08:00
|
|
|
|
}).then(result =>
|
|
|
|
|
|
mapServiceResult(result as ServiceRequestResult<UserManagementRelationResponse>, normalizeUserManagementRelation)
|
|
|
|
|
|
);
|
2026-04-10 16:30:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 创建用户管理链路
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 创建新的用户管理链路记录
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
|
|
|
|
|
* @param data 创建请求参数
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function fetchCreateUserManagementRelation(data: Api.SystemManage.UserManagementRelationSaveReqVO) {
|
2026-04-23 09:05:55 +08:00
|
|
|
|
return request<string | number>({
|
|
|
|
|
|
...safeJsonRequestConfig,
|
2026-04-10 16:30:42 +08:00
|
|
|
|
url: `${USER_MANAGEMENT_RELATION_PREFIX}/create`,
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
data
|
2026-04-23 09:05:55 +08:00
|
|
|
|
}).then(result => mapServiceResult(result as ServiceRequestResult<string | number>, normalizeStringId));
|
2026-04-10 16:30:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 更新用户管理链路
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 更新已有的用户管理链路记录
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
|
|
|
|
|
* @param data 更新请求参数(包含 id)
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function fetchUpdateUserManagementRelation(
|
2026-04-23 09:05:55 +08:00
|
|
|
|
data: { id: string } & Api.SystemManage.UserManagementRelationSaveReqVO
|
2026-04-10 16:30:42 +08:00
|
|
|
|
) {
|
|
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${USER_MANAGEMENT_RELATION_PREFIX}/update`,
|
|
|
|
|
|
method: 'put',
|
|
|
|
|
|
data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 删除用户管理链路
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 根据主键 ID 删除单条用户管理链路记录
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
|
|
|
|
|
* @param id 关系记录主键 ID
|
|
|
|
|
|
*/
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export function fetchDeleteUserManagementRelation(id: string | null) {
|
2026-04-10 16:30:42 +08:00
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${USER_MANAGEMENT_RELATION_PREFIX}/delete`,
|
|
|
|
|
|
method: 'delete',
|
|
|
|
|
|
params: { id }
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 批量删除用户管理链路
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
2026-04-15 20:58:00 +08:00
|
|
|
|
* 根据主键 ID 列表批量删除用户管理链路记录
|
2026-04-10 16:30:42 +08:00
|
|
|
|
*
|
|
|
|
|
|
* @param ids 关系记录主键 ID 列表
|
|
|
|
|
|
*/
|
2026-04-23 09:05:55 +08:00
|
|
|
|
export function fetchBatchDeleteUserManagementRelation(ids: string[]) {
|
2026-04-10 16:30:42 +08:00
|
|
|
|
return request<boolean>({
|
|
|
|
|
|
url: `${USER_MANAGEMENT_RELATION_PREFIX}/delete-list?${createBatchDeleteQuery(ids)}`,
|
|
|
|
|
|
method: 'delete'
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|