fix(): 资产结构概述统计数量点击其他数量不改变BUG
parent
01a2c3956f
commit
a9b7d706e0
|
@ -96,29 +96,6 @@ export default {
|
||||||
|
|
||||||
// 从节点信息对象中解构出 data 属性
|
// 从节点信息对象中解构出 data 属性
|
||||||
const {data} = node;
|
const {data} = node;
|
||||||
|
|
||||||
// 异步调用 selectAssetSouructureTableList API 函数,传入当前节点的 id 作为参数
|
|
||||||
selectAssetSouructureTableList(data.id).then((response) => {
|
|
||||||
// 打印 API 返回的响应数据
|
|
||||||
// console.log(response);
|
|
||||||
|
|
||||||
// 将 API 返回的 data 属性赋值给 this.childrenList
|
|
||||||
this.childrenList = response.data.assetStructureList;
|
|
||||||
|
|
||||||
// 遍历 this.childrenList,为每个元素添加 type 属性,值为 "dataTable"
|
|
||||||
this.childrenList.forEach((item) => {
|
|
||||||
item.type = "dataTable";
|
|
||||||
});
|
|
||||||
|
|
||||||
this.structureTableDataCount.tableCount = response.data.tableCount
|
|
||||||
this.structureTableDataCount.tableDataCount = response.data.tableDataCount
|
|
||||||
|
|
||||||
console.log(this.structureTableDataCount)
|
|
||||||
|
|
||||||
// 调用 resolve 函数,传递处理后的 this.childrenList 作为子节点数据
|
|
||||||
resolve(this.childrenList);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 如果当前节点的数据类型为 "dataTable",返回空数组,不加载任何子节点
|
// 如果当前节点的数据类型为 "dataTable",返回空数组,不加载任何子节点
|
||||||
if (data.type === 'dataTable') {
|
if (data.type === 'dataTable') {
|
||||||
return resolve([]);
|
return resolve([]);
|
||||||
|
@ -139,6 +116,28 @@ export default {
|
||||||
showAssetsFun(data){
|
showAssetsFun(data){
|
||||||
this.title = data.dataSourceName + '('+data.dataSourceDatabaseName + '-' + data.dataSourceSystemName+')'
|
this.title = data.dataSourceName + '('+data.dataSourceDatabaseName + '-' + data.dataSourceSystemName+')'
|
||||||
this.showAssets = data.type;
|
this.showAssets = data.type;
|
||||||
|
// 异步调用 selectAssetSouructureTableList API 函数,传入当前节点的 id 作为参数
|
||||||
|
selectAssetSouructureTableList(data.id).then((response) => {
|
||||||
|
// 打印 API 返回的响应数据
|
||||||
|
// console.log(response);
|
||||||
|
|
||||||
|
// 将 API 返回的 data 属性赋值给 this.childrenList
|
||||||
|
this.childrenList = response.data.assetStructureList;
|
||||||
|
|
||||||
|
// 遍历 this.childrenList,为每个元素添加 type 属性,值为 "dataTable"
|
||||||
|
this.childrenList.forEach((item) => {
|
||||||
|
item.type = "dataTable";
|
||||||
|
});
|
||||||
|
|
||||||
|
this.structureTableDataCount.tableCount = response.data.tableCount
|
||||||
|
this.structureTableDataCount.tableDataCount = response.data.tableDataCount
|
||||||
|
|
||||||
|
|
||||||
|
console.log(this.structureTableDataCount)
|
||||||
|
|
||||||
|
// 调用 resolve 函数,传递处理后的 this.childrenList 作为子节点数据
|
||||||
|
resolve(this.childrenList);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue