File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
frontend/src/views/dataset/add Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ import UnionNode from '@/views/dataset/add/union/UnionNode'
88
88
import NodeItem from ' @/views/dataset/add/union/NodeItem'
89
89
import DatasetGroupSelectorTree from ' @/views/dataset/common/DatasetGroupSelectorTree'
90
90
import UnionEdit from ' @/views/dataset/add/union/UnionEdit'
91
- import { getTable , post } from ' @/api/dataset/dataset'
91
+ import { post } from ' @/api/dataset/dataset'
92
92
import UnionPreview from ' @/views/dataset/add/union/UnionPreview'
93
93
export default {
94
94
name: ' AddUnion' ,
@@ -151,6 +151,7 @@ export default {
151
151
},
152
152
watch: {
153
153
' param.tableId ' : function () {
154
+ this .resetComponent ()
154
155
this .initTableData ()
155
156
}
156
157
},
@@ -280,7 +281,7 @@ export default {
280
281
281
282
initTableData () {
282
283
if (this .param .tableId ) {
283
- getTable ( this .param .tableId ).then (response => {
284
+ post ( ' /dataset/table/get/ ' + this .param .tableId , null ).then (response => {
284
285
const table = JSON .parse (JSON .stringify (response .data ))
285
286
this .name = table .name
286
287
this .dataset = JSON .parse (table .info ).union
@@ -299,6 +300,11 @@ export default {
299
300
info: ' {"union":' + JSON .stringify (this .dataset ) + ' }'
300
301
}
301
302
this .showPreview = true
303
+ },
304
+
305
+ resetComponent () {
306
+ this .dataset = []
307
+ this .name = ' 关联数据集'
302
308
}
303
309
}
304
310
}
You can’t perform that action at this time.
0 commit comments