diff --git a/apps/web-antd/src/views/aiot/device/roi/components/AlgorithmParamEditor.vue b/apps/web-antd/src/views/aiot/device/roi/components/AlgorithmParamEditor.vue new file mode 100644 index 000000000..42deca53f --- /dev/null +++ b/apps/web-antd/src/views/aiot/device/roi/components/AlgorithmParamEditor.vue @@ -0,0 +1,165 @@ + + + + + + + + + + + {{ item }} + + + + + + 添加 + + + + + + + + + diff --git a/apps/web-antd/src/views/aiot/device/roi/components/RoiAlgorithmBind.vue b/apps/web-antd/src/views/aiot/device/roi/components/RoiAlgorithmBind.vue new file mode 100644 index 000000000..7f984bedd --- /dev/null +++ b/apps/web-antd/src/views/aiot/device/roi/components/RoiAlgorithmBind.vue @@ -0,0 +1,229 @@ + + + + + + 绑定算法 + + 添加算法 + + + + + 暂未绑定算法 + + + + + + + {{ item.algorithm?.algoName || item.bind.algoCode }} + + + {{ item.bind.algoCode }} + + + + onToggleEnabled(item.bind, val)" + /> + + 参数配置 + + + 解绑 + + + + + + + + + + + + + + diff --git a/apps/web-antd/src/views/aiot/device/roi/components/RoiCanvas.vue b/apps/web-antd/src/views/aiot/device/roi/components/RoiCanvas.vue new file mode 100644 index 000000000..d4080fee1 --- /dev/null +++ b/apps/web-antd/src/views/aiot/device/roi/components/RoiCanvas.vue @@ -0,0 +1,354 @@ + + + + + + + 正在截取画面... + {{ errorMsg || '暂无画面' }} + + + + + + diff --git a/apps/web-antd/src/views/aiot/device/roi/data.ts b/apps/web-antd/src/views/aiot/device/roi/data.ts deleted file mode 100644 index 67dcee6d5..000000000 --- a/apps/web-antd/src/views/aiot/device/roi/data.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { VxeTableGridOptions } from '#/adapter/vxe-table'; - -/** ROI 列表字段 */ -export function useRoiGridColumns(): VxeTableGridOptions['columns'] { - return [ - { - field: 'name', - title: 'ROI 名称', - minWidth: 150, - }, - { - field: 'channelName', - title: '摄像头', - minWidth: 150, - }, - { - field: 'type', - title: '类型', - minWidth: 100, - }, - { - field: 'enabled', - title: '启用状态', - minWidth: 90, - slots: { default: 'enabled' }, - }, - { - field: 'createdAt', - title: '创建时间', - minWidth: 170, - formatter: 'formatDateTime', - }, - { - title: '操作', - width: 120, - fixed: 'right', - slots: { default: 'actions' }, - }, - ]; -} 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 b31993e8f..f9dfa30b9 100644 --- a/apps/web-antd/src/views/aiot/device/roi/index.vue +++ b/apps/web-antd/src/views/aiot/device/roi/index.vue @@ -1,99 +1,522 @@ - - - - - {{ row.enabled ? '启用' : '禁用' }} - - + + + 请选择要配置ROI的摄像头 + onCameraSelected(String(val))" + /> + + 或从「摄像头管理」页面点击「ROI配置」进入 + + - - - - - + + + + + + 返回 + {{ cameraId }} - ROI配置 + + + + 画矩形 + + + 画多边形 + + + 取消绘制 + + 刷新截图 + + 推送到边缘端 + + + + + + + + + + + + + + + + ROI列表 ({{ roiList.length }}) + + + 暂无ROI,请在左侧画面上绘制 + + + + + {{ roi.name || '未命名' }} + + {{ roi.roiType === 'rectangle' ? '矩形' : '多边形' }} + + { + roi.enabled = val ? 1 : 0; + updateRoiData(roi); + } + " + @click.stop + /> + + 删除 + + + + + + + + + ROI属性 + + + + + + + + + + + + + + + + + + + + + 点击左侧ROI区域或列表项查看详情 + + + + + +