feat(fix):添加db数据集,默认加上数据源名称

This commit is contained in:
junjie
2021-06-02 11:59:33 +08:00
parent f837c0edf4
commit c2cb12c73b
2 changed files with 9 additions and 6 deletions

View File

@@ -120,17 +120,24 @@ export default {
save() {
// console.log(this.checkTableList);
// console.log(this.scene);
let ds = {}
this.options.forEach(ele => {
if (ele.id === this.dataSource) {
ds = ele
}
})
const sceneId = this.param.id
const dataSourceId = this.dataSource
const tables = []
const mode = this.mode
this.checkTableList.forEach(function(name) {
tables.push({
name: name,
name: ds.name + '_' + name,
sceneId: sceneId,
dataSourceId: dataSourceId,
type: 'db',
mode: parseInt(mode)
mode: parseInt(mode),
info: JSON.stringify({ table: name })
})
})
post('/dataset/table/batchAdd', tables).then(response => {