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