From bf7fb83336acd8fb2765d8fe84b1a2df3b4581c6 Mon Sep 17 00:00:00 2001 From: zhanjiesheng <210466500@qq.com> Date: Mon, 15 Jun 2026 16:14:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=83=9F=E9=9B=BE=E6=A3=80=E6=B5=8B=E9=9A=90?= =?UTF-8?q?=E8=97=8F=EF=BC=8C=E7=81=AB=E7=81=BE=E6=A3=80=E6=B5=8B=E7=9A=84?= =?UTF-8?q?=E5=A4=8D=E5=90=88=E6=A3=80=E6=B5=8B=E9=BB=98=E8=AE=A4=E5=BC=80?= =?UTF-8?q?=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/components/DetectionConfig.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/DetectionConfig.vue b/apps/web/src/components/DetectionConfig.vue index 3d2eb48..7d3f942 100644 --- a/apps/web/src/components/DetectionConfig.vue +++ b/apps/web/src/components/DetectionConfig.vue @@ -42,7 +42,7 @@ class="full-width" > 0 ? props.models[0].id : ''), confidence: 0.5, iou: 0.45, - composite: false, + composite: true, algorithmConfig: {} }) +// 过滤掉烟雾检测模型 +const filteredModels = computed(() => { + return props.models.filter(model => model.id !== 'smoke_detection') +}) + // 判断当前是否是火灾检测模型 const isFireDetectionModel = computed(() => { return config.value.model === 'fire_detection' @@ -231,9 +236,11 @@ watch(() => [config.value.model, config.value.confidence, config.value.iou, conf emit('config-change', config.value) }, { deep: true }) -// 监听模型变化,如果不是火灾模型,关闭复合检测 +// 监听模型变化,火灾模型默认开启复合检测,非火灾模型关闭 watch(() => config.value.model, (newModel) => { - if (newModel !== 'fire_detection') { + if (newModel === 'fire_detection') { + config.value.composite = true + } else { config.value.composite = false } })