This commit is contained in:
橙子
2021-10-19 17:57:51 +08:00
parent 5915e15b05
commit 71a6878122
3 changed files with 14 additions and 20 deletions

View File

@@ -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) => {