fix(查询组件): 文本下拉组件切换数据集后再变更为下拉树无法获取数据问题 #12990

This commit is contained in:
dataeaseShu 2024-11-04 11:08:15 +08:00
parent f88d095ce6
commit ca46b9d2d9
2 changed files with 7 additions and 6 deletions

View File

@ -1734,10 +1734,9 @@ const startTreeDesign = () => {
const [comId] = curComponent.value.checkedFields
const componentObj = fields.value.find(ele => ele.componentId === comId)
treeDialog.value.init(
(curComponent.value.optionValueSource === 0
? componentObj?.fields?.dimensionList
: curComponent.value.dataset?.fields
).filter(ele => ele.deType === +curComponent.value.field.deType),
componentObj?.fields?.dimensionList.filter(
ele => ele.deType === +curComponent.value.field.deType
),
curComponent.value.treeFieldList
)
}

View File

@ -14,7 +14,9 @@ const emits = defineEmits(['saveTree'])
const { t } = useI18n()
const addCascadeItem = () => {
treeList.value.push({
field: null,
field: {
id: ''
},
id: guid()
})
}
@ -127,7 +129,7 @@ defineExpose({
</div>
<template #footer>
<div class="dialog-footer">
<el-button secondary @click="cancelClick">{{ t('v_query.cancel') }}</el-button>
<el-button secondary @click="cancelClick">{{ t('common.cancel') }}</el-button>
<el-button type="primary" @click="confirmClick"> {{ t('pblink.sure_bt') }} </el-button>
</div>
</template>