功能:摄像头管理页面增加边缘设备绑定选择
- 表格新增「边缘设备」列 - 编辑弹窗新增边缘设备下拉选择(edge/edge_002) - 新建摄像头默认绑定 edge
This commit is contained in:
@@ -31,6 +31,7 @@ export namespace AiotDeviceApi {
|
|||||||
stream?: string;
|
stream?: string;
|
||||||
cameraCode?: string; // 摄像头唯一编码
|
cameraCode?: string; // 摄像头唯一编码
|
||||||
cameraName?: string; // 摄像头名称(用户自定义)
|
cameraName?: string; // 摄像头名称(用户自定义)
|
||||||
|
edgeDeviceId?: string; // 绑定的边缘设备ID
|
||||||
srcUrl?: string;
|
srcUrl?: string;
|
||||||
timeout?: number;
|
timeout?: number;
|
||||||
rtspType?: string; // '0'=TCP, '1'=UDP, '2'=Multicast
|
rtspType?: string; // '0'=TCP, '1'=UDP, '2'=Multicast
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ const searchQuery = ref('');
|
|||||||
const columns = [
|
const columns = [
|
||||||
{ title: '摄像头名称', dataIndex: 'cameraName', width: 150 },
|
{ title: '摄像头名称', dataIndex: 'cameraName', width: 150 },
|
||||||
{ title: '拉流地址', dataIndex: 'srcUrl', ellipsis: true },
|
{ title: '拉流地址', dataIndex: 'srcUrl', ellipsis: true },
|
||||||
|
{ title: '边缘设备', dataIndex: 'edgeDeviceId', width: 100 },
|
||||||
{ title: '状态', key: 'status', width: 60, align: 'center' as const },
|
{ title: '状态', key: 'status', width: 60, align: 'center' as const },
|
||||||
{ title: 'ROI', key: 'roiCount', width: 80, align: 'center' as const },
|
{ title: 'ROI', key: 'roiCount', width: 80, align: 'center' as const },
|
||||||
{ title: '操作', key: 'actions', width: 240, fixed: 'right' as const },
|
{ title: '操作', key: 'actions', width: 240, fixed: 'right' as const },
|
||||||
@@ -75,6 +76,7 @@ const editForm = reactive<Partial<AiotDeviceApi.Camera>>({
|
|||||||
cameraName: '',
|
cameraName: '',
|
||||||
app: '',
|
app: '',
|
||||||
stream: '',
|
stream: '',
|
||||||
|
edgeDeviceId: 'edge',
|
||||||
srcUrl: '',
|
srcUrl: '',
|
||||||
timeout: 15,
|
timeout: 15,
|
||||||
rtspType: '0',
|
rtspType: '0',
|
||||||
@@ -180,6 +182,7 @@ function resetForm() {
|
|||||||
cameraName: '',
|
cameraName: '',
|
||||||
app: '',
|
app: '',
|
||||||
stream: '',
|
stream: '',
|
||||||
|
edgeDeviceId: 'edge',
|
||||||
srcUrl: '',
|
srcUrl: '',
|
||||||
timeout: 15,
|
timeout: 15,
|
||||||
rtspType: '0',
|
rtspType: '0',
|
||||||
@@ -242,6 +245,7 @@ function handleEdit(row: AiotDeviceApi.Camera) {
|
|||||||
cameraName: row.cameraName || '',
|
cameraName: row.cameraName || '',
|
||||||
app: row.app || '',
|
app: row.app || '',
|
||||||
stream: row.stream || '',
|
stream: row.stream || '',
|
||||||
|
edgeDeviceId: row.edgeDeviceId || 'edge',
|
||||||
cameraCode: row.cameraCode || '',
|
cameraCode: row.cameraCode || '',
|
||||||
srcUrl: row.srcUrl || '',
|
srcUrl: row.srcUrl || '',
|
||||||
timeout: row.timeout ?? 15,
|
timeout: row.timeout ?? 15,
|
||||||
@@ -487,6 +491,16 @@ onMounted(() => {
|
|||||||
placeholder="请输入摄像头名称,如:大堂吧台、室外停车场"
|
placeholder="请输入摄像头名称,如:大堂吧台、室外停车场"
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</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>
|
<Form.Item label="拉流地址" required>
|
||||||
<Input
|
<Input
|
||||||
v-model:value="editForm.srcUrl"
|
v-model:value="editForm.srcUrl"
|
||||||
|
|||||||
Reference in New Issue
Block a user