|
|
|
@ -99,7 +99,6 @@ export class RoleComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
let body2 = instance.validateForm.value.menus || [] |
|
|
|
|
this.http.post('/api/services/app/Role/Create', body).subscribe((data: any) => { |
|
|
|
|
resolve(data) |
|
|
|
|
this.http.post('/api/services/app/Role/SetRoleMenus', body2, { |
|
|
|
|
params: { |
|
|
|
|
roleId: data.result.id |
|
|
|
@ -108,7 +107,6 @@ export class RoleComponent implements OnInit {
|
|
|
|
|
resolve(data) |
|
|
|
|
this.message.create('success', '创建成功!'); |
|
|
|
|
this.getAllRoles() |
|
|
|
|
return true |
|
|
|
|
}, err => { |
|
|
|
|
this.message.create('warning', '分配菜单错误!'); |
|
|
|
|
}) |
|
|
|
@ -152,7 +150,7 @@ export class RoleComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
let body2 = instance.validateForm.value.menus || [] |
|
|
|
|
this.http.put('/api/services/app/Role/Update', body).subscribe((data: any) => { |
|
|
|
|
resolve(data) |
|
|
|
|
|
|
|
|
|
this.http.post('/api/services/app/Role/SetRoleMenus', body2, { |
|
|
|
|
params: { |
|
|
|
|
roleId: data.result.id |
|
|
|
@ -160,7 +158,6 @@ export class RoleComponent implements OnInit {
|
|
|
|
|
}).subscribe(data => { |
|
|
|
|
this.message.create('success', '修改成功!'); |
|
|
|
|
this.getAllRoles() |
|
|
|
|
|
|
|
|
|
resolve(data) |
|
|
|
|
}, err => { |
|
|
|
|
this.message.create('warning', '分配菜单错误!'); |
|
|
|
|