mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
机构查询 ,修改回使用接口查询 的
This commit is contained in:
@@ -560,10 +560,10 @@ export default {
|
|||||||
},
|
},
|
||||||
confirmChooseOrg(orgInfo){
|
confirmChooseOrg(orgInfo){
|
||||||
//console.log(orgInfo,'orgInfo');
|
//console.log(orgInfo,'orgInfo');
|
||||||
// if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){
|
if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){
|
||||||
// this.$message.error("此机构无HRBP审核人信息,请重新选择");
|
this.$message.error("此机构无HRBP审核人信息,请重新选择");
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
this.orgName=orgInfo.name;
|
this.orgName=orgInfo.name;
|
||||||
this.orgKid=orgInfo.kid; //kid已不存在
|
this.orgKid=orgInfo.kid; //kid已不存在
|
||||||
this.courseInfo.orgId=orgInfo.id;
|
this.courseInfo.orgId=orgInfo.id;
|
||||||
@@ -598,30 +598,30 @@ export default {
|
|||||||
}),
|
}),
|
||||||
loadUserGroup(){
|
loadUserGroup(){
|
||||||
let $this=this;
|
let $this=this;
|
||||||
apiUserGroup.findByName('').then(rs=>{
|
// apiUserGroup.findByName('').then(rs=>{
|
||||||
if(rs.status==200){
|
// if(rs.status==200){
|
||||||
let crowdList=[];
|
// let crowdList=[];
|
||||||
rs.result.forEach(item=>{
|
// rs.result.forEach(item=>{
|
||||||
crowdList.push({
|
// crowdList.push({
|
||||||
id:item.key,
|
// id:item.key,
|
||||||
name:item.value,
|
// name:item.value,
|
||||||
disabled:false
|
// 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
|
|
||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
// }
|
// 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) {
|
resOwnerName(code) {
|
||||||
if (code == '') {
|
if (code == '') {
|
||||||
@@ -1383,28 +1383,28 @@ export default {
|
|||||||
let $this = this;
|
let $this = this;
|
||||||
console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
|
console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
|
||||||
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
|
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
|
||||||
// apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
|
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
|
||||||
// if(rs.status==200 && rs.result){
|
if(rs.status==200 && rs.result){
|
||||||
// postData.auditUser={
|
postData.auditUser={
|
||||||
// email:rs.result.email,
|
email:rs.result.email,
|
||||||
// code:rs.result.userNo,
|
code:rs.result.userNo,
|
||||||
// name:rs.result.name,
|
name:rs.result.name,
|
||||||
// aid:rs.result.id,
|
aid:rs.result.id,
|
||||||
// orgId:rs.result.orgId
|
orgId:rs.result.orgId
|
||||||
// }
|
}
|
||||||
// postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
|
postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
|
||||||
|
|
||||||
apiHRBP.getHRBP(this.orgKid).then(rs=>{
|
// apiHRBP.getHRBP(this.orgKid).then(rs=>{
|
||||||
if(rs.status==200 && rs.result.length>0){
|
// if(rs.status==200 && rs.result.length>0){
|
||||||
let hrbpUser=rs.result[0];
|
// let hrbpUser=rs.result[0];
|
||||||
postData.auditUser={
|
// postData.auditUser={
|
||||||
email:hrbpUser.email,
|
// email:hrbpUser.email,
|
||||||
code:hrbpUser.user_no,
|
// code:hrbpUser.user_no,
|
||||||
name:hrbpUser.real_name,
|
// name:hrbpUser.real_name,
|
||||||
kid:hrbpUser.user_id,
|
// kid:hrbpUser.user_id,
|
||||||
orgId:hrbpUser.orgnization_id
|
// orgId:hrbpUser.orgnization_id
|
||||||
}
|
// }
|
||||||
postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
|
// postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
|
||||||
|
|
||||||
apiCourse.submitCourse(postData).then(res => {
|
apiCourse.submitCourse(postData).then(res => {
|
||||||
//this.btnLoading=false;
|
//this.btnLoading=false;
|
||||||
|
|||||||
@@ -106,56 +106,56 @@
|
|||||||
}else{
|
}else{
|
||||||
let $this=this;
|
let $this=this;
|
||||||
if(node.level === 1){
|
if(node.level === 1){
|
||||||
parentId = '-1';
|
// parentId = '-1';
|
||||||
// apiUserBasic.findOrgsByKeyword('').then(rs=>{
|
apiUserBasic.findOrgsByKeyword('').then(rs=>{
|
||||||
// let treeList=[];
|
let treeList=[];
|
||||||
// rs.result.forEach(item=>{
|
rs.result.forEach(item=>{
|
||||||
// let node={
|
let node={
|
||||||
// id:item.id,
|
id:item.id,
|
||||||
// name:item.name,
|
name:item.name,
|
||||||
// hrbpId:item.hrbpId,
|
hrbpId:item.hrbpId,
|
||||||
// children:[]
|
children:[]
|
||||||
// }
|
}
|
||||||
// treeList.push(node);
|
treeList.push(node);
|
||||||
// });
|
});
|
||||||
// resolve(treeList);
|
resolve(treeList);
|
||||||
// });
|
});
|
||||||
}else{
|
}else{
|
||||||
parentId = node.data.id;
|
parentId = node.data.id;
|
||||||
// apiUserBasic.findOrgTreeByOrgId(parentId).then(rs=>{
|
apiUserBasic.findOrgTreeByOrgId(parentId).then(rs=>{
|
||||||
// if(rs.status==200){
|
if(rs.status==200){
|
||||||
// let treeList=[];
|
let treeList=[];
|
||||||
// if(rs.result.length>0 && rs.result[0].treeChildList){
|
if(rs.result.length>0 && rs.result[0].treeChildList){
|
||||||
// rs.result[0].treeChildList.forEach(item=>{
|
rs.result[0].treeChildList.forEach(item=>{
|
||||||
// let node={
|
let node={
|
||||||
// id:item.id,
|
id:item.id,
|
||||||
// name:item.name,
|
name:item.name,
|
||||||
// hrbpId:item.hrbpId,
|
hrbpId:item.hrbpId,
|
||||||
// children:[]
|
children:[]
|
||||||
// }
|
}
|
||||||
// if(item.treeChildList){
|
if(item.treeChildList){
|
||||||
// $this.readTreeNode(node,item.treeChildList);
|
$this.readTreeNode(node,item.treeChildList);
|
||||||
// }
|
}
|
||||||
// treeList.push(node);
|
treeList.push(node);
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
// resolve(treeList);
|
resolve(treeList);
|
||||||
// }else{
|
}else{
|
||||||
// resolve([]);
|
resolve([]);
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
usergroupApi.userOrgs(parentId).then(res =>{
|
// usergroupApi.userOrgs(parentId).then(res =>{
|
||||||
if (res.status == 200) {
|
// if (res.status == 200) {
|
||||||
if(res.result != null && res.result.length > 0){
|
// if(res.result != null && res.result.length > 0){
|
||||||
resolve(res.result);
|
// resolve(res.result);
|
||||||
}else{
|
// }else{
|
||||||
resolve([]);
|
// resolve([]);
|
||||||
}
|
// }
|
||||||
}else{
|
// }else{
|
||||||
this.$message.error('查询用户的机构失败');
|
// this.$message.error('查询用户的机构失败');
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
|
|||||||
@@ -208,66 +208,66 @@ export default {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
//新的提交流程
|
//新的提交流程
|
||||||
// apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{
|
apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{
|
||||||
// if(rs.status==200 && rs.result){
|
if(rs.status==200 && rs.result){
|
||||||
// let req={
|
let req={
|
||||||
// courseId:row.id,
|
courseId:row.id,
|
||||||
// email:rs.result.email,
|
email:rs.result.email,
|
||||||
// courseUser:row.sysCreateBy,
|
courseUser:row.sysCreateBy,
|
||||||
// courseName:row.name,
|
courseName:row.name,
|
||||||
// ucode:rs.result.userNo,
|
ucode:rs.result.userNo,
|
||||||
// auditUser:rs.result.name,
|
auditUser:rs.result.name,
|
||||||
// //ukid:hrbpUser.user_id,
|
//ukid:hrbpUser.user_id,
|
||||||
// orgId:row.orgId,
|
orgId:row.orgId,
|
||||||
// orgName:rs.result.orgNamePath +'/'+rs.result.name
|
orgName:rs.result.orgNamePath +'/'+rs.result.name
|
||||||
// }
|
}
|
||||||
// apiCourse.sumbits(req).then(res=>{
|
apiCourse.sumbits(req).then(res=>{
|
||||||
// if(res.status==200){
|
if(res.status==200){
|
||||||
// $this.$message.success('提交成功');
|
$this.$message.success('提交成功');
|
||||||
// row.status=2
|
row.status=2
|
||||||
// }
|
}
|
||||||
// if(res.status==400){
|
if(res.status==400){
|
||||||
// $this.$message.error('提交失败:'+res.message);
|
$this.$message.error('提交失败:'+res.message);
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// }else{
|
}else{
|
||||||
// $this.$message.error("获取HRBP审核人员失败:"+rs.message);
|
$this.$message.error("获取HRBP审核人员失败:"+rs.message);
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
|
|
||||||
apiOrg.getSimple(row.orgId).then(rrs=>{
|
// apiOrg.getSimple(row.orgId).then(rrs=>{
|
||||||
if(rrs.status==200){
|
// if(rrs.status==200){
|
||||||
apiHRBP.getHRBP(rrs.result.kid).then(rs=>{
|
// apiHRBP.getHRBP(rrs.result.kid).then(rs=>{
|
||||||
if(rs.status==200 && rs.result.length>0){
|
// if(rs.status==200 && rs.result.length>0){
|
||||||
let hrbpUser=rs.result[0];
|
// let hrbpUser=rs.result[0];
|
||||||
let req={
|
// let req={
|
||||||
courseId:row.id,
|
// courseId:row.id,
|
||||||
email:hrbpUser.email,
|
// email:hrbpUser.email,
|
||||||
courseUser:row.sysCreateBy,
|
// courseUser:row.sysCreateBy,
|
||||||
courseName:row.name,
|
// courseName:row.name,
|
||||||
ucode:hrbpUser.user_no,
|
// ucode:hrbpUser.user_no,
|
||||||
auditUser:hrbpUser.real_name,
|
// auditUser:hrbpUser.real_name,
|
||||||
ukid:hrbpUser.user_id,
|
// ukid:hrbpUser.user_id,
|
||||||
orgId:row.orgId,
|
// orgId:row.orgId,
|
||||||
orgName:rs.result.orgnization_name_path+'/'+rrs.result.name
|
// orgName:rs.result.orgnization_name_path+'/'+rrs.result.name
|
||||||
}
|
// }
|
||||||
apiCourse.sumbits(req).then(res=>{
|
// apiCourse.sumbits(req).then(res=>{
|
||||||
if(res.status==200){
|
// if(res.status==200){
|
||||||
$this.$message.success('提交成功');
|
// $this.$message.success('提交成功');
|
||||||
row.status=2
|
// row.status=2
|
||||||
}
|
// }
|
||||||
if(res.status==400){
|
// if(res.status==400){
|
||||||
$this.$message.error('提交失败:'+res.message);
|
// $this.$message.error('提交失败:'+res.message);
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}else{
|
// }else{
|
||||||
$this.$message.error("获取HRBP审核人员失败:"+rs.message);
|
// $this.$message.error("获取HRBP审核人员失败:"+rs.message);
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}else{
|
// }else{
|
||||||
$this.$message.error("处理资源归属失败,请重新设置资源归属");
|
// $this.$message.error("处理资源归属失败,请重新设置资源归属");
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
delItem(row) {
|
delItem(row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user