提交 2c7bd91f 编写于 作者: zhentian.jia's avatar zhentian.jia

更新新建项目中tree和label双向绑定 多层tabs的数据关联

上级 32c9046b
此差异已折叠。
......@@ -2,9 +2,7 @@
<div class="main-container">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<el-main>
<el-header
style="text-align: left; font-size: 12px; background-color:#fff; border-bottom: 1px solid #fff;"
>
<el-header class="header">
<h3 class="title">项目管理</h3>
</el-header>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
......@@ -43,7 +41,11 @@
<el-button class="add-button" type="primary" @click="toPage()">新建项目</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableData" :header-cell-style="{background:'#FAFAFA',color:'#000'}">
<el-table
v-loading="loading"
:data="tableData"
:header-cell-style="{background:'#FAFAFA',color:'#000'}"
>
<el-table-column prop="id" label="ID编号" width="140"></el-table-column>
<el-table-column prop="projectName" label="项目名称" width="120"></el-table-column>
<el-table-column prop="createName" label="创建人"></el-table-column>
......@@ -138,7 +140,7 @@ export default {
create() {},
methods: {
toPage() {
this.$router.push('add-manager');
this.$router.push("add-manager");
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
......@@ -168,36 +170,33 @@ export default {
}
};
</script>
<style>
.label-row {
padding-top: 10px;
}
<style lang="scss">
.main-container {
width: 100%;
}
.title {
color: #409eff;
}
.el-header {
background-color: #b3c0d1;
color: #333;
line-height: 60px;
}
.table-option span {
color: #409eff;
}
.add-button {
float: right;
}
/* .el-table tr>.el-table_1_column_2 .cell {
color: #409eff
} */
.el-table .cell {
color: #929292;
}
.el-table th > .cell {
font-weight: bold;
color: #000;
.el-header {
margin-top: 20px;
color: #333;
line-height: 60px;
text-align: left;
font-size: 12px;
background-color: #fff;
border-bottom: 1px solid #fff;
.title {
color: #409eff;
}
}
.table-option span {
color: #409eff;
}
.add-button {
float: right;
}
.el-table .cell {
color: #929292;
}
.el-table th > .cell {
font-weight: bold;
color: #000;
}
}
</style>
\ No newline at end of file
let tableOrganization = [{
name: "上海市第一人民医院",
grade: "一甲医院",
province: "上海市",
city: "上海市",
district: "浦东新区",
street: "张江街道"
}, {
name: "上海市第二人民医院",
grade: "二甲医院",
province: "上海市",
city: "上海市",
district: "浦东新区",
street: "张江街道"
}, {
name: "上海市第三人民医院",
grade: "三甲医院",
province: "上海市",
city: "上海市",
district: "浦东新区",
street: "张江街道"
}];
let tablePerson = [{
name: "云小鹊",
hospital: "上海市第一人民医院",
department: "全科",
province: "上海市",
city: "上海市",
district: "浦东新区"
}, {
name: "云小鹊",
hospital: "上海市第二人民医院",
department: "全科",
province: "上海市",
city: "上海市",
district: "长宁区"
}, {
name: "云小鹊",
hospital: "上海市第三人民医院",
department: "全科",
province: "上海市",
city: "上海市",
district: "南汇区"
}];
let treeData = [
{
id: 11,
label: "一级 1",
children: [
{
id: 1,
label: "一级 1",
children: [
{
id: 4,
label: "二级 1-1",
children: [
{
id: 9,
label: "三级 1-1-1"
},
{
id: 10,
label: "三级 1-1-2"
}
]
}
]
},
{
id: 2,
label: "一级 2",
children: [
{
id: 5,
label: "二级 2-1"
},
{
id: 6,
label: "二级 2-2"
}
]
},
{
id: 3,
label: "一级 3",
children: [
{
id: 7,
label: "二级 3-1"
},
{
id: 8,
label: "二级 3-2"
}
]
}
]
}
];
export function returnData() {
let data = {};
data.tableOrganization = tableOrganization;
data.tablePerson = tablePerson;
data.treeData = treeData;
return data;
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册