Commit 09692fb1 by 匡雅琴

11

1 parent fd516f40
......@@ -5,9 +5,9 @@
<!-- <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> -->
</div>
<div class="table_widget">
<div class="search_widget">
<div class="left_wrap">
<div v-if="accountLevel != 4" class="top_select">
<div>
<!-- <div class="left_wrap"> -->
<!-- <div v-if="accountLevel != 4" class="top_select">
<span class="select_label">商户名称</span>
<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>
......@@ -27,7 +27,13 @@
<div class="btn_wrapper">
<el-button size="small" @click="reSetFindData">重置</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>
<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">
......@@ -49,24 +55,65 @@ export default {
data() {
return {
searchForm: {
delFlag: 2,
delFlag: '',
roleName: '',
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',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
......@@ -157,10 +204,16 @@ export default {
getMerchantName() {
this.$apis.role.merchantDataList({ source: 'glsx' }).then(res => {
this.merchantList = res || []
this.merchantList.unshift({
merchantName: '全部',
id: 0
// this.merchantList.unshift({
// merchantName: '全部',
// id: 0
// })
let idx = this.searchFormData.findIndex(item => item.name == 'merchantId')
res.unshift({
id: '',
merchantName: '全部'
})
this.materialFormData[idx].optionList = res
// this.filterList()
})
},
......@@ -179,7 +232,7 @@ export default {
reSetFindData() {
this.distoryTable = false
this.searchForm = {
delFlag: 2,
delFlag: '',
roleName: '',
merchantId: ''
}
......@@ -230,6 +283,8 @@ export default {
if (accountLevel != 4) {
this.tableParams.tableColumns.splice(2, 0, { label: '所属商户名', prop: 'merchantName' })
this.getMerchantName()
let idx = this.searchFormData.findIndex(item => item.name == 'merchantId')
this.searchFormData[idx].isDisabled = true
}
this.accountLevel = accountLevel
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!