功能:摄像头管理页面增加边缘设备绑定选择

- 表格新增「边缘设备」列
- 编辑弹窗新增边缘设备下拉选择(edge/edge_002)
- 新建摄像头默认绑定 edge
This commit is contained in:
2026-03-22 01:08:03 +08:00
parent aa76e3cba9
commit 6dca2a68c0
2 changed files with 15 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ export namespace AiotDeviceApi {
stream?: string;
cameraCode?: string; // 摄像头唯一编码
cameraName?: string; // 摄像头名称(用户自定义)
edgeDeviceId?: string; // 绑定的边缘设备ID
srcUrl?: string;
timeout?: number;
rtspType?: string; // '0'=TCP, '1'=UDP, '2'=Multicast

View File

@@ -58,6 +58,7 @@ const searchQuery = ref('');
const columns = [
{ title: '摄像头名称', dataIndex: 'cameraName', width: 150 },
{ title: '拉流地址', dataIndex: 'srcUrl', ellipsis: true },
{ title: '边缘设备', dataIndex: 'edgeDeviceId', width: 100 },
{ title: '状态', key: 'status', width: 60, align: 'center' as const },
{ title: 'ROI', key: 'roiCount', width: 80, align: 'center' as const },
{ title: '操作', key: 'actions', width: 240, fixed: 'right' as const },
@@ -75,6 +76,7 @@ const editForm = reactive<Partial<AiotDeviceApi.Camera>>({
cameraName: '',
app: '',
stream: '',
edgeDeviceId: 'edge',
srcUrl: '',
timeout: 15,
rtspType: '0',
@@ -180,6 +182,7 @@ function resetForm() {
cameraName: '',
app: '',
stream: '',
edgeDeviceId: 'edge',
srcUrl: '',
timeout: 15,
rtspType: '0',
@@ -242,6 +245,7 @@ function handleEdit(row: AiotDeviceApi.Camera) {
cameraName: row.cameraName || '',
app: row.app || '',
stream: row.stream || '',
edgeDeviceId: row.edgeDeviceId || 'edge',
cameraCode: row.cameraCode || '',
srcUrl: row.srcUrl || '',
timeout: row.timeout ?? 15,
@@ -487,6 +491,16 @@ onMounted(() => {
placeholder="请输入摄像头名称,如:大堂吧台、室外停车场"
/>
</Form.Item>
<Form.Item label="边缘设备">
<Select
v-model:value="editForm.edgeDeviceId"
:options="[
{ value: 'edge', label: 'edge主站' },
{ value: 'edge_002', label: 'edge_002梦中心' },
]"
placeholder="选择绑定的边缘设备"
/>
</Form.Item>
<Form.Item label="拉流地址" required>
<Input
v-model:value="editForm.srcUrl"