{{ data. accessSourceName + '('+data.databaseName + '-' + data.dataSourceSystemName+')' }}
@@ -17,8 +17,8 @@
-
-
+
+
@@ -27,11 +27,16 @@
import OverallSpecificAssets from "@/views/dataSource/assets/OverallSpecificAssets.vue";
import OverallAssets from "@/views/dataSource/assets/OverallAssets.vue";
-import {testList} from "@/api/dataSource/source";
+import {
+ findAssetStructure, findDataBaseByAssetId, findDataBaseByInformationId, findDataBaseTable,
+ findDataBaseTableById,
+ findInformationById
+} from "@/api/dataSource/source";
+import OverallAssetStructure from "@/views/dataSource/assets/OverallAssetStructure.vue";
export default {
name: 'assets',
- components: { OverallSpecificAssets, OverallAssets },
+ components: {OverallAssetStructure, OverallSpecificAssets, OverallAssets },
data() {
return {
mainHeight: window.innerHeight - 85,
@@ -39,38 +44,68 @@ export default {
children: 'childrenList',
label: 'name'
},
+
assetStructureList: [],
childrenList: [],
showAssets: null,
- title: null
+ title: null,
+ databaseTableInformation:{},
+ databaseTableInformationList:[],
+ databaseTable:[],
}
},
created() {
- this.findTest();
+ this.findAssetStructure();
},
methods: {
expandTable(node, resolve) {
if (node.level === 0) return resolve(this.assetStructureList);
-
-
const {data} = node;
- this.showAssets = data.type;
- if (data.type === 'dataTable') {
- return resolve([])
+ this.showAssets = data.id;
+
+ findDataBaseByAssetId(data.id).then(
+ res=>{
+
+ this.databaseTableInformationList=res.data;
+
+ }
+ )
+ findDataBaseTable(data.id).then(
+ res=>{
+ this.databaseTableInformation=res.data
+ }
+ )
+ findInformationById(data.id).then(
+ res=>{
+ this.childrenList=res.data;
+ }
+ )
+ if (data.type === 1){
+ findDataBaseByInformationId(data.id).then(
+ res=>{
+
+ this.databaseTable=res.data;
+ console.log("res",this.databaseTable)
+ }
+ )
}
- this.title = data.accessSourceName + '('+data.databaseName + '-' + data.dataSourceSystemName+')'
+
setTimeout(() => {
resolve(this.childrenList)
}, 500);
},
- findTest(){
- testList().then(
+ showAssetsFun(data){
+ this.title = data.accessSourceName + '('+data.databaseName + '-' + data.dataSourceSystemName+')'
+ this.showAssets = data.type;
+ },
+ findAssetStructure(){
+ findAssetStructure().then(
res=>{
- this.assetStructureList=res.data.assetStructureList;
- this.childrenList=res.data.databaseTableInformationList;
+ this.assetStructureList=res.data
}
)
},
+
}
}
diff --git a/src/views/dataSource/source/index.vue b/src/views/dataSource/source/index.vue
index f1b9aca..13b72b4 100644
--- a/src/views/dataSource/source/index.vue
+++ b/src/views/dataSource/source/index.vue
@@ -142,7 +142,6 @@
-
@@ -426,7 +425,6 @@ export default {
listType().then(
res=>{
this.accessTypes=res.data;
- console.log("res",this.accessTypes)
}
)
},