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

优化

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