同步
This commit is contained in:
@@ -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'
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -116,6 +116,7 @@ export default {
|
||||
position: "top-right",
|
||||
timeout: 5000,
|
||||
});
|
||||
this.init();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -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=[];
|
||||
|
||||
@@ -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: "信息详情",
|
||||
|
||||
Reference in New Issue
Block a user