Commit 17e1f536 by 杨北旺

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

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