fix: 过滤组件参数化获取数据不是最新的

This commit is contained in:
dataeaseShu 2023-10-30 14:05:38 +08:00
parent 3b971cda59
commit 82f940ea8b

View File

@ -364,6 +364,16 @@ const init = (queryId: string) => {
const datasetMapKeyList = Object.keys(datasetMap)
getSqlParams([
...new Set(
datasetFieldList.value
.map(ele => ele.tableId)
.filter(ele => !datasetMapKeyList.includes(ele) && ele)
)
]).then(res => {
parameters.value = res || []
})
if (datasetFieldIdList.every(ele => datasetMapKeyList.includes(ele))) {
fields.value = datasetFieldList.value
.map(ele => {
@ -400,15 +410,6 @@ const init = (queryId: string) => {
.finally(() => {
handleCheckedFieldsChange(curComponent.value.checkedFields)
})
getSqlParams([
...new Set(
datasetFieldList.value
.map(ele => ele.tableId)
.filter(ele => !datasetMapKeyList.includes(ele) && ele)
)
]).then(res => {
parameters.value = res || []
})
}
const weightlessness = () => {