70 lines
1.6 KiB
TypeScript
70 lines
1.6 KiB
TypeScript
|
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}`);
|
||
|
}
|