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