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;