Skip to content

Commit 41f8e87

Browse files
Merge pull request dataease#1388 from dataease/pr@dev@feat_union_ds
feat(数据集): 关联数据集
2 parents 2a9fdea + 1cd7936 commit 41f8e87

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

frontend/src/views/dataset/add/AddUnion.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ import UnionNode from '@/views/dataset/add/union/UnionNode'
8888
import NodeItem from '@/views/dataset/add/union/NodeItem'
8989
import DatasetGroupSelectorTree from '@/views/dataset/common/DatasetGroupSelectorTree'
9090
import UnionEdit from '@/views/dataset/add/union/UnionEdit'
91-
import { getTable, post } from '@/api/dataset/dataset'
91+
import { post } from '@/api/dataset/dataset'
9292
import UnionPreview from '@/views/dataset/add/union/UnionPreview'
9393
export default {
9494
name: 'AddUnion',
@@ -151,6 +151,7 @@ export default {
151151
},
152152
watch: {
153153
'param.tableId': function() {
154+
this.resetComponent()
154155
this.initTableData()
155156
}
156157
},
@@ -280,7 +281,7 @@ export default {
280281
281282
initTableData() {
282283
if (this.param.tableId) {
283-
getTable(this.param.tableId).then(response => {
284+
post('/dataset/table/get/' + this.param.tableId, null).then(response => {
284285
const table = JSON.parse(JSON.stringify(response.data))
285286
this.name = table.name
286287
this.dataset = JSON.parse(table.info).union
@@ -299,6 +300,11 @@ export default {
299300
info: '{"union":' + JSON.stringify(this.dataset) + '}'
300301
}
301302
this.showPreview = true
303+
},
304+
305+
resetComponent() {
306+
this.dataset = []
307+
this.name = '关联数据集'
302308
}
303309
}
304310
}

0 commit comments

Comments
 (0)