diff --git a/src/views/data/structure/index.vue b/src/views/data/structure/index.vue
index 9feeba0..54c8491 100644
--- a/src/views/data/structure/index.vue
+++ b/src/views/data/structure/index.vue
@@ -21,6 +21,9 @@
+
@@ -29,10 +32,11 @@
import {listAssetStructure, selectAssetSouructureTableList} from "@/api/data/structure";
import OverallAssets from "@/views/data/structure/dashlboard/OverallAssets.vue";
import OverallSpecificAssets from "@/views/data/structure/dashlboard/OverallSpecificAssets.vue";
+import OverallAssetStructure from "@/views/data/structure/dashlboard/OverallAssetStructure.vue";
export default {
name: 'assetStructure',
- components: {OverallSpecificAssets, OverallAssets},
+ components: {OverallAssetStructure, OverallSpecificAssets, OverallAssets},
data() {
return {
mainHeight: window.innerHeight - 85,
@@ -47,6 +51,10 @@ export default {
showAssets: null,
title: null,
+ tableName: null,
+ tableNameAnnotation: null,
+ tableDataCount: null,
+ assetTableDetailsList: null,
// 数据接入数量
assetStructureDataCount: {
dataCount: null,
@@ -98,31 +106,40 @@ export default {
// 从节点信息对象中解构出 data 属性
const {data} = node;
-/*
- // 异步调用 selectAssetSouructureTableList API 函数,传入当前节点的 id 作为参数
- selectAssetSouructureTableList(data.id).then((response) => {
- // 打印 API 返回的响应数据
- // console.log(response);
+ /*
+ // 异步调用 selectAssetSouructureTableList API 函数,传入当前节点的 id 作为参数
+ selectAssetSouructureTableList(data.id).then((response) => {
+ // 打印 API 返回的响应数据
+ // console.log(response);
- // 将 API 返回的 data 属性赋值给 this.childrenList
- this.childrenList = response.data.assetStructureList;
+ // 将 API 返回的 data 属性赋值给 this.childrenList
+ this.childrenList = response.data.assetStructureList;
- // 遍历 this.childrenList,为每个元素添加 type 属性,值为 "dataTable"
- this.childrenList.forEach((item) => {
- item.type = "dataTable";
- });
+ // 遍历 this.childrenList,为每个元素添加 type 属性,值为 "dataTable"
+ this.childrenList.forEach((item) => {
+ item.type = "dataTable";
+ });
- this.structureTableDataCount.tableCount = response.data.tableCount
- this.structureTableDataCount.tableDataCount = response.data.tableDataCount
- this.structureTableDataCount.childrenList = this.childrenList
+ this.structureTableDataCount.tableCount = response.data.tableCount
+ this.structureTableDataCount.tableDataCount = response.data.tableDataCount
+ this.structureTableDataCount.childrenList = this.childrenList
- // 调用 resolve 函数,传递处理后的 this.childrenList 作为子节点数据
- resolve(this.childrenList);
- });*/
+ // 调用 resolve 函数,传递处理后的 this.childrenList 作为子节点数据
+ resolve(this.childrenList);
+ });*/
// 如果当前节点的数据类型为 "dataTable",返回空数组,不加载任何子节点
if (data.type === 'dataTable') {
- return resolve([]);
+ this.tableName = data.tableName,
+ this.tableNameAnnotation = data.tableNameAnnotation,
+ this.tableDataCount = data.tableDataCount
+ this.childrenList.forEach(item => {
+ if (item.tableName === this.tableName){
+ this.assetTableDetailsList = item.assetTableDetailsList
+ }
+ return
+ })
+ return resolve([])
}
// 如果当前节点级别大于 1,返回空数组,不加载任何子节点
@@ -159,6 +176,12 @@ export default {
this.structureTableDataCount.childrenList = this.childrenList
});
}
+ if (data.type === "dataTable") {
+ this.tableParams = {
+ tableName: data.name,
+ tableAsName: data.as
+ }
+ }
}
}
}