From 7d98af43e8c32957954f0e0fde5a3f6036199474 Mon Sep 17 00:00:00 2001 From: sunshine7058 <2564255161@qq.com> Date: Sun, 28 Apr 2024 20:59:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=87=8D=E6=9E=84=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E5=90=8C=E6=AD=A5=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/data/source.js | 7 +++---- src/views/data/assetStructure/index.vue | 13 +++---------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/api/data/source.js b/src/api/data/source.js index e80f66a..3bbca13 100644 --- a/src/api/data/source.js +++ b/src/api/data/source.js @@ -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' }) } diff --git a/src/views/data/assetStructure/index.vue b/src/views/data/assetStructure/index.vue index eb3fc8d..04dad44 100644 --- a/src/views/data/assetStructure/index.vue +++ b/src/views/data/assetStructure/index.vue @@ -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