Commit 09692fb1 by 匡雅琴

11

1 parent fd516f40
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<!-- <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> --> <!-- <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> -->
</div> </div>
<div class="table_widget"> <div class="table_widget">
<div class="search_widget"> <div>
<div class="left_wrap"> <!-- <div class="left_wrap"> -->
<div v-if="accountLevel != 4" class="top_select"> <!-- <div v-if="accountLevel != 4" class="top_select">
<span class="select_label">商户名称</span> <span class="select_label">商户名称</span>
<el-select size="small" clearable filterable v-model="searchForm.merchantId" placeholder="请选择"> <el-select size="small" clearable filterable v-model="searchForm.merchantId" placeholder="请选择">
<el-option v-for="item in merchantList" :key="item.id" :label="item.merchantName" :value="item.id"></el-option> <el-option v-for="item in merchantList" :key="item.id" :label="item.merchantName" :value="item.id"></el-option>
...@@ -27,7 +27,13 @@ ...@@ -27,7 +27,13 @@
<div class="btn_wrapper"> <div class="btn_wrapper">
<el-button size="small" @click="reSetFindData">重置</el-button> <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> -->
<GLCombiForm ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" :inline="true" @handleOk="toFindData" @handleRest="reSetFindData">
<!-- <span slot="footer" slot-scope="scope">
<el-button size="small" @click="reSetFindData">重置</el-button>
<el-button type="primary" size="small" @click="toFindData">查询</el-button>
</span> -->
</GLCombiForm>
</div> </div>
<GLTable v-if="distoryTable" 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"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
...@@ -49,24 +55,65 @@ export default { ...@@ -49,24 +55,65 @@ export default {
data() { data() {
return { return {
searchForm: { searchForm: {
delFlag: 2, delFlag: '',
roleName: '', roleName: '',
merchantId: '' merchantId: ''
}, },
optionData: [ searchFormData: [
{ {
value: 2, label: '商户名称',
label: '全部' name: 'merchantId',
type: 'select',
placeholder: '全部',
optionList: [],
optionId: 'id',
optionLabel: 'merchantName',
optionsName: 'merchantName',
isDisabled: false
}, },
{ {
value: 1, label: '状态',
label: '草稿' name: 'delFlag',
type: 'select',
placeholder: '全部',
optionList: [
{
optionId: '',
optionLabel: '全部'
},
{
optionId: 0,
optionLabel: '启用'
},
{
optionId: 1,
optionLabel: '草稿'
}
],
optionId: 'optionId',
optionLabel: 'optionLabel',
optionsName: 'optionLabel'
}, },
{ {
value: 0, label: '角色名称',
label: '启用' name: 'roleName',
type: 'input'
} }
], ],
// optionData: [
// {
// value: 2,
// label: '全部'
// },
// {
// value: 1,
// label: '草稿'
// },
// {
// value: 0,
// label: '启用'
// }
// ],
//表格配置 //表格配置
layout: 'sizes, prev, pager, next, jumper, ->, total', layout: 'sizes, prev, pager, next, jumper, ->, total',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
...@@ -157,10 +204,16 @@ export default { ...@@ -157,10 +204,16 @@ export default {
getMerchantName() { getMerchantName() {
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
// })
let idx = this.searchFormData.findIndex(item => item.name == 'merchantId')
res.unshift({
id: '',
merchantName: '全部'
}) })
this.materialFormData[idx].optionList = res
// this.filterList() // this.filterList()
}) })
}, },
...@@ -179,7 +232,7 @@ export default { ...@@ -179,7 +232,7 @@ export default {
reSetFindData() { reSetFindData() {
this.distoryTable = false this.distoryTable = false
this.searchForm = { this.searchForm = {
delFlag: 2, delFlag: '',
roleName: '', roleName: '',
merchantId: '' merchantId: ''
} }
...@@ -230,6 +283,8 @@ export default { ...@@ -230,6 +283,8 @@ export default {
if (accountLevel != 4) { if (accountLevel != 4) {
this.tableParams.tableColumns.splice(2, 0, { label: '所属商户名', prop: 'merchantName' }) this.tableParams.tableColumns.splice(2, 0, { label: '所属商户名', prop: 'merchantName' })
this.getMerchantName() this.getMerchantName()
let idx = this.searchFormData.findIndex(item => item.name == 'merchantId')
this.searchFormData[idx].isDisabled = true
} }
this.accountLevel = accountLevel this.accountLevel = accountLevel
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!