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!)" /> - - -