Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
admin-base
Commits
1e863357
Commit
1e863357
authored
Dec 10, 2018
by
chenfenglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据角色筛选帐户
parent
db69b5ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
admin.vue
src/components/system/admin.vue
+21
-6
No files found.
src/components/system/admin.vue
View file @
1e863357
...
...
@@ -18,7 +18,7 @@
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"角色"
>
<el-select
v-model=
"searchFrom.role_
id
"
placeholder=
"请选择用户等级"
@
change=
"getList"
>
<el-select
v-model=
"searchFrom.role_
name
"
placeholder=
"请选择用户等级"
@
change=
"getList"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"超级管理员"
value=
"超级管理员"
></el-option>
<el-option
label=
"管理员"
value=
"管理员"
></el-option>
...
...
@@ -207,7 +207,7 @@
searchFrom
:{
user_name
:
''
,
status
:
''
,
role_
id
:
""
role_
name
:
""
},
dialog
:{
dialogType
:
0
,
...
...
@@ -277,11 +277,26 @@
if
(
this
.
searchFrom
.
status
!==
''
){
json
.
status
=
this
.
searchFrom
.
status
}
if
(
this
.
searchFrom
.
role_id
!==
''
){
json
.
role_id
=
this
.
searchFrom
.
role_id
}
// console.log(json) //管理员筛选查看
// if (this.searchFrom.role_id !== ''){
// json.role_id = this.searchFrom.role_id
// }
getAdminListApi
(
json
).
then
(
res
=>
{
if
(
this
.
searchFrom
.
role_name
!==
''
){
switch
(
this
.
searchFrom
.
role_name
){
case
'超级管理员'
:
res
.
list
=
res
.
list
.
filter
(
function
(
item
,
i
){
return
item
.
role_name
==
"超级管理员"
})
break
;
case
'管理员'
:
res
.
list
=
res
.
list
.
filter
(
function
(
item
,
i
){
return
item
.
role_name
==
"管理员"
})
break
;
default
:
break
;
}
}
this
.
adminList
=
res
.
list
;
this
.
total
=
Number
(
res
.
total
)
this
.
$store
.
commit
(
'mainCanShow'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment