几个左边树右边列表布局的界面美化

This commit is contained in:
xielue 2023-06-05 11:22:15 +08:00
parent 65662498d1
commit 3b055c6ff1
6 changed files with 83 additions and 186 deletions

View File

@ -498,12 +498,12 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.page-body { .page-body {
padding: 30px; padding: 15px;
background: @base-bg-color; background: @base-bg-color;
} }
.gridPanel { .gridPanel {
height: calc(100vh - 400px); height: calc(100vh - 300px);
} }
</style> </style>

View File

@ -71,3 +71,56 @@
.vxe-table--render-default .vxe-footer--column:not(.col--ellipsis) { .vxe-table--render-default .vxe-footer--column:not(.col--ellipsis) {
padding: 6px 0; padding: 6px 0;
} }
.split_wrapper {
display: flex;
}
.split_wrapper .left {
width: 200px;
border:1px solid #dcdcdc;
}
.split_wrapper .right {
flex-grow: 1;
height: 100%;
width: calc(100% - 300px);
border:1px solid #dcdcdc;
border-left: none;
}
.treepanel {
width: calc(100%);
background: white;
}
.treepanel-content {
padding: 7px;
}
.treepanel-header {
width: 100%;
border-bottom: 1px solid #ccc;
height: 48px;
line-height: 48px;
margin: 0;
background-color: #FAFAFA;
box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
font-size: 14px;
color: #606266;
}
.treepanel-header .link{
color: #333;
}
.treepanel-header svg {
width: 17px;
height: 17px;
}
.treepanel-header .anticon {
margin-left: 8px;
cursor: pointer;
}

View File

@ -1,10 +1,7 @@
<template> <template>
<div class="page-body"> <div class="page-body">
<div class="split_wrapper">
<div class="left">
<a-row type="flex">
<a-col flex="200px">
<div class="treepanel" :style="'height:' + tableHeight + 'px'"> <div class="treepanel" :style="'height:' + tableHeight + 'px'">
<div class="treepanel-header"> <div class="treepanel-header">
<a @click.stop="treeAdd(row)" title="新增"> <a @click.stop="treeAdd(row)" title="新增">
@ -24,8 +21,8 @@
</a-tree> </a-tree>
</div> </div>
</div> </div>
</a-col> </div>
<a-col flex="auto"> <div class="right" style="padding:10px">
<div class="toolbarbtns"> <div class="toolbarbtns">
<a-button type="primary" @click="pageAdd">新增</a-button> <a-button type="primary" @click="pageAdd">新增</a-button>
<a-button type="primary" @click="ok">保存</a-button> <a-button type="primary" @click="ok">保存</a-button>
@ -53,8 +50,8 @@
</vxe-table> </vxe-table>
</a-col> </div>
</a-row> </div>
@ -118,7 +115,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.tableHeight = this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xTable.$el) - 200; this.tableHeight = this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xTable.$el) - 40;
this.treeInit(); this.treeInit();
}); });
@ -450,34 +447,6 @@ export default {
padding: 8px; padding: 8px;
} }
.treepanel {
width: calc(100% - 10px);
margin-right: 10px;
border: 1px solid #ccc;
}
.treepanel-content {
padding: 7px;
}
.treepanel-header {
width: 100%;
background: #F8F8F9;
border-bottom: 1px solid #ccc;
height: 32px;
line-height: 32px;
margin: 0;
font-size: 14px;
color: #606266;
}
.treepanel-header .anticon {
margin-left: 5px;
cursor: pointer;
}
.toolbarbtns .ant-btn { .toolbarbtns .ant-btn {
margin-right: 10px; margin-right: 10px;
} }

View File

@ -2,17 +2,17 @@
<div class="page-body"> <div class="page-body">
<div class="wrapper"> <div class="split_wrapper">
<div class="left"> <div class="left">
<div class="treepanel" :style="'height:' + tableHeight + 'px'"> <div class="treepanel" :style="'height:' + tableHeight + 'px'">
<div class="treepanel-header"> <div class="treepanel-header">
<a @click.stop="treeAdd(row)" title="新增"> <a style="margin-left: 10px;" class="link" @click.stop="treeAdd(row)" title="新增">
<a-icon type="plus-circle" /> <a-icon type="plus-circle" />
</a> </a>
<a @click.stop="treeEdit(row)" title="编辑"> <a class="link" @click.stop="treeEdit(row)" title="编辑">
<a-icon type="edit" /> <a-icon type="edit" />
</a> </a>
<a @click.stop="treeDelete(row)" title="删除"> <a class="link" @click.stop="treeDelete(row)" title="删除">
<a-icon type="delete" /> <a-icon type="delete" />
</a> </a>
</div> </div>
@ -511,48 +511,6 @@ export default {
padding: 8px; padding: 8px;
} }
/* 左侧固定宽度 200px右侧自适应 */
.wrapper {
display: flex;
}
.left {
width: 200px;
height: 100%;
}
.right {
flex-grow: 1;
height: 100%;
width: calc(100% - 300px);
}
.treepanel {
width: calc(100% - 10px);
background: white;
margin-right: 10px;
border: 1px solid #ccc;
}
.treepanel-content {
padding: 7px;
}
.treepanel-header {
width: 100%;
background: #F8F8F9;
border-bottom: 1px solid #ccc;
height: 32px;
line-height: 32px;
margin: 0;
font-size: 14px;
color: #606266;
}
.treepanel-header .anticon {
margin-left: 5px;
cursor: pointer;
}
.toolbarbtns .ant-btn { .toolbarbtns .ant-btn {
margin-right: 10px; margin-right: 10px;

View File

@ -1,9 +1,10 @@
<template> <template>
<div class="wrapper"> <div class="page-body">
<div class="split_wrapper">
<div class="left"> <div class="left">
<div class="treepanel" :style="'height:' + tableHeight + 'px'"> <div class="treepanel">
<div class="treepanel-header"> <div class="treepanel-header">
<a @click.stop="treeAdd(row)" title="新增"> <a @click.stop="treeAdd(row)" title="新增">
<a-icon type="plus-circle" /> <a-icon type="plus-circle" />
@ -30,6 +31,7 @@
</div> </div>
</div> </div>
</div>
</template> </template>
@ -88,7 +90,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.tableHeight = this.$mk.getWindowSize().height - 320; this.tableHeight = this.$mk.getWindowSize().height - 260;
this.treeInit(); this.treeInit();
}); });
@ -211,11 +213,11 @@ export default {
], ],
// //
searchFormItems: [ // searchFormItems: [ //
{ field: 'name', title: '工序名称', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入工序名称' } } }, { field: 'name', title: '工序名称', span: 4, itemRender: { name: '$input', props: { placeholder: '请输入工序名称' } } },
{ field: 'code', title: '编码', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } }, { field: 'code', title: '编码', span: 4, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
{ span: 8, slots: { default: 'date' } }, // { span: 6, slots: { default: 'date' } }, //
{ {
align: 'right', span: 4, itemRender: { // align: 'left', span: 4, itemRender: { //
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, //
{ props: { type: 'reset', content: '重置' } }] { props: { type: 'reset', content: '重置' } }]
} }
@ -567,49 +569,6 @@ export default {
padding: 8px; padding: 8px;
} }
/* 左侧固定宽度 200px右侧自适应 */
.wrapper {
display: flex;
}
.left {
width: 200px;
height: 100%;
}
.right {
flex-grow: 1;
height: 100%;
width: calc(100% - 300px);
}
.treepanel {
width: calc(100% - 10px);
background: white;
margin-right: 10px;
border: 1px solid #ccc;
}
.treepanel-content {
padding: 7px;
}
.treepanel-header {
width: 100%;
background: #F8F8F9;
border-bottom: 1px solid #ccc;
height: 32px;
line-height: 32px;
margin: 0;
font-size: 14px;
color: #606266;
}
.treepanel-header .anticon {
margin-left: 5px;
cursor: pointer;
}
.toolbarbtns .ant-btn { .toolbarbtns .ant-btn {
margin-right: 10px; margin-right: 10px;
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="page-body">
<div class="wrapper"> <div class="split_wrapper">
<div class="left"> <div class="left">
<div class="treepanel" :style="'height:' + tableHeight + 'px'"> <div class="treepanel" :style="'height:' + tableHeight + 'px'">
<div class="treepanel-header"> <div class="treepanel-header">
@ -30,7 +30,7 @@
</div> </div>
</div> </div>
</div>
</template> </template>
@ -520,48 +520,6 @@ export default {
padding: 8px; padding: 8px;
} }
/* 左侧固定宽度 200px右侧自适应 */
.wrapper {
display: flex;
}
.left {
width: 200px;
height: 100%;
}
.right {
flex-grow: 1;
height: 100%;
width: calc(100% - 300px);
}
.treepanel {
width: calc(100% - 10px);
background: white;
margin-right: 10px;
border: 1px solid #ccc;
}
.treepanel-content {
padding: 7px;
}
.treepanel-header {
width: 100%;
background: #F8F8F9;
border-bottom: 1px solid #ccc;
height: 32px;
line-height: 32px;
margin: 0;
font-size: 14px;
color: #606266;
}
.treepanel-header .anticon {
margin-left: 5px;
cursor: pointer;
}
.toolbarbtns .ant-btn { .toolbarbtns .ant-btn {
margin-right: 10px; margin-right: 10px;