From aa7bedac1da52cf422f39a58e09962fbc3356212 Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 6 Sep 2022 09:37:23 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/organiza.js | 6 ++ src/components/Course/courseForm.vue | 115 +++++++++++++++++++-------- 2 files changed, 86 insertions(+), 35 deletions(-) diff --git a/src/api/system/organiza.js b/src/api/system/organiza.js index 67bf0541..eb1f8c2b 100644 --- a/src/api/system/organiza.js +++ b/src/api/system/organiza.js @@ -21,8 +21,14 @@ const treeList = function (query) { const listByParent = function (parentId) { return ajax.get('/xboe/org/list-by-parent?parentId='+parentId); } + +const getSimple = function (id) { + return ajax.get('/xboe/org/simple?id='+id); +} + export default { treeList, + getSimple, listByParent } diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue index 627d5d5f..38dd03b7 100644 --- a/src/components/Course/courseForm.vue +++ b/src/components/Course/courseForm.vue @@ -73,16 +73,11 @@ :props="{ value: 'id', label: 'name' }" :options="sysTypeListMap"> - + + + 选择 + + @@ -219,15 +214,7 @@ :options="sysTypeListMap"> - + @@ -254,6 +241,11 @@ + + + 选择 + + @@ -378,6 +370,7 @@ + + + From a9bb2f0222e9c84ea33e03a59ef474d9cf549919 Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 6 Sep 2022 19:59:39 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E6=95=99=E5=B8=88=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E9=82=80=E8=AF=B7=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/boe/HRBP.js | 15 +++++++ src/api/modules/course.js | 8 +++- src/components/Course/courseForm.vue | 13 +++--- src/views/course/WaitAudit.vue | 63 +++++++--------------------- src/views/examine/NotApproved.vue | 51 ++++++++-------------- 5 files changed, 60 insertions(+), 90 deletions(-) create mode 100644 src/api/boe/HRBP.js diff --git a/src/api/boe/HRBP.js b/src/api/boe/HRBP.js new file mode 100644 index 00000000..6b38359a --- /dev/null +++ b/src/api/boe/HRBP.js @@ -0,0 +1,15 @@ +import ajax from '@/api/boe/boeApiAjax.js' + +/** + * 获取课程审核的 HRBP 审核 人信息 + * 机构的id + * organization_id + */ +const getHRBP = function(orgId) { + return ajax.get('/b1/system/user/org-hrbp?organization_id='+orgId); +} + + +export default { + getHRBP +} diff --git a/src/api/modules/course.js b/src/api/modules/course.js index a647c86d..143c1879 100644 --- a/src/api/modules/course.js +++ b/src/api/modules/course.js @@ -274,13 +274,18 @@ const countWaitAudit = function() { } /** - * 当前用户需要审核的课程列表 + * 管理员需要审核的课程列表 * @param {Object} query 同pageList */ const auditList = function(query) { return ajax.post('/xboe/m/course/manage/audit-pagelist', query); } +/**教师需要审核的课程列表*/ +const teacherAuditList = function(query) { + return ajax.post('/xboe/m/course/audit/teacher-course', query); +} + /** * 指定审核人,转审核人 * 点击“转审” 弹出教师查询窗口,查询教师,填写备注,提交,调用此接口 @@ -430,6 +435,7 @@ export default { getHomework, countWaitAudit, auditList, + teacherAuditList, auditAppoint, getAuditInfo, getAuditLogs, diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue index 38dd03b7..c4dc5669 100644 --- a/src/components/Course/courseForm.vue +++ b/src/components/Course/courseForm.vue @@ -1158,13 +1158,14 @@ export default { let $this = this; //先获取课程内容 apiHRBP.getHRBP(this.orgKid).then(rs=>{ - if(rs.status==200){ + if(rs.status==200 && rs.result.length>0){ + let hrbpUser=rs.result[0]; postData.auditUser={ - email:rs.result.email, - code:rs.result.user_no, - name:rs.result.real_name, - kid:rs.result.user_id, - orgId:rs.result.orgnization_id, + email:hrbpUser.email, + code:hrbpUser.user_no, + name:hrbpUser.real_name, + kid:hrbpUser.user_id, + orgId:hrbpUser.orgnization_id } apiCourse.submitCourse(postData).then(res => { //this.btnLoading=false; diff --git a/src/views/course/WaitAudit.vue b/src/views/course/WaitAudit.vue index c27bff49..6b2ed9a6 100644 --- a/src/views/course/WaitAudit.vue +++ b/src/views/course/WaitAudit.vue @@ -5,7 +5,7 @@ - + @@ -14,6 +14,7 @@ + 搜索 重置 - + - -
-
-
搜索
-
-
- - - - - - - - - -
- -
@@ -229,6 +199,7 @@ export default { examin:{ detailType: '', examineId: '', + auditId:'', examineName: '', }, paperJson:{items:[]}, @@ -304,15 +275,7 @@ export default { this.loadSysTypes(); }, methods: { - remarksInterception(info){ - let name = ''; - if(info == '' || info == null || info == undefined) { - name = '--'; - } else { - name = info.split('请')[0]; - } - return name; - }, + getseatch(){ this.params.pageIndex= 1; this.searchData(); @@ -348,7 +311,7 @@ export default { //预览跳转页面 toPreview(row) { if(row.type == 10) { - + window.open(`${this.webBaseUrl}/course/microPreview?id=${row.id}`); } else{ window.open(`${this.webBaseUrl}/course/rePreview?id=${row.id}`); @@ -359,7 +322,8 @@ export default { examineData(flag) { if(this.isExamine == 1) { let params = { - id:this.examin.examineId,//课程id, + auditId:this.examin.auditId, + courseId:this.examin.examineId,//课程id, title:this.examin.examineName,//课程的名称, pass: this.auditInfo.pass,//Boolean 是否通过, remark: this.auditInfo.remark// 备注 @@ -395,7 +359,7 @@ export default { }, // 课程查询 async searchData() { - + this.params.resOwner1 = this.resOwner[0]; this.params.resOwner2 = this.resOwner[1]; this.params.resOwner3 = this.resOwner[2]; @@ -407,7 +371,7 @@ export default { this.params.sysType3 = this.sysTypeList[2]; try { this.loading = true; - const {result, status,message} = await apiCourse.auditList(this.params); + const {result, status,message} = await apiCourse.teacherAuditList(this.params); if(status === 200) { this.pageData = result.list; @@ -437,6 +401,7 @@ export default { }, toExamine(row) { this.audit = {}; + this.examin.auditId=row.auditId; this.examin.detailType = row.type; this.examin.examineId = row.id; this.examin.examineName = row.name; diff --git a/src/views/examine/NotApproved.vue b/src/views/examine/NotApproved.vue index b5fe1190..ac433ff5 100644 --- a/src/views/examine/NotApproved.vue +++ b/src/views/examine/NotApproved.vue @@ -5,7 +5,7 @@ - + @@ -14,6 +14,7 @@ + 搜索 重置 - +
{{courseInfo.source == 2?'外部':'内部'}} + {{orgName}} {{courseInfo.forUsers}} {{courseInfo.device == 3? '多端可见': courseInfo.device == 2?'移动端可见':'PC端可见'}} @@ -60,7 +61,7 @@
- +
上传为16:9(如:800*450)的png或jpg图片
@@ -93,6 +94,11 @@
+ + + 选择 + + @@ -216,7 +222,7 @@ - + @@ -233,6 +239,7 @@ import pdfPreview from "@/components/PdfPreview/index.vue"; import weikeContent from "@/components/Course/weikeContent.vue"; import catalogCourseware from "@/components/Course/catalogCourseware.vue"; import apiCourse from "@/api/modules/course.js"; +import apiOrg from '../../api/system/organiza.js'; import scene from "../../api/modules/scene.js"; import exam from "@/components/Course/exam"; import homework from "@/components/Course/homework"; @@ -244,6 +251,7 @@ import audioPlayer from "@/components/AudioPlayer/index.vue"; import apiCourseFile from '@/api/modules/courseFile.js'; import filecloud from '@/components/FileCloud/index.vue'; import { mapGetters, mapActions } from "vuex"; +import chooseOrg from '@/components/System/chooseOrg.vue'; // import hyperLink from '@/components/Course/hyperLink.vue'; export default { name: "auditCourse1", @@ -258,7 +266,8 @@ export default { WxEditor, pdfPreview, videoPlayer, - audioPlayer + audioPlayer, + chooseOrg // hyperLink }, computed: { @@ -326,6 +335,8 @@ export default { label: "name" }, courseCoverurl: "", + orgName:'', + orgKid:'', courseInfo: {}, //基本信息 dataList: [], activeName: "info", @@ -360,7 +371,16 @@ export default { }); }, methods: { - + showChooseOrg(){ + this.$refs.refChooseOrg.dlgShow = true; + }, + confirmChooseOrg(orgInfo){ + //console.log(orgInfo,'orgInfo'); + this.orgName=orgInfo.name; + this.orgKid=orgInfo.kid; + this.courseInfo.orgId=orgInfo.id; + this.$refs.refChooseOrg.dlgShow = false; + }, chooseFile(){ this.dlgFileChoose.show=true; }, @@ -570,6 +590,16 @@ export default { apiCoursePortal.detail(this.id,true).then(rs => { if (rs.status == 200) { this.courseInfo = rs.result.course; + //加载所属机构名称 + 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.teacherList = rs.result.teachers; this.teacherName = rs.result.teachers; this.teacher = rs.result.teachers.map(res => res.teacherName); diff --git a/src/components/Course/auditCourse2.vue b/src/components/Course/auditCourse2.vue index ca0adb87..9a337314 100644 --- a/src/components/Course/auditCourse2.vue +++ b/src/components/Course/auditCourse2.vue @@ -41,6 +41,7 @@ + {{orgName}} {{courseInfo.forUsers}} @@ -75,7 +76,7 @@
- +
上传为16:9(如:800*450)的png或jpg图片
@@ -108,6 +109,11 @@
+ + + 选择 + + @@ -254,17 +260,19 @@ - +