授权逻辑更改

This commit is contained in:
15683799673
2025-07-11 07:36:51 +08:00
parent 332d8eccba
commit 195d7fff7d
24 changed files with 242 additions and 1642 deletions

View File

@@ -1,78 +0,0 @@
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 queryListByFactoryNo(factory: string) {
return requestClient.get<AccessControlDeviceVO[]>(`/sis/accessControlDevice/list/${factory}`,);
}
/**
* 导出门禁设备列表
* @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}`);
}

View File

@@ -1,202 +0,0 @@
import type { BaseEntity, PageQuery } from '#/api/common';
export interface AccessControlDeviceVO {
/**
* 主键id
*/
id: number | string;
/**
* 设备编码
*/
eqpNo: string;
/**
* 设备名称
*/
eqpName: string;
/**
* 厂商编码
*/
factoryNo: string;
/**
* 设备类型
*/
eqpType: number;
/**
* 接入类型(1: 平台接入2:设备接入)
*/
accessType: number;
/**
* 设备ip
*/
eqpIp: string;
/**
* 设备端口
*/
eqpPort: number;
/**
* 设备账号
*/
eqpAccount: string;
/**
* 设备密码
*/
eqpPwd: string;
/**
* 创建人id
*/
createById: number | string;
/**
* 更新人id
*/
updateById: number | string;
/**
* 搜索值
*/
searchValue: string;
}
export interface AccessControlDeviceForm extends BaseEntity {
/**
* 主键id
*/
id?: number | string;
/**
* 设备编码
*/
eqpNo?: string;
/**
* 设备名称
*/
eqpName?: string;
/**
* 厂商编码
*/
factoryNo?: string;
/**
* 设备类型
*/
eqpType?: number;
/**
* 接入类型(1: 平台接入2:设备接入)
*/
accessType?: number;
/**
* 设备ip
*/
eqpIp?: string;
/**
* 设备端口
*/
eqpPort?: number;
/**
* 设备账号
*/
eqpAccount?: string;
/**
* 设备密码
*/
eqpPwd?: string;
/**
* 创建人id
*/
createById?: number | string;
/**
* 更新人id
*/
updateById?: number | string;
/**
* 搜索值
*/
searchValue?: string;
}
export interface AccessControlDeviceQuery extends PageQuery {
/**
* 设备编码
*/
eqpNo?: string;
/**
* 设备名称
*/
eqpName?: string;
/**
* 厂商编码
*/
factoryNo?: string;
/**
* 设备类型
*/
eqpType?: number;
/**
* 接入类型(1: 平台接入2:设备接入)
*/
accessType?: number;
/**
* 设备ip
*/
eqpIp?: string;
/**
* 设备端口
*/
eqpPort?: number;
/**
* 设备账号
*/
eqpAccount?: string;
/**
* 设备密码
*/
eqpPwd?: string;
/**
* 创建人id
*/
createById?: number | string;
/**
* 更新人id
*/
updateById?: number | string;
/**
* 搜索值
*/
searchValue?: string;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -1,18 +1,19 @@
import type { AuthRecordVO, AuthRecordForm, AuthRecordQuery } from './model';
import type { AuthRecordForm, AuthRecordQuery, AuthRecordVO } from './model';
import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';
import type { ID, IDS, PageResult } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询授权记录列表
* @param params
* @returns 授权记录列表
*/
* 查询授权记录列表
* @param params
* @returns 授权记录列表
*/
export function authRecordList(params?: AuthRecordQuery) {
return requestClient.get<PageResult<AuthRecordVO>>('/sis/authRecord/list', { params });
return requestClient.get<PageResult<AuthRecordVO>>('/sis/authRecord/list', {
params,
});
}
/**
@@ -59,3 +60,15 @@ export function authRecordUpdate(data: AuthRecordForm) {
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}`);
}

View File

@@ -15,6 +15,8 @@ export interface AuthRecordVO {
* 门禁id
*/
acdId: string | number;
deviceId: string | number;
}
export interface AuthRecordForm extends BaseEntity {

View File

@@ -1,18 +1,24 @@
import type { DeviceManageVO, DeviceManageForm, DeviceManageQuery } from './model';
import type {
DeviceManageForm,
DeviceManageQuery,
DeviceManageVO,
} from './model';
import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';
import type { ID, IDS, PageResult, TreeNode } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询设备管理列表
* @param params
* @returns 设备管理列表
*/
* 查询设备管理列表
* @param params
* @returns 设备管理列表
*/
export function deviceManageList(params?: DeviceManageQuery) {
return requestClient.get<PageResult<DeviceManageVO>>('/sis/deviceManage/list', { params });
return requestClient.get<PageResult<DeviceManageVO>>(
'/sis/deviceManage/list',
{ params },
);
}
/**
@@ -59,3 +65,11 @@ export function deviceManageUpdate(data: DeviceManageForm) {
export function deviceManageRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/sis/deviceManage/${id}`);
}
/**
* 查询门禁书
* @returns void
*/
export function queryTree() {
return requestClient.get<TreeNode<Number>[]>(`/sis/deviceManage/tree`);
}

View File

@@ -1,62 +0,0 @@
import type { DevicePointForm, DevicePointQuery, DevicePointVO } 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 devicePointList(params?: DevicePointQuery) {
return requestClient.get<PageResult<DevicePointVO>>('/sis/devicePoint/list', {
params,
});
}
/**
* 导出宇视设备点位(通道)列表
* @param params
* @returns 宇视设备点位(通道)列表
*/
export function devicePointExport(params?: DevicePointQuery) {
return commonExport('/sis/devicePoint/export', params ?? {});
}
/**
* 查询宇视设备点位(通道)详情
* @param id id
* @returns 宇视设备点位(通道)详情
*/
export function devicePointInfo(id: ID) {
return requestClient.get<DevicePointVO>(`/sis/devicePoint/${id}`);
}
/**
* 新增宇视设备点位(通道)
* @param data
* @returns void
*/
export function devicePointAdd(data: DevicePointForm) {
return requestClient.postWithMsg<void>('/sis/devicePoint', data);
}
/**
* 更新宇视设备点位(通道)
* @param data
* @returns void
*/
export function devicePointUpdate(data: DevicePointForm) {
return requestClient.putWithMsg<void>('/sis/devicePoint', data);
}
/**
* 删除宇视设备点位(通道)
* @param id id
* @returns void
*/
export function devicePointRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/sis/devicePoint/${id}`);
}

View File

@@ -1,259 +0,0 @@
import type { BaseEntity, PageQuery } from '#/api/common';
export interface DevicePointVO {
/**
* 主键id
*/
id: number | string;
/**
* 设备编码
*/
eqpCode: string;
/**
* 视频协议 1onvif 2
rtsp
*/
video: number | string;
/**
* 传输协议(AIBOX 需要,一
体机不需要) 1: tcp 2:
udp
*/
transportType: number;
/**
* 点位名称
*/
channelName: string;
/**
* rtsp 地址(当视频协议为
rtsp 时,该字段必填)
*/
rtspAddr: string;
/**
* 点位名称
*/
ip: string;
/**
* 端口
*/
port: number;
/**
* 通道相机账号
*/
username: string;
/**
* 相机密码
*/
pwd: string;
/**
* onvif 设备码流添加方
1主码流 2自定
义码流
*/
videoType: number | string;
/**
* 码流 id当选择自定义码
流时,该字段必填,值为
获取设备码流信息接口返
回的码流 id
*/
videoId: number | string;
/**
* 创建人id
*/
createById: number | string;
/**
* 更新人id
*/
updateById: number | string;
/**
* 搜索值
*/
searchValue: string;
}
export interface DevicePointForm extends BaseEntity {
/**
* 主键id
*/
id?: number | string;
/**
* 设备编码
*/
eqpCode?: string;
/**
* 视频协议 1onvif 2
rtsp
*/
video?: number | string;
/**
* 传输协议(AIBOX 需要,一
体机不需要) 1: tcp 2:
udp
*/
transportType?: number;
/**
* 点位名称
*/
channelName?: string;
/**
* rtsp 地址(当视频协议为
rtsp 时,该字段必填)
*/
rtspAddr?: string;
/**
* 点位名称
*/
ip?: string;
/**
* 端口
*/
port?: number;
/**
* 通道相机账号
*/
username?: string;
/**
* 相机密码
*/
pwd?: string;
/**
* onvif 设备码流添加方
1主码流 2自定
义码流
*/
videoType?: number | string;
/**
* 码流 id当选择自定义码
流时,该字段必填,值为
获取设备码流信息接口返
回的码流 id
*/
videoId?: number | string;
/**
* 创建人id
*/
createById?: number | string;
/**
* 更新人id
*/
updateById?: number | string;
/**
* 搜索值
*/
searchValue?: string;
}
export interface DevicePointQuery extends PageQuery {
/**
* 设备编码
*/
eqpCode?: string;
/**
* 视频协议 1onvif 2
rtsp
*/
video?: number | string;
/**
* 传输协议(AIBOX 需要,一
体机不需要) 1: tcp 2:
udp
*/
transportType?: number;
/**
* 点位名称
*/
channelName?: string;
/**
* rtsp 地址(当视频协议为
rtsp 时,该字段必填)
*/
rtspAddr?: string;
/**
* 点位名称
*/
ip?: string;
/**
* 端口
*/
port?: number;
/**
* 通道相机账号
*/
username?: string;
/**
* 相机密码
*/
pwd?: string;
/**
* onvif 设备码流添加方
1主码流 2自定
义码流
*/
videoType?: number | string;
/**
* 码流 id当选择自定义码
流时,该字段必填,值为
获取设备码流信息接口返
回的码流 id
*/
videoId?: number | string;
/**
* 创建人id
*/
createById?: number | string;
/**
* 更新人id
*/
updateById?: number | string;
/**
* 搜索值
*/
searchValue?: string;
/**
* 日期范围参数
*/
params?: any;
}