Files
admin-vben5/apps/web-antd/src/api/sis/accessControl/index.ts
15683799673 285ac3e0ed
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
增加门禁授权操作
2025-06-30 06:16:40 +08:00

76 lines
1.6 KiB
TypeScript

import type {
AccessControlForm,
AccessControlQuery,
AccessControlVO,
} from './model';
import type { ID, IDS, PageResult, TreeNode } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询门禁管理列表
* @param params
* @returns 门禁管理列表
*/
export function accessControlList(params?: AccessControlQuery) {
return requestClient.get<PageResult<AccessControlVO>>(
'/sis/accessControl/list',
{ params },
);
}
/**
* 导出门禁管理列表
* @param params
* @returns 门禁管理列表
*/
export function accessControlExport(params?: AccessControlQuery) {
return commonExport('/sis/accessControl/export', params ?? {});
}
/**
* 查询门禁管理详情
* @param id id
* @returns 门禁管理详情
*/
export function accessControlInfo(id: ID) {
return requestClient.get<AccessControlVO>(`/sis/accessControl/${id}`);
}
/**
* 新增门禁管理
* @param data
* @returns void
*/
export function accessControlAdd(data: AccessControlForm) {
return requestClient.postWithMsg<void>('/sis/accessControl', data);
}
/**
* 更新门禁管理
* @param data
* @returns void
*/
export function accessControlUpdate(data: AccessControlForm) {
return requestClient.putWithMsg<void>('/sis/accessControl', data);
}
/**
* 删除门禁管理
* @param id id
* @returns void
*/
export function accessControlRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/sis/accessControl/${id}`);
}
/**
* 查询门禁书
* @returns void
*/
export function queryTree() {
return requestClient.get<TreeNode<Number>[]>(`/sis/accessControl/tree`);
}