资产结构测试1
parent
a9dd6cb370
commit
f9b086e019
|
@ -51,3 +51,12 @@ export function delInfo(id) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//获取
|
||||
export function getTableInfo(){
|
||||
return request({
|
||||
url: 'etl/info/dataConstruct',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,149 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-container>
|
||||
<el-aside width="200px">
|
||||
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
||||
</el-aside>
|
||||
|
||||
<el-main>
|
||||
<h1>整体数据资产结构概述</h1>
|
||||
<el-button @click="getTable">
|
||||
测试
|
||||
</el-button>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {getTableInfo} from "@/api/etl/etl";
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
name:'construction',
|
||||
data() {
|
||||
//这里存放数据"
|
||||
|
||||
return {
|
||||
data: [{
|
||||
label: '一级1',
|
||||
children: [{
|
||||
label: '二级 1-1',
|
||||
children: [{
|
||||
label: '三级 1-1-1'
|
||||
}]
|
||||
}]
|
||||
},
|
||||
{
|
||||
label: '一级 2',
|
||||
children: [{
|
||||
label: '二级 2-1',
|
||||
children: [{
|
||||
label: '三级 2-1-1'
|
||||
}]
|
||||
},
|
||||
{
|
||||
label: '二级 2-2',
|
||||
children: [{
|
||||
label: '三级 2-2-1'
|
||||
}]
|
||||
}]
|
||||
},
|
||||
{
|
||||
label: '一级 3',
|
||||
children: [{
|
||||
label: '二级 3-1',
|
||||
children: [{
|
||||
label: '三级 3-1-1'
|
||||
}]
|
||||
},
|
||||
{
|
||||
label: '二级 3-2',
|
||||
children: [{
|
||||
label: '三级 3-2-1'
|
||||
}]
|
||||
}]
|
||||
}],
|
||||
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
//计算属性 类似于data概念",
|
||||
computed: {
|
||||
data() {
|
||||
return data
|
||||
}
|
||||
},
|
||||
//监控data中的数据变化",
|
||||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
|
||||
getTable(){
|
||||
getTableInfo().then(response=>{
|
||||
console.log(response)
|
||||
})
|
||||
}
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
},
|
||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
},
|
||||
beforeCreate() {
|
||||
}, //生命周期 - 创建之前",
|
||||
beforeMount() {
|
||||
}, //生命周期 - 挂载之前",
|
||||
beforeUpdate() {
|
||||
}, //生命周期 - 更新之前",
|
||||
updated() {
|
||||
}, //生命周期 - 更新之后",
|
||||
beforeDestroy() {
|
||||
}, //生命周期 - 销毁之前",
|
||||
destroyed() {
|
||||
}, //生命周期 - 销毁完成",
|
||||
activated() {
|
||||
} //如果页面有keep-alive缓存功能,这个函数会触发",
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
.el-aside{
|
||||
background-color: #ccb1ea;
|
||||
color: #f4516c;
|
||||
text-align: center;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
.el-main{
|
||||
background-color: #ccb1ea;
|
||||
color: #f4516c;
|
||||
text-align: center;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
body > .el-container {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.el-container:nth-child(5).el-aside,
|
||||
.el-container:nth-child(6).el-aside{
|
||||
line-height: 260px;
|
||||
}
|
||||
|
||||
.el-container:nth-child(7).el-aside{
|
||||
line-height: 320px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
|
@ -108,7 +108,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
importTable({tables: tableNames}).then(res => {
|
||||
this.$modal.msgSuccess(res.data.msg);
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
this.visible = false;
|
||||
this.$emit("ok");
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue