Commit 36928608 authored by 华国豪's avatar 华国豪 🙄
parents 1ae7afdf 8d75d7fb
......@@ -305,7 +305,8 @@ export default {
}
});
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();
} else {
this.companyList = res.data.data;
......@@ -339,6 +340,10 @@ export default {
res => {
if (res.data.resultCode == 1) {
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 {
this.Error(res.data.message);
}
......@@ -346,6 +351,24 @@ export default {
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() {
this.apipost(
"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