机构查询 ,修改回使用接口查询 的

This commit is contained in:
daihh
2022-11-24 15:13:53 +08:00
parent e3556e5480
commit 3e02f4bd58
3 changed files with 154 additions and 154 deletions

View File

@@ -560,10 +560,10 @@ export default {
},
confirmChooseOrg(orgInfo){
//console.log(orgInfo,'orgInfo');
// if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){
// this.$message.error("此机构无HRBP审核人信息请重新选择");
// return;
// }
if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){
this.$message.error("此机构无HRBP审核人信息请重新选择");
return;
}
this.orgName=orgInfo.name;
this.orgKid=orgInfo.kid; //kid已不存在
this.courseInfo.orgId=orgInfo.id;
@@ -598,30 +598,30 @@ export default {
}),
loadUserGroup(){
let $this=this;
apiUserGroup.findByName('').then(rs=>{
if(rs.status==200){
let crowdList=[];
rs.result.forEach(item=>{
crowdList.push({
id:item.key,
name:item.value,
disabled:false
})
})
this.userGroupList=crowdList;
}
});
// apiUserBasic.getUserCrowds().then(rs=>{
// if(rs.status==200){
// let crowdList=[];
// rs.result.forEach(item=>{
// crowdList.push({
// id:item.kid,
// name:item.audienceName
// apiUserGroup.findByName('').then(rs=>{
// if(rs.status==200){
// let crowdList=[];
// rs.result.forEach(item=>{
// crowdList.push({
// id:item.key,
// name:item.value,
// disabled:false
// })
// })
// }
// })
// })
// this.userGroupList=crowdList;
// }
// });
apiUserBasic.getUserCrowds().then(rs=>{
if(rs.status==200){
let crowdList=[];
rs.result.forEach(item=>{
crowdList.push({
id:item.kid,
name:item.audienceName
})
})
}
})
},
resOwnerName(code) {
if (code == '') {
@@ -1383,28 +1383,28 @@ export default {
let $this = this;
console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
// apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
// if(rs.status==200 && rs.result){
// postData.auditUser={
// email:rs.result.email,
// code:rs.result.userNo,
// name:rs.result.name,
// aid:rs.result.id,
// orgId:rs.result.orgId
// }
// postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200 && rs.result){
postData.auditUser={
email:rs.result.email,
code:rs.result.userNo,
name:rs.result.name,
aid:rs.result.id,
orgId:rs.result.orgId
}
postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
apiHRBP.getHRBP(this.orgKid).then(rs=>{
if(rs.status==200 && rs.result.length>0){
let hrbpUser=rs.result[0];
postData.auditUser={
email:hrbpUser.email,
code:hrbpUser.user_no,
name:hrbpUser.real_name,
kid:hrbpUser.user_id,
orgId:hrbpUser.orgnization_id
}
postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
// apiHRBP.getHRBP(this.orgKid).then(rs=>{
// if(rs.status==200 && rs.result.length>0){
// let hrbpUser=rs.result[0];
// postData.auditUser={
// email:hrbpUser.email,
// code:hrbpUser.user_no,
// name:hrbpUser.real_name,
// kid:hrbpUser.user_id,
// orgId:hrbpUser.orgnization_id
// }
// postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
apiCourse.submitCourse(postData).then(res => {
//this.btnLoading=false;