资产结构展示

master
冷调 2024-09-02 20:12:37 +08:00
parent 1ae24fc57a
commit b7ee942ec3
4 changed files with 16 additions and 16 deletions

View File

@ -61,14 +61,13 @@ export function synchronous(data) {
//根据基础表ID和SQL语句查询数据 //根据基础表ID和SQL语句查询数据
export function findTableValue(basicId,sql) { export function findTableValue(basicId,sql) {
return request({ return request({
url: '/source/value/findTableValue', url: "/source/value/findTableValue?basicId="+basicId+"&sql="+sql,
method: 'post', method: 'post',
params: {basicId:basicId,sql:sql}
}) })
} }
export function findByTableName() { export function findByTableName() {
return request({ return request({
url: '/source/tableInfo/findTableInfo', url: '/source/tableInfo/findAssetByTableName',
method: 'GET', method: 'GET',
}) })
} }

View File

@ -59,13 +59,13 @@ export function selectTableData(id) {
} }
export function findTableInfo() { export function findTableInfo() {
return request({ return request({
url: '/source/tableInfo/findTableInfo', url: '/source/tableInfo/findAssetByTableName',
method: 'get' method: 'get'
}) })
} }
export function findTableInfoList() { export function findTableInfoList() {
return request({ return request({
url: '/source/tableInfo/findTableInfoList', url: '/source/tableInfo/findAsset',
method: 'get', method: 'get',
}) })
} }

View File

@ -81,6 +81,7 @@
</template> </template>
<script setup> <script setup>
import {findByTableName, findTableValueList} from "@/api/source/source"; import {findByTableName, findTableValueList} from "@/api/source/source";
import {findTableInfoList} from "@/api/tableData/data";
export default { export default {
name: 'Show', name: 'Show',
@ -102,18 +103,25 @@ export default {
}, },
created() { created() {
this.findByTableName(); this.findByTableName();
this.findTableInfoList();
}, },
methods: { methods: {
findByTableName(){ findByTableName(){
findByTableName().then((res)=>{ findByTableName().then(res=>{
this.data=res.data this.data=res.data
console.log(res.data);
})
},
findTableInfoList(){
findTableInfoList().then(res=>{
this.data=res.data
console.log(res.data);
}) })
}, },
handleNodeClick(data) { handleNodeClick(data) {
console.log("...." + data)
this.tableBasic = data this.tableBasic = data
if (data.children == null) { if (data.children == null) {
console.log(data);
findTableValueList(data.basicId, data.tableName).then(res => { findTableValueList(data.basicId, data.tableName).then(res => {
this.assetShowList = res.data; this.assetShowList = res.data;
this.DataValue = res.data; this.DataValue = res.data;

View File

@ -89,16 +89,9 @@ export default {
}, },
created() { created() {
this.findTableInfoList(); this.findTableInfoList();
this.selectColumnList();
}, },
methods: { methods: {
selectColumnList(){
selectColumn().then(res=>{
console.log(res.data)
this.columnList=res.data
})
},
findTableInfoList(){ findTableInfoList(){
findTableInfoList().then(res=>{ findTableInfoList().then(res=>{
this.dataList=res.data this.dataList=res.data