From 8375d3c8a185e3e0cbea87643ad058bc20c49891 Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Sat, 14 Feb 2026 09:01:55 +0800 Subject: [PATCH] =?UTF-8?q?refactor(aiot):=20=E7=AE=97=E6=B3=95=E6=8A=BD?= =?UTF-8?q?=E5=B8=A7=E9=A2=91=E7=8E=87=E6=94=B9=E4=B8=BA=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=EF=BC=8C=E4=B8=8D=E5=85=81=E8=AE=B8=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在算法绑定列表中显示固定帧率标签(绿色Tag) - 离岗检测:3帧/秒 - 周界入侵:1帧/秒 - 其他算法:默认5帧/秒 - 删除参数配置界面的帧率选择器 - 帧率由算法类型决定,不允许用户修改 Co-Authored-By: Claude Opus 4.6 --- .../roi/components/AlgorithmParamEditor.vue | 47 ------------------- .../roi/components/RoiAlgorithmBind.vue | 12 +++++ 2 files changed, 12 insertions(+), 47 deletions(-) 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 index 702172dfc..eeea6e9a7 100644 --- a/apps/web-antd/src/views/aiot/device/roi/components/AlgorithmParamEditor.vue +++ b/apps/web-antd/src/views/aiot/device/roi/components/AlgorithmParamEditor.vue @@ -44,7 +44,6 @@ const newListItem = ref(''); // 参数名中英文映射 const paramNameMap: Record = { leave_countdown_sec: '离岗倒计时(秒)', - frame_rate: '抽帧频率', working_hours: '工作时间段', // 其他算法参数 cooldown_seconds: '告警冷却期(秒)', @@ -59,24 +58,12 @@ const paramNameMap: Record = { // 参数说明映射 const paramDescMap: Record = { leave_countdown_sec: '人员离开后,倒计时多少秒才触发离岗告警', - frame_rate: '算法处理视频流的频率,频率越高检测越及时但消耗越大', working_hours: '仅在指定时间段内进行监控,留空表示24小时监控', // 其他算法参数说明 cooldown_seconds: '触发告警后,多少秒内不再重复告警(用于周界入侵等算法)', confirm_seconds: '检测到目标后,持续多少秒才触发告警(避免瞬间误报)', }; -// 抽帧频率选项(物业场景优化) -const frameRateOptions = [ - { value: 10.0, label: '10帧/秒', desc: '高频检测 - 快速移动场景' }, - { value: 5.0, label: '5帧/秒', desc: '中高频 - 正常人员活动' }, - { value: 3.0, label: '3帧/秒', desc: '中频 - 人员离岗、聚集(推荐)' }, - { value: 1.0, label: '1帧/秒', desc: '标准频率 - 周界入侵(推荐)' }, - { value: 0.33, label: '1帧/3秒', desc: '低频 - 慢速场景' }, - { value: 0.1, label: '1帧/10秒', desc: '极低频 - 车辆检测' }, - { value: 0.03, label: '1帧/30秒', desc: '超低频 - 垃圾堆放等静态检测' }, -]; - // 获取参数的中文名称 function getParamLabel(key: string): string { return paramNameMap[key] || key; @@ -142,17 +129,6 @@ function isWorkingHoursField(key: string): boolean { return key === 'working_hours'; } -// 判断是否为抽帧频率字段 -function isFrameRateField(key: string): boolean { - return key === 'frame_rate'; -} - -// 获取抽帧频率显示文本 -function getFrameRateLabel(value: number): string { - const option = frameRateOptions.find(opt => Math.abs(opt.value - value) < 0.01); - return option ? option.label : `${value}帧/秒`; -} - async function handleSave() { try { console.log('[算法参数保存] 开始保存,原始数据:', formData.value); @@ -297,29 +273,6 @@ function validateParams(params: Record): { - - -
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 index 703cf0d35..8d011b802 100644 --- a/apps/web-antd/src/views/aiot/device/roi/components/RoiAlgorithmBind.vue +++ b/apps/web-antd/src/views/aiot/device/roi/components/RoiAlgorithmBind.vue @@ -124,6 +124,15 @@ async function onToggleEnabled(bind: AiotDeviceApi.AlgoBind, val: string | numbe function onParamSaved() { emit('changed'); } + +// 获取算法的固定帧率 +function getAlgoFrameRate(algoCode: string): string { + const frameRates: Record = { + leave_post: '3帧/秒', + intrusion: '1帧/秒', + }; + return frameRates[algoCode] || '5帧/秒'; +}