From 2772d78e78f3b81725dd048916a3706e1164d27e Mon Sep 17 00:00:00 2001 From: junjie Date: Mon, 2 Aug 2021 18:27:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=B3=E8=81=94=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=8F=8A=E6=97=B6=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/DatasetGroupSelectorTree.vue | 29 ++++++++++--------- frontend/src/views/dataset/data/UnionView.vue | 4 ++- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/frontend/src/views/dataset/common/DatasetGroupSelectorTree.vue b/frontend/src/views/dataset/common/DatasetGroupSelectorTree.vue index 8f097ea5c2..18e859b0fe 100644 --- a/frontend/src/views/dataset/common/DatasetGroupSelectorTree.vue +++ b/frontend/src/views/dataset/common/DatasetGroupSelectorTree.vue @@ -163,16 +163,17 @@ export default { this.unionDataChange() }, 'table': function() { - if (this.table && this.table.sceneId) { - post('dataset/group/getScene/' + this.table.sceneId, {}, false).then(response => { - this.currGroup = response.data - - this.$nextTick(function() { - this.sceneMode = true - this.tableTree() - }) - }) - } + // if (this.table && this.table.sceneId) { + // post('dataset/group/getScene/' + this.table.sceneId, {}, false).then(response => { + // this.currGroup = response.data + // + // this.$nextTick(function() { + // this.sceneMode = true + // this.tableTree() + // }) + // }) + // } + this.treeNode(this.groupForm) }, search(val) { this.$emit('switchComponent', { name: '' }) @@ -236,7 +237,7 @@ export default { this.tableData = [] if (this.currGroup) { this.dsLoading = true - this.tables = []; + this.tables = [] post('/dataset/table/list', { sort: 'type asc,name asc,create_time desc', sceneId: this.currGroup.id, @@ -247,7 +248,7 @@ export default { if (response.data[i].mode === 1 && this.kettleRunning === false) { this.$set(response.data[i], 'disabled', true) } - if(hasDataPermission(this.privileges, response.data[i].privileges)){ + if (hasDataPermission(this.privileges, response.data[i].privileges)) { this.tables.push(response.data[i]) } } @@ -352,7 +353,7 @@ export default { if (!this.isTreeSearch) { if (node.data.id) { this.dsLoading = true - this.tables = []; + this.tables = [] post('/dataset/table/listAndGroup', { sort: 'type asc,name asc,create_time desc', sceneId: node.data.id, @@ -364,7 +365,7 @@ export default { if (response.data[i].mode === 1 && this.kettleRunning === false) { this.$set(response.data[i], 'disabled', true) } - if(hasDataPermission(this.privileges, response.data[i].privileges)){ + if (hasDataPermission(this.privileges, response.data[i].privileges)) { this.tables.push(response.data[i]) } } diff --git a/frontend/src/views/dataset/data/UnionView.vue b/frontend/src/views/dataset/data/UnionView.vue index 092d11f8b2..466556fcf3 100644 --- a/frontend/src/views/dataset/data/UnionView.vue +++ b/frontend/src/views/dataset/data/UnionView.vue @@ -105,7 +105,7 @@ width="500" trigger="click" > - +

{{ targetTable.name || $t('dataset.pls_slc_union_table') }}

@@ -206,6 +206,8 @@ export default { if (this.table.id) { if (this.table.mode === 0) { this.customType = ['db'] + } else { + this.customType = ['db', 'sql', 'excel'] } post('dataset/union/listByTableId/' + this.table.id, {}).then(response => { // console.log(response)