Commit 36928608 authored by 华国豪's avatar 华国豪 🙄
parents 1ae7afdf 8d75d7fb
...@@ -305,7 +305,8 @@ export default { ...@@ -305,7 +305,8 @@ export default {
} }
}); });
this.employeeMsg.RB_Branch_id = this.userInfo.RB_Branch_id; this.employeeMsg.RB_Branch_id = this.userInfo.RB_Branch_id;
this.msg.RB_Department_Id = this.userInfo.RB_Branch_id; this.msg.BranchId = this.userInfo.RB_Branch_id;
this.linkageDepartment();
this.getEmployee(); this.getEmployee();
} else { } else {
this.companyList = res.data.data; this.companyList = res.data.data;
...@@ -339,6 +340,10 @@ export default { ...@@ -339,6 +340,10 @@ export default {
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.departmentList = res.data.data; this.departmentList = res.data.data;
if(res.data.data && res.data.data.length>0){
this.findMyDepartment(res.data.data[0]);
}
console.log(this.departmentList);
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -346,6 +351,24 @@ export default { ...@@ -346,6 +351,24 @@ export default {
err => {} err => {}
); );
}, },
findMyDepartment(data){
console.log(data)
if(data.DepartmentId==this.userInfo.RB_Department_Id){
console.log('yes',data)
this.changeDeparent(data)
}else{
if (data.ChildList && data.ChildList.length>0) {
data.ChildList.forEach(x => {
this.findMyDepartment(x)
});
}
}
},
changeDeparent(data){
let newDt=new Array();
newDt.push(data)
this.departmentList = newDt;
},
getEmployee() { getEmployee() {
this.apipost( this.apipost(
"app_get_company_employee", "app_get_company_employee",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment