From 195d7fff7d0d27f6373553fc86e7824613f7d28c Mon Sep 17 00:00:00 2001 From: 15683799673 Date: Fri, 11 Jul 2025 07:36:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=88=E6=9D=83=E9=80=BB=E8=BE=91=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/sis/accessControlDevice/index.ts | 78 ------ .../api/sis/accessControlDevice/model.d.ts | 202 -------------- apps/web-antd/src/api/sis/authRecord/index.ts | 29 +- .../src/api/sis/authRecord/model.d.ts | 2 + .../src/api/sis/deviceManage/index.ts | 30 +- .../web-antd/src/api/sis/devicePoint/index.ts | 62 ----- .../src/api/sis/devicePoint/model.d.ts | 259 ------------------ .../device/accessControlModal.vue | 2 +- .../views/sis/accessControl/device/data.ts | 3 +- .../accessControlDevice-modal.vue | 106 ------- .../src/views/sis/accessControlDevice/data.ts | 117 -------- .../views/sis/accessControlDevice/index.vue | 182 ------------ .../sis/deviceManage/deviceManage-modal.vue | 2 +- .../src/views/sis/devicePoint/data.ts | 236 ---------------- .../sis/devicePoint/devicePoint-modal.vue | 104 ------- .../src/views/sis/devicePoint/index.vue | 182 ------------ .../src/views/sis/elevatorInfo/data.ts | 53 ++-- .../sis/elevatorInfo/elevatorInfo-modal.vue | 69 ++++- apps/web-antd/src/views/sis/personLib/data.ts | 32 +-- .../src/views/sis/personLib/index.vue | 19 +- .../src/views/sis/personLib/libAuth-modal.vue | 95 +++++++ .../src/views/sis/personLibImg/data.tsx | 16 +- .../sis/personLibImg/personLibImg-modal.vue | 2 +- apps/web-antd/vite.config.mts | 2 +- 24 files changed, 242 insertions(+), 1642 deletions(-) delete mode 100644 apps/web-antd/src/api/sis/accessControlDevice/index.ts delete mode 100644 apps/web-antd/src/api/sis/accessControlDevice/model.d.ts delete mode 100644 apps/web-antd/src/api/sis/devicePoint/index.ts delete mode 100644 apps/web-antd/src/api/sis/devicePoint/model.d.ts delete mode 100644 apps/web-antd/src/views/sis/accessControlDevice/accessControlDevice-modal.vue delete mode 100644 apps/web-antd/src/views/sis/accessControlDevice/data.ts delete mode 100644 apps/web-antd/src/views/sis/accessControlDevice/index.vue delete mode 100644 apps/web-antd/src/views/sis/devicePoint/data.ts delete mode 100644 apps/web-antd/src/views/sis/devicePoint/devicePoint-modal.vue delete mode 100644 apps/web-antd/src/views/sis/devicePoint/index.vue create mode 100644 apps/web-antd/src/views/sis/personLib/libAuth-modal.vue diff --git a/apps/web-antd/src/api/sis/accessControlDevice/index.ts b/apps/web-antd/src/api/sis/accessControlDevice/index.ts deleted file mode 100644 index ef99954a..00000000 --- a/apps/web-antd/src/api/sis/accessControlDevice/index.ts +++ /dev/null @@ -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>( - '/sis/accessControlDevice/list', - { params }, - ); -} - -/** - * 根据厂商编号查询设备列表 - * @param params - * @returns 门禁设备列表 - */ -export function queryListByFactoryNo(factory: string) { - return requestClient.get(`/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( - `/sis/accessControlDevice/${id}`, - ); -} - -/** - * 新增门禁设备 - * @param data - * @returns void - */ -export function accessControlDeviceAdd(data: AccessControlDeviceForm) { - return requestClient.postWithMsg('/sis/accessControlDevice', data); -} - -/** - * 更新门禁设备 - * @param data - * @returns void - */ -export function accessControlDeviceUpdate(data: AccessControlDeviceForm) { - return requestClient.putWithMsg('/sis/accessControlDevice', data); -} - -/** - * 删除门禁设备 - * @param id id - * @returns void - */ -export function accessControlDeviceRemove(id: ID | IDS) { - return requestClient.deleteWithMsg(`/sis/accessControlDevice/${id}`); -} diff --git a/apps/web-antd/src/api/sis/accessControlDevice/model.d.ts b/apps/web-antd/src/api/sis/accessControlDevice/model.d.ts deleted file mode 100644 index f60326c2..00000000 --- a/apps/web-antd/src/api/sis/accessControlDevice/model.d.ts +++ /dev/null @@ -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; -} diff --git a/apps/web-antd/src/api/sis/authRecord/index.ts b/apps/web-antd/src/api/sis/authRecord/index.ts index 9a1a4845..10236e41 100644 --- a/apps/web-antd/src/api/sis/authRecord/index.ts +++ b/apps/web-antd/src/api/sis/authRecord/index.ts @@ -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>('/sis/authRecord/list', { params }); + return requestClient.get>('/sis/authRecord/list', { + params, + }); } /** @@ -59,3 +60,15 @@ export function authRecordUpdate(data: AuthRecordForm) { export function authRecordRemove(id: ID | IDS) { return requestClient.deleteWithMsg(`/sis/authRecord/${id}`); } + +/** + * 对人员库进行授权 + * @param params id + */ +export function authPersonLib(params: any) { + return requestClient.postWithMsg(`/sis/authRecord/authLib`, params); +} + +export function queryAuthDevice(id: ID) { + return requestClient.get(`/sis/authRecord/authDevice/${id}`); +} diff --git a/apps/web-antd/src/api/sis/authRecord/model.d.ts b/apps/web-antd/src/api/sis/authRecord/model.d.ts index fdbd9caa..ef7e2232 100644 --- a/apps/web-antd/src/api/sis/authRecord/model.d.ts +++ b/apps/web-antd/src/api/sis/authRecord/model.d.ts @@ -15,6 +15,8 @@ export interface AuthRecordVO { * 门禁id */ acdId: string | number; + + deviceId: string | number; } export interface AuthRecordForm extends BaseEntity { diff --git a/apps/web-antd/src/api/sis/deviceManage/index.ts b/apps/web-antd/src/api/sis/deviceManage/index.ts index 1ad62e17..4110ac71 100644 --- a/apps/web-antd/src/api/sis/deviceManage/index.ts +++ b/apps/web-antd/src/api/sis/deviceManage/index.ts @@ -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>('/sis/deviceManage/list', { params }); + return requestClient.get>( + '/sis/deviceManage/list', + { params }, + ); } /** @@ -59,3 +65,11 @@ export function deviceManageUpdate(data: DeviceManageForm) { export function deviceManageRemove(id: ID | IDS) { return requestClient.deleteWithMsg(`/sis/deviceManage/${id}`); } + +/** + * 查询门禁书 + * @returns void + */ +export function queryTree() { + return requestClient.get[]>(`/sis/deviceManage/tree`); +} diff --git a/apps/web-antd/src/api/sis/devicePoint/index.ts b/apps/web-antd/src/api/sis/devicePoint/index.ts deleted file mode 100644 index 12cb1be3..00000000 --- a/apps/web-antd/src/api/sis/devicePoint/index.ts +++ /dev/null @@ -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>('/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(`/sis/devicePoint/${id}`); -} - -/** - * 新增宇视设备点位(通道) - * @param data - * @returns void - */ -export function devicePointAdd(data: DevicePointForm) { - return requestClient.postWithMsg('/sis/devicePoint', data); -} - -/** - * 更新宇视设备点位(通道) - * @param data - * @returns void - */ -export function devicePointUpdate(data: DevicePointForm) { - return requestClient.putWithMsg('/sis/devicePoint', data); -} - -/** - * 删除宇视设备点位(通道) - * @param id id - * @returns void - */ -export function devicePointRemove(id: ID | IDS) { - return requestClient.deleteWithMsg(`/sis/devicePoint/${id}`); -} diff --git a/apps/web-antd/src/api/sis/devicePoint/model.d.ts b/apps/web-antd/src/api/sis/devicePoint/model.d.ts deleted file mode 100644 index f60f3cb5..00000000 --- a/apps/web-antd/src/api/sis/devicePoint/model.d.ts +++ /dev/null @@ -1,259 +0,0 @@ -import type { BaseEntity, PageQuery } from '#/api/common'; - -export interface DevicePointVO { - /** - * 主键id - */ - id: number | string; - - /** - * 设备编码 - */ - eqpCode: string; - - /** - * 视频协议 1:onvif 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; - - /** - * 视频协议 1:onvif 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; - - /** - * 视频协议 1:onvif 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; -} diff --git a/apps/web-antd/src/views/sis/accessControl/device/accessControlModal.vue b/apps/web-antd/src/views/sis/accessControl/device/accessControlModal.vue index 5b616bef..b65cafe5 100644 --- a/apps/web-antd/src/views/sis/accessControl/device/accessControlModal.vue +++ b/apps/web-antd/src/views/sis/accessControl/device/accessControlModal.vue @@ -27,7 +27,7 @@ const [BasicForm, formApi] = useVbenForm({ // 默认占满两列 formItemClass: 'col-span-1', // 默认label宽度 px - labelWidth: 80, + labelWidth: 120, // 通用配置项 会影响到所有表单项 componentProps: { class: 'w-full', diff --git a/apps/web-antd/src/views/sis/accessControl/device/data.ts b/apps/web-antd/src/views/sis/accessControl/device/data.ts index 5c4c173c..038e3921 100644 --- a/apps/web-antd/src/views/sis/accessControl/device/data.ts +++ b/apps/web-antd/src/views/sis/accessControl/device/data.ts @@ -143,9 +143,10 @@ export const modalSchema: FormSchemaGetter = () => [ }, { label: '绑定设备', - fieldName: 'bindDeviceIp', + fieldName: 'bindDeviceId', component: 'ApiSelect', componentProps: { + allowClear: true, resultField: 'list', // 根据API返回结构调整 labelField: 'deviceName', valueField: 'id', diff --git a/apps/web-antd/src/views/sis/accessControlDevice/accessControlDevice-modal.vue b/apps/web-antd/src/views/sis/accessControlDevice/accessControlDevice-modal.vue deleted file mode 100644 index bbee13cc..00000000 --- a/apps/web-antd/src/views/sis/accessControlDevice/accessControlDevice-modal.vue +++ /dev/null @@ -1,106 +0,0 @@ - - - diff --git a/apps/web-antd/src/views/sis/accessControlDevice/data.ts b/apps/web-antd/src/views/sis/accessControlDevice/data.ts deleted file mode 100644 index 950997de..00000000 --- a/apps/web-antd/src/views/sis/accessControlDevice/data.ts +++ /dev/null @@ -1,117 +0,0 @@ -import type { FormSchemaGetter } from '#/adapter/form'; -import type { VxeGridProps } from '#/adapter/vxe-table'; - -import { DictEnum } from '@vben/constants'; -import { getPopupContainer } from '@vben/utils'; - -import { getDictOptions } from '#/utils/dict'; - -export const querySchema: FormSchemaGetter = () => [ - { - component: 'Input', - fieldName: 'eqpName', - label: '设备名称', - }, - { - component: 'Select', - componentProps: { - getPopupContainer, - options: getDictOptions(DictEnum.SIS_ACCESS_CONTROL_DEVICE_TYPE), - }, - fieldName: 'factoryNo', - label: '设备厂商', - }, -]; - -// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 -// export const columns: () => VxeGridProps['columns'] = () => [ -export const columns: VxeGridProps['columns'] = [ - { type: 'checkbox', width: 60 }, - { - title: '设备编码', - field: 'eqpNo', - }, - { - title: '设备名称', - field: 'eqpName', - }, - { - title: '设备厂商', - field: 'factoryName', - }, - - { - title: '设备ip', - field: 'eqpIp', - }, - { - title: '设备端口', - field: 'eqpPort', - }, - { - title: '设备账号', - field: 'eqpAccount', - }, - { - title: '设备密码', - field: 'eqpPwd', - }, - { - field: 'action', - fixed: 'right', - slots: { default: 'action' }, - title: '操作', - width: 180, - }, -]; - -export const modalSchema: FormSchemaGetter = () => [ - { - label: '主键', - fieldName: 'id', - component: 'Input', - dependencies: { - show: () => false, - triggerFields: [''], - }, - }, - { - label: '设备名称', - fieldName: 'eqpName', - component: 'Input', - rules: 'required', - }, - { - label: '设备厂商', - fieldName: 'factoryNo', - component: 'Select', - componentProps: { - getPopupContainer, - options: getDictOptions(DictEnum.SIS_ACCESS_CONTROL_DEVICE_TYPE), - }, - }, - { - label: '设备ip', - fieldName: 'eqpIp', - component: 'Input', - rules: 'required', - }, - { - label: '设备端口', - fieldName: 'eqpPort', - component: 'Input', - rules: 'required', - }, - { - label: '设备账号', - fieldName: 'eqpAccount', - component: 'Input', - rules: 'required', - }, - { - label: '设备密码', - fieldName: 'eqpPwd', - component: 'Input', - rules: 'required', - }, -]; diff --git a/apps/web-antd/src/views/sis/accessControlDevice/index.vue b/apps/web-antd/src/views/sis/accessControlDevice/index.vue deleted file mode 100644 index 584f083f..00000000 --- a/apps/web-antd/src/views/sis/accessControlDevice/index.vue +++ /dev/null @@ -1,182 +0,0 @@ - - - diff --git a/apps/web-antd/src/views/sis/deviceManage/deviceManage-modal.vue b/apps/web-antd/src/views/sis/deviceManage/deviceManage-modal.vue index 8a1fcca6..762ae10d 100644 --- a/apps/web-antd/src/views/sis/deviceManage/deviceManage-modal.vue +++ b/apps/web-antd/src/views/sis/deviceManage/deviceManage-modal.vue @@ -23,7 +23,7 @@ const [BasicForm, formApi] = useVbenForm({ // 默认占满两列 formItemClass: 'col-span-1', // 默认label宽度 px - labelWidth: 80, + labelWidth: 120, // 通用配置项 会影响到所有表单项 componentProps: { class: 'w-full', diff --git a/apps/web-antd/src/views/sis/devicePoint/data.ts b/apps/web-antd/src/views/sis/devicePoint/data.ts deleted file mode 100644 index 1d1ddc35..00000000 --- a/apps/web-antd/src/views/sis/devicePoint/data.ts +++ /dev/null @@ -1,236 +0,0 @@ -import type { FormSchemaGetter } from '#/adapter/form'; -import type { VxeGridProps } from '#/adapter/vxe-table'; - -export const querySchema: FormSchemaGetter = () => [ - { - component: 'Input', - fieldName: 'eqpCode', - label: '设备编码', - }, - { - component: 'Input', - fieldName: 'video', - label: '视频协议', - }, - { - component: 'Select', - componentProps: {}, - fieldName: 'transportType', - label: '传输协议', - }, - { - component: 'Input', - fieldName: 'channelName', - label: '点位名称', - }, - { - component: 'Input', - fieldName: 'rtspAddr', - label: 'rtsp 地址', - }, - { - component: 'Input', - fieldName: 'ip', - label: '点位名称', - }, - { - component: 'Input', - fieldName: 'port', - label: '端口', - }, - { - component: 'Input', - fieldName: 'username', - label: '通道相机账号', - }, - { - component: 'Input', - fieldName: 'pwd', - label: '相机密码', - }, - { - component: 'Select', - componentProps: {}, - fieldName: 'videoType', - label: '码流', - }, - { - component: 'Input', - fieldName: 'videoId', - label: '码流id', - }, - { - component: 'Input', - fieldName: 'createById', - label: '创建人id', - }, - { - component: 'Input', - fieldName: 'updateById', - label: '更新人id', - }, - { - component: 'Input', - fieldName: 'searchValue', - label: '搜索值', - }, -]; - -// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 -// export const columns: () => VxeGridProps['columns'] = () => [ -export const columns: VxeGridProps['columns'] = [ - { type: 'checkbox', width: 60 }, - { - title: '主键id', - field: 'id', - }, - { - title: '设备编码', - field: 'eqpCode', - }, - { - title: '视频协议', - }, - { - title: '传输协议', - field: 'transportType', - }, - { - title: '点位名称', - field: 'channelName', - }, - { - title: 'rtsp 地址', - field: 'rtspAddr', - }, - { - title: '点位名称', - field: 'ip', - }, - { - title: '端口', - field: 'port', - }, - { - title: '通道相机账号', - field: 'username', - }, - { - title: '相机密码', - field: 'pwd', - }, - { - title: '设备码流', - field: 'videoType', - }, - { - title: '码流id', - field: 'videoId', - }, - { - title: '创建人id', - field: 'createById', - }, - { - title: '更新人id', - field: 'updateById', - }, - { - title: '搜索值', - field: 'searchValue', - }, - { - 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: 'eqpCode', - component: 'Input', - rules: 'required', - }, - { - label: '视频协议', - fieldName: 'video', - component: 'Input', - }, - { - label: '传输协议', - fieldName: 'transportType', - component: 'Select', - componentProps: {}, - }, - { - label: '点位名称', - fieldName: 'channelName', - component: 'Input', - }, - { - label: 'rtsp 地址', - fieldName: 'rtspAddr', - component: 'Input', - }, - { - label: '点位名称', - fieldName: 'ip', - component: 'Input', - }, - { - label: '端口', - fieldName: 'port', - component: 'Input', - }, - { - label: '通道相机账号', - fieldName: 'username', - component: 'Input', - }, - { - label: '相机密码', - fieldName: 'pwd', - component: 'Input', - }, - { - label: '设备码流', - fieldName: 'videoType', - component: 'Select', - componentProps: {}, - }, - { - label: '码流id', - fieldName: 'videoId', - component: 'Input', - }, - { - label: '创建人id', - fieldName: 'createById', - component: 'Input', - }, - { - label: '更新人id', - fieldName: 'updateById', - component: 'Input', - }, - { - label: '搜索值', - fieldName: 'searchValue', - component: 'Input', - }, -]; diff --git a/apps/web-antd/src/views/sis/devicePoint/devicePoint-modal.vue b/apps/web-antd/src/views/sis/devicePoint/devicePoint-modal.vue deleted file mode 100644 index 3e5ad95b..00000000 --- a/apps/web-antd/src/views/sis/devicePoint/devicePoint-modal.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - diff --git a/apps/web-antd/src/views/sis/devicePoint/index.vue b/apps/web-antd/src/views/sis/devicePoint/index.vue deleted file mode 100644 index b8e41518..00000000 --- a/apps/web-antd/src/views/sis/devicePoint/index.vue +++ /dev/null @@ -1,182 +0,0 @@ - - - diff --git a/apps/web-antd/src/views/sis/elevatorInfo/data.ts b/apps/web-antd/src/views/sis/elevatorInfo/data.ts index bc9b3a52..9e94a8fa 100644 --- a/apps/web-antd/src/views/sis/elevatorInfo/data.ts +++ b/apps/web-antd/src/views/sis/elevatorInfo/data.ts @@ -1,5 +1,7 @@ import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; +import type { DeviceManageQuery } from '#/api/sis/deviceManage/model'; +import { deviceManageList } from '#/api/sis/deviceManage'; export const querySchema: FormSchemaGetter = () => [ { @@ -58,18 +60,6 @@ export const columns: VxeGridProps['columns'] = [ title: '维保公司', field: 'maintenanceCompany', }, - /*{ - title: '维保电话', - field: 'maintenancePhone', - }, - { - title: '上次年检日期', - field: 'lastInspectionDate', - }, - { - title: '下次年检日期', - field: 'nextInspectionDate', - },*/ { title: '梯控厂商', field: 'controlFactory', @@ -173,31 +163,6 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'maintenanceCompany', component: 'Input', }, - /* { - label: '维保电话', - fieldName: 'maintenancePhone', - component: 'Input', - }, - { - label: '上次年检日期', - fieldName: 'lastInspectionDate', - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - }, - { - label: '下次年检日期', - fieldName: 'nextInspectionDate', - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - },*/ { label: '梯控厂商', fieldName: 'controlFactory', @@ -228,4 +193,18 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', rules: 'required', }, + { + component: 'Select', + fieldName: 'remoteCallElevatorDeviceId', + defaultValue: undefined, + label: '呼梯摄像头', + }, + + { + component: 'Select', + fieldName: 'elevatorControlDeviceId', + defaultValue: undefined, + label: '梯控摄像头', + + }, ]; diff --git a/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue b/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue index 32c2b403..3f5d0801 100644 --- a/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue +++ b/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue @@ -6,11 +6,17 @@ import { $t } from '@vben/locales'; import { cloneDeep, getPopupContainer, handleNode } from '@vben/utils'; import { useVbenForm } from '#/adapter/form'; -import { elevatorInfoAdd, elevatorInfoInfo, elevatorInfoUpdate } from '#/api/sis/elevatorInfo'; +import { + elevatorInfoAdd, + elevatorInfoInfo, + elevatorInfoUpdate, +} from '#/api/sis/elevatorInfo'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { modalSchema } from './data'; import { communityTree } from '#/api/property/community'; +import type { DeviceManageForm, DeviceManageQuery } from '#/api/sis/deviceManage/model'; +import { deviceManageList } from '#/api/sis/deviceManage'; const emit = defineEmits<{ reload: [] }>(); @@ -24,11 +30,11 @@ const [BasicForm, formApi] = useVbenForm({ // 默认占满两列 formItemClass: 'col-span-1', // 默认label宽度 px - labelWidth: 100, + labelWidth: 200, // 通用配置项 会影响到所有表单项 componentProps: { class: 'w-full', - } + }, }, schema: modalSchema(), showDefaultActions: false, @@ -54,7 +60,10 @@ const [BasicModal, modalApi] = useVbenModal({ return null; } modalApi.modalLoading(true); - setupCommunitySelect() + // 加载社区树 + setupCommunitySelect(); + // 加载未绑定的设备 + loadDeviceList(); const { id } = modalApi.getData() as { id?: number | string }; isUpdate.value = !!id; @@ -88,6 +97,56 @@ async function handleConfirm() { } } +let rows: any = []; + +async function loadDeviceList() { + if (rows.length === 0) { + const params: DeviceManageQuery = { + pageNum: 1, + pageSize: 500, + }; + const res = await deviceManageList(params); + if (res && res.rows && res.rows.length > 0) { + rows = res.rows; + } + } + const arr = rows.map((item: DeviceManageForm) => { + return { + label: item.deviceName, + value: item.id, + deviceIp: item.deviceIp, + deviceId: item.id, + }; + }); + + formApi.updateSchema([ + { + componentProps: () => ({ + options: arr, + mode: 'multiple', // 关键属性,启用多选模式 + onChange: async (value: string, option: any) => { + const data = cloneDeep(await formApi.getValues()); + data.remoteCallElevatorDeviceId = option; + formApi.setValues(data); + }, + }), + fieldName: 'remoteCallElevatorDeviceId', + }, + { + componentProps: () => ({ + options: arr, + allowClear: true, + onChange: async (value: string, option: any) => { + const data = cloneDeep(await formApi.getValues()); + data.elevatorControlDeviceId = option; + formApi.setValues(data); + }, + }), + fieldName: 'elevatorControlDeviceId', + }, + ]); +} + /** * 初始化城市 */ @@ -127,7 +186,6 @@ async function setupCommunitySelect() { ]); } - async function handleClosed() { await formApi.resetForm(); resetInitialized(); @@ -139,4 +197,3 @@ async function handleClosed() { - diff --git a/apps/web-antd/src/views/sis/personLib/data.ts b/apps/web-antd/src/views/sis/personLib/data.ts index 7b91b221..5817bee6 100644 --- a/apps/web-antd/src/views/sis/personLib/data.ts +++ b/apps/web-antd/src/views/sis/personLib/data.ts @@ -1,12 +1,6 @@ import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; -import { DictEnum } from '@vben/constants'; -import { getPopupContainer } from '@vben/utils'; - -import { queryListByFactoryNo } from '#/api/sis/accessControlDevice'; -import { getDictOptions } from '#/utils/dict'; - export const querySchema: FormSchemaGetter = () => [ { component: 'Input', @@ -58,32 +52,8 @@ export const modalSchema: FormSchemaGetter = () => [ rules: 'required', }, { - label: '人员库描述', + label: '描述', fieldName: 'libDesc', component: 'Input', }, - { - label: '库类型', - fieldName: 'libType', - component: 'Select', - componentProps: { - getPopupContainer, - options: getDictOptions(DictEnum.SIS_LIB_TYPE), - }, - }, - { - label: '设备', - fieldName: 'eqpIds', - component: 'ApiSelect', - rules: 'required', - componentProps: { - mode: 'multiple', // 关键属性,启用多选模式 - resultField: 'list', // 根据API返回结构调整 - labelField: 'eqpName', - valueField: 'id', - api: async () => { - return await queryListByFactoryNo('2'); - }, - }, - }, ]; diff --git a/apps/web-antd/src/views/sis/personLib/index.vue b/apps/web-antd/src/views/sis/personLib/index.vue index cad9d844..0a3f588e 100644 --- a/apps/web-antd/src/views/sis/personLib/index.vue +++ b/apps/web-antd/src/views/sis/personLib/index.vue @@ -1,15 +1,13 @@ diff --git a/apps/web-antd/src/views/sis/personLib/libAuth-modal.vue b/apps/web-antd/src/views/sis/personLib/libAuth-modal.vue new file mode 100644 index 00000000..34842d56 --- /dev/null +++ b/apps/web-antd/src/views/sis/personLib/libAuth-modal.vue @@ -0,0 +1,95 @@ + + + diff --git a/apps/web-antd/src/views/sis/personLibImg/data.tsx b/apps/web-antd/src/views/sis/personLibImg/data.tsx index e308af09..2d827e76 100644 --- a/apps/web-antd/src/views/sis/personLibImg/data.tsx +++ b/apps/web-antd/src/views/sis/personLibImg/data.tsx @@ -7,7 +7,6 @@ import { getPopupContainer } from '@vben/utils'; import { getDictOptions } from '#/utils/dict'; import { personLibList } from '#/api/sis/personLib'; import type { PersonLibQuery, PersonLibVO } from '#/api/sis/personLib/model'; -import { Tag } from 'ant-design-vue'; let libArr: PersonLibVO[] = []; const labelText: VbenFormSchema = { @@ -16,7 +15,7 @@ const labelText: VbenFormSchema = { component: 'ApiSelect', componentProps: { resultField: 'list', // 根据API返回结构调整 - labelField: 'labelText', + labelField: 'libName', valueField: 'id', // immediate: true, api: async () => { @@ -26,19 +25,6 @@ const labelText: VbenFormSchema = { pageSize: 500, }; const res = await personLibList(params); - res.rows.forEach((item) => { - let tag = - item.libType == 1 ? ( - 人像库 - ) : ( - 工服库 - ); - item.labelText = ( - - {item.libName} {tag} - - ); - }); libArr = res.rows; } return libArr; diff --git a/apps/web-antd/src/views/sis/personLibImg/personLibImg-modal.vue b/apps/web-antd/src/views/sis/personLibImg/personLibImg-modal.vue index 3efc575e..9a9a2b5c 100644 --- a/apps/web-antd/src/views/sis/personLibImg/personLibImg-modal.vue +++ b/apps/web-antd/src/views/sis/personLibImg/personLibImg-modal.vue @@ -27,7 +27,7 @@ const [BasicForm, formApi] = useVbenForm({ // 默认占满两列 formItemClass: 'col-span-1', // 默认label宽度 px - labelWidth: 80, + labelWidth: 100, // 通用配置项 会影响到所有表单项 componentProps: { class: 'w-full', diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index 978fbcff..6a6a60b6 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -28,7 +28,7 @@ export default defineConfig(async () => { rewrite: (path) => path.replace(/^\/api/, ''), // mock代理目标地址 // target: 'http://192.168.43.169:8080', - target: 'http://192.168.110.207:8080', + target: 'http://127.0.0.1:8080', // target: 'http://192.168.0.108:8080', // target: 'http://192.168.0.106:8080', // target: 'http://47.109.37.87:3010',