From 1cd793650549bc9237c51200d06ebd45e4251f7c Mon Sep 17 00:00:00 2001 From: junjie Date: Fri, 3 Dec 2021 17:37:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E9=9B=86):=20=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=95=B0=E6=8D=AE=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/dataset/add/AddUnion.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/dataset/add/AddUnion.vue b/frontend/src/views/dataset/add/AddUnion.vue index 68d13975d1..81dc14445a 100644 --- a/frontend/src/views/dataset/add/AddUnion.vue +++ b/frontend/src/views/dataset/add/AddUnion.vue @@ -88,7 +88,7 @@ import UnionNode from '@/views/dataset/add/union/UnionNode' import NodeItem from '@/views/dataset/add/union/NodeItem' import DatasetGroupSelectorTree from '@/views/dataset/common/DatasetGroupSelectorTree' import UnionEdit from '@/views/dataset/add/union/UnionEdit' -import { getTable, post } from '@/api/dataset/dataset' +import { post } from '@/api/dataset/dataset' import UnionPreview from '@/views/dataset/add/union/UnionPreview' export default { name: 'AddUnion', @@ -151,6 +151,7 @@ export default { }, watch: { 'param.tableId': function() { + this.resetComponent() this.initTableData() } }, @@ -280,7 +281,7 @@ export default { initTableData() { if (this.param.tableId) { - getTable(this.param.tableId).then(response => { + post('/dataset/table/get/' + this.param.tableId, null).then(response => { const table = JSON.parse(JSON.stringify(response.data)) this.name = table.name this.dataset = JSON.parse(table.info).union @@ -299,6 +300,11 @@ export default { info: '{"union":' + JSON.stringify(this.dataset) + '}' } this.showPreview = true + }, + + resetComponent() { + this.dataset = [] + this.name = '关联数据集' } } }