|
@@ -632,7 +632,7 @@ export default {
|
|
|
// 获取可编辑角色
|
|
|
try {
|
|
|
const res= await userRole()
|
|
|
- this.rolerulesList = []
|
|
|
+ this.roleBaseList = []
|
|
|
res.data.forEach(item => {
|
|
|
this.roleBaseList.push({
|
|
|
label: item.roleName,
|
|
@@ -640,7 +640,7 @@ export default {
|
|
|
disabled: false,
|
|
|
})
|
|
|
})
|
|
|
- res.data
|
|
|
+
|
|
|
}catch(e){
|
|
|
console.log(e)
|
|
|
}
|
|
@@ -725,13 +725,12 @@ export default {
|
|
|
if (type == 'update') {
|
|
|
let roleIdList = [...data.roleIds]
|
|
|
this.roleBaseList.forEach(item=>{
|
|
|
- if(roleIdList.indexOf(item.id) == -1){
|
|
|
- roleIdList.push(item.id)
|
|
|
+ if(roleIdList.indexOf(item.value) == -1){
|
|
|
+ roleIdList.push(item.value)
|
|
|
}
|
|
|
})
|
|
|
this.roleResetList = []
|
|
|
this.roleList.forEach(role=>{
|
|
|
- console.log(role)
|
|
|
if(roleIdList.indexOf(role.value) != -1){
|
|
|
this.roleResetList.push(role)
|
|
|
}
|