From 1227d3328d5f107ca739169719ada1cdaf2c3663 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 11 Apr 2024 17:05:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E9=9B=86sql?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=BC=B9=E5=87=BA=E5=AD=97=E6=AE=B5=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-visualization/ComponentToolBar.vue | 2 +- .../data/dataset/form/DatasetUnion.vue | 28 +++++++++++-------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue b/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue index 262e2cc812..447decf6c1 100644 --- a/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue +++ b/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue @@ -163,7 +163,7 @@ onUnmounted(() => { .scale-input-number { height: 28px; - width: 60px !important; + width: 80px !important; margin-right: 16px; input { -webkit-appearance: none; diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue b/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue index e8a672a383..df2e47a85d 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue @@ -176,19 +176,15 @@ const saveSqlNode = (val: SqlNode, cb) => { info: state.visualNode.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) + 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() } return @@ -203,6 +199,14 @@ const setChangeStatus = (to, from) => { } 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) { nextTick(() => { emits('joinEditor', [