Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
class="full-width"
|
||||
>
|
||||
<el-option
|
||||
v-for="model in models"
|
||||
v-for="model in filteredModels"
|
||||
:key="model.id"
|
||||
:label="model.name"
|
||||
:value="model.id"
|
||||
@@ -197,10 +197,15 @@ const config = ref({
|
||||
model: props.defaultModel || (props.models.length > 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
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user