Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
loan-manager-customer
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
zhanhai
loan-manager-customer
Commits
8929c586
Commit
8929c586
authored
Jun 16, 2020
by
feifei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限
parent
43f6cf52
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
22 deletions
+55
-22
ByhService.vue
src/components/byh/ByhService.vue
+2
-1
ServiceProblem.vue
src/components/byh/ServiceProblem.vue
+18
-18
Login.vue
src/components/login/Login.vue
+18
-2
cacheManage.js
src/utils/cacheManage.js
+1
-0
permission.js
src/utils/permission.js
+15
-0
version.json
version.json
+1
-1
No files found.
src/components/byh/ByhService.vue
View file @
8929c586
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<el-table-column
prop=
"userStatus"
label=
"状态"
:formatter=
"userStatusFormat"
></el-table-column>
<el-table-column
prop=
"userStatus"
label=
"状态"
:formatter=
"userStatusFormat"
></el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<template
scope=
"scope"
>
<template
scope=
"scope"
>
<el-button
type=
"primary"
size=
"small"
v-if=
"
scope.row.userStatus == 'REAL_NAME'
"
@
click=
"cancellation(scope.row)"
>
注销
</el-button>
<el-button
type=
"primary"
size=
"small"
v-if=
"
$permissionUtils.rolePermission('customBoss') && scope.row.userStatus == 'REAL_NAME'
"
@
click=
"cancellation(scope.row)"
>
注销
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"查看详情"
>
<el-table-column
label=
"查看详情"
>
...
@@ -148,6 +148,7 @@
...
@@ -148,6 +148,7 @@
loanList
(){
loanList
(){
console
.
log
(
"角色"
+
this
.
$permissionUtils
.
rolePermission
(
'admin'
));
/** 加载数据 */
/** 加载数据 */
this
.
$$post
(
'/customer/selectClientInfo'
,
this
.
buildParam
()).
then
(
res
=>
{
this
.
$$post
(
'/customer/selectClientInfo'
,
this
.
buildParam
()).
then
(
res
=>
{
if
(
res
.
data
.
code
!=
200
)
{
if
(
res
.
data
.
code
!=
200
)
{
...
...
src/components/byh/ServiceProblem.vue
View file @
8929c586
src/components/login/Login.vue
View file @
8929c586
...
@@ -97,9 +97,13 @@
...
@@ -97,9 +97,13 @@
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
localStorage
.
setItem
(
'userName'
,
res
.
data
.
result
.
userName
)
localStorage
.
setItem
(
'userName'
,
res
.
data
.
result
.
userName
)
;
localStorage
.
setItem
(
'agentNo'
,
res
.
data
.
result
.
extensionNumber
);
localStorage
.
setItem
(
'agentNo'
,
res
.
data
.
result
.
extensionNumber
);
localStorage
.
setItem
(
'loginName'
,
res
.
data
.
result
.
loginName
)
localStorage
.
setItem
(
'loginName'
,
res
.
data
.
result
.
loginName
);
var
userRolePermission
=
this
.
userRolelistToStringUtils
(
res
.
data
.
result
.
userRole
);
localStorage
.
setItem
(
'userRole'
,
userRolePermission
);
var
btnPermission
=
this
.
listToStringUtils
(
res
.
data
.
result
.
buttonList
);
var
btnPermission
=
this
.
listToStringUtils
(
res
.
data
.
result
.
buttonList
);
localStorage
.
setItem
(
'btnPermission'
,
btnPermission
)
localStorage
.
setItem
(
'btnPermission'
,
btnPermission
)
...
@@ -210,6 +214,18 @@
...
@@ -210,6 +214,18 @@
return
returnStr
;
return
returnStr
;
},
},
userRolelistToStringUtils
(
list
)
{
var
returnStr
=
''
for
(
var
num
in
list
)
{
if
(
num
==
list
.
length
-
1
)
{
returnStr
=
returnStr
+
list
[
num
].
roleCode
}
else
{
returnStr
=
returnStr
+
list
[
num
].
roleCode
+
","
}
}
return
returnStr
;
},
showErrorAlert
(
err
)
{
showErrorAlert
(
err
)
{
this
.
$message
.
error
(
err
.
msg
===
undefined
?
'404'
:
err
.
msg
)
this
.
$message
.
error
(
err
.
msg
===
undefined
?
'404'
:
err
.
msg
)
this
.
ui
.
loginLoading
=
false
this
.
ui
.
loginLoading
=
false
...
...
src/utils/cacheManage.js
View file @
8929c586
...
@@ -11,6 +11,7 @@ const cacheManage = {
...
@@ -11,6 +11,7 @@ const cacheManage = {
localStorage
.
setItem
(
'userName'
,
""
)
localStorage
.
setItem
(
'userName'
,
""
)
localStorage
.
setItem
(
'loginName'
,
""
)
localStorage
.
setItem
(
'loginName'
,
""
)
localStorage
.
setItem
(
'userRole'
,
""
)
localStorage
.
setItem
(
'btnPermission'
,
""
)
localStorage
.
setItem
(
'btnPermission'
,
""
)
localStorage
.
setItem
(
'menuPermission'
,
""
)
localStorage
.
setItem
(
'menuPermission'
,
""
)
localStorage
.
setItem
(
'myRaisCardName'
,
""
)
localStorage
.
setItem
(
'myRaisCardName'
,
""
)
...
...
src/utils/permission.js
View file @
8929c586
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
const
permissionUtils
=
{
const
permissionUtils
=
{
install
:
function
(
Vue
)
{
install
:
function
(
Vue
)
{
Vue
.
prototype
.
$permissionUtils
=
{
Vue
.
prototype
.
$permissionUtils
=
{
btnPermission
(
code
)
{
btnPermission
(
code
)
{
if
(
localStorage
.
getItem
(
'btnPermission'
)
==
null
||
localStorage
.
getItem
(
'btnPermission'
)
==
''
)
{
if
(
localStorage
.
getItem
(
'btnPermission'
)
==
null
||
localStorage
.
getItem
(
'btnPermission'
)
==
''
)
{
return
false
return
false
...
@@ -30,6 +31,20 @@ const permissionUtils = {
...
@@ -30,6 +31,20 @@ const permissionUtils = {
}
}
}
}
return
false
return
false
},
rolePermission
(
code
)
{
if
(
localStorage
.
getItem
(
'userRole'
)
==
null
||
localStorage
.
getItem
(
'userRole'
)
==
''
)
{
return
false
}
var
rolePerList
=
localStorage
.
getItem
(
'userRole'
).
split
(
","
);
for
(
var
num
in
rolePerList
)
{
if
(
code
==
rolePerList
[
num
])
{
return
true
}
}
return
false
}
}
...
...
version.json
View file @
8929c586
{
{
"name"
:
"versiony"
,
"name"
:
"versiony"
,
"version"
:
"5.6.
2
"
"version"
:
"5.6.
4
"
}
}
\ No newline at end of file
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