From afeabcf43b016c3b90d978fdec6401a8e7d2ed85 Mon Sep 17 00:00:00 2001 From: daihh Date: Wed, 26 Oct 2022 19:13:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=81=E5=B8=88=E8=AF=BE=E7=A8=8B=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=9C=A8=E5=88=97=E8=A1=A8=E4=B8=AD=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E5=8E=9Fhrbp=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E4=BF=AE=E6=94=B9=E5=90=8E=EF=BC=8C=E8=BF=99=E9=87=8C?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=90=8C=E6=AD=A5=E8=BF=87=E6=9D=A5=E3=80=82?= =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E5=90=8C=E4=B8=8D=E8=BF=87=E6=9D=A5=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/course.js | 4 +- src/views/course/TeacherList.vue | 66 ++++++++++++++++++++++++-------- 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/src/api/modules/course.js b/src/api/modules/course.js index 96192d9d..9c879131 100644 --- a/src/api/modules/course.js +++ b/src/api/modules/course.js @@ -363,8 +363,8 @@ const detailFew=function(id){ /* 直接审核 */ -const sumbits=function(id){ - return ajax.post('/xboe/m/course/manage/sumbits?id='+id); +const sumbits=function(data){ + return ajax.post('/xboe/m/course/manage/sumbits',data); } /* 教师授课记录 diff --git a/src/views/course/TeacherList.vue b/src/views/course/TeacherList.vue index 2c83cff0..83290b1e 100644 --- a/src/views/course/TeacherList.vue +++ b/src/views/course/TeacherList.vue @@ -84,7 +84,7 @@
暂无数据
- +
@@ -113,6 +113,8 @@ import courseForm from '@/components/Course/courseForm.vue'; import apiCourse from '@/api/modules/course.js'; import { courseType } from '@/utils/tools.js'; import apiAudit from '@/api/system/audit.js'; +import apiHRBP from '@/api/boe/HRBP.js'; +import apiOrg from '@/api/system/organiza.js'; export default { name: 'ucStudyIndex', components: { studyItem, courseForm, courseImage }, @@ -194,21 +196,50 @@ export default { }); }, examine(row) { - this.$confirm('您确定要直接提交审核所选课程吗?', '友情提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(()=>{ - apiCourse.sumbits(row.id).then(res=>{ - if(res.status==200){ - this.$message.success('提交成功'); - row.status=2 - } - if(res.status==400){ - this.$message.error('课程信息不完整,提交失败') - } - }) - }) + if(!row.orgId){ + this.$message.error("课程还未设置资源归属,请先设置资源归属"); + return; + } + let $this=this; + this.$confirm('您确定要直接提交审核所选课程吗?', '友情提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(()=>{ + 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) { this.$confirm('您确定要删除所选课程吗?', '删除提示', { @@ -280,7 +311,7 @@ export default { this.params.pageSize = val; // this.params.pageIndex = 1; - + this.getList(); }, handleCurrentChange(val) { @@ -363,6 +394,7 @@ export default { line-height: 28px; padding: 0px 10px; .summary-item { + padding-top: 10px; height: 40px; line-height: 20px; color: #7d7d7d;