添加资产展示
parent
c20e4d1667
commit
7c8e69e1f6
|
@ -7,9 +7,9 @@ export function getExtractDataTableNameList() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function findTableValueList(data) {
|
export function findTableValueList(basicId,dataId,tableName) {
|
||||||
return request({
|
return request({
|
||||||
url: '/property/dataSource/findTableValueList',
|
url: '/property/dataSource/findTableValueList?basicId='+basicId+"&dataId="+dataId+"&tableName="+tableName,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h1>测试4()- 资产展示</h1>
|
<h1>资产展示</h1>
|
||||||
|
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-aside width="400px">
|
<el-aside width="400px">
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<el-descriptions class="margin-top" title="资产模型基本信息" :column="2" border>
|
<el-descriptions class="margin-top" title="资产模型基本信息" :column="2" border>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">表名称</template>
|
<template slot="label">表名称</template>
|
||||||
{{ tableBasic.tableName }}
|
{{ tableBasic.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">表备注</template>
|
<template slot="label">表备注</template>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">数据量</template>
|
<template slot="label">数据量</template>
|
||||||
{{ tableBasic.dataNum }}
|
{{ dataNum }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">是否核心</template>
|
<template slot="label">是否核心</template>
|
||||||
|
@ -112,10 +112,10 @@ export default {
|
||||||
return {
|
return {
|
||||||
data:[],
|
data:[],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'tableNames',
|
||||||
label: 'tableName'
|
label: 'name'
|
||||||
},
|
},
|
||||||
tableBasic:{},
|
tableBasic:[],
|
||||||
tableStructure:[],
|
tableStructure:[],
|
||||||
assetShowList: [
|
assetShowList: [
|
||||||
// {key: "测试.sys_user.id", type: "String", value: 1},
|
// {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.email", type: "String", value: "123@136.com"},
|
||||||
// {key: "测试.sys_user.sex", type: "String", value: "Y"},
|
// {key: "测试.sys_user.sex", type: "String", value: "Y"},
|
||||||
],
|
],
|
||||||
kvtList: [],
|
|
||||||
DataValue:[],
|
DataValue:[],
|
||||||
|
dataNum:'',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//计算属性 类似于data概念",
|
//计算属性 类似于data概念",
|
||||||
|
@ -145,16 +144,17 @@ export default {
|
||||||
handleNodeClick(data){
|
handleNodeClick(data){
|
||||||
console.log("...."+data)
|
console.log("...."+data)
|
||||||
this.tableBasic=data
|
this.tableBasic=data
|
||||||
|
console.log(this.tableBasic)
|
||||||
|
dataNum=this.tableBasic.tableFie.length
|
||||||
// findStructureByTableId(data.id).then((res)=>{
|
// findStructureByTableId(data.id).then((res)=>{
|
||||||
// this.tableStructure=res.data
|
// 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.assetShowList=res.data;
|
||||||
this.DataValue=res.data;
|
this.DataValue=res.data;
|
||||||
})
|
})
|
||||||
}
|
|
||||||
console.log("-----"+this.DataValue);
|
console.log("-----"+this.DataValue);
|
||||||
console.log("...."+data.basicId)
|
console.log("...."+data.basicId)
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ export default {
|
||||||
console.log(this.tableBasic.length)
|
console.log(this.tableBasic.length)
|
||||||
if (this.tableBasic.length === undefined){
|
if (this.tableBasic.length === undefined){
|
||||||
selectBasicList().then(ress=>{
|
selectBasicList().then(ress=>{
|
||||||
this.tableBasic.ress.data
|
this.tableBasic = ress.data
|
||||||
this.tableBasics.data
|
this.tableBasics.data
|
||||||
})
|
})
|
||||||
this.dataNum=data.tableFie.length
|
this.dataNum=data.tableFie.length
|
||||||
|
|
|
@ -130,7 +130,7 @@ export default {
|
||||||
this.tableStructure=data.tableFie
|
this.tableStructure=data.tableFie
|
||||||
// console.log(this.tableStructure)
|
// console.log(this.tableStructure)
|
||||||
findTableValue(data.dataId,data.name).then(res=>{
|
findTableValue(data.dataId,data.name).then(res=>{
|
||||||
let tableMapping=res.data
|
let tableMapping = res.data
|
||||||
// console.log(res.data)
|
// console.log(res.data)
|
||||||
|
|
||||||
for (const index in tableMapping) {
|
for (const index in tableMapping) {
|
||||||
|
@ -140,7 +140,7 @@ export default {
|
||||||
this.tableStructure[i].types.push(tableMapping[index].type)
|
this.tableStructure[i].types.push(tableMapping[index].type)
|
||||||
|
|
||||||
console.log(this.tableStructure[i].types)
|
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")
|
alert("dawdwadad")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue