From 569ea04236fb389b3916bf0b0aad33a72b76d3d4 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Thu, 17 Sep 2026 18:30:52 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E4=BB=A5=E9=80=9A=E9=81=93=E7=9A=84?=
=?UTF-8?q?=E6=96=B9=E5=BC=8F=E5=B1=95=E7=A4=BA=E6=91=84=E5=83=8F=E5=A4=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/device/deviceChannel.ts | 13 +
src/views/base/deviceCamera/index.vue | 2 +-
src/views/device/components/camera-list.vue | 464 +++++++++++++-----
.../preview-video/preview-video-dialog.vue | 33 +-
src/views/device/deviceCamera/index.vue | 2 +-
5 files changed, 390 insertions(+), 124 deletions(-)
diff --git a/src/api/device/deviceChannel.ts b/src/api/device/deviceChannel.ts
index ebeb5c9..015cd83 100644
--- a/src/api/device/deviceChannel.ts
+++ b/src/api/device/deviceChannel.ts
@@ -22,6 +22,19 @@ export const getChannelPage = (query:any) => {
})
}
+// 编码设备通道分页查询
+export const cameraChannelPage = (query: any) => {
+ return request({
+ url: '/admin/deviceChannel/cameraPage',
+ method: 'post',
+ data: query,
+ params: {
+ current: query.current,
+ size: query.size,
+ }
+ })
+}
+
export function getReplayList(data: any) {
return request({
url: '/admin/deviceChannel/getReplayList',
diff --git a/src/views/base/deviceCamera/index.vue b/src/views/base/deviceCamera/index.vue
index e180769..ecd7ffb 100644
--- a/src/views/base/deviceCamera/index.vue
+++ b/src/views/base/deviceCamera/index.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/views/device/components/preview-video/preview-video-dialog.vue b/src/views/device/components/preview-video/preview-video-dialog.vue
index ff11695..d92955c 100644
--- a/src/views/device/components/preview-video/preview-video-dialog.vue
+++ b/src/views/device/components/preview-video/preview-video-dialog.vue
@@ -35,8 +35,11 @@ import * as DeviceChannelApi from "/@/api/device/deviceChannel"
const previewVideoRef = ref()
-const state = reactive({
+const state = reactive({
dialogVisible: false,
+ // device-设备维度 code=设备id;channel-通道维度 code=通道编码
+ type: "device",
+ code: null,
channelList: [],
loading: false,
treeLoading: false,
@@ -57,12 +60,21 @@ const handleClose = () => {
}
// 打开弹窗
-const openDialog = async (id: string) => {
+const openDialog = async (type: string, code: string) => {
+ if (!type || !code) return
+ state.type = type
+ state.code = code
state.dialogVisible = true
- // 获取deviceManage信息
- if (!id) return
- await getdeviceManageData(id)
- await getDeviceChannelList()
+ if (state.type === "device") {
+ // 获取deviceManage信息
+ await getdeviceManageData(code)
+ await getDeviceChannelList()
+ return
+ }
+ if (state.type === "channel") {
+ await getDeviceChannelList()
+ return
+ }
};
const videoChangePage = async ({ current, size }: any) => {
@@ -149,7 +161,14 @@ const getdeviceManageData = async (id: string) => {
const getDeviceChannelList = async () => {
state.treeLoading = true
try {
- const { data, code } = await DeviceChannelApi.list({ deviceCode: detail.deviceCode })
+ const _data: any = {}
+ if (state.type == "device") {
+ _data.deviceCode = detail.deviceCode
+ }
+ if (state.type == "channel") {
+ _data.channelCode = state.code
+ }
+ const { data, code } = await DeviceChannelApi.list(_data)
if (code != 0) throw new Error()
channel.treeList = data
channel.list = data
diff --git a/src/views/device/deviceCamera/index.vue b/src/views/device/deviceCamera/index.vue
index e7faec5..73556ca 100644
--- a/src/views/device/deviceCamera/index.vue
+++ b/src/views/device/deviceCamera/index.vue
@@ -1,5 +1,5 @@
-
+