diff --git a/src/components/Course/auditCourse1.vue b/src/components/Course/auditCourse1.vue index 277518ef..62ee3cd4 100644 --- a/src/components/Course/auditCourse1.vue +++ b/src/components/Course/auditCourse1.vue @@ -34,6 +34,7 @@ {{teacher && teacher.join(',')}} {{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,8 @@ 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 apiUser from '../../api/system/user.js'; import scene from "../../api/modules/scene.js"; import exam from "@/components/Course/exam"; import homework from "@/components/Course/homework"; @@ -244,6 +252,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,11 +267,12 @@ export default { WxEditor, pdfPreview, videoPlayer, - audioPlayer + audioPlayer, + chooseOrg // hyperLink }, computed: { - ...mapGetters(["resOwnerMap", "sysTypeMap"]) + ...mapGetters(["resOwnerMap", "sysTypeMap","identity"]) }, props: { id: { @@ -326,6 +336,8 @@ export default { label: "name" }, courseCoverurl: "", + orgName:'', + orgKid:'', courseInfo: {}, //基本信息 dataList: [], activeName: "info", @@ -360,7 +372,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 +591,31 @@ 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; + } + }) + }else{ + //根据课程创建者获取机构id + apiUser.getOrgSimpleByUserId(this.courseInfo.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; + } + }) + }else{ + // + } + }) + } 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..efa3ed9d 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,20 @@ - +