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

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

View File

@ -667,9 +667,7 @@ const init = (queryId: string) => {
.forEach(ele => {
const { dimensionList, quotaList } = ele.fields
ele.list = [...dimensionList, ...quotaList]
if (!datasetMap[ele.id]) {
datasetMap[ele.id] = ele
}
datasetMap[ele.id] = ele
})
fields.value = datasetFieldList.value
.map(ele => {
@ -745,7 +743,7 @@ const handleCondition = item => {
curComponent.value = conditions.value.find(ele => ele.id === item.id)
multiple.value = curComponent.value.multiple
if (!curComponent.value.dataset.fields.length && curComponent.value.dataset.id) {
if (curComponent.value.dataset.id) {
getOptions(curComponent.value.dataset.id, curComponent.value)
}
datasetFieldList.value.forEach(ele => {