62 lines
1.5 KiB
TypeScript
62 lines
1.5 KiB
TypeScript
import type { AccessControlVO, AccessControlForm, AccessControlQuery } from './model';
|
|
|
|
import type { ID, IDS } from '#/api/common';
|
|
import type { PageResult } 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>>('/property/accessControl/list', { params });
|
|
}
|
|
|
|
/**
|
|
* 导出门禁管理列表
|
|
* @param params
|
|
* @returns 门禁管理列表
|
|
*/
|
|
export function accessControlExport(params?: AccessControlQuery) {
|
|
return commonExport('/property/accessControl/export', params ?? {});
|
|
}
|
|
|
|
/**
|
|
* 查询门禁管理详情
|
|
* @param id id
|
|
* @returns 门禁管理详情
|
|
*/
|
|
export function accessControlInfo(id: ID) {
|
|
return requestClient.get<AccessControlVO>(`/property/accessControl/${id}`);
|
|
}
|
|
|
|
/**
|
|
* 新增门禁管理
|
|
* @param data
|
|
* @returns void
|
|
*/
|
|
export function accessControlAdd(data: AccessControlForm) {
|
|
return requestClient.postWithMsg<void>('/property/accessControl', data);
|
|
}
|
|
|
|
/**
|
|
* 更新门禁管理
|
|
* @param data
|
|
* @returns void
|
|
*/
|
|
export function accessControlUpdate(data: AccessControlForm) {
|
|
return requestClient.putWithMsg<void>('/property/accessControl', data);
|
|
}
|
|
|
|
/**
|
|
* 删除门禁管理
|
|
* @param id id
|
|
* @returns void
|
|
*/
|
|
export function accessControlRemove(id: ID | IDS) {
|
|
return requestClient.deleteWithMsg<void>(`/property/accessControl/${id}`);
|
|
}
|