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