Commit 17e1f536 by 杨北旺

角色管理界面添加重置按钮/label换行问题

1 parent 423e940c
......@@ -20,12 +20,15 @@
</div>
<div class="top_select">
<span class="select_label">角色名称</span>
<el-input style="width:76%" size="small" v-model="searchForm.roleName" clearable placeholder="请输入"></el-input>
<el-input style="width: 76%" size="small" v-model="searchForm.roleName" clearable placeholder="请输入"></el-input>
</div>
</div>
<el-button type="primary" size="small" @click="toFindData">查询</el-button>
<div class="btn_wrapper">
<el-button size="small" @click="reSetFindData">重置</el-button>
<el-button type="primary" size="small" @click="toFindData">查询</el-button>
</div>
</div>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="getTableData">
<GLTable v-if="distoryTable" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="getTableData">
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="toLookPage(scope.scope)">查看</el-button>
<el-button type="text" @click="toEditPage(scope.scope)">修改</el-button>
......@@ -104,7 +107,8 @@ export default {
merchantList: [],
tableTotal: 0,
accountLevel: 1,
list: []
list: [],
distoryTable: true
}
},
......@@ -112,10 +116,18 @@ export default {
// 获取表格数据
getTableData() {
let { delFlag, roleName, merchantId } = this.searchForm
let para = {}
console.log(merchantId)
let para = {
pageNum: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize
if (!this.distoryTable) {//代表重置
para = {
pageNum: 1,
pageSize: 10
}
} else {
para = {
pageNum: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize
}
}
if (delFlag < 2) {
para.delFlag = delFlag
......@@ -141,8 +153,8 @@ export default {
this.$apis.role.merchantDataList({ source: 'glsx' }).then(res => {
this.merchantList = res || []
this.merchantList.unshift({
merchantName:'全部',
id:0
merchantName: '全部',
id: 0
})
// this.filterList()
})
......@@ -158,6 +170,19 @@ export default {
// this.list = arr
// }
// },
// 重置
reSetFindData() {
this.distoryTable = false
this.searchForm = {
delFlag: 2,
roleName: '',
merchantId: ''
}
this.getTableData()
this.$nextTick(() => {
this.distoryTable = true
})
},
// 查询
toFindData() {
this.getTableData()
......@@ -251,8 +276,13 @@ export default {
font-weight: 400;
color: #333333;
margin-right: 10px;
white-space: nowrap;
}
}
}
.btn_wrapper {
display: flex;
align-items: center;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!