Commit 294a511a by fengzhaoyu

权限修改“

git commit -m 权限修改“
parent 0f218f77
......@@ -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)
......
......@@ -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)
}
......
......@@ -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 }
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment