Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 09692fb1
authored
Apr 06, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
11
1 parent
fd516f40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
16 deletions
src/views/role/index.vue
src/views/role/index.vue
View file @
09692fb
...
...
@@ -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
:
''
},
option
Data
:
[
searchForm
Data
:
[
{
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
},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment