From a55182b27d21dce807823f028ce53fa3a0709dcf Mon Sep 17 00:00:00 2001 From: daihh Date: Mon, 5 Dec 2022 17:49:17 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=86=85=E8=80=83=E8=AF=95=E5=88=86=E6=95=B0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/exam.vue | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/components/Course/exam.vue b/src/components/Course/exam.vue index b5edbe38..a4898c09 100644 --- a/src/components/Course/exam.vue +++ b/src/components/Course/exam.vue @@ -278,6 +278,7 @@ export default { this.total=paper.items.length; this.paper =paper; //console.log(this.paper); + this.curItem=paper.items[this.curIndex]; this.startTime=new Date();//记录开始时间 this.timerValue=this.info.testDuration; @@ -335,12 +336,12 @@ export default { showClose:false, type: 'warning' }).then(() => { - this.submitTest() + this.submitTest(score); }).catch(()=>{ }) }else{ - this.submitTest() + this.submitTest(score); } }, countTest(){ //计算考试的分数 @@ -382,11 +383,20 @@ export default { noAnswers.push(idx+1); } let allRight = true; + //console.log('用户的答案',item.userAnswer); item.options.forEach(it =>{ - if(it.answer && item.userAnswer.indexOf(it.id)==-1) { - allRight=false; + //console.log('选项',it.answer,it.id,item.userAnswer.indexOf(it.id)); + if(it.answer){ //正确答案 + if(item.userAnswer.indexOf(it.id)==-1){ + allRight=false; + } + }else{ + if(item.userAnswer.indexOf(it.id)>-1){ + allRight=false; + } } }); + //console.log('是否回答正确',allRight) if(allRight){ scoreNum+=item.score; } @@ -404,14 +414,15 @@ export default { //console.log('本次得分='+this.lastScore); return this.lastScore; }, - submitTest(){ //提交处理 + submitTest(testScore){ //提交处理 //清空提示 if(this.timer){ window.clearInterval(this.timer); } let now=new Date(); - let testScore=this.countTest(); - + if(!testScore){ + testScore=this.countTest(); + } let postData={ studyId:this.studyId,// studyItemId:this.studyItemId,//前面已经给了 From 94cf379aaddafd74b5676490436f5bd642f9b04b Mon Sep 17 00:00:00 2001 From: daihh Date: Mon, 5 Dec 2022 23:40:25 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E7=9A=84=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/courseForm.vue | 175 ++++++++++++++------------- src/components/System/chooseOrg.vue | 80 +++++------- src/views/course/TeacherList.vue | 118 +++++++++--------- 3 files changed, 180 insertions(+), 193 deletions(-) diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue index c09fb7f6..04ec6fc3 100644 --- a/src/components/Course/courseForm.vue +++ b/src/components/Course/courseForm.vue @@ -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; diff --git a/src/components/System/chooseOrg.vue b/src/components/System/chooseOrg.vue index 2b553706..59719223 100644 --- a/src/components/System/chooseOrg.vue +++ b/src/components/System/chooseOrg.vue @@ -106,55 +106,35 @@ }else{ let $this=this; if(node.level === 1){ - // parentId = '-1'; - apiUserBasic.findOrgsByKeyword('').then(rs=>{ - let treeList=[]; - rs.result.forEach(item=>{ - let node={ - id:item.id, - name:item.name, - hrbpId:item.hrbpId, - children:[] - } - treeList.push(node); - }); - resolve(treeList); - }); + parentId = '-1'; + + // apiUserBasic.findOrgsByKeyword('').then(rs=>{ + // let treeList=[]; + // rs.result.forEach(item=>{ + // let node={ + // id:item.id, + // name:item.name, + // hrbpId:item.hrbpId, + // children:[] + // } + // treeList.push(node); + // }); + // resolve(treeList); + // }); }else{ parentId = node.data.id; - apiUserBasic.getOrgInfo(parentId).then(rs=>{ - if(rs.status==200){ - let treeList=[]; - if(rs.result.directChildList){ - rs.result.directChildList.forEach(item=>{ - let node={ - id:item.id, - name:item.name, - hrbpId:item.hrbpId, - children:[] - } - treeList.push(node); - }); - } - resolve(treeList); - }else{ - resolve([]); - } - }); - // apiUserBasic.findOrgTreeByOrgId(parentId).then(rs=>{ + + // apiUserBasic.getOrgInfo(parentId).then(rs=>{ // if(rs.status==200){ // let treeList=[]; - // if(rs.result.length>0 && rs.result[0].treeChildList){ - // rs.result[0].treeChildList.forEach(item=>{ + // if(rs.result.directChildList){ + // rs.result.directChildList.forEach(item=>{ // let node={ // id:item.id, // name:item.name, // hrbpId:item.hrbpId, // children:[] // } - // if(item.treeChildList){ - // $this.readTreeNode(node,item.treeChildList); - // } // treeList.push(node); // }); // } @@ -164,17 +144,17 @@ // } // }); } - // usergroupApi.userOrgs(parentId).then(res =>{ - // if (res.status == 200) { - // if(res.result != null && res.result.length > 0){ - // resolve(res.result); - // }else{ - // resolve([]); - // } - // }else{ - // this.$message.error('查询用户的机构失败'); - // } - // }); + usergroupApi.userOrgs(parentId).then(res =>{ + if (res.status == 200) { + if(res.result != null && res.result.length > 0){ + resolve(res.result); + }else{ + resolve([]); + } + }else{ + this.$message.error('查询用户的机构失败'); + } + }); } }, handleSelectionChange(val) { diff --git a/src/views/course/TeacherList.vue b/src/views/course/TeacherList.vue index 9ebc9888..39dd47bc 100644 --- a/src/views/course/TeacherList.vue +++ b/src/views/course/TeacherList.vue @@ -208,66 +208,66 @@ export default { type: 'warning' }).then(()=>{ //新的提交流程 - apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{ - if(rs.status==200 && rs.result){ - let req={ - courseId:row.id, - email:rs.result.email, - courseUser:row.sysCreateBy, - courseName:row.name, - ucode:rs.result.userNo, - auditUser:rs.result.name, - //ukid:hrbpUser.user_id, - orgId:row.orgId, - orgName:rs.result.orgNamePath +'/'+rs.result.name - } - apiCourse.sumbits(req).then(res=>{ - if(res.status==200){ - $this.$message.success('提交成功'); - row.status=2 - } - if(res.status==400){ - $this.$message.error('提交失败:'+res.message); - } - }) - }else{ - $this.$message.error("获取HRBP审核人员失败:"+rs.message); - } - }); + // apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{ + // if(rs.status==200 && rs.result){ + // let req={ + // courseId:row.id, + // email:rs.result.email, + // courseUser:row.sysCreateBy, + // courseName:row.name, + // ucode:rs.result.userNo, + // auditUser:rs.result.name, + // //ukid:hrbpUser.user_id, + // orgId:row.orgId, + // orgName:rs.result.orgNamePath +'/'+rs.result.name + // } + // apiCourse.sumbits(req).then(res=>{ + // if(res.status==200){ + // $this.$message.success('提交成功'); + // row.status=2 + // } + // if(res.status==400){ + // $this.$message.error('提交失败:'+res.message); + // } + // }) + // }else{ + // $this.$message.error("获取HRBP审核人员失败:"+rs.message); + // } + // }); - // apiOrg.getSimple(row.orgId).then(rrs=>{ - // if(rrs.status==200){ - // apiHRBP.getHRBP(rrs.result.kid).then(rs=>{ - // if(rs.status==200 && rs.result.length>0){ - // let hrbpUser=rs.result[0]; - // let req={ - // courseId:row.id, - // email:hrbpUser.email, - // courseUser:row.sysCreateBy, - // courseName:row.name, - // ucode:hrbpUser.user_no, - // auditUser:hrbpUser.real_name, - // ukid:hrbpUser.user_id, - // orgId:row.orgId, - // orgName:rs.result.orgnization_name_path+'/'+rrs.result.name - // } - // apiCourse.sumbits(req).then(res=>{ - // if(res.status==200){ - // $this.$message.success('提交成功'); - // row.status=2 - // } - // if(res.status==400){ - // $this.$message.error('提交失败:'+res.message); - // } - // }) - // }else{ - // $this.$message.error("获取HRBP审核人员失败:"+rs.message); - // } - // }) - // }else{ - // $this.$message.error("处理资源归属失败,请重新设置资源归属"); - // } - // }) + apiOrg.getSimple(row.orgId).then(rrs=>{ + if(rrs.status==200){ + apiHRBP.getHRBP(rrs.result.kid).then(rs=>{ + if(rs.status==200 && rs.result.length>0){ + let hrbpUser=rs.result[0]; + let req={ + courseId:row.id, + email:hrbpUser.email, + courseUser:row.sysCreateBy, + courseName:row.name, + ucode:hrbpUser.user_no, + auditUser:hrbpUser.real_name, + ukid:hrbpUser.user_id, + orgId:row.orgId, + orgName:rs.result.orgnization_name_path+'/'+rrs.result.name + } + apiCourse.sumbits(req).then(res=>{ + if(res.status==200){ + $this.$message.success('提交成功'); + row.status=2 + } + if(res.status==400){ + $this.$message.error('提交失败:'+res.message); + } + }) + }else{ + $this.$message.error("获取HRBP审核人员失败:"+rs.message); + } + }) + }else{ + $this.$message.error("处理资源归属失败,请重新设置资源归属"); + } + }) }) }, delItem(row) { From bca831ad7ce0f0627104fae11e3538592ccc5774 Mon Sep 17 00:00:00 2001 From: daihh Date: Wed, 7 Dec 2022 12:50:02 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E6=9C=BA=E6=9E=84?= =?UTF-8?q?=E7=9A=84=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/courseForm.vue | 135 +++++++++++++-------------- src/components/Course/exam.vue | 2 +- src/components/System/chooseOrg.vue | 87 +++++++++-------- src/views/course/TeacherList.vue | 118 +++++++++++------------ src/views/portal/course/Detail.vue | 5 +- src/views/study/coursenew.vue | 1 + 6 files changed, 175 insertions(+), 173 deletions(-) diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue index 04ec6fc3..9dee4cda 100644 --- a/src/components/Course/courseForm.vue +++ b/src/components/Course/courseForm.vue @@ -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,49 +839,49 @@ export default { apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{ if(ors.status==200){ $this.courseInfo.orgId=ors.result.id; - 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('资源归属已变更,请重新选择'); - // } - // }) + // 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=[]; @@ -1410,29 +1410,28 @@ 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; diff --git a/src/components/Course/exam.vue b/src/components/Course/exam.vue index a4898c09..99cf596e 100644 --- a/src/components/Course/exam.vue +++ b/src/components/Course/exam.vue @@ -434,7 +434,7 @@ export default { arrange:this.info.arrange, passLine:this.info.passLine, randomMode:this.info.randomMode, - score:this.lastScore,//分数需要计算,在检查是否填写完整性时就可以计算出分数 + score:testScore, paperJson:JSON.stringify(this.paper),//原来是对象,这里要也要对象 //startTime:formatDate(this.startTime),//此时间需要格式化,格式化时间可以放在util中 //endTime:formatDate(now), diff --git a/src/components/System/chooseOrg.vue b/src/components/System/chooseOrg.vue index 59719223..3d830b36 100644 --- a/src/components/System/chooseOrg.vue +++ b/src/components/System/chooseOrg.vue @@ -107,54 +107,53 @@ let $this=this; if(node.level === 1){ parentId = '-1'; - - // apiUserBasic.findOrgsByKeyword('').then(rs=>{ - // let treeList=[]; - // rs.result.forEach(item=>{ - // let node={ - // id:item.id, - // name:item.name, - // hrbpId:item.hrbpId, - // children:[] - // } - // treeList.push(node); - // }); - // resolve(treeList); - // }); + apiUserBasic.findOrgsByKeyword('').then(rs=>{ + let treeList=[]; + rs.result.forEach(item=>{ + let node={ + id:item.id, + name:item.name, + hrbpId:item.hrbpId, + children:[] + } + treeList.push(node); + }); + resolve(treeList); + }); }else{ parentId = node.data.id; - // apiUserBasic.getOrgInfo(parentId).then(rs=>{ - // if(rs.status==200){ - // let treeList=[]; - // if(rs.result.directChildList){ - // rs.result.directChildList.forEach(item=>{ - // let node={ - // id:item.id, - // name:item.name, - // hrbpId:item.hrbpId, - // children:[] - // } - // treeList.push(node); - // }); - // } - // resolve(treeList); - // }else{ - // resolve([]); - // } - // }); + apiUserBasic.getOrgInfo(parentId).then(rs=>{ + if(rs.status==200){ + let treeList=[]; + if(rs.result.directChildList){ + rs.result.directChildList.forEach(item=>{ + let node={ + id:item.id, + name:item.name, + hrbpId:item.hrbpId, + children:[] + } + treeList.push(node); + }); + } + resolve(treeList); + }else{ + resolve([]); + } + }); } - usergroupApi.userOrgs(parentId).then(res =>{ - if (res.status == 200) { - if(res.result != null && res.result.length > 0){ - resolve(res.result); - }else{ - resolve([]); - } - }else{ - this.$message.error('查询用户的机构失败'); - } - }); + // usergroupApi.userOrgs(parentId).then(res =>{ + // if (res.status == 200) { + // if(res.result != null && res.result.length > 0){ + // resolve(res.result); + // }else{ + // resolve([]); + // } + // }else{ + // this.$message.error('查询用户的机构失败'); + // } + // }); } }, handleSelectionChange(val) { diff --git a/src/views/course/TeacherList.vue b/src/views/course/TeacherList.vue index 39dd47bc..9ebc9888 100644 --- a/src/views/course/TeacherList.vue +++ b/src/views/course/TeacherList.vue @@ -208,66 +208,66 @@ export default { type: 'warning' }).then(()=>{ //新的提交流程 - // apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{ - // if(rs.status==200 && rs.result){ - // let req={ - // courseId:row.id, - // email:rs.result.email, - // courseUser:row.sysCreateBy, - // courseName:row.name, - // ucode:rs.result.userNo, - // auditUser:rs.result.name, - // //ukid:hrbpUser.user_id, - // orgId:row.orgId, - // orgName:rs.result.orgNamePath +'/'+rs.result.name - // } - // apiCourse.sumbits(req).then(res=>{ - // if(res.status==200){ - // $this.$message.success('提交成功'); - // row.status=2 - // } - // if(res.status==400){ - // $this.$message.error('提交失败:'+res.message); - // } - // }) - // }else{ - // $this.$message.error("获取HRBP审核人员失败:"+rs.message); - // } - // }); + apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{ + if(rs.status==200 && rs.result){ + let req={ + courseId:row.id, + email:rs.result.email, + courseUser:row.sysCreateBy, + courseName:row.name, + ucode:rs.result.userNo, + auditUser:rs.result.name, + //ukid:hrbpUser.user_id, + orgId:row.orgId, + orgName:rs.result.orgNamePath +'/'+rs.result.name + } + apiCourse.sumbits(req).then(res=>{ + if(res.status==200){ + $this.$message.success('提交成功'); + row.status=2 + } + if(res.status==400){ + $this.$message.error('提交失败:'+res.message); + } + }) + }else{ + $this.$message.error("获取HRBP审核人员失败:"+rs.message); + } + }); - apiOrg.getSimple(row.orgId).then(rrs=>{ - if(rrs.status==200){ - apiHRBP.getHRBP(rrs.result.kid).then(rs=>{ - if(rs.status==200 && rs.result.length>0){ - let hrbpUser=rs.result[0]; - let req={ - courseId:row.id, - email:hrbpUser.email, - courseUser:row.sysCreateBy, - courseName:row.name, - ucode:hrbpUser.user_no, - auditUser:hrbpUser.real_name, - ukid:hrbpUser.user_id, - orgId:row.orgId, - orgName:rs.result.orgnization_name_path+'/'+rrs.result.name - } - apiCourse.sumbits(req).then(res=>{ - if(res.status==200){ - $this.$message.success('提交成功'); - row.status=2 - } - if(res.status==400){ - $this.$message.error('提交失败:'+res.message); - } - }) - }else{ - $this.$message.error("获取HRBP审核人员失败:"+rs.message); - } - }) - }else{ - $this.$message.error("处理资源归属失败,请重新设置资源归属"); - } - }) + // apiOrg.getSimple(row.orgId).then(rrs=>{ + // if(rrs.status==200){ + // apiHRBP.getHRBP(rrs.result.kid).then(rs=>{ + // if(rs.status==200 && rs.result.length>0){ + // let hrbpUser=rs.result[0]; + // let req={ + // courseId:row.id, + // email:hrbpUser.email, + // courseUser:row.sysCreateBy, + // courseName:row.name, + // ucode:hrbpUser.user_no, + // auditUser:hrbpUser.real_name, + // ukid:hrbpUser.user_id, + // orgId:row.orgId, + // orgName:rs.result.orgnization_name_path+'/'+rrs.result.name + // } + // apiCourse.sumbits(req).then(res=>{ + // if(res.status==200){ + // $this.$message.success('提交成功'); + // row.status=2 + // } + // if(res.status==400){ + // $this.$message.error('提交失败:'+res.message); + // } + // }) + // }else{ + // $this.$message.error("获取HRBP审核人员失败:"+rs.message); + // } + // }) + // }else{ + // $this.$message.error("处理资源归属失败,请重新设置资源归属"); + // } + // }) }) }, delItem(row) { diff --git a/src/views/portal/course/Detail.vue b/src/views/portal/course/Detail.vue index 7ed57dda..26e3aae0 100644 --- a/src/views/portal/course/Detail.vue +++ b/src/views/portal/course/Detail.vue @@ -82,7 +82,10 @@
{{item.section.name}}
-
{{getType(it.contentType)}}{{it.contentName}}
+
+ {{getType(it.contentType)}} + {{it.contentName}} +
diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 666cb528..889b987f 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -392,6 +392,7 @@ mounted() { this.$watermark.set(this.userInfo.name + this.userInfo.loginName); this.courseId = this.$route.query.id; + this.initContentId = this.$route.query.contentId; this.loadData(); //console.log(this.$xpage.constants.fileBaseUrl,'this.$xpage.constants.fileBaseUrl'); }, From eef266d1bea440ec92393db010f795bea7480c02 Mon Sep 17 00:00:00 2001 From: daihh Date: Wed, 7 Dec 2022 20:22:50 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E6=96=B0=E7=89=88=E7=AE=A1=E7=90=86=E5=91=98=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UserCenter/menu.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/UserCenter/menu.vue b/src/components/UserCenter/menu.vue index 90422620..984161cb 100644 --- a/src/components/UserCenter/menu.vue +++ b/src/components/UserCenter/menu.vue @@ -99,12 +99,12 @@ 旧版管理员界面 - +