diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue index bba11ab4b7..72948e8c92 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -252,6 +252,15 @@ const setTreeDefault = () => { } } const handleCheckedFieldsChange = (value: string[]) => { + handleDialogClick() + const checkedCount = value.length + checkAll.value = checkedCount === fields.value.length + isIndeterminate.value = checkedCount > 0 && checkedCount < fields.value.length + if (curComponent.value.displayType === '8') return + setType() +} + +const handleCheckedFieldsChangeTree = (value: string[]) => { handleDialogClick() const checkedCount = value.length checkAll.value = checkedCount === fields.value.length @@ -1008,8 +1017,8 @@ const showError = computed(() => { if (displayType === '9') { let displayField = null return checkedFields.some(id => { - const arr = fields.value.find(itx => itx.componentId === id) - const field = arr.id + const arr = (fields.value || []).find(itx => itx.componentId === id) + const field = arr?.id if (!field) return false if (displayField === null) { displayField = field @@ -1332,7 +1341,7 @@ defineExpose({