This commit is contained in:
橙子
2021-10-19 17:44:37 +08:00
parent d31bf1af9d
commit 1d33fa487d
5 changed files with 30 additions and 5 deletions

View File

@@ -7,10 +7,17 @@ export default {
data: { "ids1": userIds, "ids2": roleIds }
})
},
GetRolesByUser() {
return myaxios({
url: '/User/GetRolesByUser',
method: 'get'
})
},
GetRolesByUserId(userId) {
return myaxios({
url: `/User/GetRolesByUserId?userId=${userId}`,
method: 'get'
})
}
}

View File

@@ -116,6 +116,7 @@ export default {
position: "top-right",
timeout: 5000,
});
this.init();
});
},

View File

@@ -49,6 +49,18 @@ export default {
created() {
this.init();
},
watch: {
selectionRole:{
handler(val, oldVal){
if(val.length==1)
{
////
this.selectionMenu=[{id:38},{id:39}]
}
},
deep:true
},
},
methods: {
setMenu(){
var roleIds=[];

View File

@@ -36,14 +36,13 @@ export default {
methods: {
async showItem(item) {
var strInfo = "";
roleApi.GetRolesByUser().then(resp=>{
})
Object.keys(item).forEach(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: "信息详情",