mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
下级机构查询换成info接口
This commit is contained in:
@@ -50,9 +50,10 @@ const formRequest=axios.create({
|
||||
return res.data
|
||||
}else{
|
||||
if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
//Message({message: msg, type: 'error'});
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
Message({message: msg, type: 'error'});
|
||||
|
||||
@@ -23,6 +23,10 @@ const findOrgTreeByOrgId = function(orgId) {
|
||||
return ajax.postJson(baseURL,'/org/childOrgs',{orgId});
|
||||
}
|
||||
|
||||
const getOrgInfo = function(orgId) {
|
||||
return ajax.postJson(baseURL,'/org/info',{orgId});
|
||||
}
|
||||
|
||||
/**根据用户id获取用户的信息*/
|
||||
const getUserInfoById = function(id) {
|
||||
return ajax.postJson(baseURL,'/user/list',{id});
|
||||
@@ -47,6 +51,7 @@ const getOrgHrbpInfo = function(orgId) {
|
||||
export default {
|
||||
userParentOrg,
|
||||
findOrgsByKeyword,
|
||||
getOrgInfo,
|
||||
findOrgTreeByOrgId,
|
||||
getUserInfoById,
|
||||
getUserCrowds,
|
||||
|
||||
@@ -122,20 +122,17 @@
|
||||
});
|
||||
}else{
|
||||
parentId = node.data.id;
|
||||
apiUserBasic.findOrgTreeByOrgId(parentId).then(rs=>{
|
||||
apiUserBasic.getOrgInfo(parentId).then(rs=>{
|
||||
if(rs.status==200){
|
||||
let treeList=[];
|
||||
if(rs.result.length>0 && rs.result[0].treeChildList){
|
||||
rs.result[0].treeChildList.forEach(item=>{
|
||||
if(rs.result.directChildList){
|
||||
rs.result.directChildList.forEach(item=>{
|
||||
let node={
|
||||
id:item.id,
|
||||
name:item.name,
|
||||
hrbpId:item.hrbpId,
|
||||
children:[]
|
||||
}
|
||||
if(item.treeChildList){
|
||||
$this.readTreeNode(node,item.treeChildList);
|
||||
}
|
||||
treeList.push(node);
|
||||
});
|
||||
}
|
||||
@@ -144,6 +141,28 @@
|
||||
resolve([]);
|
||||
}
|
||||
});
|
||||
// apiUserBasic.findOrgTreeByOrgId(parentId).then(rs=>{
|
||||
// if(rs.status==200){
|
||||
// let treeList=[];
|
||||
// if(rs.result.length>0 && rs.result[0].treeChildList){
|
||||
// rs.result[0].treeChildList.forEach(item=>{
|
||||
// let node={
|
||||
// id:item.id,
|
||||
// name:item.name,
|
||||
// hrbpId:item.hrbpId,
|
||||
// children:[]
|
||||
// }
|
||||
// if(item.treeChildList){
|
||||
// $this.readTreeNode(node,item.treeChildList);
|
||||
// }
|
||||
// treeList.push(node);
|
||||
// });
|
||||
// }
|
||||
// resolve(treeList);
|
||||
// }else{
|
||||
// resolve([]);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
// usergroupApi.userOrgs(parentId).then(res =>{
|
||||
// if (res.status == 200) {
|
||||
|
||||
Reference in New Issue
Block a user