Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mingPayPc
Overview
Overview
Details
Activity
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
fengzhaoyu
mingPayPc
Commits
294a511a
Commit
294a511a
authored
Dec 06, 2019
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限修改“
git commit -m 权限修改“
parent
0f218f77
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
axios.js
src/api/axios.js
+7
-1
addOrRights.vue
src/components/pages/rightsManagement/addOrRights.vue
+4
-2
rightsManagement.vue
src/components/pages/rightsManagement/rightsManagement.vue
+3
-3
No files found.
src/api/axios.js
View file @
294a511a
...
...
@@ -28,10 +28,16 @@ axios.interceptors.request.use((config) => {
// 配置请求返回的拦截器,
axios
.
interceptors
.
response
.
use
(
res
=>
{
// if (res.data.resultCode === 0) {
return
Promise
.
resolve
(
res
)
//
return Promise.resolve(res)
// } else {
// return Promise.reject()
// }
if
(
res
.
code
===
0
||
res
.
data
.
resultCode
===
0
)
{
return
Promise
.
resolve
(
res
)
}
else
if
(
res
.
data
.
resultCode
===
4003
)
{
message
.
error
(
'权限不足'
)
return
Promise
.
reject
()
}
},
err
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
err
)
...
...
src/components/pages/rightsManagement/addOrRights.vue
View file @
294a511a
...
...
@@ -7,7 +7,7 @@
<a-input
placeholder=
"请填写角色名称"
v-decorator=
"['roleName',
{
rules: [{required: true, message: '角色名称不能为空'}],
rules: [{required: true, message: '角色名称不能为空'}
, {max: 10, message: '角色名称不能超过10个字符'}
],
initialValue: roleName,
}]"
/>
...
...
@@ -16,7 +16,7 @@
<a-input
placeholder=
"请填写角色的描述"
v-decorator=
"['roleDesc',
{
rules: [{required: false, message: '角色描述不能为空'}],
rules: [{required: false, message: '角色描述不能为空'}
, {max: 50, message: '角色描述不能超过50个字符'}
],
initialValue: roleDesc,
}]"
/>
...
...
@@ -144,6 +144,8 @@ export default {
$http
.
post
(
`/admin/manager/addFullRole`
,
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
$router
.
push
({
name
:
'rightsManagement'
})
}
else
{
this
.
$message
.
error
(
res
.
data
.
msg
)
}
...
...
src/components/pages/rightsManagement/rightsManagement.vue
View file @
294a511a
...
...
@@ -163,9 +163,9 @@ export default {
})
this
.
roleList
.
push
({
key
:
item
.
roleId
,
roleName
:
item
.
roleName
||
'---'
,
userHasRoles
:
userHasRoles
||
'---'
,
roleDesc
:
item
.
roleDesc
||
'---'
,
roleName
:
item
.
roleName
,
userHasRoles
:
userHasRoles
,
roleDesc
:
item
.
roleDesc
,
creatTime
:
item
.
createTime
.
replace
(
'T'
,
' '
),
action
:
{
ddUserId
:
ddUserId
,
name
:
userHasRoles
}
})
...
...
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