From 2cb3da7f833aecebdea1a9f90a82cb5e502c4c1a Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Wed, 6 Aug 2025 17:31:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E7=9B=B8=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Select/SelectTreeChannel.vue | 3 +- .../Select/SelectTreeChannelRadio.vue | 208 ++++++++++++++++++ src/components/index.ts | 2 + src/views/area/_components/bindCameraForm.vue | 9 + .../area/_components/bindCameraTable.vue | 5 +- .../replay-video/replay-video-dialog.vue | 17 +- src/views/door/doorAlarm/index.vue | 19 +- 7 files changed, 252 insertions(+), 11 deletions(-) create mode 100644 src/components/Select/SelectTreeChannelRadio.vue diff --git a/src/components/Select/SelectTreeChannel.vue b/src/components/Select/SelectTreeChannel.vue index 8098da9..4535ce7 100644 --- a/src/components/Select/SelectTreeChannel.vue +++ b/src/components/Select/SelectTreeChannel.vue @@ -1,11 +1,10 @@ + + \ No newline at end of file diff --git a/src/components/index.ts b/src/components/index.ts index 107f23a..0ece2ba 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -26,6 +26,7 @@ import SelectArea from "/@/components/Select/SelectArea.vue" import SelectDevice from "/@/components/Select/SelectDevice.vue" import SelectDutyType from "/@/components/Select/SelectDutyType.vue" import SelectTreeChannel from "/@/components/Select/SelectTreeChannel.vue" +import SelectTreeChannelRadio from "/@/components/Select/SelectTreeChannelRadio.vue" import ColumnBtn from "/@/components/Column/ColumnBtn.vue" @@ -82,6 +83,7 @@ export default { app.component('SelectDevice', SelectDevice); app.component('SelectDutyType', SelectDutyType); app.component('SelectTreeChannel', SelectTreeChannel); + app.component('SelectTreeChannelRadio', SelectTreeChannelRadio); app.component('ColumnBtn', ColumnBtn); diff --git a/src/views/area/_components/bindCameraForm.vue b/src/views/area/_components/bindCameraForm.vue index 10d328a..a817d99 100644 --- a/src/views/area/_components/bindCameraForm.vue +++ b/src/views/area/_components/bindCameraForm.vue @@ -19,6 +19,13 @@ + + + + + + +
@@ -75,6 +82,7 @@ const dataRules = ref({ name: [{ required: true, message: '房间名不能为空', trigger: 'change' }], uniqueCode: [{ required: true, message: '唯一编码不能为空', trigger: 'change' }], channelIds: [{ required: true, message: '设备不能为空', trigger: 'change' }], + channelCode: [{ required: true, message: '设备不能为空', trigger: 'change' }] }) // 打开弹窗 @@ -144,6 +152,7 @@ const getareaHouseDeviceData = async (bindId: any, areaHouseId: any) => { form.name = houseDeviceRes.houseName form.uniqueCode = houseDeviceRes.uniqueCode form.channelIds = houseDeviceRes.channelIds + form.channelCode = houseDeviceRes.channelCode form.x = houseDeviceRes.x form.y = houseDeviceRes.y form.z = houseDeviceRes.z diff --git a/src/views/area/_components/bindCameraTable.vue b/src/views/area/_components/bindCameraTable.vue index a97fe31..c48f01e 100644 --- a/src/views/area/_components/bindCameraTable.vue +++ b/src/views/area/_components/bindCameraTable.vue @@ -47,8 +47,9 @@ - + @@ -199,6 +199,19 @@ function getDictByValue(value: any, tag: any) { return target.label } } +function openReplayDialog(row: any) { + const dateTime = row.swingTime + if (!dateTime) return + // 获取dateTime前后30秒的时间 + const baseTime = new Date(dateTime) + const startDateTime = new Date(baseTime.getTime() - 30 * 1000) + const endDateTime = new Date(baseTime.getTime() + 30 * 1000) + + const startTime = parseTime(startDateTime, '{y}-{m}-{d} {h}:{i}:{s}') + const endTime = parseTime(endDateTime, '{y}-{m}-{d} {h}:{i}:{s}') + + replayVideoDialogRef.value.openDialog('channel', row.channelCode, { startTime, endTime }) +} \ No newline at end of file