|
|
@ -313,7 +313,7 @@ export default { |
|
|
|
this.tempRole.resourcePermissionIds = this.permissionList |
|
|
|
// 添加新角色 |
|
|
|
this.api({ |
|
|
|
url: '/role/addRole', |
|
|
|
url: '/role', |
|
|
|
method: 'post', |
|
|
|
data: this.tempRole |
|
|
|
}).then(() => { |
|
|
@ -342,8 +342,8 @@ export default { |
|
|
|
this.tempRole.resourcePermissionIds = this.permissionList |
|
|
|
// 修改角色 |
|
|
|
this.api({ |
|
|
|
url: '/role/updateRole', |
|
|
|
method: 'post', |
|
|
|
url: '/role', |
|
|
|
method: 'put', |
|
|
|
data: this.tempRole |
|
|
|
}).then(() => { |
|
|
|
this.$message.success('更新成功。') |
|
|
@ -386,8 +386,8 @@ export default { |
|
|
|
user.roleIds.split(',').forEach(roleId => roleIds.push(Number(roleId))) |
|
|
|
roleIds.push(this.tempRole.id) |
|
|
|
this.api({ |
|
|
|
url: '/user/updateUser', |
|
|
|
method: 'post', |
|
|
|
url: '/user', |
|
|
|
method: 'put', |
|
|
|
data: { |
|
|
|
user: user, |
|
|
|
roleIds: roleIds |
|
|
@ -407,8 +407,8 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
this.api({ |
|
|
|
url: '/user/updateUser', |
|
|
|
method: 'post', |
|
|
|
url: '/user', |
|
|
|
method: 'put', |
|
|
|
data: { |
|
|
|
user: user, |
|
|
|
roleIds: roleIds |
|
|
@ -433,7 +433,7 @@ export default { |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.api({ |
|
|
|
url: '/role/deleteRole', |
|
|
|
url: '/role', |
|
|
|
method: 'delete', |
|
|
|
params: { |
|
|
|
pks: pks |
|
|
@ -594,14 +594,13 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
// // 处理上级 |
|
|
|
// if (val.permission.id !== 0) { |
|
|
|
// this.findParent(this.allPermission, val.permission.parentId) |
|
|
|
// } |
|
|
|
// 处理上级 |
|
|
|
if (val.permission.id !== 0) { |
|
|
|
this.findParent(this.allPermission, val.permission.parentId) |
|
|
|
} |
|
|
|
val.indeterminate = false |
|
|
|
}, |
|
|
|
handleCheckChange(val) { |
|
|
|
console.log(val, '子功能') |
|
|
|
const length = val.resourcePermissionList.length |
|
|
|
let checkedLength = 0 |
|
|
|
val.resourcePermissionList.forEach(options => { |
|
|
|