添加资产展示

pull/7/head^2
Yueng 2024-09-02 20:12:37 +08:00
parent c20e4d1667
commit 7c8e69e1f6
4 changed files with 17 additions and 17 deletions

View File

@ -7,9 +7,9 @@ export function getExtractDataTableNameList() {
})
}
export function findTableValueList(data) {
export function findTableValueList(basicId,dataId,tableName) {
return request({
url: '/property/dataSource/findTableValueList',
url: '/property/dataSource/findTableValueList?basicId='+basicId+"&dataId="+dataId+"&tableName="+tableName,
method: 'post',
data: data
})

View File

@ -1,6 +1,6 @@
<template>
<div>
<h1>测试4()- 资产展示</h1>
<h1>资产展示</h1>
<el-container>
<el-aside width="400px">
@ -26,7 +26,7 @@
<el-descriptions class="margin-top" title="资产模型基本信息" :column="2" border>
<el-descriptions-item>
<template slot="label">表名称</template>
{{ tableBasic.tableName }}
{{ tableBasic.name }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">表备注</template>
@ -34,7 +34,7 @@
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">数据量</template>
{{ tableBasic.dataNum }}
{{ dataNum }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">是否核心</template>
@ -112,10 +112,10 @@ export default {
return {
data:[],
defaultProps: {
children: 'children',
label: 'tableName'
children: 'tableNames',
label: 'name'
},
tableBasic:{},
tableBasic:[],
tableStructure:[],
assetShowList: [
// {key: ".sys_user.id", type: "String", value: 1},
@ -124,9 +124,8 @@ export default {
// {key: ".sys_user.email", type: "String", value: "123@136.com"},
// {key: ".sys_user.sex", type: "String", value: "Y"},
],
kvtList: [],
DataValue:[],
dataNum:'',
};
},
// data",
@ -145,16 +144,17 @@ export default {
handleNodeClick(data){
console.log("...."+data)
this.tableBasic=data
console.log(this.tableBasic)
dataNum=this.tableBasic.tableFie.length
// findStructureByTableId(data.id).then((res)=>{
// this.tableStructure=res.data
// })
if (data.children==null){
findTableValueList(data.basicId,data.tableName).then(res=>{
findTableValueList(data.id,data.dataId,data.tableName).then(res=>{
this.assetShowList=res.data;
this.DataValue=res.data;
})
}
console.log("-----"+this.DataValue);
console.log("...."+data.basicId)

View File

@ -136,7 +136,7 @@ export default {
console.log(this.tableBasic.length)
if (this.tableBasic.length === undefined){
selectBasicList().then(ress=>{
this.tableBasic.ress.data
this.tableBasic = ress.data
this.tableBasics.data
})
this.dataNum=data.tableFie.length

View File

@ -130,7 +130,7 @@ export default {
this.tableStructure=data.tableFie
// console.log(this.tableStructure)
findTableValue(data.dataId,data.name).then(res=>{
let tableMapping=res.data
let tableMapping = res.data
// console.log(res.data)
for (const index in tableMapping) {
@ -140,7 +140,7 @@ export default {
this.tableStructure[i].types.push(tableMapping[index].type)
console.log(this.tableStructure[i].types)
if (i!== 0&& this.tableStructure[i].types==this.tableStructure[0].types){
if (i !== 0&& this.tableStructure[i].types==this.tableStructure[0].types){
alert("dawdwadad")
return