mirror of
https://github.com/dataease/dataease.git
synced 2026-05-24 06:18:10 +08:00
feat(fix):添加db数据集,默认加上数据源名称
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user