Files
admin-vben5/apps/web-antd/src/api/sis/accessControl/index.ts

76 lines
1.6 KiB
TypeScript
Raw Normal View History

2025-06-30 06:16:40 +08:00
import type {
AccessControlForm,
AccessControlQuery,
AccessControlVO,
} from './model';
2025-06-18 11:03:42 +08:00
2025-06-30 06:16:40 +08:00
import type { ID, IDS, PageResult, TreeNode } from '#/api/common';
2025-06-18 11:03:42 +08:00
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
2025-06-30 06:16:40 +08:00
*
* @param params
* @returns
*/
2025-06-18 11:03:42 +08:00
export function accessControlList(params?: AccessControlQuery) {
2025-06-30 06:16:40 +08:00
return requestClient.get<PageResult<AccessControlVO>>(
'/sis/accessControl/list',
{ params },
);
2025-06-18 11:03:42 +08:00
}
/**
*
* @param params
* @returns
*/
export function accessControlExport(params?: AccessControlQuery) {
2025-06-29 02:59:14 +08:00
return commonExport('/sis/accessControl/export', params ?? {});
2025-06-18 11:03:42 +08:00
}
/**
*
* @param id id
* @returns
*/
export function accessControlInfo(id: ID) {
2025-06-29 02:59:14 +08:00
return requestClient.get<AccessControlVO>(`/sis/accessControl/${id}`);
2025-06-18 11:03:42 +08:00
}
/**
*
* @param data
* @returns void
*/
export function accessControlAdd(data: AccessControlForm) {
2025-06-29 02:59:14 +08:00
return requestClient.postWithMsg<void>('/sis/accessControl', data);
2025-06-18 11:03:42 +08:00
}
/**
*
* @param data
* @returns void
*/
export function accessControlUpdate(data: AccessControlForm) {
2025-06-29 02:59:14 +08:00
return requestClient.putWithMsg<void>('/sis/accessControl', data);
2025-06-18 11:03:42 +08:00
}
/**
*
* @param id id
* @returns void
*/
export function accessControlRemove(id: ID | IDS) {
2025-06-29 02:59:14 +08:00
return requestClient.deleteWithMsg<void>(`/sis/accessControl/${id}`);
2025-06-18 11:03:42 +08:00
}
2025-06-30 06:16:40 +08:00
/**
*
* @returns void
*/
export function queryTree() {
return requestClient.get<TreeNode<Number>[]>(`/sis/accessControl/tree`);
}