Commit 294a511a by fengzhaoyu

权限修改“

git commit -m 权限修改“
parent 0f218f77
...@@ -28,10 +28,16 @@ axios.interceptors.request.use((config) => { ...@@ -28,10 +28,16 @@ axios.interceptors.request.use((config) => {
// 配置请求返回的拦截器, // 配置请求返回的拦截器,
axios.interceptors.response.use(res => { axios.interceptors.response.use(res => {
// if (res.data.resultCode === 0) { // if (res.data.resultCode === 0) {
return Promise.resolve(res) // return Promise.resolve(res)
// } else { // } else {
// return Promise.reject() // 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 => { }, err => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log(err) console.log(err)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<a-input <a-input
placeholder="请填写角色名称" placeholder="请填写角色名称"
v-decorator="['roleName',{ v-decorator="['roleName',{
rules: [{required: true, message: '角色名称不能为空'}], rules: [{required: true, message: '角色名称不能为空'}, {max: 10, message: '角色名称不能超过10个字符'}],
initialValue: roleName, initialValue: roleName,
}]" }]"
/> />
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<a-input <a-input
placeholder="请填写角色的描述" placeholder="请填写角色的描述"
v-decorator="['roleDesc',{ v-decorator="['roleDesc',{
rules: [{required: false, message: '角色描述不能为空'}], rules: [{required: false, message: '角色描述不能为空'}, {max: 50, message: '角色描述不能超过50个字符'}],
initialValue: roleDesc, initialValue: roleDesc,
}]" }]"
/> />
...@@ -144,6 +144,8 @@ export default { ...@@ -144,6 +144,8 @@ export default {
$http.post(`/admin/manager/addFullRole`, data).then(res => { $http.post(`/admin/manager/addFullRole`, data).then(res => {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success('保存成功') this.$message.success('保存成功')
this.$router.push({ name: 'rightsManagement' })
} else { } else {
this.$message.error(res.data.msg) this.$message.error(res.data.msg)
} }
......
...@@ -163,9 +163,9 @@ export default { ...@@ -163,9 +163,9 @@ export default {
}) })
this.roleList.push({ this.roleList.push({
key: item.roleId, key: item.roleId,
roleName: item.roleName || '---', roleName: item.roleName ,
userHasRoles: userHasRoles || '---', userHasRoles: userHasRoles,
roleDesc: item.roleDesc || '---', roleDesc: item.roleDesc,
creatTime: item.createTime.replace('T', ' '), creatTime: item.createTime.replace('T', ' '),
action: { ddUserId: ddUserId, name: userHasRoles } 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