|
|
@ -52,7 +52,7 @@ export class RoleComponent implements OnInit { |
|
|
|
this.http.get('/api/services/app/Menu/GetAll', { |
|
|
|
this.http.get('/api/services/app/Menu/GetAll', { |
|
|
|
params: params |
|
|
|
params: params |
|
|
|
}).subscribe((data: any) => { |
|
|
|
}).subscribe((data: any) => { |
|
|
|
console.log(666, data) |
|
|
|
// console.log(666, data)
|
|
|
|
this.totalCount = data.result.totalCount |
|
|
|
this.totalCount = data.result.totalCount |
|
|
|
data.result.items.forEach(element => { |
|
|
|
data.result.items.forEach(element => { |
|
|
|
element.key = element.id |
|
|
|
element.key = element.id |
|
|
@ -87,7 +87,7 @@ export class RoleComponent implements OnInit { |
|
|
|
grantedPermissions: arr |
|
|
|
grantedPermissions: arr |
|
|
|
} |
|
|
|
} |
|
|
|
let body2=instance.validateForm.value.menus |
|
|
|
let body2=instance.validateForm.value.menus |
|
|
|
this.http.post('/api/services/app/Role/Create', body).subscribe(data => { |
|
|
|
this.http.post('/api/services/app/Role/Create', body).subscribe((data:any) => { |
|
|
|
resolve(data) |
|
|
|
resolve(data) |
|
|
|
this.http.post('/api/services/app/Role/SetRoleMenus', body2, { |
|
|
|
this.http.post('/api/services/app/Role/SetRoleMenus', body2, { |
|
|
|
params: { |
|
|
|
params: { |
|
|
@ -95,7 +95,6 @@ export class RoleComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
}).subscribe(data => { |
|
|
|
}).subscribe(data => { |
|
|
|
resolve(data) |
|
|
|
resolve(data) |
|
|
|
console.log(data,8252); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.message.create('success', '分配成功!');
|
|
|
|
// this.message.create('success', '分配成功!');
|
|
|
|
|
|
|
|
|
|
|
@ -145,7 +144,7 @@ export class RoleComponent implements OnInit { |
|
|
|
grantedPermissions: arr |
|
|
|
grantedPermissions: arr |
|
|
|
} |
|
|
|
} |
|
|
|
let body2=instance.validateForm.value.menus |
|
|
|
let body2=instance.validateForm.value.menus |
|
|
|
this.http.put('/api/services/app/Role/Update', body).subscribe(data => { |
|
|
|
this.http.put('/api/services/app/Role/Update', body).subscribe((data:any) => { |
|
|
|
resolve(data) |
|
|
|
resolve(data) |
|
|
|
this.http.post('/api/services/app/Role/SetRoleMenus', body2, { |
|
|
|
this.http.post('/api/services/app/Role/SetRoleMenus', body2, { |
|
|
|
params: { |
|
|
|
params: { |
|
|
@ -153,7 +152,6 @@ export class RoleComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
}).subscribe(data => { |
|
|
|
}).subscribe(data => { |
|
|
|
resolve(data) |
|
|
|
resolve(data) |
|
|
|
console.log(data,8252); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.message.create('success', '分配成功!');
|
|
|
|
// this.message.create('success', '分配成功!');
|
|
|
|
|
|
|
|
|
|
|
|