去掉接口机构的查询

This commit is contained in:
daihh
2022-12-05 23:40:25 +08:00
parent a55182b27d
commit 94cf379aad
3 changed files with 180 additions and 193 deletions

View File

@@ -598,32 +598,32 @@ 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;
}
})
})
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,
// disabled:false
// })
// });
// this.userGroupList=crowdList;
// }
// })
},
resOwnerName(code) {
if (code == '') {
@@ -719,20 +719,20 @@ export default {
}
this.orgKid='';
if(this.courseInfo.orgId){
// apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
// if(rrs.status==200){
// this.orgName=rrs.result.name;
// this.orgKid=rrs.result.kid;
// this.orgNamePath=rrs.result.namePath;
// }
// });
apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200){
this.orgName=rs.result.name;
//this.orgKid=rs.result.kid;
this.orgNamePath=rs.result.namePath;
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
if(rrs.status==200){
this.orgName=rrs.result.name;
this.orgKid=rrs.result.kid;
this.orgNamePath=rrs.result.namePath;
}
});
// apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rs=>{
// if(rs.status==200){
// this.orgName=rs.result.name;
// //this.orgKid=rs.result.kid;
// this.orgNamePath=rs.result.namePath;
// }
// });
}
} else {
@@ -839,42 +839,49 @@ export default {
apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{
if(ors.status==200){
$this.courseInfo.orgId=ors.result.id;
apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
if(rrs.status==200){
$this.orgName=rrs.result.name;
//$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
}else{
this.courseInfo.orgId='';
//this.$message.error('资源归属已变更,请重新选择');
}
})
apiOrg.getSimple(ors.result.id).then(rrs=>{
if(rrs.status==200){
$this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
}
})
// apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
// if(rrs.status==200){
// $this.orgName=rrs.result.name;
// //$this.orgKid=rrs.result.kid;
// $this.orgNamePath=rrs.result.namePath;
// }else{
// this.courseInfo.orgId='';
// //this.$message.error('资源归属已变更,请重新选择');
// }
// })
}else{
//this.$message.error('无机构关联,不需要提示');
}
})
}else{
// apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
// if(rrs.status==200){
// $this.orgName=rrs.result.name;
// $this.orgKid=rrs.result.kid;
// $this.orgNamePath=rrs.result.namePath;
// }else{
// $this.courseInfo.orgId='';
// $this.$message.error('资源归属已变更,请重新选择');
// }
// });
apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200){
$this.orgName=rs.result.name;
//$this.orgKid=rs.result.kid;
$this.orgNamePath=rs.result.namePath;
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
if(rrs.status==200){
$this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
}else{
$this.courseInfo.orgId='';
$this.$message.error('资源归属已变更,请重新选择');
$this.courseInfo.orgId='';
$this.$message.error('资源归属已变更,请重新选择');
}
});
// apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rs=>{
// if(rs.status==200){
// $this.orgName=rs.result.name;
// //$this.orgKid=rs.result.kid;
// $this.orgNamePath=rs.result.namePath;
// }else{
// $this.courseInfo.orgId='';
// $this.$message.error('资源归属已变更,请重新选择');
// }
// });
}
this.resOwnerArray=[];
@@ -1403,29 +1410,29 @@ export default {
let $this = this;
//console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
// 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;
// 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;