同步
This commit is contained in:
@@ -114,23 +114,8 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<Result> GetRolesByUserId(int userId)
|
||||
<<<<<<< Updated upstream
|
||||
<<<<<<< Updated upstream
|
||||
<<<<<<< Updated upstream
|
||||
<<<<<<< Updated upstream
|
||||
{
|
||||
var roleList = await _userService.GetRolesByUser(new user() { id=userId});
|
||||
=======
|
||||
=======
|
||||
>>>>>>> Stashed changes
|
||||
=======
|
||||
>>>>>>> Stashed changes
|
||||
=======
|
||||
>>>>>>> Stashed changes
|
||||
{
|
||||
var _user =await _userService.GetEntityById(userId);
|
||||
var roleList = await _userService.GetRolesByUser(_user);
|
||||
>>>>>>> Stashed changes
|
||||
return Result.Success().SetData(roleList);
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Binary file not shown.
@@ -36,13 +36,17 @@ export default {
|
||||
methods: {
|
||||
async showItem(item) {
|
||||
var strInfo = "";
|
||||
Object.keys(item).forEach(function (key) {
|
||||
userApi.GetRolesByUserId(item.id).then(async(resp)=>{
|
||||
|
||||
const roleData=resp.data;
|
||||
strInfo+="拥有的角色:<br>"
|
||||
roleData.forEach(u=>{strInfo+=u.role_name+"<br>"})
|
||||
|
||||
strInfo+="<hr>"
|
||||
Object.keys(item).forEach(async function (key) {
|
||||
strInfo += key + ":" + item[key] + "<br>";
|
||||
});
|
||||
userApi.GetRolesByUserId(item.id).then(resp=>{
|
||||
const roleData=resp.data;
|
||||
roleData.forEach(u=>{strInfo+="角色名:"+u.role_name})
|
||||
})
|
||||
|
||||
await this.$dialog.confirm({
|
||||
text: strInfo,
|
||||
title: "信息详情",
|
||||
@@ -50,6 +54,11 @@ roleData.forEach(u=>{strInfo+="角色名:"+u.role_name})
|
||||
true: "关闭",
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
init() {
|
||||
roleApi.getRole().then((resp) => {
|
||||
|
||||
Reference in New Issue
Block a user