fix(数据集): 修复修改数据集sql没有弹出字段确认的问题

This commit is contained in:
dataeaseShu 2024-04-11 17:05:11 +08:00
parent ea54a54f46
commit 1227d3328d
2 changed files with 17 additions and 13 deletions

View File

@ -163,7 +163,7 @@ onUnmounted(() => {
.scale-input-number { .scale-input-number {
height: 28px; height: 28px;
width: 60px !important; width: 80px !important;
margin-right: 16px; margin-right: 16px;
input { input {
-webkit-appearance: none; -webkit-appearance: none;

View File

@ -176,19 +176,15 @@ const saveSqlNode = (val: SqlNode, cb) => {
info: state.visualNode.info, info: state.visualNode.info,
tableName, tableName,
type: 'sql' type: 'sql'
}).then(res => {
nodeField.value = res as unknown as Field[]
nodeField.value.forEach(ele => {
ele.checked = true
})
state.nodeList[0].currentDsFields = cloneDeep(res)
cb?.()
confirmEditUnion()
}) })
.then(res => {
nodeField.value = res as unknown as Field[]
nodeField.value.forEach(ele => {
ele.checked = true
})
state.nodeList[0].currentDsFields = cloneDeep(res)
cb?.()
confirmEditUnion()
})
.finally(() => {
editUnion.value = true
})
confirm() confirm()
} }
return return
@ -203,6 +199,14 @@ const setChangeStatus = (to, from) => {
} }
const closeSqlNode = () => { const closeSqlNode = () => {
if (
state.nodeList.length === 1 &&
!state.nodeList[0].children?.length &&
changeSqlId.value.length === 1
) {
editUnion.value = true
changeSqlId.value = []
}
if (state.visualNode?.confirm) { if (state.visualNode?.confirm) {
nextTick(() => { nextTick(() => {
emits('joinEditor', [ emits('joinEditor', [