Merge pull request #9521 from dataease/pr@dev-v2_st

fix(查询组件): 修复查询条件的选项来源设置为数据集时,数据集字段变更后,查询字段依然使用变更前的 ID,导致无法获取选项的问题
This commit is contained in:
dataeaseShu 2024-05-08 10:23:56 +08:00 committed by GitHub
commit bfe81225cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -740,11 +740,14 @@ const handleCondition = item => {
handleDialogClick()
if (activeConditionForRename.id) return
activeCondition.value = item.id
curComponent.value = conditions.value.find(ele => ele.id === item.id)
curComponent.value = cloneDeep(conditions.value.find(ele => ele.id === item.id))
curComponent.value.dataset.fields = []
multiple.value = curComponent.value.multiple
if (curComponent.value.dataset.id) {
getOptions(curComponent.value.dataset.id, curComponent.value)
listFieldsWithPermissions(curComponent.value.dataset.id).then(res => {
curComponent.value.dataset.fields = res.data
})
}
datasetFieldList.value.forEach(ele => {
if (!curComponent.value.checkedFieldsMap[ele.id]) {