diff --git a/src/api/dataSource/source.js b/src/api/dataSource/source.js index cf4bd89..ec14b9d 100644 --- a/src/api/dataSource/source.js +++ b/src/api/dataSource/source.js @@ -66,9 +66,47 @@ export function delSource(id) { } //资产属性列表 -export function testList(){ +export function findAssetStructure(){ return request({ - url:'/dataSource/source/findTest', + url:'/dataSource/source/findAssetStructure', method:'get' }) } +export function findInformationById(id){ + return request({ + url:'/dataSource/source/findInformationById?id='+id, + method:'get', + params:id, + }) +} + +export function findDataBaseTableById(id){ + return request({ + url:'dataSource/source/findDataBaseTableById?id='+id, + method:'get', + params:id, + }) +} + +export function findDataBaseByAssetId(id){ + return request({ + url:'dataSource/source/findDataBaseByAssetId?id='+id, + method:'get', + params:id, + }) +} +export function findDataBaseTable(id){ + return request({ + url:'dataSource/source/findDataBaseTable?id='+id, + method:'get', + params:id, + }) +} + +export function findDataBaseByInformationId(id){ + return request({ + url:'dataSource/source/findDataBaseByInformationId?id='+id, + method:'get', + params:id, + }) +} diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 4529f99..360d737 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -131,6 +131,7 @@ export default { return { noticeVisble: false, noticeInfo: {}, + size:0, noticeAttr: [ { createTime: '', diff --git a/src/views/dataSource/assets/OverallAssetStructure.vue b/src/views/dataSource/assets/OverallAssetStructure.vue index 9c365c4..abcc0c0 100644 --- a/src/views/dataSource/assets/OverallAssetStructure.vue +++ b/src/views/dataSource/assets/OverallAssetStructure.vue @@ -1,13 +1,13 @@ - diff --git a/src/views/dataSource/assets/OverallSpecificAssets.vue b/src/views/dataSource/assets/OverallSpecificAssets.vue index 232aff8..fed25b9 100644 --- a/src/views/dataSource/assets/OverallSpecificAssets.vue +++ b/src/views/dataSource/assets/OverallSpecificAssets.vue @@ -30,11 +30,85 @@ - - - + +
+ 基础字典 + + + + + + + + + + 确定 + + + 新增字典 + +
+ + + +
+ {{key}} + 新增 +
+ + + + + + + + + + + +
+
+
+
+ +
+ + + + - sys_dept(部门表) @@ -44,27 +118,87 @@ diff --git a/src/views/dataSource/assets/index.vue b/src/views/dataSource/assets/index.vue index 86f8b98..5bcf2a7 100644 --- a/src/views/dataSource/assets/index.vue +++ b/src/views/dataSource/assets/index.vue @@ -6,7 +6,7 @@
{{ 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) } ) },