From 7c6949cef7b2d6520a0b75afe438dddc52185b88 Mon Sep 17 00:00:00 2001 From: Jiang Peng <2622360564@qq.com> Date: Sun, 12 May 2024 21:45:05 +0800 Subject: [PATCH] =?UTF-8?q?fix():=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/etl/assetAuthorization/index.vue | 37 +++++---- src/views/etl/assetShow/index.vue | 83 ++++--------------- .../etl/assetShow/modules/dataAssetShow.vue | 2 +- .../dashboard/OverallAssetStructure.vue | 2 +- src/views/etl/assets/index.vue | 19 ++++- 5 files changed, 55 insertions(+), 88 deletions(-) diff --git a/src/views/etl/assetAuthorization/index.vue b/src/views/etl/assetAuthorization/index.vue index be60545..1024c2b 100644 --- a/src/views/etl/assetAuthorization/index.vue +++ b/src/views/etl/assetAuthorization/index.vue @@ -2,7 +2,7 @@ - + @@ -25,16 +25,33 @@ export default { data() { return { title: {}, - sourceList: [], + sourceList: [{ + label: '测试', + tableList: [ + {label: '测试1'} + ] + }], mainHeight: window.innerHeight - 85, defaultProps: { children: 'tableList', label: 'label' }, - showAuth: null + showAuth: null, + childrenList: [] } }, methods: { + expandTable( node, resolve){ + if (node.level === 0) return resolve(this.sourceList); + const {data} = node; + this.showAssets = data.dataType; + if (data.dataType === 'dataTable') { + return resolve([]) + } + setTimeout(() => { + resolve(this.childrenList) + }, 500); + }, handleNodeClick(data) { if (data.dataType === 'dataSource'){ dataAssetList(data).then(res => { @@ -44,9 +61,9 @@ export default { }) data.tableList = res.data this.sourceList[this.sourceList.indexOf(data)].tableList = res.data + this.childrenList = res.data this.title = data }) - }else{ this.sourceList.forEach(source => { if (source.tableList!=null){ @@ -63,23 +80,13 @@ export default { } this.showAuth = data.dataType }, - expandTable( node, resolve){ - if (node.level === 0) return resolve(this.assetStructureList); - const {data} = node; - if (data.type === 'dataTable') { - return resolve([]) - } - setTimeout(() => { - resolve(this.childrenList) - }, 500); - }, getList() { this.assetsCompute={ assetsModuleSum: 0, dataModuleSum: 0, dataSourceSum: 0 } - listSource(this.queryParams).then(response => { + listSource({}).then(response => { this.sourceList = response.data.rows; this.sourceList.forEach(source => { source.label=source.dataSourceName+'('+source.databaseName+'-'+source.systemName+')' diff --git a/src/views/etl/assetShow/index.vue b/src/views/etl/assetShow/index.vue index b1aa870..20bc4c1 100644 --- a/src/views/etl/assetShow/index.vue +++ b/src/views/etl/assetShow/index.vue @@ -1,52 +1,12 @@