添加资产展示
parent
f427e262ce
commit
8ae1b76ddc
|
@ -7,9 +7,16 @@ export function getExtractDataTableNameList() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function findTableValue(id,dataName) {
|
export function findTableValue(dataId,name) {
|
||||||
return request({
|
return request({
|
||||||
url: '/property/dataRunName/findTableValue?basicId='+id +"&dataName="+dataName,
|
url: '/property/dataRunName/findTableValue?dataId='+dataId+"&tableName="+name,
|
||||||
|
method: 'post',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function selectBasicList() {
|
||||||
|
return request({
|
||||||
|
url: '/property/dataRunName/selectBasicList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h1>数据资产结构</h1>
|
<h1>测试4()- 资产展示</h1>
|
||||||
|
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-aside width="400px">
|
<el-aside width="400px">
|
||||||
|
@ -14,12 +14,19 @@
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span style="font-size: xx-large"></span>
|
<span style="font-size: xx-large"></span>
|
||||||
|
<!-- <table>-->
|
||||||
|
<!-- a <tr><td>表名称:</td><td>{{ tableBasic.tableName }}</td></tr>-->
|
||||||
|
<!-- <tr><td>表备注:</td><td>{{ tableBasic.tableRemark }}</td></tr>-->
|
||||||
|
<!-- <tr><td>数据量:</td><td>{{ tableBasic.dataNum }}</td></tr>-->
|
||||||
|
<!-- <tr><td>是否核心:</td><td><dict-tag :options="dict.type.sys_yes_no" :value="tableBasic.isCenter"/></td></tr>-->
|
||||||
|
<!-- </table>-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<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.name }}
|
{{ tableBasic.tableName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">表备注</template>
|
<template slot="label">表备注</template>
|
||||||
|
@ -27,7 +34,7 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">数据量</template>
|
<template slot="label">数据量</template>
|
||||||
{{ dataNum }}
|
{{ tableBasic.dataNum }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">是否核心</template>
|
<template slot="label">是否核心</template>
|
||||||
|
@ -35,59 +42,64 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<!-- v-if="dataType === 'dataTable'-->
|
||||||
<el-card class="box-card" title="资产模型基本信息" :column="2" >
|
<el-card class="box-card" style="margin-top: 20px">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>资产模型详细信息</span>
|
<span>模型数据</span>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-row :gutter="20">
|
||||||
:data="tableStructure" style="width: 100%">
|
<!-- -->
|
||||||
<el-table-column label="名称" prop="field"></el-table-column>
|
<el-col :span="6" v-for="DataValue in assetShowList" style="margin-top: 20px">
|
||||||
<el-table-column label="注释" prop="annotation"></el-table-column>
|
<el-descriptions :title="tableBasic.tableRemark+'.'+tableBasic.tableName+'.'+DataValue.key" direction="vertical"
|
||||||
<el-table-column label="是否主键" prop="primarys">
|
border :column="1">
|
||||||
<template slot-scope="scope">
|
<el-descriptions-item label="Type">
|
||||||
<span v-if="scope.row.primarys==='PRI'">
|
<el-tag size="small">{{ DataValue.type }}</el-tag>
|
||||||
<el-tag type="success">{{scope.row.primarys }}</el-tag>
|
</el-descriptions-item>
|
||||||
</span>
|
<el-descriptions-item label="Value">{{ DataValue.value }}</el-descriptions-item>
|
||||||
<span v-if="scope.row.primarys===''">
|
</el-descriptions>
|
||||||
<el-tag type="danger">NO</el-tag>
|
|
||||||
</span>
|
|
||||||
</template>
|
</el-col>
|
||||||
</el-table-column>
|
</el-row>
|
||||||
<el-table-column label="类型" prop="type"></el-table-column>
|
|
||||||
<el-table-column label="映射类型" prop="javaType">{{this.javaType.type}}</el-table-column>
|
|
||||||
<el-table-column label="是否为空" prop="nullable"></el-table-column>
|
|
||||||
<el-table-column label="是否字典" prop="isDictionary"></el-table-column>
|
|
||||||
<el-table-column label="映射字典" prop="dictionaryTable"></el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-table
|
||||||
|
:data="DataValue"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
prop="key"
|
||||||
|
label="key"
|
||||||
|
width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="label"
|
||||||
|
label="label"
|
||||||
|
width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="type"
|
||||||
|
label="type">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="value"
|
||||||
|
label="value">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style>
|
|
||||||
|
|
||||||
.el-main {
|
|
||||||
background-color: #ececec;
|
|
||||||
color: #000000;
|
|
||||||
line-height: 147px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||||
//例如:import 《组件名称》 from '《组件路径》,
|
//例如:import 《组件名称》 from '《组件路径》,
|
||||||
|
import { findByTableName, findStructureByTableId, findTableValueList } from '@/api/etl/property'
|
||||||
import { findTableValue, getExtractDataTableNameList } from '@/api/property/astr'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
//import引入的组件需要注入到对象中才能使用"
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
|
@ -100,15 +112,21 @@ export default {
|
||||||
return {
|
return {
|
||||||
data:[],
|
data:[],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'tableNames',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'tableName'
|
||||||
},
|
|
||||||
dataNum:0,
|
|
||||||
tableBasic:{
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
tableBasic:{},
|
||||||
tableStructure:[],
|
tableStructure:[],
|
||||||
javaType:[],
|
assetShowList: [
|
||||||
|
// {key: "测试.sys_user.id", type: "String", value: 1},
|
||||||
|
// {key: "测试.sys_user.name", type: "String", value: "张三"},
|
||||||
|
// {key: "测试.sys_user.age", type: "Integer", value: 18},
|
||||||
|
// {key: "测试.sys_user.email", type: "String", value: "123@136.com"},
|
||||||
|
// {key: "测试.sys_user.sex", type: "String", value: "Y"},
|
||||||
|
],
|
||||||
|
kvtList: [],
|
||||||
|
DataValue:[],
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//计算属性 类似于data概念",
|
//计算属性 类似于data概念",
|
||||||
|
@ -117,33 +135,34 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
//方法集合",
|
//方法集合",
|
||||||
methods: {
|
methods: {
|
||||||
getSelectList(){
|
findByTableName(){
|
||||||
getExtractDataTableNameList().then((res)=>{
|
findByTableName().then((res)=>{
|
||||||
this.data = res.data
|
this.data = res.data
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleNodeClick(data){
|
handleNodeClick(data){
|
||||||
console.log(data)
|
console.log("...."+data)
|
||||||
this.tableBasic=data
|
this.tableBasic=data
|
||||||
this.dataNum=data.tableFie.length
|
|
||||||
this.tableStructure=data.tableFie
|
|
||||||
|
|
||||||
var id = 0;
|
// findStructureByTableId(data.id).then((res)=>{
|
||||||
data.tableFie.forEach(res => {
|
// this.tableStructure=res.data
|
||||||
id=res.tableId
|
// })
|
||||||
})
|
if (data.children==null){
|
||||||
console.log(id)
|
findTableValueList(data.basicId,data.tableName).then(res=>{
|
||||||
findTableValue(id,data.name).then(res=>{
|
this.assetShowList=res.data;
|
||||||
// console.log(res)
|
this.DataValue=res.data;
|
||||||
this.javaType=res.data
|
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
console.log("-----"+this.DataValue);
|
||||||
|
console.log("...."+data.basicId)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||||
created() {
|
created() {
|
||||||
this.getSelectList();
|
this.findByTableName();
|
||||||
|
|
||||||
},
|
},
|
||||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h1>数据资产结构</h1>
|
<h1>数据资产授权</h1>
|
||||||
|
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-aside width="400px">
|
<el-aside width="400px">
|
||||||
|
@ -18,20 +18,28 @@
|
||||||
|
|
||||||
<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.name }}
|
{{ tableBasics.accSourName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">表备注</template>
|
<template slot="label">系统名称</template>
|
||||||
{{ tableBasic.tableRemark }}
|
{{ tableBasics.dataSourSystemName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">数据库名称</template>
|
||||||
|
{{ tableBasics }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">表名称</template>
|
||||||
|
{{ this.tableBasics.name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">表中文名</template>
|
||||||
|
{{ this.tableBasics.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">数据量</template>
|
<template slot="label">数据量</template>
|
||||||
{{ dataNum }}
|
{{ dataNum}}
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">是否核心</template>
|
|
||||||
<dict-tag :options="dict.type.sys_no" :value="tableBasic.isCenter"/>
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</template>
|
</template>
|
||||||
|
@ -43,31 +51,27 @@
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
|
<el-tabs type="border-card">
|
||||||
|
<el-tab-pane label="用户管理">
|
||||||
<el-card class="box-card" title="资产模型基本信息" :column="2" >
|
<el-card class="box-card" title="资产模型基本信息" :column="2" >
|
||||||
<div slot="header" class="clearfix">
|
|
||||||
<span>资产模型详细信息</span>
|
|
||||||
</div>
|
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableStructure" style="width: 100%">
|
:data="tableBasic" style="width: 100%">
|
||||||
<el-table-column label="名称" prop="field"></el-table-column>
|
<el-table-column label="部门名称" prop="field"></el-table-column>
|
||||||
<el-table-column label="注释" prop="annotation"></el-table-column>
|
<el-table-column label="部门负责人" prop="annotation"></el-table-column>
|
||||||
<el-table-column label="是否主键" prop="primarys">
|
<el-table-column label="邮箱" prop="primarys"></el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column label="创建时间" prop="type"></el-table-column>
|
||||||
<span v-if="scope.row.primarys==='PRI'">
|
<el-table-column label="操作" prop="types"></el-table-column>
|
||||||
<el-tag type="success">{{scope.row.primarys }}</el-tag>
|
|
||||||
</span>
|
|
||||||
<span v-if="scope.row.primarys===''">
|
|
||||||
<el-tag type="danger">NO</el-tag>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="类型" prop="type"></el-table-column>
|
|
||||||
<el-table-column label="映射类型" prop="javaType">{{this.javaType.type}}</el-table-column>
|
|
||||||
<el-table-column label="是否为空" prop="nullable"></el-table-column>
|
|
||||||
<el-table-column label="是否字典" prop="isDictionary"></el-table-column>
|
|
||||||
<el-table-column label="映射字典" prop="dictionaryTable"></el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="配置管理">
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
|
@ -98,16 +102,16 @@ export default {
|
||||||
//这里存放数据"
|
//这里存放数据"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
tableMapping:[],
|
||||||
data:[],
|
data:[],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'tableNames',
|
children: 'tableNames',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
},
|
},
|
||||||
dataNum:0,
|
dataNum:0,
|
||||||
tableBasic:{
|
tableBasic:{},
|
||||||
|
|
||||||
},
|
|
||||||
tableStructure:[],
|
tableStructure:[],
|
||||||
|
tableBasics:{},
|
||||||
javaType:[],
|
javaType:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -122,21 +126,28 @@ export default {
|
||||||
this.data = res.data
|
this.data = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
handleNodeClick(data){
|
handleNodeClick(data){
|
||||||
|
debugger;
|
||||||
console.log(data)
|
console.log(data)
|
||||||
this.tableBasic=data
|
if (this.tableBasic.name===data.name){
|
||||||
|
this.tableBasic={}
|
||||||
|
}
|
||||||
|
console.log(this.tableBasic.length)
|
||||||
|
if (this.tableBasic.length === undefined){
|
||||||
|
selectBasicList().then(ress=>{
|
||||||
|
this.tableBasic.ress.data
|
||||||
|
this.tableBasics.data
|
||||||
|
})
|
||||||
this.dataNum=data.tableFie.length
|
this.dataNum=data.tableFie.length
|
||||||
this.tableStructure=data.tableFie
|
this.tableStructure=data.tableFie
|
||||||
|
findTableValue(data.dataId,data.name).then(res=>{
|
||||||
|
let tableMapping=res.data
|
||||||
|
|
||||||
|
|
||||||
var id = 0;
|
|
||||||
data.tableFie.forEach(res => {
|
|
||||||
id=res.tableId
|
|
||||||
})
|
|
||||||
console.log(id)
|
|
||||||
findTableValue(id,data.name).then(res=>{
|
|
||||||
// console.log(res)
|
|
||||||
this.javaType=res.data
|
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="类型" prop="type"></el-table-column>
|
<el-table-column label="类型" prop="type"></el-table-column>
|
||||||
<el-table-column label="映射类型" prop="javaType">{{this.javaType.type}}</el-table-column>
|
<el-table-column label="映射类型" prop="types"></el-table-column>
|
||||||
<el-table-column label="是否为空" prop="nullable"></el-table-column>
|
<el-table-column label="是否为空" prop="nullable"></el-table-column>
|
||||||
<el-table-column label="是否字典" prop="isDictionary"></el-table-column>
|
<el-table-column label="是否字典" prop="isDictionary"></el-table-column>
|
||||||
<el-table-column label="映射字典" prop="dictionaryTable"></el-table-column>
|
<el-table-column label="映射字典" prop="dictionaryTable"></el-table-column>
|
||||||
|
@ -98,6 +98,7 @@ export default {
|
||||||
//这里存放数据"
|
//这里存放数据"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
tableMapping:[],
|
||||||
data:[],
|
data:[],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'tableNames',
|
children: 'tableNames',
|
||||||
|
@ -123,20 +124,33 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleNodeClick(data){
|
handleNodeClick(data){
|
||||||
sessionStorage.setItem("key",data.name)
|
// console.log(data)
|
||||||
console.log(data)
|
|
||||||
this.tableBasic=data
|
this.tableBasic=data
|
||||||
this.dataNum=data.tableFie.length
|
this.dataNum=data.tableFie.length
|
||||||
this.tableStructure=data.tableFie
|
this.tableStructure=data.tableFie
|
||||||
|
// console.log(this.tableStructure)
|
||||||
|
findTableValue(data.dataId,data.name).then(res=>{
|
||||||
|
let tableMapping=res.data
|
||||||
|
// console.log(res.data)
|
||||||
|
|
||||||
|
for (const index in tableMapping) {
|
||||||
|
for (const i in this.tableStructure) {
|
||||||
|
if (tableMapping[index].key === this.tableStructure[i].field) {
|
||||||
|
|
||||||
|
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){
|
||||||
|
|
||||||
|
alert("dawdwadad")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var id = 0;
|
|
||||||
data.tableFie.forEach(res => {
|
|
||||||
id=res.tableId
|
|
||||||
})
|
|
||||||
console.log(id)
|
|
||||||
findTableValue(id,data.name).then(res=>{
|
|
||||||
// console.log(res)
|
|
||||||
this.javaType=res.data
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue