diff --git a/apps/web-antd/src/views/aiot/alarm/list/data.ts b/apps/web-antd/src/views/aiot/alarm/list/data.ts new file mode 100644 index 000000000..47535808e --- /dev/null +++ b/apps/web-antd/src/views/aiot/alarm/list/data.ts @@ -0,0 +1,180 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; + +import { getRangePickerDefaultProps } from '#/utils'; + +/** 告警类型选项 */ +export const ALERT_TYPE_OPTIONS = [ + { label: '离岗检测', value: 'leave_post' }, + { label: '周界入侵', value: 'intrusion' }, +]; + +/** 告警状态选项 */ +export const ALERT_STATUS_OPTIONS = [ + { label: '待处理', value: 'pending' }, + { label: '处理中', value: 'processing' }, + { label: '已处理', value: 'handled' }, + { label: '已忽略', value: 'ignored' }, +]; + +/** 告警级别选项 */ +export const ALERT_LEVEL_OPTIONS = [ + { label: '低', value: 'low' }, + { label: '中', value: 'medium' }, + { label: '高', value: 'high' }, +]; + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'cameraId', + label: '摄像头', + component: 'Input', + componentProps: { + placeholder: '请输入摄像头ID', + allowClear: true, + }, + }, + { + fieldName: 'alertType', + label: '告警类型', + component: 'Select', + componentProps: { + options: ALERT_TYPE_OPTIONS, + placeholder: '请选择告警类型', + allowClear: true, + }, + }, + { + fieldName: 'status', + label: '处理状态', + component: 'Select', + componentProps: { + options: ALERT_STATUS_OPTIONS, + placeholder: '请选择处理状态', + allowClear: true, + }, + }, + { + fieldName: 'createTime', + label: '创建时间', + component: 'RangePicker', + componentProps: { + ...getRangePickerDefaultProps(), + allowClear: true, + }, + }, + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { type: 'checkbox', width: 40 }, + { + field: 'alertNo', + title: '告警编号', + minWidth: 160, + }, + { + field: 'cameraId', + title: '摄像头', + minWidth: 120, + slots: { default: 'camera' }, + }, + { + field: 'alertType', + title: '告警类型', + minWidth: 100, + slots: { default: 'alertType' }, + }, + { + field: 'confidence', + title: '置信度', + minWidth: 80, + slots: { default: 'confidence' }, + }, + { + field: 'durationMinutes', + title: '持续时长', + minWidth: 100, + slots: { default: 'duration' }, + }, + { + field: 'status', + title: '状态', + minWidth: 90, + slots: { default: 'status' }, + }, + { + field: 'level', + title: '级别', + minWidth: 80, + slots: { default: 'level' }, + }, + { + field: 'triggerTime', + title: '触发时间', + minWidth: 170, + formatter: 'formatDateTime', + }, + { + field: 'createdAt', + title: '创建时间', + minWidth: 170, + formatter: 'formatDateTime', + }, + { + title: '操作', + width: 150, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} + +/** 摄像头告警汇总列表字段 */ +export function useCameraSummaryColumns(): VxeTableGridOptions['columns'] { + return [ + { + field: 'cameraId', + title: '摄像头ID', + minWidth: 150, + }, + { + field: 'cameraName', + title: '摄像头名称', + minWidth: 150, + }, + { + field: 'totalCount', + title: '告警总数', + minWidth: 100, + sortable: true, + }, + { + field: 'pendingCount', + title: '待处理', + minWidth: 100, + slots: { default: 'pendingCount' }, + }, + { + field: 'lastAlertTypeName', + title: '最近告警类型', + minWidth: 120, + }, + { + field: 'lastAlertTime', + title: '最近告警时间', + minWidth: 170, + formatter: 'formatDateTime', + }, + { + title: '操作', + width: 120, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} diff --git a/apps/web-antd/src/views/aiot/alarm/list/index.vue b/apps/web-antd/src/views/aiot/alarm/list/index.vue new file mode 100644 index 000000000..394ba1e91 --- /dev/null +++ b/apps/web-antd/src/views/aiot/alarm/list/index.vue @@ -0,0 +1,368 @@ + + + diff --git a/apps/web-antd/src/views/aiot/alarm/summary/index.vue b/apps/web-antd/src/views/aiot/alarm/summary/index.vue new file mode 100644 index 000000000..263ed7865 --- /dev/null +++ b/apps/web-antd/src/views/aiot/alarm/summary/index.vue @@ -0,0 +1,83 @@ + + + diff --git a/apps/web-antd/src/views/aiot/device/camera/index.vue b/apps/web-antd/src/views/aiot/device/camera/index.vue new file mode 100644 index 000000000..a4f7e66c5 --- /dev/null +++ b/apps/web-antd/src/views/aiot/device/camera/index.vue @@ -0,0 +1,110 @@ + + + diff --git a/apps/web-antd/src/views/aiot/device/roi/data.ts b/apps/web-antd/src/views/aiot/device/roi/data.ts new file mode 100644 index 000000000..67dcee6d5 --- /dev/null +++ b/apps/web-antd/src/views/aiot/device/roi/data.ts @@ -0,0 +1,40 @@ +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 new file mode 100644 index 000000000..b31993e8f --- /dev/null +++ b/apps/web-antd/src/views/aiot/device/roi/index.vue @@ -0,0 +1,99 @@ + + + diff --git a/apps/web-antd/src/views/aiot/edge/node/data.ts b/apps/web-antd/src/views/aiot/edge/node/data.ts new file mode 100644 index 000000000..a9c352b58 --- /dev/null +++ b/apps/web-antd/src/views/aiot/edge/node/data.ts @@ -0,0 +1,77 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; + +/** 设备状态选项 */ +export const DEVICE_STATUS_OPTIONS = [ + { label: '在线', value: 'online' }, + { label: '离线', value: 'offline' }, + { label: '异常', value: 'error' }, +]; + +/** 边缘设备搜索表单 */ +export function useEdgeGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'status', + label: '设备状态', + component: 'Select', + componentProps: { + options: DEVICE_STATUS_OPTIONS, + placeholder: '请选择设备状态', + allowClear: true, + }, + }, + ]; +} + +/** 边缘设备列表字段 */ +export function useEdgeGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + field: 'deviceId', + title: '设备ID', + minWidth: 160, + }, + { + field: 'deviceName', + title: '设备名称', + minWidth: 150, + }, + { + field: 'status', + title: '状态', + minWidth: 90, + slots: { default: 'status' }, + }, + { + field: 'lastHeartbeat', + title: '最后心跳', + minWidth: 170, + formatter: 'formatDateTime', + }, + { + field: 'uptimeSeconds', + title: '运行时长', + minWidth: 100, + slots: { default: 'uptime' }, + }, + { + field: 'framesProcessed', + title: '处理帧数', + minWidth: 100, + slots: { default: 'frames' }, + }, + { + field: 'alertsGenerated', + title: '告警数', + minWidth: 90, + slots: { default: 'alerts' }, + }, + { + field: 'updatedAt', + title: '更新时间', + minWidth: 170, + formatter: 'formatDateTime', + }, + ]; +} diff --git a/apps/web-antd/src/views/aiot/edge/node/index.vue b/apps/web-antd/src/views/aiot/edge/node/index.vue new file mode 100644 index 000000000..7eed61c47 --- /dev/null +++ b/apps/web-antd/src/views/aiot/edge/node/index.vue @@ -0,0 +1,92 @@ + + + diff --git a/apps/web-antd/src/views/aiot/video/live/index.vue b/apps/web-antd/src/views/aiot/video/live/index.vue new file mode 100644 index 000000000..bd0139d7f --- /dev/null +++ b/apps/web-antd/src/views/aiot/video/live/index.vue @@ -0,0 +1,112 @@ + + +