forked from github/dataease
Merge pull request #1388 from dataease/pr@dev@feat_union_ds
feat(数据集): 关联数据集
This commit is contained in:
commit
41f8e875d8
@ -88,7 +88,7 @@ import UnionNode from '@/views/dataset/add/union/UnionNode'
|
|||||||
import NodeItem from '@/views/dataset/add/union/NodeItem'
|
import NodeItem from '@/views/dataset/add/union/NodeItem'
|
||||||
import DatasetGroupSelectorTree from '@/views/dataset/common/DatasetGroupSelectorTree'
|
import DatasetGroupSelectorTree from '@/views/dataset/common/DatasetGroupSelectorTree'
|
||||||
import UnionEdit from '@/views/dataset/add/union/UnionEdit'
|
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'
|
import UnionPreview from '@/views/dataset/add/union/UnionPreview'
|
||||||
export default {
|
export default {
|
||||||
name: 'AddUnion',
|
name: 'AddUnion',
|
||||||
@ -151,6 +151,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'param.tableId': function() {
|
'param.tableId': function() {
|
||||||
|
this.resetComponent()
|
||||||
this.initTableData()
|
this.initTableData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -280,7 +281,7 @@ export default {
|
|||||||
|
|
||||||
initTableData() {
|
initTableData() {
|
||||||
if (this.param.tableId) {
|
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))
|
const table = JSON.parse(JSON.stringify(response.data))
|
||||||
this.name = table.name
|
this.name = table.name
|
||||||
this.dataset = JSON.parse(table.info).union
|
this.dataset = JSON.parse(table.info).union
|
||||||
@ -299,6 +300,11 @@ export default {
|
|||||||
info: '{"union":' + JSON.stringify(this.dataset) + '}'
|
info: '{"union":' + JSON.stringify(this.dataset) + '}'
|
||||||
}
|
}
|
||||||
this.showPreview = true
|
this.showPreview = true
|
||||||
|
},
|
||||||
|
|
||||||
|
resetComponent() {
|
||||||
|
this.dataset = []
|
||||||
|
this.name = '关联数据集'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user