refactor(sis): 重构人员库授权功能
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { AuthRecordForm, AuthRecordQuery, AuthRecordVO } from './model';
|
||||
|
||||
import type { ID, IDS, PageResult } from '#/api/common';
|
||||
import type { ID, IDS, PageResult, TreeNode } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
@@ -35,12 +35,12 @@ export function authRecordInfo(id: ID) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增授权记录
|
||||
* 新增授权记录(授权只针对人员库,不对单张照片进行授权)
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function authRecordAdd(data: AuthRecordForm) {
|
||||
return requestClient.postWithMsg<void>('/sis/authRecord/add', data);
|
||||
return requestClient.postWithMsg<void>('/sis/authRecord', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,14 +61,15 @@ export function authRecordRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/sis/authRecord/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对人员库进行授权
|
||||
* @param params id
|
||||
*/
|
||||
export function authPersonLib(params: any) {
|
||||
return requestClient.postWithMsg<void>(`/sis/authRecord/authLib`, params);
|
||||
}
|
||||
|
||||
export function queryAuthDevice(id: ID) {
|
||||
return requestClient.get<AuthRecordVO[]>(`/sis/authRecord/authDevice/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有可授权设备树
|
||||
* @returns void
|
||||
*/
|
||||
export function queryTree() {
|
||||
return requestClient.get<TreeNode<Number>[]>(`/sis/authRecord/authDevice/tree`);
|
||||
}
|
||||
|
11
apps/web-antd/src/api/sis/authRecord/model.d.ts
vendored
11
apps/web-antd/src/api/sis/authRecord/model.d.ts
vendored
@@ -26,16 +26,9 @@ export interface AuthRecordForm extends BaseEntity {
|
||||
libId?: string | number;
|
||||
|
||||
/**
|
||||
* 人像id
|
||||
* 设备ids
|
||||
*/
|
||||
imgIds?: string[] | number[];
|
||||
|
||||
/**
|
||||
* 门禁id
|
||||
*/
|
||||
acIds?: string[] | number[];
|
||||
|
||||
issue: boolean;
|
||||
deviceIds?: string[] | number[];
|
||||
}
|
||||
|
||||
export interface AuthRecordQuery extends PageQuery {
|
||||
|
Reference in New Issue
Block a user