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>( '/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( `/sis/accessControlDevice/${id}`, ); } /** * 新增门禁设备 * @param data * @returns void */ export function accessControlDeviceAdd(data: AccessControlDeviceForm) { return requestClient.postWithMsg('/sis/accessControlDevice', data); } /** * 更新门禁设备 * @param data * @returns void */ export function accessControlDeviceUpdate(data: AccessControlDeviceForm) { return requestClient.putWithMsg('/sis/accessControlDevice', data); } /** * 删除门禁设备 * @param id id * @returns void */ export function accessControlDeviceRemove(id: ID | IDS) { return requestClient.deleteWithMsg(`/sis/accessControlDevice/${id}`); }