需修改表单分页,图标样式

This commit is contained in:
shenyanpei
2021-10-14 15:33:44 +08:00
parent 9af1f4320b
commit 33d711071c
2 changed files with 170 additions and 89 deletions
+7 -4
View File
@@ -8,8 +8,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="toggle-btn iconfont" style="margin: 10px 0; display: flex;justify-content: center; font-size: 30px; color: #333333;" @click="handleToggleSideBar"> <div class="toggle-btn el-icon-s-fold" v-if="isCollapse === false" style="margin: 10px 0; display: flex;justify-content: center; font-size: 30px; color: #333333;" @click="handleToggleSideBar">
<div style="font-size: 14px; line-height: 30px;">{{ this.isCollapse ? '' : '' }}</div>&#xe647;</div> <div style="font-size: 14px; line-height: 30px;">{{ this.isCollapse ? '' : '' }}</div><i class=""></i></div>
<div class="toggle-btn el-icon-s-unfold" v-else style="margin: 10px 0; display: flex;justify-content: center; font-size: 30px; color: #333333;" @click="handleToggleSideBar">
<div style="font-size: 14px; line-height: 30px;">{{ this.isCollapse ? '' : '' }}</div></div>
<div class="left-tree"> <div class="left-tree">
<el-menu <el-menu
unique-opened unique-opened
@@ -463,7 +465,7 @@
}, },
computed: { computed: {
logo () { logo () {
return this.isCollapse ? require('assets/images/shangqi/img/logo4.png') : require('assets/images/shangqi/img/logo5.png') return this.isCollapse ? require('assets/images/shangqi/img/logo4.png') : require('assets/images/shangqi/img/logo2.png')
}, },
...mapGetters(['getDynamicTotal', 'isCollapse']) ...mapGetters(['getDynamicTotal', 'isCollapse'])
}, },
@@ -509,7 +511,7 @@
text-align: left; text-align: left;
img { img {
width: 115px; width: 115px;
height: 40px; height: 45px;
} }
} }
} }
@@ -557,6 +559,7 @@
color: #5ea9f6 !important; color: #5ea9f6 !important;
font-weight: bold; font-weight: bold;
} }
.el-menu-item { .el-menu-item {
padding: 0 16px !important; padding: 0 16px !important;
span { span {
@@ -140,9 +140,15 @@
<el-dropdown trigger="click" @command="handleCommand"> <el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i> <i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-btn-permission="'30db3b395deb5004266cd65d302c2776'" v-if="scope.row.disableFlag === '1'" :command="[scope.row, '启用']">启用</el-dropdown-item> <el-dropdown-item v-btn-permission="'30db3b395deb5004266cd65d302c2776'" v-if="scope.row.disableFlag === '1'" :command="[scope.row, '启用']">
<el-dropdown-item v-btn-permission="'30db3b395deb5004266cd65d302c2776'" v-if="scope.row.disableFlag === '0'" :command="[scope.row, '禁用']">禁用</el-dropdown-item> 启用
<el-dropdown-item v-btn-permission="'ce2d2b9bb8004e0d9efcabc42a9f354d'" :command="[scope.row, '配置岗位']">配置岗位</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item v-btn-permission="'30db3b395deb5004266cd65d302c2776'" v-if="scope.row.disableFlag === '0'" :command="[scope.row, '禁用']">
禁用
</el-dropdown-item>
<el-dropdown-item v-btn-permission="'ce2d2b9bb8004e0d9efcabc42a9f354d'" :command="[scope.row, '配置岗位']">
配置岗位
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
@@ -155,12 +161,31 @@
</div> </div>
<loading style="z-index: 2099;" :loading="treeLoading">导入中...</loading> <loading style="z-index: 2099;" :loading="treeLoading">导入中...</loading>
<el-drawer <el-drawer
class="postPage"
title="配置岗位" title="配置岗位"
:visible.sync="modalPost" :visible.sync="modalPost"
:wrapperClosable="false" :wrapperClosable="false"
size="800px" size="800px"
@close="resetFormPost" @close="resetFormPost"
> >
<el-form ref="" :model="sarPost" inline>
<el-form-item class="search-item" style="padding-left: 25px">
<el-input v-model="sarPost.name"
size="small"
placeholder="岗位名称查找"
clearable></el-input>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-primary" type="primary" size="mini" @click="searchPostName"
v-btn-permission="">查询
</el-button>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-default" @click="resetSelect" size="mini"
v-btn-permission="">清空
</el-button>
</el-form-item>
</el-form>
<el-tree <el-tree
ref="tree2" ref="tree2"
node-key="id" node-key="id"
@@ -169,6 +194,7 @@
v-if="modalPost" v-if="modalPost"
:props="props" :props="props"
:data="postList" :data="postList"
:filter-node-method="filterNode"
:default-checked-keys="nodeList" :default-checked-keys="nodeList"
highlight-current highlight-current
check-strictly check-strictly
@@ -176,6 +202,7 @@
:expand-on-click-node="false" :expand-on-click-node="false"
show-checkbox> show-checkbox>
</el-tree> </el-tree>
<pagination :page="page" :pageSize="pageSize" :total="total2" @pageChange="pageChange2" @pageSizeChange="pageSizeChange2"></pagination>
<div id="roleFormButton" class="demo-drawer-footer"> <div id="roleFormButton" class="demo-drawer-footer">
<el-button <el-button
size="mini" size="mini"
@@ -183,7 +210,8 @@
icon="el-icon-check" icon="el-icon-check"
type="primary" type="primary"
@click="PostSubmit" @click="PostSubmit"
>确定</el-button> >确定
</el-button>
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="resetFormPost">取消</el-button> <el-button size="mini" class="common-button-default" icon="el-icon-close" @click="resetFormPost">取消</el-button>
</div> </div>
</el-drawer> </el-drawer>
@@ -208,6 +236,9 @@ export default {
}, },
nodeList: [], nodeList: [],
modalPost: false, modalPost: false,
sarPost: {
name: "", // 岗位名称
},
filterText: '', // 树结构检索条件 filterText: '', // 树结构检索条件
defaultProps: { defaultProps: {
children: 'children', children: 'children',
@@ -216,6 +247,7 @@ export default {
treeData: [], // 树结构数据 treeData: [], // 树结构数据
page: 1, page: 1,
total: 0, total: 0,
total2: 0,
pageSize: this.$store.getters.userInfo.configContent, pageSize: this.$store.getters.userInfo.configContent,
sideClose: false, sideClose: false,
data: [], // table数据 data: [], // table数据
@@ -243,11 +275,20 @@ export default {
}, {}, res => { }, {}, res => {
if (res.ok) { if (res.ok) {
this.$message.success('配置岗位成功') this.$message.success('配置岗位成功')
this.modalPost = false this.modalPost = false
this.getData() this.getData()
} }
}) })
}, },
searchPostName() {
this.page = 1;
this.getTree2();
}, // 查询
resetSelect() {
this.sarPost.name = "";
this.getTree2();
}, // 外层清空条件查询
handleCommand(command) { handleCommand(command) {
switch (command[1]) { switch (command[1]) {
case '启用': case '启用':
@@ -261,11 +302,17 @@ export default {
break break
} }
}, },
getTree2() { getTree2() {
this.$http.get('sarPosition/position', {}, { this.$http.get('sarPosition/position', {
current: this.page,
pageSize: this.pageSize,
...this.sarPost,
}, {
_this: this, _this: this,
}, res => { }, res => {
this.postList = res.data this.postList = res.data.records
this.total2 = res.data.total
}) })
}, },
postsConfigure(row) { postsConfigure(row) {
@@ -355,6 +402,14 @@ export default {
this.pageSize = pageSize this.pageSize = pageSize
this.getData() this.getData()
}, },
pageChange2(page) {
this.page = page
this.getTree2()
},
pageSizeChange2(pageSize) {
this.pageSize = pageSize
this.getTree2()
},
}, },
computed: {}, computed: {},
watch: { watch: {
@@ -372,38 +427,53 @@ export default {
<style lang="less"> <style lang="less">
@import '~@/assets/styles/mixins'; @import '~@/assets/styles/mixins';
#mechanism-manage { #mechanism-manage {
display: flex; display: flex;
height: 100%; height: 100%;
.tree-close { .tree-close {
.tree { .tree {
left: -200px !important; left: -200px !important;
} }
.tree-right { .tree-right {
width: calc(~'100% - 15px') !important; width: calc(~'100% - 15px') !important;
} }
.side-bar-collapse { .side-bar-collapse {
background: #5596CC !important; background: #5596CC !important;
color: #FFF; color: #FFF;
} }
} }
.tree-closed { .tree-closed {
width: 15px !important; width: 15px !important;
} }
.postPage {
.pagination {
position: initial;
}
}
.tree-content { .tree-content {
background: #fff; background: #fff;
width: 300px; width: 300px;
position: relative; position: relative;
.tree { .tree {
width: 95%; width: 95%;
position: absolute; position: absolute;
left: 0; left: 0;
} }
.tree-collapse { .tree-collapse {
position: absolute; position: absolute;
right: 0; right: 0;
} }
} }
.tree-right { .tree-right {
overflow-y: hidden; overflow-y: hidden;
padding: 0; padding: 0;
@@ -412,6 +482,7 @@ export default {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.content { .content {
padding: 0px; padding: 0px;
display: flex; display: flex;
@@ -420,6 +491,7 @@ export default {
flex: auto; flex: auto;
//height: calc(~'100% - 105px - 56px'); //height: calc(~'100% - 105px - 56px');
} }
.pagination { .pagination {
position: static; position: static;
width: 100% !important; width: 100% !important;
@@ -431,23 +503,29 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
#mechanism-manage { #mechanism-manage {
height: 100%; height: 100%;
.content { .content {
height: calc(~'100% - 105px - 56px') height: calc(~'100% - 105px - 56px')
} }
/deep/ .el-select__tags { /deep/ .el-select__tags {
overflow-x: hidden; overflow-x: hidden;
} }
/deep/ .width-all { /deep/ .width-all {
width: 100%; width: 100%;
} }
.filter-tree { .filter-tree {
height: calc(~'100% - 50px') height: calc(~'100% - 50px')
} }
.laws-tree { .laws-tree {
/deep/ .clearable { /deep/ .clearable {
top: 20px; top: 20px;
} }
} }
.add-form-item { .add-form-item {
display: flex; display: flex;
} }