|
|
|
@ -1,30 +1,33 @@ |
|
|
|
<template> |
|
|
|
<div class="box"> |
|
|
|
<div> |
|
|
|
<el-card> |
|
|
|
<div style="display: flex"> |
|
|
|
<!-- 单位树组件 --> |
|
|
|
<div style="width: 15%; border: 1px solid"> |
|
|
|
<CustomerOrgTree /> |
|
|
|
</div> |
|
|
|
<div style="width: 85%"> |
|
|
|
<!-- 单位详情 录入与编辑 --> |
|
|
|
<CustomerOrgEdit /> |
|
|
|
<!-- 体检次数 联系人 --> |
|
|
|
<el-tabs style="margin-left: 10px" v-model="tabChoosed"> |
|
|
|
<!-- 体检次数 --> |
|
|
|
<el-tab-pane label="体检次数" name="1"> |
|
|
|
<CustomerOrgRegister /> |
|
|
|
</el-tab-pane> |
|
|
|
<!-- 联系人 --> |
|
|
|
<el-tab-pane label="联系人" name="2"> |
|
|
|
<ContactPerson /> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-card style="display: block; "> |
|
|
|
<!-- 标题高度 60px |
|
|
|
<div slot="header"> |
|
|
|
<span>体检单位设置</span> |
|
|
|
</div> |
|
|
|
--> |
|
|
|
<div style="display: flex"> |
|
|
|
<!-- 单位树组件 --> |
|
|
|
<div :style="CustomerOrgTreeStyle"> |
|
|
|
<CustomerOrgTree /> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
<div :style="CustomerOrgRightStyle"> |
|
|
|
<!-- 单位详情 录入与编辑 --> |
|
|
|
<CustomerOrgEdit /> |
|
|
|
<!-- 体检次数 联系人 --> |
|
|
|
<el-tabs style="margin-left: 10px" v-model="tabChoosed"> |
|
|
|
<!-- 体检次数 --> |
|
|
|
<el-tab-pane label="体检次数" name="1"> |
|
|
|
<CustomerOrgRegister /> |
|
|
|
</el-tab-pane> |
|
|
|
<!-- 联系人 --> |
|
|
|
<el-tab-pane label="联系人" name="2"> |
|
|
|
<ContactPerson /> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
@ -43,30 +46,66 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
tabChoosed: "1", |
|
|
|
CustomerOrgTreeStyle: "overflow: scroll;border: 1px solid;width:200px; height:600px;", |
|
|
|
CustomerOrgRightStyle: "width:200px; height:600px;", |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
created() {}, |
|
|
|
created() { }, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() {}, |
|
|
|
mounted() { |
|
|
|
this.resize(); |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
...mapState(["customerOrg"]), |
|
|
|
...mapState(["customerOrg", "window"]), |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
resize() { |
|
|
|
let headerHeight = Number(150); |
|
|
|
let orgDetailHeight = Number(200); |
|
|
|
let editHeight = Number(200); |
|
|
|
this.CustomerOrgTreeStyle = "overflow: scroll;border: 1px solid;width:200px; height:" + (this.window.pageHeight - headerHeight) + "px;"; |
|
|
|
this.CustomerOrgRightStyle = "width:" + (this.window.pageWidth - 200 - 60) + "px; height:" + (this.window.pageHeight - headerHeight) + "px;"; |
|
|
|
|
|
|
|
this.customerOrg.orgEditStyle = 'display: flex;'; |
|
|
|
this.customerOrg.orgDetailStyle = 'display: flex;'; |
|
|
|
if (this.window.pageHeight < 600) { |
|
|
|
this.customerOrg.orgDetailHeight = orgDetailHeight; |
|
|
|
this.CustomerOrgTreeStyle = "overflow: scroll;border: 1px solid;width:200px; height:" + (orgDetailHeight*2 + Number(50)) + "px;"; |
|
|
|
this.customerOrg.orgEditStyle += "overflow-y: scroll;height:" + orgDetailHeight + "px;"; |
|
|
|
this.customerOrg.orgDetailStyle += "overflow-y: scroll;height:" + orgDetailHeight + "px;"; |
|
|
|
} else { |
|
|
|
this.customerOrg.orgDetailHeight = orgDetailHeight + Math.floor((this.window.pageHeight - 600) * 1 / 3); |
|
|
|
editHeight = this.window.pageHeight - headerHeight - this.customerOrg.orgDetailHeight - 50; |
|
|
|
if (editHeight > 400) { |
|
|
|
this.customerOrg.orgEditStyle += "height:" + editHeight + "px;"; |
|
|
|
this.customerOrg.orgDetailStyle += "height:" + this.customerOrg.orgDetailHeight + "px;"; |
|
|
|
} else { |
|
|
|
this.customerOrg.orgEditStyle += "overflow-y: scroll;height:" + editHeight + "px;"; |
|
|
|
this.customerOrg.orgDetailStyle += "overflow-y: scroll;height:" + this.customerOrg.orgDetailHeight + "px;"; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
methods: {}, |
|
|
|
|
|
|
|
|
|
|
|
//监听事件 |
|
|
|
// watch:{ |
|
|
|
// 'customerOrg.customerOrgId'(newVal, oldVal){ |
|
|
|
// if(newVal != oldVal && newVal != ""){ |
|
|
|
// alert(newVal) |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
watch: { |
|
|
|
"window.pageHeight"(newVal, oldVal) { |
|
|
|
if (newVal != oldVal) { |
|
|
|
this.resize(); |
|
|
|
} |
|
|
|
}, |
|
|
|
"window.pageWidth"(newVal, oldVal) { |
|
|
|
if (newVal != oldVal) { |
|
|
|
this.resize(); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
.box { |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style scoped></style> |