From b1942b5572c6a91ee6361457315c95b6c5801ae7 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 1 Feb 2024 10:42:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E6=BA=90):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E6=BA=90=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E4=B8=8D=E4=BF=9D=E5=AD=98=E4=BE=9D=E7=84=B6=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=8F=98=E6=9B=B4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/datasource/DsFormContent.vue | 8 ++++++++ core/frontend/src/views/system/datasource/DsTable.vue | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/core/frontend/src/views/system/datasource/DsFormContent.vue b/core/frontend/src/views/system/datasource/DsFormContent.vue index 673ae90d30..b142fc2cca 100644 --- a/core/frontend/src/views/system/datasource/DsFormContent.vue +++ b/core/frontend/src/views/system/datasource/DsFormContent.vue @@ -694,6 +694,14 @@ export default { }) }, methods: { + async cancelEdit() { + const params = this.configFromTabs?.id ? this.configFromTabs : this.$route.query + let { id, showModel } = params + await this.getDatasourceDetail(id, showModel) + this.edit(this.params) + this.changeType(true) + this.editDatasource(false) + }, editDatasource(type) { this.$emit('update:canEdit', type) this.disabled = !type diff --git a/core/frontend/src/views/system/datasource/DsTable.vue b/core/frontend/src/views/system/datasource/DsTable.vue index fc316b2572..52092f2995 100644 --- a/core/frontend/src/views/system/datasource/DsTable.vue +++ b/core/frontend/src/views/system/datasource/DsTable.vue @@ -24,7 +24,7 @@ v-if="privileges && canEdit" key="cancel" secondary - @click="editDatasource(false)" + @click="cancelEdit" >{{ $t('commons.cancel') }} Date: Thu, 1 Feb 2024 13:36:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20?= =?UTF-8?q?=E7=BC=96=E8=BE=91sql=E6=97=B6,=E8=AE=BE=E7=BD=AE=E4=B8=BB?= =?UTF-8?q?=E9=94=AE=E6=94=B9=E4=B8=8D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/views/dataset/add/AddSQL.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/frontend/src/views/dataset/add/AddSQL.vue b/core/frontend/src/views/dataset/add/AddSQL.vue index 22eb2b493c..2b7dc235cc 100644 --- a/core/frontend/src/views/dataset/add/AddSQL.vue +++ b/core/frontend/src/views/dataset/add/AddSQL.vue @@ -966,8 +966,8 @@ export default { table.info.replace(/\n/g, '\\n').replace(/\r/g, '\\r') ).sql } - if(JSON.parse(table.info).hasOwnProperty("setKey")){ - this.param.setKey = JSON.parse(table.info).setKey + if (JSON.parse(table.info).hasOwnProperty("setKey")) { + this.$set(this.param, 'setKey', JSON.parse(table.info).setKey) this.param.keys = JSON.parse(table.info).keys } this.variables = JSON.parse(table.sqlVariableDetails)