fix:重构资产结构同步方法
parent
ca87c5e438
commit
7d98af43e8
|
@ -59,12 +59,11 @@ export function getAssetList() {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询数据库下的表
|
||||
export function getChildrenList(data) {
|
||||
// 查询数据库结构
|
||||
export function getChildrenList(id) {
|
||||
return request({
|
||||
url: '/data/source/getChildrenList',
|
||||
method: 'post',
|
||||
data: data
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -80,16 +80,9 @@ export default {
|
|||
if (data.type === 'dataSource') {
|
||||
this.assetId = data.id
|
||||
console.log(this.assetId)
|
||||
getChildrenList(data).then(res => {
|
||||
getChildrenList(data.id).then(res => {
|
||||
this.childrenList = res.data
|
||||
resolve(this.childrenList)
|
||||
this.childrenList.forEach(children => {
|
||||
this.showTable.assetStructure = data
|
||||
this.showTable.tableName = children.name
|
||||
addTableData(this.showTable).then(res => {
|
||||
// console.log(res)
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
// this.showAssets = data.type;
|
||||
|
@ -114,7 +107,7 @@ export default {
|
|||
getTableDataCount(data.id).then(res => {
|
||||
this.count = res.data
|
||||
})
|
||||
getChildrenList(data).then(res => {
|
||||
getChildrenList(data.id).then(res => {
|
||||
this.childrenList = res.data
|
||||
this.childrenList.forEach(children => {
|
||||
this.showTable.assetStructure = data
|
||||
|
|
Loading…
Reference in New Issue