增加视频监控页面
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
15683799673
2025-07-19 09:09:14 +08:00
parent 5f19bb22a8
commit 2bb661e32b
14 changed files with 896 additions and 143 deletions

View File

@@ -1,3 +1,5 @@
import type { DataNode } from 'ant-design-vue/es/tree';
export type ID = number | string;
export type IDS = (number | string)[];
@@ -42,15 +44,12 @@ export interface PageQuery {
[key: string]: any;
}
export interface TreeNode<T = any> {
export interface TreeNode<T = any> extends DataNode {
level: number;
code: T;
ParentCode: T;
label: string;
children: TreeNode<T>;
title?: string;
key?:any
disabled: boolean
data?: [];
disabled: boolean;
}

View File

@@ -0,0 +1,74 @@
import type {
DeviceChannelForm,
DeviceChannelQuery,
DeviceChannelVO,
} from './model';
import type { ID, IDS, PageResult, TreeNode } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询设备通道管理列表
* @param params
* @returns 设备通道管理列表
*/
export function deviceChannelList(params?: DeviceChannelQuery) {
return requestClient.get<PageResult<DeviceChannelVO>>(
'/sis/deviceChannel/list',
{ params },
);
}
/**
* 获取通道树结构
*/
export function treeList() {
return requestClient.get<TreeNode[]>('/sis/deviceChannel/treeList');
}
/**
* 导出设备通道管理列表
* @param params
* @returns 设备通道管理列表
*/
export function deviceChannelExport(params?: DeviceChannelQuery) {
return commonExport('/sis/deviceChannel/export', params ?? {});
}
/**
* 查询设备通道管理详情
* @param id id
* @returns 设备通道管理详情
*/
export function deviceChannelInfo(id: ID) {
return requestClient.get<DeviceChannelVO>(`/sis/deviceChannel/${id}`);
}
/**
* 新增设备通道管理
* @param data
* @returns void
*/
export function deviceChannelAdd(data: DeviceChannelForm) {
return requestClient.postWithMsg<void>('/sis/deviceChannel', data);
}
/**
* 更新设备通道管理
* @param data
* @returns void
*/
export function deviceChannelUpdate(data: DeviceChannelForm) {
return requestClient.putWithMsg<void>('/sis/deviceChannel', data);
}
/**
* 删除设备通道管理
* @param id id
* @returns void
*/
export function deviceChannelRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/sis/deviceChannel/${id}`);
}

View File

@@ -0,0 +1,159 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface DeviceChannelVO {
/**
* 主键id
*/
id: string | number;
/**
* 设备id
*/
deviceId: string | number;
/**
* 设备名称
*/
deviceName: string;
/**
* 通道分组组id
*/
groupId: string | number;
/**
* 设备ip
*/
deviceIp: string;
/**
* 设备端口
*/
devicePort: number;
/**
* 设备账号
*/
deviceAccount: string;
/**
* 设备密码
*/
devicePwd: string;
/**
* 设备
*/
deviceMac: string;
/**
* 设备通道编号
*/
channelNo: string;
}
export interface DeviceChannelForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 设备id
*/
deviceId?: string | number;
/**
* 设备名称
*/
deviceName?: string;
/**
* 通道分组组id
*/
groupId?: string | number;
/**
* 设备ip
*/
deviceIp?: string;
/**
* 设备端口
*/
devicePort?: number;
/**
* 设备账号
*/
deviceAccount?: string;
/**
* 设备密码
*/
devicePwd?: string;
/**
* 设备
*/
deviceMac?: string;
/**
* 设备通道编号
*/
channelNo?: string;
}
export interface DeviceChannelQuery extends PageQuery {
/**
* 设备id
*/
deviceId?: string | number;
/**
* 设备名称
*/
deviceName?: string;
/**
* 通道分组组id
*/
groupId?: string | number;
/**
* 设备ip
*/
deviceIp?: string;
/**
* 设备端口
*/
devicePort?: number;
/**
* 设备账号
*/
deviceAccount?: string;
/**
* 设备密码
*/
devicePwd?: string;
/**
* 设备
*/
deviceMac?: string;
/**
* 设备通道编号
*/
channelNo?: string;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -0,0 +1,61 @@
import type { DeviceGroupVO, DeviceGroupForm, DeviceGroupQuery } 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 deviceGroupList(params?: DeviceGroupQuery) {
return requestClient.get<PageResult<DeviceGroupVO>>('/sis/deviceGroup/list', { params });
}
/**
* 导出设备组管理列表
* @param params
* @returns 设备组管理列表
*/
export function deviceGroupExport(params?: DeviceGroupQuery) {
return commonExport('/sis/deviceGroup/export', params ?? {});
}
/**
* 查询设备组管理详情
* @param id id
* @returns 设备组管理详情
*/
export function deviceGroupInfo(id: ID) {
return requestClient.get<DeviceGroupVO>(`/sis/deviceGroup/${id}`);
}
/**
* 新增设备组管理
* @param data
* @returns void
*/
export function deviceGroupAdd(data: DeviceGroupForm) {
return requestClient.postWithMsg<void>('/sis/deviceGroup', data);
}
/**
* 更新设备组管理
* @param data
* @returns void
*/
export function deviceGroupUpdate(data: DeviceGroupForm) {
return requestClient.putWithMsg<void>('/sis/deviceGroup', data);
}
/**
* 删除设备组管理
* @param id id
* @returns void
*/
export function deviceGroupRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/sis/deviceGroup/${id}`);
}

View File

@@ -0,0 +1,64 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface DeviceGroupVO {
/**
* 主键id
*/
id: string | number;
/**
* 分组名称
*/
name: string;
/**
* 父编码id(-1 表示根节点)
*/
parentId: string | number;
/**
* 备注
*/
remark: string;
}
export interface DeviceGroupForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 分组名称
*/
name?: string;
/**
* 父编码id(-1 表示根节点)
*/
parentId?: string | number;
/**
* 备注
*/
remark?: string;
}
export interface DeviceGroupQuery extends PageQuery {
/**
* 分组名称
*/
name?: string;
/**
* 父编码id(-1 表示根节点)
*/
parentId?: string | number;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -1,4 +1,4 @@
import type { PageQuery, BaseEntity } from '#/api/common';
import type { BaseEntity, PageQuery } from '#/api/common';
export interface DeviceManageVO {
/**
@@ -80,7 +80,6 @@ export interface DeviceManageVO {
* 门禁id
*/
accessControlId: string | number;
}
export interface DeviceManageForm extends BaseEntity {
@@ -128,42 +127,6 @@ export interface DeviceManageForm extends BaseEntity {
* 设备在线状态 0:离线 1:在线 2:未知
*/
deviceStatus?: number;
/**
* 父级设备id
*/
parentId?: string | number;
/**
* 设备通道编号
*/
channelNo?: string;
/**
* 录像机ip
*/
vcrIp?: string;
/**
* 录像机端口
*/
vcrPort?: number;
/**
* 录像机账号
*/
vcrAccount?: string;
/**
* 录像机密码
*/
vcrPwd?: string;
/**
* 门禁id
*/
accessControlId?: string | number;
}
export interface DeviceManageQuery extends PageQuery {
@@ -208,42 +171,7 @@ export interface DeviceManageQuery extends PageQuery {
deviceStatus?: number;
/**
* 父级设备id
* 日期范围参数
*/
parentId?: string | number;
/**
* 设备通道编号
*/
channelNo?: string;
/**
* 录像机ip
*/
vcrIp?: string;
/**
* 录像机端口
*/
vcrPort?: number;
/**
* 录像机账号
*/
vcrAccount?: string;
/**
* 录像机密码
*/
vcrPwd?: string;
/**
* 门禁id
*/
accessControlId?: string | number;
/**
* 日期范围参数
*/
params?: any;
}