diff --git a/apps/web-antd/src/views/aiot/device/camera/index.vue b/apps/web-antd/src/views/aiot/device/camera/index.vue index ba24c59dd..d80484e95 100644 --- a/apps/web-antd/src/views/aiot/device/camera/index.vue +++ b/apps/web-antd/src/views/aiot/device/camera/index.vue @@ -29,14 +29,11 @@ import { import { deleteCamera, - exportConfig, getCameraList, getMediaServerList, getRoiByCameraId, pushAllConfig, saveCamera, - startCamera, - stopCamera, } from '#/api/aiot/device'; defineOptions({ name: 'AiotDeviceCamera' }); @@ -52,15 +49,13 @@ const page = ref(1); const pageSize = ref(15); const total = ref(0); const searchQuery = ref(''); -const searchPulling = ref(undefined); const columns = [ { title: '应用名', dataIndex: 'app', width: 120 }, { title: '流ID', dataIndex: 'stream', width: 150 }, { title: '拉流地址', dataIndex: 'srcUrl', ellipsis: true }, - { title: '状态', key: 'pulling', width: 100 }, { title: 'ROI', key: 'roiCount', width: 80, align: 'center' as const }, - { title: '操作', key: 'actions', width: 340, fixed: 'right' as const }, + { title: '操作', key: 'actions', width: 240, fixed: 'right' as const }, ]; // ==================== 编辑弹窗状态 ==================== @@ -114,10 +109,6 @@ async function loadData() { page: page.value, count: pageSize.value, query: searchQuery.value || undefined, - pulling: - searchPulling.value === undefined - ? undefined - : searchPulling.value === 'true', }); cameraList.value = res.list || []; total.value = res.total || 0; @@ -288,23 +279,6 @@ function handleDelete(row: AiotDeviceApi.Camera) { }); } -// ==================== 拉流控制 ==================== - -async function toggleStream(row: AiotDeviceApi.Camera) { - try { - if (row.pulling) { - await stopCamera(row.id!); - message.success('已停止拉流'); - } else { - await startCamera(row.id!); - message.success('开始拉流'); - } - loadData(); - } catch { - message.error('操作失败'); - } -} - // ==================== ROI 配置跳转 ==================== function handleRoiConfig(row: AiotDeviceApi.Camera) { @@ -317,29 +291,6 @@ function handleRoiConfig(row: AiotDeviceApi.Camera) { }); } -// ==================== 配置导出 ==================== - -async function handleExport(row: AiotDeviceApi.Camera) { - const cameraCode = row.cameraCode; - if (!cameraCode) { - message.warning('摄像头编码为空,无法导出'); - return; - } - try { - const data = await exportConfig(cameraCode); - const json = JSON.stringify(data, null, 2); - const blob = new Blob([json], { type: 'application/json' }); - const url = URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = `config_${cameraCode}.json`; - a.click(); - URL.revokeObjectURL(url); - } catch { - message.error('导出失败'); - } -} - // ==================== 同步全局配置 ==================== const syncing = ref(false); @@ -401,17 +352,6 @@ onMounted(() => { allow-clear @press-enter="loadData" /> -