From 7e13025e3b09d689784beea202adaa2563df4732 Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Mon, 30 Mar 2026 14:14:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9AROI=20=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E9=A1=B5=E5=88=A0=E9=99=A4=E8=BE=B9=E7=BC=98=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E9=80=89=E6=8B=A9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit device_id 现在由后端从摄像头配置自动继承,前端不再需要手动选择。 --- .../src/views/aiot/device/roi/index.vue | 27 ++----------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/apps/web-antd/src/views/aiot/device/roi/index.vue b/apps/web-antd/src/views/aiot/device/roi/index.vue index 29ca39f6f..3a0793832 100644 --- a/apps/web-antd/src/views/aiot/device/roi/index.vue +++ b/apps/web-antd/src/views/aiot/device/roi/index.vue @@ -68,17 +68,6 @@ const snapOk = ref(false); const panelVisible = ref(false); const roiCanvasRef = ref | null>(null); -const edgeDevices = ref>([]); - -async function loadEdgeDevices() { - try { - const list = await wvpRequestClient.get>('/aiot/device/device/list'); - edgeDevices.value = (list as any) || []; - } catch { - edgeDevices.value = [{ deviceId: 'edge' }]; - } -} - const selectedRoi = computed(() => { if (!selectedRoiId.value) return null; return roiList.value.find((r) => r.roiId === selectedRoiId.value) || null; @@ -93,7 +82,6 @@ const polygonPointCount = computed(() => { // ==================== 初始化 ==================== onMounted(async () => { - loadEdgeDevices(); const q = route.query; if (q.cameraCode) { cameraCode.value = String(q.cameraCode); @@ -230,7 +218,7 @@ function addFullscreen() { priority: 0, enabled: 1, description: '', - deviceId: edgeDevices.value[0]?.deviceId || 'edge', + deviceId: '', }; try { await saveRoi(newRoi); @@ -283,7 +271,7 @@ async function onRoiDrawn(data: { coordinates: string; roi_type: string }) { priority: 0, enabled: 1, description: '', - deviceId: edgeDevices.value[0]?.deviceId || 'edge', + deviceId: '', }; try { await saveRoi(newRoi); @@ -532,17 +520,6 @@ function handlePush() { @blur="updateRoiData(selectedRoi!)" /> - - -