Commit 010d3485 authored by 罗超's avatar 罗超

优化

parent 5225ded7
...@@ -304,7 +304,8 @@ export default { ...@@ -304,7 +304,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;
...@@ -338,6 +339,10 @@ export default { ...@@ -338,6 +339,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);
} }
...@@ -345,6 +350,24 @@ export default { ...@@ -345,6 +350,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