<template>
|
<div class="archive">
|
<div class="top_header">
|
<div class="top_left">
|
<label>{{ $t('synthesis.synthesis') }}</label>
|
<span>/</span>
|
<label>{{ $t('synthesis.archive') }}</label>
|
</div>
|
<div class="top_right">
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
<el-form-item>
|
<el-input
|
v-model="formInline.user"
|
suffix-icon="el-icon-search"
|
:placeholder="$t('common.pleaseInput')"
|
></el-input>
|
</el-form-item>
|
<el-form-item>
|
<el-button class="primaries">{{ $t('common.iquery') }}</el-button>
|
</el-form-item>
|
<el-form-item>
|
<el-button class="primaries">{{ $t('common.download') }}</el-button>
|
</el-form-item>
|
<el-form-item>
|
<el-button class="primaries">{{ $t('common.iquery') }}</el-button>
|
</el-form-item>
|
</el-form>
|
</div>
|
</div>
|
<div class="bottom_content">
|
<div class="left_bottom">
|
<div class="left_tree">
|
<el-tree
|
:data="tree"
|
:props="defaultProps"
|
:default-expanded-keys="[1]"
|
node-key="id"
|
@node-click="handleNodeClick"
|
></el-tree>
|
</div>
|
</div>
|
<div class="right_bottom"></div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { dataLib_selectTabs, dataLib_selectTabFields } from '../../api/api';
|
|
import MyBread from '../../components/MyBread.vue';
|
export default {
|
components: {
|
MyBread,
|
},
|
data() {
|
return {
|
listdata: {
|
name: null,
|
pageSize: 10,
|
pageIndex: 1,
|
},
|
count: 0,
|
formInline: {},
|
tree: [
|
{
|
tabDesc: '基础数据',
|
label: '基础数据',
|
value: 'BD',
|
children: [],
|
},
|
{
|
tabDesc: '业务数据',
|
label: '业务数据',
|
value: 'BS',
|
children: [],
|
},
|
],
|
defaultProps: {
|
children: 'children',
|
label: 'label',
|
},
|
};
|
},
|
methods: {
|
//树节点点击事件
|
handleNodeClick(data) {
|
if (data.children != null) return;
|
this.listData.name = data.entity; //要查询表格类型;
|
this.filedsLayer = this.getDataLibSelectTabFields(data); //获取每个表字段名称及阈值
|
},
|
async getDataLibSelectTabFields(res) {
|
const data = await dataLib_selectTabFields({
|
ns: res.ns,
|
tab: res.entity,
|
});
|
if (data.code != 200) {
|
this.$message.error('列表调用失败');
|
return;
|
}
|
debugger;
|
},
|
//获取所有表格数据
|
async getDataLibSelectTabs() {
|
const data = await dataLib_selectTabs();
|
if (data.code != 200) {
|
this.$message.error('列表调用失败');
|
return;
|
}
|
var option = data.result;
|
for (var i in option) {
|
var val_Data = option[i];
|
val_Data.id = '1' + i;
|
val_Data.label = val_Data.tabDesc + '(' + val_Data.tab + ')';
|
if (option[i].ns == 'bd') {
|
this.tree[0].children.push(val_Data);
|
} else {
|
this.tree[1].children.push(val_Data);
|
}
|
}
|
},
|
},
|
mounted() {
|
this.getDataLibSelectTabs();
|
},
|
};
|
</script>
|
|
<style lang="less" scoped>
|
.archive {
|
width: 100%;
|
height: 100%;
|
margin: 0;
|
overflow: hidden;
|
background: black;
|
.top_header {
|
width: calc(100% - 60px);
|
height: 70px;
|
background: #353539;
|
display: flex;
|
padding: 0 30px;
|
justify-content: space-between;
|
|
label {
|
font-size: 21px;
|
font-family: Source Han Sans SC;
|
font-weight: 400;
|
color: #009cff;
|
line-height: 70px;
|
}
|
span {
|
color: gray;
|
margin: 0 5px;
|
}
|
/deep/.el-form--inline .el-form-item__content {
|
line-height: 70px;
|
}
|
/deep/.el-form--inline .el-form-item__label {
|
line-height: 70px;
|
}
|
}
|
.bottom_content {
|
width: 100%;
|
height: calc(100% - 70px);
|
display: flex;
|
justify-content: space-between;
|
.left_bottom {
|
width: 224px;
|
height: calc(100% - 64px);
|
background: #303030;
|
padding: 32px 23px;
|
.left_tree {
|
width: 100%;
|
height: 100%;
|
overflow: auto;
|
}
|
}
|
.right_bottom {
|
width: calc(100% - 20px);
|
height: calc(100% - 20px);
|
padding: 10px;
|
}
|
}
|
.primaries {
|
background: linear-gradient(180deg, #002992, #080472);
|
border: 1px solid #000000;
|
box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.21);
|
color: white;
|
}
|
}
|
</style>
|