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

70 lines
1.6 KiB
TypeScript
Raw Normal View History

2025-06-26 22:02:40 +08:00
import type {
AccessControlDeviceForm,
AccessControlDeviceQuery,
AccessControlDeviceVO,
} from './model';
import type { ID, IDS, PageResult } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
*
* @param params
* @returns
*/
export function accessControlDeviceList(params?: AccessControlDeviceQuery) {
return requestClient.get<PageResult<AccessControlDeviceVO>>(
'/sis/accessControlDevice/list',
{ params },
);
}
/**
*
* @param params
* @returns
*/
export function accessControlDeviceExport(params?: AccessControlDeviceQuery) {
return commonExport('/sis/accessControlDevice/export', params ?? {});
}
/**
*
* @param id id
* @returns
*/
export function accessControlDeviceInfo(id: ID) {
return requestClient.get<AccessControlDeviceVO>(
`/sis/accessControlDevice/${id}`,
);
}
/**
*
* @param data
* @returns void
*/
export function accessControlDeviceAdd(data: AccessControlDeviceForm) {
return requestClient.postWithMsg<void>('/sis/accessControlDevice', data);
}
/**
*
* @param data
* @returns void
*/
export function accessControlDeviceUpdate(data: AccessControlDeviceForm) {
return requestClient.putWithMsg<void>('/sis/accessControlDevice', data);
}
/**
*
* @param id id
* @returns void
*/
export function accessControlDeviceRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/sis/accessControlDevice/${id}`);
}