From 2bb661e32bb09cffdda86d38bcb4b26262ef0543 Mon Sep 17 00:00:00 2001 From: 15683799673 Date: Sat, 19 Jul 2025 09:09:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A7=86=E9=A2=91=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/api/common.d.ts | 11 +- .../src/api/sis/deviceChannel/index.ts | 74 +++++++ .../src/api/sis/deviceChannel/model.d.ts | 159 +++++++++++++++ .../web-antd/src/api/sis/deviceGroup/index.ts | 61 ++++++ .../src/api/sis/deviceGroup/model.d.ts | 64 ++++++ .../src/api/sis/deviceManage/model.d.ts | 76 +------- .../src/views/sis/deviceGroup/data.ts | 69 +++++++ .../sis/deviceGroup/deviceGroup-modal.vue | 101 ++++++++++ .../src/views/sis/deviceGroup/index.vue | 182 ++++++++++++++++++ .../src/views/sis/deviceManage/data.ts | 89 +++------ .../src/views/sis/deviceManage/index.vue | 2 +- .../src/views/sis/video/channel-tree.vue | 114 +++++++++++ apps/web-antd/src/views/sis/video/data.ts | 0 apps/web-antd/src/views/sis/video/index.vue | 37 ++++ 14 files changed, 896 insertions(+), 143 deletions(-) create mode 100644 apps/web-antd/src/api/sis/deviceChannel/index.ts create mode 100644 apps/web-antd/src/api/sis/deviceChannel/model.d.ts create mode 100644 apps/web-antd/src/api/sis/deviceGroup/index.ts create mode 100644 apps/web-antd/src/api/sis/deviceGroup/model.d.ts create mode 100644 apps/web-antd/src/views/sis/deviceGroup/data.ts create mode 100644 apps/web-antd/src/views/sis/deviceGroup/deviceGroup-modal.vue create mode 100644 apps/web-antd/src/views/sis/deviceGroup/index.vue create mode 100644 apps/web-antd/src/views/sis/video/channel-tree.vue create mode 100644 apps/web-antd/src/views/sis/video/data.ts create mode 100644 apps/web-antd/src/views/sis/video/index.vue diff --git a/apps/web-antd/src/api/common.d.ts b/apps/web-antd/src/api/common.d.ts index a2b1cdfb..575a4877 100644 --- a/apps/web-antd/src/api/common.d.ts +++ b/apps/web-antd/src/api/common.d.ts @@ -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 { +export interface TreeNode extends DataNode { level: number; code: T; ParentCode: T; label: string; - children: TreeNode; - - title?: string; - key?:any - disabled: boolean + data?: []; + disabled: boolean; } diff --git a/apps/web-antd/src/api/sis/deviceChannel/index.ts b/apps/web-antd/src/api/sis/deviceChannel/index.ts new file mode 100644 index 00000000..66fe9f35 --- /dev/null +++ b/apps/web-antd/src/api/sis/deviceChannel/index.ts @@ -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>( + '/sis/deviceChannel/list', + { params }, + ); +} + +/** + * 获取通道树结构 + */ +export function treeList() { + return requestClient.get('/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(`/sis/deviceChannel/${id}`); +} + +/** + * 新增设备通道管理 + * @param data + * @returns void + */ +export function deviceChannelAdd(data: DeviceChannelForm) { + return requestClient.postWithMsg('/sis/deviceChannel', data); +} + +/** + * 更新设备通道管理 + * @param data + * @returns void + */ +export function deviceChannelUpdate(data: DeviceChannelForm) { + return requestClient.putWithMsg('/sis/deviceChannel', data); +} + +/** + * 删除设备通道管理 + * @param id id + * @returns void + */ +export function deviceChannelRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/sis/deviceChannel/${id}`); +} diff --git a/apps/web-antd/src/api/sis/deviceChannel/model.d.ts b/apps/web-antd/src/api/sis/deviceChannel/model.d.ts new file mode 100644 index 00000000..37055ca9 --- /dev/null +++ b/apps/web-antd/src/api/sis/deviceChannel/model.d.ts @@ -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; +} diff --git a/apps/web-antd/src/api/sis/deviceGroup/index.ts b/apps/web-antd/src/api/sis/deviceGroup/index.ts new file mode 100644 index 00000000..bbabeadd --- /dev/null +++ b/apps/web-antd/src/api/sis/deviceGroup/index.ts @@ -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>('/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(`/sis/deviceGroup/${id}`); +} + +/** + * 新增设备组管理 + * @param data + * @returns void + */ +export function deviceGroupAdd(data: DeviceGroupForm) { + return requestClient.postWithMsg('/sis/deviceGroup', data); +} + +/** + * 更新设备组管理 + * @param data + * @returns void + */ +export function deviceGroupUpdate(data: DeviceGroupForm) { + return requestClient.putWithMsg('/sis/deviceGroup', data); +} + +/** + * 删除设备组管理 + * @param id id + * @returns void + */ +export function deviceGroupRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/sis/deviceGroup/${id}`); +} diff --git a/apps/web-antd/src/api/sis/deviceGroup/model.d.ts b/apps/web-antd/src/api/sis/deviceGroup/model.d.ts new file mode 100644 index 00000000..76dd4118 --- /dev/null +++ b/apps/web-antd/src/api/sis/deviceGroup/model.d.ts @@ -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; +} diff --git a/apps/web-antd/src/api/sis/deviceManage/model.d.ts b/apps/web-antd/src/api/sis/deviceManage/model.d.ts index 46d73770..7f5e0160 100644 --- a/apps/web-antd/src/api/sis/deviceManage/model.d.ts +++ b/apps/web-antd/src/api/sis/deviceManage/model.d.ts @@ -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; } diff --git a/apps/web-antd/src/views/sis/deviceGroup/data.ts b/apps/web-antd/src/views/sis/deviceGroup/data.ts new file mode 100644 index 00000000..ea58930a --- /dev/null +++ b/apps/web-antd/src/views/sis/deviceGroup/data.ts @@ -0,0 +1,69 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'name', + label: '分组名称', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '主键id', + field: 'id', + }, + { + title: '分组名称', + field: 'name', + }, + { + title: '父节点', + field: 'parentId', + }, + { + title: '备注', + field: 'remark', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键id', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '分组名称', + fieldName: 'name', + component: 'Input', + rules: 'required', + }, + { + label: '父节点', + fieldName: 'parentId', + component: 'Input', + rules: 'required', + }, + { + label: '备注', + fieldName: 'remark', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/sis/deviceGroup/deviceGroup-modal.vue b/apps/web-antd/src/views/sis/deviceGroup/deviceGroup-modal.vue new file mode 100644 index 00000000..e8ffb434 --- /dev/null +++ b/apps/web-antd/src/views/sis/deviceGroup/deviceGroup-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/sis/deviceGroup/index.vue b/apps/web-antd/src/views/sis/deviceGroup/index.vue new file mode 100644 index 00000000..9a371535 --- /dev/null +++ b/apps/web-antd/src/views/sis/deviceGroup/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/src/views/sis/deviceManage/data.ts b/apps/web-antd/src/views/sis/deviceManage/data.ts index fb21fc12..a4e1c13b 100644 --- a/apps/web-antd/src/views/sis/deviceManage/data.ts +++ b/apps/web-antd/src/views/sis/deviceManage/data.ts @@ -15,6 +15,11 @@ export const querySchema: FormSchemaGetter = () => [ fieldName: 'deviceIp', label: '设备ip', }, + { + component: 'Input', + fieldName: 'deviceType', + label: '设备类型', + }, { fieldName: 'deviceStatus', label: '在线状态', @@ -34,6 +39,14 @@ export const columns: VxeGridProps['columns'] = [ title: '设备名称', field: 'deviceName', }, + { + title: '厂商编号', + field: 'factoryNo', + }, + { + title: '设备类型', + field: 'device_type', + }, { title: '设备ip', field: 'deviceIp', @@ -43,30 +56,13 @@ export const columns: VxeGridProps['columns'] = [ field: 'devicePort', }, { - title: '设备', + title: '设备mac', field: 'deviceMac', }, { title: '在线状态', field: 'deviceStatus', }, - - { - title: '通道编号', - field: 'channelNo', - }, - { - title: '录像机ip', - field: 'vcrIp', - }, - { - title: '录像机端口', - field: 'vcrPort', - }, - /*{ - title: '门禁id', - field: 'accessControlId', - },*/ { field: 'action', fixed: 'right', @@ -92,6 +88,18 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', rules: 'required', }, + { + label: '设备厂商', + fieldName: 'facrotyNo', + component: 'Input', + rules: 'required', + }, + { + label: '设备类型', + fieldName: 'deviceType', + component: 'Input', + rules: 'required', + }, { label: '设备ip', fieldName: 'deviceIp', @@ -116,53 +124,10 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', rules: 'required', }, + { label: '设备Mac', fieldName: 'deviceMac', component: 'Input', }, - { - label: '通道编号', - fieldName: 'channelNo', - component: 'Input', - }, - { - label: '录像机ip', - fieldName: 'vcrIp', - component: 'Input', - }, - { - label: '录像机端口', - fieldName: 'vcrPort', - component: 'Input', - }, - { - label: '录像机账号', - fieldName: 'vcrAccount', - component: 'Input', - }, - { - label: '录像机密码', - fieldName: 'vcrPwd', - component: 'Input', - }, - /*{ - label: '绑定门禁', - fieldName: 'accessControlId', - component: 'ApiSelect', - componentProps: { - // mode: 'multiple', // 关键属性,启用多选模式 - resultField: 'list', // 根据API返回结构调整 - labelField: 'accessName', - valueField: 'accessCode', - api: async () => { - const params: AccessControlQuery = { - pageNum: 1, - pageSize: 500, - }; - const res = await accessControlList(params); - return res.rows; - }, - }, - },*/ ]; diff --git a/apps/web-antd/src/views/sis/deviceManage/index.vue b/apps/web-antd/src/views/sis/deviceManage/index.vue index 9b637156..3a56729e 100644 --- a/apps/web-antd/src/views/sis/deviceManage/index.vue +++ b/apps/web-antd/src/views/sis/deviceManage/index.vue @@ -126,7 +126,7 @@ function handleDownloadExcel() {