forked from github/dataease
fix(数据集): 修复使用自定义 SQL 创建数据集,SQL编辑器关闭后,没有获取并加载字段的问题
This commit is contained in:
parent
5fc801f1cf
commit
31004a1bd2
@ -221,7 +221,22 @@ const closeSqlNode = () => {
|
|||||||
!state.nodeList[0].children?.length &&
|
!state.nodeList[0].children?.length &&
|
||||||
changeSqlId.value.length === 1
|
changeSqlId.value.length === 1
|
||||||
) {
|
) {
|
||||||
|
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
|
editUnion.value = true
|
||||||
|
})
|
||||||
changeSqlId.value = []
|
changeSqlId.value = []
|
||||||
}
|
}
|
||||||
if (state.visualNode?.confirm) {
|
if (state.visualNode?.confirm) {
|
||||||
|
Loading…
Reference in New Issue
Block a user