fix(数据集): 修复使用自定义 SQL 创建数据集,SQL编辑器关闭后,没有获取并加载字段的问题

This commit is contained in:
dataeaseShu 2024-04-24 10:58:30 +08:00
parent 5fc801f1cf
commit 31004a1bd2

View File

@ -221,7 +221,22 @@ const closeSqlNode = () => {
!state.nodeList[0].children?.length &&
changeSqlId.value.length === 1
) {
editUnion.value = true
currentNode.value = state.nodeList[0]
const { datasourceId, id, info, tableName } = currentNode.value
getTableField({
datasourceId,
id,
info,
tableName,
type: 'sql'
}).then(res => {
nodeField.value = res as unknown as Field[]
nodeField.value.forEach(ele => {
ele.checked = true
})
state.nodeList[0].currentDsFields = cloneDeep(res)
editUnion.value = true
})
changeSqlId.value = []
}
if (state.visualNode?.confirm) {