Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wangjiahao 2021-12-03 17:40:52 +08:00
commit fa5e0d9e19

View File

@ -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 = '关联数据集'
}
}
}