mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
课程审核部分的修改,替换到新开发的分支上来
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
{{teacher && teacher.join(',')}}</el-form-item>
|
{{teacher && teacher.join(',')}}</el-form-item>
|
||||||
<!-- <el-form-item label="系统标签">{{courseInfo.tags}}</el-form-item> -->
|
<!-- <el-form-item label="系统标签">{{courseInfo.tags}}</el-form-item> -->
|
||||||
<el-form-item label="课程来源">{{courseInfo.source == 2?'外部':'内部'}}</el-form-item>
|
<el-form-item label="课程来源">{{courseInfo.source == 2?'外部':'内部'}}</el-form-item>
|
||||||
|
<el-form-item label="资源归属" >{{orgName}}</el-form-item>
|
||||||
<el-form-item label="目标人群">{{courseInfo.forUsers}}</el-form-item>
|
<el-form-item label="目标人群">{{courseInfo.forUsers}}</el-form-item>
|
||||||
<el-form-item label="观看设置">
|
<el-form-item label="观看设置">
|
||||||
{{courseInfo.device == 3? '多端可见': courseInfo.device == 2?'移动端可见':'PC端可见'}}
|
{{courseInfo.device == 3? '多端可见': courseInfo.device == 2?'移动端可见':'PC端可见'}}
|
||||||
@@ -60,7 +61,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div @click.stop="chooseFile">
|
<div @click.stop="chooseFile">
|
||||||
<imageUpload :disabled="true" :value="courseCoverurl" width="160px" height="90px" @success="uploadCoverImgSuccess" @subimage="acceptimage" @remove="removeCoverImgSuccess"></imageUpload>
|
<imageUpload :disabled="true" :value="courseCoverurl" width="160px" height="90px" @success="uploadCoverImgSuccess" @subimage="acceptimage" @remove="removeCoverImgSuccess"></imageUpload>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>上传为16:9(如:800*450)的png或jpg图片</div>
|
<div>上传为16:9(如:800*450)的png或jpg图片</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -93,6 +94,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="资源归属" required>
|
||||||
|
<el-input placeholder="请选择" v-model="orgName" >
|
||||||
|
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="目标人群" >
|
<el-form-item label="目标人群" >
|
||||||
<el-input maxlength="50" show-word-limit v-model="courseInfo.forUsers" placeholder="目标人群(限50字以内)"></el-input>
|
<el-input maxlength="50" show-word-limit v-model="courseInfo.forUsers" placeholder="目标人群(限50字以内)"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -216,7 +222,7 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
||||||
|
<chooseOrg ref="refChooseOrg" @confirm="confirmChooseOrg"></chooseOrg>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -233,6 +239,8 @@ import pdfPreview from "@/components/PdfPreview/index.vue";
|
|||||||
import weikeContent from "@/components/Course/weikeContent.vue";
|
import weikeContent from "@/components/Course/weikeContent.vue";
|
||||||
import catalogCourseware from "@/components/Course/catalogCourseware.vue";
|
import catalogCourseware from "@/components/Course/catalogCourseware.vue";
|
||||||
import apiCourse from "@/api/modules/course.js";
|
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 scene from "../../api/modules/scene.js";
|
||||||
import exam from "@/components/Course/exam";
|
import exam from "@/components/Course/exam";
|
||||||
import homework from "@/components/Course/homework";
|
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 apiCourseFile from '@/api/modules/courseFile.js';
|
||||||
import filecloud from '@/components/FileCloud/index.vue';
|
import filecloud from '@/components/FileCloud/index.vue';
|
||||||
import { mapGetters, mapActions } from "vuex";
|
import { mapGetters, mapActions } from "vuex";
|
||||||
|
import chooseOrg from '@/components/System/chooseOrg.vue';
|
||||||
// import hyperLink from '@/components/Course/hyperLink.vue';
|
// import hyperLink from '@/components/Course/hyperLink.vue';
|
||||||
export default {
|
export default {
|
||||||
name: "auditCourse1",
|
name: "auditCourse1",
|
||||||
@@ -258,11 +267,12 @@ export default {
|
|||||||
WxEditor,
|
WxEditor,
|
||||||
pdfPreview,
|
pdfPreview,
|
||||||
videoPlayer,
|
videoPlayer,
|
||||||
audioPlayer
|
audioPlayer,
|
||||||
|
chooseOrg
|
||||||
// hyperLink
|
// hyperLink
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["resOwnerMap", "sysTypeMap"])
|
...mapGetters(["resOwnerMap", "sysTypeMap","identity"])
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
@@ -326,6 +336,8 @@ export default {
|
|||||||
label: "name"
|
label: "name"
|
||||||
},
|
},
|
||||||
courseCoverurl: "",
|
courseCoverurl: "",
|
||||||
|
orgName:'',
|
||||||
|
orgKid:'',
|
||||||
courseInfo: {}, //基本信息
|
courseInfo: {}, //基本信息
|
||||||
dataList: [],
|
dataList: [],
|
||||||
activeName: "info",
|
activeName: "info",
|
||||||
@@ -360,7 +372,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
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(){
|
chooseFile(){
|
||||||
this.dlgFileChoose.show=true;
|
this.dlgFileChoose.show=true;
|
||||||
},
|
},
|
||||||
@@ -570,6 +591,31 @@ export default {
|
|||||||
apiCoursePortal.detail(this.id,true).then(rs => {
|
apiCoursePortal.detail(this.id,true).then(rs => {
|
||||||
if (rs.status == 200) {
|
if (rs.status == 200) {
|
||||||
this.courseInfo = rs.result.course;
|
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.teacherList = rs.result.teachers;
|
||||||
this.teacherName = rs.result.teachers;
|
this.teacherName = rs.result.teachers;
|
||||||
this.teacher = rs.result.teachers.map(res => res.teacherName);
|
this.teacher = rs.result.teachers.map(res => res.teacherName);
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<!-- <el-form-item label="系统标签">
|
<!-- <el-form-item label="系统标签">
|
||||||
{{courseInfo.tags}}
|
{{courseInfo.tags}}
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
|
<el-form-item label="资源归属" >{{orgName}}</el-form-item>
|
||||||
<el-form-item label="目标人群" >
|
<el-form-item label="目标人群" >
|
||||||
{{courseInfo.forUsers}}
|
{{courseInfo.forUsers}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -75,7 +76,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div @click.stop="chooseFile">
|
<div @click.stop="chooseFile">
|
||||||
<imageUpload :disabled="true" :value="courseCoverurl" width="160px" height="90px" @subimage="acceptimage" @success="uploadCoverImgSuccess" @remove="removeCoverImgSuccess"></imageUpload>
|
<imageUpload :disabled="true" :value="courseCoverurl" width="160px" height="90px" @subimage="acceptimage" @success="uploadCoverImgSuccess" @remove="removeCoverImgSuccess"></imageUpload>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>上传为16:9(如:800*450)的png或jpg图片</div>
|
<div>上传为16:9(如:800*450)的png或jpg图片</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -108,6 +109,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="资源归属" required>
|
||||||
|
<el-input placeholder="请选择" v-model="orgName" >
|
||||||
|
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="目标人群" >
|
<el-form-item label="目标人群" >
|
||||||
<el-input maxlength="50" show-word-limit v-model="courseInfo.forUsers" placeholder="目标人群(限50字以内)"></el-input>
|
<el-input maxlength="50" show-word-limit v-model="courseInfo.forUsers" placeholder="目标人群(限50字以内)"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -254,17 +260,20 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
||||||
|
<chooseOrg ref="refChooseOrg" @confirm="confirmChooseOrg"></chooseOrg>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import apiCoursePortal from "@/api/modules/coursePortal.js";
|
import apiCoursePortal from "@/api/modules/coursePortal.js";
|
||||||
|
import apiOrg from '../../api/system/organiza.js';
|
||||||
|
import apiUser from '@/api/system/user.js';
|
||||||
import exam from "@/components/Course/exam";
|
import exam from "@/components/Course/exam";
|
||||||
import homework from "@/components/Course/homework";
|
import homework from "@/components/Course/homework";
|
||||||
import pdfPreview from "@/components/PdfPreview/index.vue";
|
import pdfPreview from "@/components/PdfPreview/index.vue";
|
||||||
import assess from "@/components/Course/assess";
|
import assess from "@/components/Course/assess";
|
||||||
import apiTag from "../../api/modules/tag.js";
|
import apiTag from "../../api/modules/tag.js";
|
||||||
|
import chooseOrg from '@/components/System/chooseOrg.vue';
|
||||||
import {
|
import {
|
||||||
formatDate,
|
formatDate,
|
||||||
courseType,
|
courseType,
|
||||||
@@ -297,7 +306,8 @@ export default {
|
|||||||
pdfPreview,
|
pdfPreview,
|
||||||
videoPlayer,
|
videoPlayer,
|
||||||
audioPlayer,
|
audioPlayer,
|
||||||
hyperLink
|
hyperLink,
|
||||||
|
chooseOrg
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
@@ -318,7 +328,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['resOwnerMap','sysTypeMap']),
|
...mapGetters(['resOwnerMap','sysTypeMap','identity']),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -358,6 +368,8 @@ export default {
|
|||||||
typeList: [], // 资源归属
|
typeList: [], // 资源归属
|
||||||
showTags: [], //用于显示标签
|
showTags: [], //用于显示标签
|
||||||
teacherList: [],
|
teacherList: [],
|
||||||
|
orgName:'',
|
||||||
|
orgKid:'',
|
||||||
courseInfo: {},
|
courseInfo: {},
|
||||||
courseCoverurl: "",
|
courseCoverurl: "",
|
||||||
sysTypeListMap:[],
|
sysTypeListMap:[],
|
||||||
@@ -401,8 +413,17 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showChooseOrg(){
|
||||||
chooseFile(){
|
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;
|
this.dlgFileChoose.show=true;
|
||||||
},
|
},
|
||||||
choseChoose(){
|
choseChoose(){
|
||||||
@@ -610,6 +631,31 @@ export default {
|
|||||||
apiCoursePortal.detail(this.id,true).then(rs => {
|
apiCoursePortal.detail(this.id,true).then(rs => {
|
||||||
if (rs.status == 200) {
|
if (rs.status == 200) {
|
||||||
this.courseInfo = rs.result.course;
|
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{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
if(rs.result.course.coverImg !== '') {
|
if(rs.result.course.coverImg !== '') {
|
||||||
this.courseCoverurl = this.fileBaseUrl + rs.result.course.coverImg;
|
this.courseCoverurl = this.fileBaseUrl + rs.result.course.coverImg;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -333,6 +333,7 @@
|
|||||||
import pdfPreview from "@/components/PdfPreview/index.vue";
|
import pdfPreview from "@/components/PdfPreview/index.vue";
|
||||||
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||||
import videoPlayer from '@/components/VideoPlayer/index.vue';
|
import videoPlayer from '@/components/VideoPlayer/index.vue';
|
||||||
|
import { deepClone, param } from "../../utils";
|
||||||
export default{
|
export default{
|
||||||
props: {
|
props: {
|
||||||
reset:{
|
reset:{
|
||||||
@@ -354,6 +355,10 @@
|
|||||||
},
|
},
|
||||||
course:{
|
course:{
|
||||||
type: Object,
|
type: Object,
|
||||||
|
},
|
||||||
|
addOrder:{
|
||||||
|
type:Number,
|
||||||
|
default:1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{chooseCourseFile,WxEditor,courseHomework,courseExam,simplePaper,fileUpload,pdfPreview,audioPlayer,videoPlayer},
|
components:{chooseCourseFile,WxEditor,courseHomework,courseExam,simplePaper,fileUpload,pdfPreview,audioPlayer,videoPlayer},
|
||||||
@@ -389,6 +394,7 @@
|
|||||||
setupTage:0,
|
setupTage:0,
|
||||||
},
|
},
|
||||||
homework:{courseId: '', name:'', content:'', file:'', deadTime: '', submitMode: 3},
|
homework:{courseId: '', name:'', content:'', file:'', deadTime: '', submitMode: 3},
|
||||||
|
homeworkChange:{},
|
||||||
exam:{
|
exam:{
|
||||||
courseId:'',
|
courseId:'',
|
||||||
contentId:'',
|
contentId:'',
|
||||||
@@ -408,7 +414,9 @@
|
|||||||
info:'',//考试说明
|
info:'',//考试说明
|
||||||
paperContent:'',//试题的json字符串
|
paperContent:'',//试题的json字符串
|
||||||
},
|
},
|
||||||
|
examChange:{},
|
||||||
onlyQuestion:true,
|
onlyQuestion:true,
|
||||||
|
examPaperChange:{},
|
||||||
examPaper:{items:[]},
|
examPaper:{items:[]},
|
||||||
assess:{
|
assess:{
|
||||||
countType:'权重配置',
|
countType:'权重配置',
|
||||||
@@ -515,6 +523,7 @@
|
|||||||
apiCourse.getHomework(this.content.id).then(res=>{
|
apiCourse.getHomework(this.content.id).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.homework=res.result;
|
this.homework=res.result;
|
||||||
|
this.homeworkChange = deepClone(res.result);
|
||||||
}else if(res.status==404){
|
}else if(res.status==404){
|
||||||
//没有找到作业信息
|
//没有找到作业信息
|
||||||
}else{
|
}else{
|
||||||
@@ -527,6 +536,8 @@
|
|||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.exam=res.result;
|
this.exam=res.result;
|
||||||
this.examPaper=JSON.parse(res.result.paperContent);
|
this.examPaper=JSON.parse(res.result.paperContent);
|
||||||
|
this.examChange = deepClone(res.result);
|
||||||
|
this.examPaperChange = deepClone(JSON.parse(res.result.paperContent));
|
||||||
}else if(res.status==404){
|
}else if(res.status==404){
|
||||||
//没有找到作业信息
|
//没有找到作业信息
|
||||||
}else{
|
}else{
|
||||||
@@ -560,7 +571,8 @@
|
|||||||
saveData() {
|
saveData() {
|
||||||
//执行成功后调用外部方法
|
//执行成功后调用外部方法
|
||||||
this.content.courseId=this.course.id;
|
this.content.courseId=this.course.id;
|
||||||
this.content.sortIndex=1;//先设置为
|
// this.content.sortIndex=1;//先设置为
|
||||||
|
this.content.sortIndex=this.addOrder;
|
||||||
if(this.content.contentType==41){
|
if(this.content.contentType==41){
|
||||||
//对图文的处理
|
//对图文的处理
|
||||||
this.content.content=this.htmlContent;
|
this.content.content=this.htmlContent;
|
||||||
|
|||||||
@@ -88,9 +88,9 @@
|
|||||||
keyword: '',
|
keyword: '',
|
||||||
comTypes:[
|
comTypes:[
|
||||||
{id:'1',type:'video',name:'视频',img:'el-icon-video-camera',resType:10,maxSize:1024,maxSizeName:"1G",fileTypes:['mp4']},
|
{id:'1',type:'video',name:'视频',img:'el-icon-video-camera',resType:10,maxSize:1024,maxSizeName:"1G",fileTypes:['mp4']},
|
||||||
{id:'2',type:'sound',name:'音频',img:'el-icon-service',resType:20,maxSize:200,maxSizeName:"200M",fileTypes:['mp3']},
|
{id:'2',type:'sound',name:'音频',img:'el-icon-service',resType:20,maxSize:1024,maxSizeName:"1G",fileTypes:['mp3']},
|
||||||
{id:'3',type:'image',name:'图片',img:'el-icon-picture-outline',resType:30,maxSize:10,maxSizeName:"10M",fileTypes:["png","jpg","gif","bmp"]},
|
{id:'3',type:'image',name:'图片',img:'el-icon-picture-outline',resType:30,maxSize:10,maxSizeName:"10M",fileTypes:["png","jpg","gif","bmp"]},
|
||||||
{id:'4',type:'doc',name:'文档',img:'el-icon-document',resType:40,maxSize:500,maxSizeName:"500M",fileTypes:["doc", "xls", "ppt","docx", "xlsx", "pptx","txt","pdf"]}
|
{id:'4',type:'doc',name:'文档',img:'el-icon-document',resType:40,maxSize:1024,maxSizeName:"1G",fileTypes:["doc", "xls", "ppt","docx", "xlsx", "pptx","txt","pdf"]}
|
||||||
],
|
],
|
||||||
curComType:{id:'',type:'',name:'',maxSizeName:'',fileTypes:[]},
|
curComType:{id:'',type:'',name:'',maxSizeName:'',fileTypes:[]},
|
||||||
findState:1,
|
findState:1,
|
||||||
|
|||||||
@@ -73,18 +73,13 @@
|
|||||||
:props="{ value: 'id', label: 'name' }"
|
:props="{ value: 'id', label: 'name' }"
|
||||||
:options="sysTypeListMap"></el-cascader>
|
:options="sysTypeListMap"></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="资源归属" required>
|
<el-form-item label="资源归属" required>
|
||||||
<el-cascader
|
<el-input placeholder="请选择" v-model="orgName" >
|
||||||
placeholder="选择资源归属"
|
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
|
||||||
style="width: 100%;"
|
</el-input>
|
||||||
clearable
|
</el-form-item>
|
||||||
v-model="resOwnerArray"
|
|
||||||
:props="{ value: 'code', label: 'name' }"
|
|
||||||
:options="resOwnerListMap"
|
|
||||||
></el-cascader>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="场景" v-show="!weike.onlyRequired">
|
<el-form-item label="场景" v-show="!weike.onlyRequired">
|
||||||
<el-select v-model="courseInfo.forScene" style="width: 100%;">
|
<el-select v-model="courseInfo.forScene" style="width: 100%;" clearable>
|
||||||
<el-option v-for="item in sceneList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in sceneList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -156,7 +151,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<div @click="checkCourse"><weikeContent :reset="weikeReset" :contents="contentInfo.list" :course="courseInfo" min-height="644px"></weikeContent></div>
|
<div @click="checkCourse"><weikeContent ref="weikeContent" :reset="weikeReset" :contents="contentInfo.list" :course="courseInfo" min-height="644px"></weikeContent></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-form-item label="完成规则" v-if="!weike.onlyRequired"><el-input maxlength="50" v-model="courseInfo.passFormula" placeholder="可基于组织树或受众选择"></el-input></el-form-item> -->
|
<!-- <el-form-item label="完成规则" v-if="!weike.onlyRequired"><el-input maxlength="50" v-model="courseInfo.passFormula" placeholder="可基于组织树或受众选择"></el-input></el-form-item> -->
|
||||||
<!-- <el-form-item label="开放权限" v-if="!weike.onlyRequired"><el-input maxlength="50" v-model="courseInfo.openObject" placeholder="可基于组织树或受众选择"></el-input></el-form-item> -->
|
<!-- <el-form-item label="开放权限" v-if="!weike.onlyRequired"><el-input maxlength="50" v-model="courseInfo.openObject" placeholder="可基于组织树或受众选择"></el-input></el-form-item> -->
|
||||||
@@ -182,6 +177,7 @@
|
|||||||
|
|
||||||
<div style="padding-right: 30px;"><div></div></div>
|
<div style="padding-right: 30px;"><div></div></div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<span class="red-tip">注:有分项内容保存的,请先保存分项内容再提交</span>
|
||||||
<el-checkbox style="margin-right:10px" v-if="curCourseId != ''" v-model="checked"></el-checkbox><span v-if="curCourseId != ''" style="font-size:14px;color:#787878;">我已阅读并遵守<span style="color:#588afc;margin-right:10px;cursor: pointer;" @click="courseInfoFormCheckedShow = true">平台内容发布要求</span></span>
|
<el-checkbox style="margin-right:10px" v-if="curCourseId != ''" v-model="checked"></el-checkbox><span v-if="curCourseId != ''" style="font-size:14px;color:#787878;">我已阅读并遵守<span style="color:#588afc;margin-right:10px;cursor: pointer;" @click="courseInfoFormCheckedShow = true">平台内容发布要求</span></span>
|
||||||
<!-- <el-button v-if="curCourseId!='' && contentInfo.list.length>0">预览</el-button> -->
|
<!-- <el-button v-if="curCourseId!='' && contentInfo.list.length>0">预览</el-button> -->
|
||||||
<el-button :loading="btnLoading" v-if="curCourseId != ''" :disabled="!checked" @click="submitCourse()" type="primary">提交审核</el-button>
|
<el-button :loading="btnLoading" v-if="curCourseId != ''" :disabled="!checked" @click="submitCourse()" type="primary">提交审核</el-button>
|
||||||
@@ -219,17 +215,9 @@
|
|||||||
:options="sysTypeListMap">
|
:options="sysTypeListMap">
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="资源归属" required>
|
|
||||||
<el-cascader
|
|
||||||
placeholder="选择资源归属"
|
|
||||||
style="width: 100%;"
|
|
||||||
clearable
|
|
||||||
v-model="resOwnerArray"
|
|
||||||
:props="{ value: 'code', label: 'name' }"
|
|
||||||
:options="resOwnerListMap"></el-cascader>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="场景">
|
<el-form-item label="场景">
|
||||||
<el-select v-model="courseInfo.forScene" style="width: 100%;">
|
<el-select v-model="courseInfo.forScene" style="width: 100%;" clearable>
|
||||||
<el-option v-for="item in sceneList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in sceneList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -254,6 +242,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="资源归属" required>
|
||||||
|
<el-input placeholder="请选择" v-model="orgName" >
|
||||||
|
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="目标人群" required>
|
<el-form-item label="目标人群" required>
|
||||||
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
|
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -350,12 +343,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main style="padding: 0px;">
|
<el-main style="padding: 0px;">
|
||||||
<catalog-courseware :reset="onlineReset" :content="curContent" :course="courseInfo" @save="saveCurContent" @remove="delCurContent"></catalog-courseware>
|
<catalog-courseware ref="courseware" :reset="onlineReset" :content="curContent" :addOrder="addOrder" :course="courseInfo" @save="saveCurContent" @remove="delCurContent"></catalog-courseware>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<span class="red-tip">注:有分项内容保存的,请先保存分项内容再提交</span>
|
||||||
<el-checkbox v-if="curCourseId != ''" style="margin-right:10px" v-model="checked"></el-checkbox><span v-if="curCourseId != ''" style="font-size:14px;color:#787878">我已阅读并遵守<span style="color:#588afc;margin-right:10px;cursor: pointer;" @click="courseInfoFormCheckedShow = true">平台内容发布要求</span></span>
|
<el-checkbox v-if="curCourseId != ''" style="margin-right:10px" v-model="checked"></el-checkbox><span v-if="curCourseId != ''" style="font-size:14px;color:#787878">我已阅读并遵守<span style="color:#588afc;margin-right:10px;cursor: pointer;" @click="courseInfoFormCheckedShow = true">平台内容发布要求</span></span>
|
||||||
<el-button :loading="btnLoading" v-if="biaoke.tabIndex == 'base'" type="primary" @click="saveAndNext(2)">保存并下一步</el-button>
|
<el-button :loading="btnLoading" v-if="biaoke.tabIndex == 'base'" type="primary" @click="saveAndNext(2)">保存并下一步</el-button>
|
||||||
<el-button :loading="btnLoading" v-if="biaoke.tabIndex == 'content'" type="primary" @click="previousStep()">上一步</el-button>
|
<el-button :loading="btnLoading" v-if="biaoke.tabIndex == 'content'" type="primary" @click="previousStep()">上一步</el-button>
|
||||||
@@ -378,6 +372,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--选择图片-->
|
<!--选择图片-->
|
||||||
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
||||||
|
<chooseOrg ref="refChooseOrg" @confirm="confirmChooseOrg"></chooseOrg>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -391,19 +386,25 @@ import scene from '../../api/modules/scene.js';
|
|||||||
import apiUserGroup from '../../api/modules/usergroup.js';
|
import apiUserGroup from '../../api/modules/usergroup.js';
|
||||||
import apiTeacher from '../../api/modules/teacher.js';
|
import apiTeacher from '../../api/modules/teacher.js';
|
||||||
import apiTag from '../../api/modules/tag.js';
|
import apiTag from '../../api/modules/tag.js';
|
||||||
|
import apiHRBP from '../../api/boe/HRBP.js';
|
||||||
import apiCourse from '../../api/modules/course.js';
|
import apiCourse from '../../api/modules/course.js';
|
||||||
|
import apiOrg from '../../api/system/organiza.js';
|
||||||
|
import apiUser from '../../api/system/user.js';
|
||||||
import WxEditor from '@/components/Editor/index.vue';
|
import WxEditor from '@/components/Editor/index.vue';
|
||||||
import catalogSort from '@/components/Course/catalogSort.vue';
|
import catalogSort from '@/components/Course/catalogSort.vue';
|
||||||
import { courseType, getType } from '../../utils/tools.js';
|
import { courseType, getType } from '../../utils/tools.js';
|
||||||
import { mapGetters, mapActions } from 'vuex';
|
import { mapGetters, mapActions } from 'vuex';
|
||||||
import filecloud from '@/components/FileCloud/index.vue';
|
import filecloud from '@/components/FileCloud/index.vue';
|
||||||
|
import chooseOrg from '@/components/System/chooseOrg.vue';
|
||||||
export default {
|
export default {
|
||||||
props: {},
|
props: {},
|
||||||
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice},
|
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice,chooseOrg},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
addOrder:1,
|
||||||
checked:false,
|
checked:false,
|
||||||
courseInfoFormCheckedShow:false,
|
courseInfoFormCheckedShow:false,
|
||||||
|
orgChooseShow:false,
|
||||||
weikeReset: '',
|
weikeReset: '',
|
||||||
onlineReset: '',
|
onlineReset: '',
|
||||||
sysTypeListMap: [],
|
sysTypeListMap: [],
|
||||||
@@ -432,11 +433,15 @@ export default {
|
|||||||
courseCoverurl: '', //显示的图片
|
courseCoverurl: '', //显示的图片
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
requireSaveCourse: false,
|
requireSaveCourse: false,
|
||||||
|
orgName:'',
|
||||||
|
orgNamePath:'',
|
||||||
|
orgKid:'',
|
||||||
courseInfo: {
|
courseInfo: {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
orderStudy: false,
|
orderStudy: false,
|
||||||
type: 10,
|
type: 10,
|
||||||
|
orgId:'',
|
||||||
coverImg: '',
|
coverImg: '',
|
||||||
source: 1,
|
source: 1,
|
||||||
forUsers: '',
|
forUsers: '',
|
||||||
@@ -493,7 +498,7 @@ export default {
|
|||||||
this.getSceneData();
|
this.getSceneData();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['resOwnerMap', 'sysTypeMap']),
|
...mapGetters(['resOwnerMap', 'sysTypeMap','userInfo','identity']),
|
||||||
catalogTree() {
|
catalogTree() {
|
||||||
let treeList = [];
|
let treeList = [];
|
||||||
let $this = this;
|
let $this = this;
|
||||||
@@ -531,8 +536,19 @@ export default {
|
|||||||
this.loadResOwners();
|
this.loadResOwners();
|
||||||
this.loadSysTypes();
|
this.loadSysTypes();
|
||||||
this.loadUserGroup();
|
this.loadUserGroup();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
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;
|
||||||
|
},
|
||||||
getTeacherList(res) {
|
getTeacherList(res) {
|
||||||
this.teacherValues = res;
|
this.teacherValues = res;
|
||||||
},
|
},
|
||||||
@@ -652,11 +668,29 @@ export default {
|
|||||||
this.onlineReset = Math.round(Math.random()) + '';
|
this.onlineReset = Math.round(Math.random()) + '';
|
||||||
this.courseChooseShow = true;
|
this.courseChooseShow = true;
|
||||||
this.biaoke.tabIndex = 'base';
|
this.biaoke.tabIndex = 'base';
|
||||||
|
|
||||||
|
this.courseInfo.orgId=this.userInfo.departId;
|
||||||
|
|
||||||
|
if(!this.courseInfo.orgId){
|
||||||
|
this.courseInfo.orgId=this.userInfo.departId;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//console.log(editData,'editData');
|
//console.log(editData,'editData');
|
||||||
this.weikeReset = editData.id;
|
this.weikeReset = editData.id;
|
||||||
this.onlineReset = editData.id;
|
this.onlineReset = editData.id;
|
||||||
//console.log("编辑课程?");
|
//console.log("编辑课程?");
|
||||||
|
this.courseInfo.orgId=editData.orgId;
|
||||||
this.curCourseId = editData.id; //设置
|
this.curCourseId = editData.id; //设置
|
||||||
this.courseInfo.type = editData.type; //设置课程类型,因为这里的课程对象可能不全,所以只能设置值,不能整个对象附值
|
this.courseInfo.type = editData.type; //设置课程类型,因为这里的课程对象可能不全,所以只能设置值,不能整个对象附值
|
||||||
this.getDetail(editData.id); //获取课程的详细信息
|
this.getDetail(editData.id); //获取课程的详细信息
|
||||||
@@ -667,6 +701,7 @@ export default {
|
|||||||
this.biaoke.dlgShow = true;
|
this.biaoke.dlgShow = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
resetCurCourseContent() {
|
resetCurCourseContent() {
|
||||||
this.curContent = { id: '', contentType: 0, contentName: '', content: '', csectionId: '', contentName: '', contentRefId: '', courseId: this.courseInfo.id };
|
this.curContent = { id: '', contentType: 0, contentName: '', content: '', csectionId: '', contentName: '', contentRefId: '', courseId: this.courseInfo.id };
|
||||||
@@ -747,22 +782,55 @@ export default {
|
|||||||
this.contentInfo.list = result.contents;
|
this.contentInfo.list = result.contents;
|
||||||
this.sectionInfo.list = result.sections;
|
this.sectionInfo.list = result.sections;
|
||||||
this.courseTeachers = result.teachers; //课程的老师信息
|
this.courseTeachers = result.teachers; //课程的老师信息
|
||||||
|
|
||||||
|
if(!this.courseInfo.orgId){
|
||||||
|
//根据课程创建者获取机构id
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}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;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
this.resOwnerArray=[];
|
this.resOwnerArray=[];
|
||||||
if (result.course.resOwner1 == '') {
|
if (result.course.resOwner1 == '') {
|
||||||
this.resOwnerArray.push(result.course.resOwner1);
|
this.resOwnerArray.push(result.course.resOwner1);
|
||||||
}else if(result.course.resOwner2 == ''){
|
}
|
||||||
|
if(result.course.resOwner2 == ''){
|
||||||
this.resOwnerArray.push(result.course.resOwner2);
|
this.resOwnerArray.push(result.course.resOwner2);
|
||||||
}else if(result.course.resOwner3 == ''){
|
}
|
||||||
|
if(result.course.resOwner3 == ''){
|
||||||
this.resOwnerArray.push(result.course.resOwner3);
|
this.resOwnerArray.push(result.course.resOwner3);
|
||||||
}
|
}
|
||||||
|
this.sysTypeList=[];
|
||||||
if (result.course.sysType3 == '' && result.course.sysType2 == '') {
|
if(result.course.sysType1!='' && result.course.sysType1!='0'){
|
||||||
this.sysTypeList = [result.course.sysType1];
|
this.sysTypeList.push(result.course.sysType1);
|
||||||
} else if (result.course.sysType3 == '') {
|
|
||||||
this.sysTypeList = [result.course.sysType1, result.course.sysType2];
|
|
||||||
} else {
|
|
||||||
this.sysTypeList = [result.course.sysType1, result.course.sysType2, result.course.sysType3];
|
|
||||||
}
|
}
|
||||||
|
if(result.course.sysType2!='' && result.course.sysType2!='0'){
|
||||||
|
this.sysTypeList.push(result.course.sysType2);
|
||||||
|
}
|
||||||
|
if(result.course.sysType3!='' && result.course.sysType3!='0'){
|
||||||
|
this.sysTypeList.push(result.course.sysType3);
|
||||||
|
}
|
||||||
|
//console.log(this.sysTypeList,'this.sysTypeList');
|
||||||
//受众处理,crowds
|
//受众处理,crowds
|
||||||
let crowdList=[];
|
let crowdList=[];
|
||||||
if(result.crowds && result.crowds.length>0){
|
if(result.crowds && result.crowds.length>0){
|
||||||
@@ -887,8 +955,24 @@ export default {
|
|||||||
//设置状态
|
//设置状态
|
||||||
},
|
},
|
||||||
addNewContent(sec) {
|
addNewContent(sec) {
|
||||||
|
console.log(sec,'sec');
|
||||||
this.resetCurCourseContent();
|
this.resetCurCourseContent();
|
||||||
this.curContent.csectionId = sec.id;
|
this.curContent.csectionId = sec.id;
|
||||||
|
this.orderValue(sec.id);
|
||||||
|
},
|
||||||
|
// 计算新增节的顺序
|
||||||
|
orderValue(id) {
|
||||||
|
let cha = this.catalogTree.find(item=>{return item.section.id == id});
|
||||||
|
let order = [];
|
||||||
|
if(cha.contents.length > 0) {
|
||||||
|
cha.contents.forEach(con=>{
|
||||||
|
order.push(con.sortIndex);
|
||||||
|
})
|
||||||
|
let addOrder = order.sort(function(a,b) {return b-a;})
|
||||||
|
this.addOrder = addOrder[0] + 1;
|
||||||
|
} else {
|
||||||
|
this.addOrder = 1;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 控制 过滤
|
// 控制 过滤
|
||||||
deviceFilter(num) {
|
deviceFilter(num) {
|
||||||
@@ -1036,7 +1120,109 @@ export default {
|
|||||||
this.btnLoading = false;
|
this.btnLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 判断是否有未保存的内容
|
||||||
|
unsavedContent() {
|
||||||
|
const courseware = this.$refs.courseware;
|
||||||
|
console.log(courseware,'courseware');
|
||||||
|
let pass = true;
|
||||||
|
if(this.curContent.id == '') {// 新增
|
||||||
|
if(this.curContent.contentType == 60) { // 判断作业是否保存
|
||||||
|
if(courseware.homework.content || courseware.homework.name || courseware.homework.deadTime){
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
} else if(this.curContent.contentType == 61) { //考试
|
||||||
|
if(courseware.exam.paperContent != '') {
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
if(courseware.examPaper.items.length >0) {
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
}else if(this.curContent.contentType == 41) { //图文
|
||||||
|
if(courseware.htmlContent.length > 7){
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
}else if(this.curContent.contentType == 52) { //外部链接
|
||||||
|
if(courseware.linkInfo.url != '') {
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {// 编辑
|
||||||
|
if(this.curContent.contentType == 60) { // 判断作业是否保存
|
||||||
|
if(JSON.stringify(courseware.homeworkChange) !== JSON.stringify(courseware.homework)) {
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
} else if(this.curContent.contentType == 61) { //考试
|
||||||
|
if(courseware.exam.paperContent !== courseware.examChange.paperContent || JSON.stringify(courseware.examPaper) != JSON.stringify(courseware.examPaperChange)) {
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
} else if(this.curContent.contentType == 41) { //图文
|
||||||
|
if(this.curContent.content !== courseware.htmlContent) {
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
} else if(this.curContent.contentType == 52) { //外部链接
|
||||||
|
if(this.curContent.content !== JSON.stringify(courseware.linkInfo)) {
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
} else if(this.curContent.contentType == 10 || this.curContent.contentType == 20) {// 视频
|
||||||
|
if(this.curContent.content !== JSON.stringify(courseware.curriculumData)) {
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pass;
|
||||||
|
},
|
||||||
|
unsavedWeiContent() {
|
||||||
|
// console.log(this.contentInfo.list,'contentInfo.list');
|
||||||
|
// console.log(this.courseInfo,'courseInfo');
|
||||||
|
//console.log(this.$refs.weikeContent,'weikeContent');
|
||||||
|
const courseware = this.$refs.weikeContent;
|
||||||
|
//console.log(this.catalogTree,'this.catalogTree');
|
||||||
|
if(courseware.cware.content.id==''){
|
||||||
|
this.$message.error('无课件内容,请先添加课件内容保存后再提交');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(courseware.homework.show == 2) { // 作业
|
||||||
|
this.$message.error('请先保存作业再提交');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let pass = true;
|
||||||
|
if(courseware.homework.show == 2) { // 作业
|
||||||
|
this.$message.error('请先保存作业再提交');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(courseware.assess.show == 2) { // 评估
|
||||||
|
//this.$message.error('请先保存评估再提交');
|
||||||
|
//return false;
|
||||||
|
}
|
||||||
|
if(courseware.exam.show == 3) { // 评估
|
||||||
|
this.$message.error('请先保存考试再提交');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
submitCourse() {
|
submitCourse() {
|
||||||
|
|
||||||
|
if(this.biaoke.dlgShow && !this.unsavedContent()){
|
||||||
|
this.$message.error('您有未保存的内容,请先保存');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(this.weike.dlgShow && !this.unsavedWeiContent()){
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//console.log(this.courseInfo.orgId,'this.courseInfo.orgId');
|
||||||
|
//console.log(this.orgKid,'this.orgKid');
|
||||||
|
if(!this.courseInfo.orgId){
|
||||||
|
this.$message.error('请选择资源归属');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!this.orgKid){
|
||||||
|
this.$message.error('资源归属无关联HRBP信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//console.log(this.resOwnerListMap[0],'this.resOwnerListMap[0]');
|
//console.log(this.resOwnerListMap[0],'this.resOwnerListMap[0]');
|
||||||
//return;
|
//return;
|
||||||
let ownerCode=this.resOwnerListMap[0].code;
|
let ownerCode=this.resOwnerListMap[0].code;
|
||||||
@@ -1127,22 +1313,40 @@ export default {
|
|||||||
};
|
};
|
||||||
this.btnLoading = true;
|
this.btnLoading = true;
|
||||||
let $this = this;
|
let $this = this;
|
||||||
apiCourse.submitCourse(postData).then(res => {
|
//先获取课程内容
|
||||||
//this.btnLoading=false;
|
apiHRBP.getHRBP(this.orgKid).then(rs=>{
|
||||||
setTimeout(function() {
|
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;
|
||||||
|
setTimeout(function() {
|
||||||
|
$this.btnLoading = false;
|
||||||
|
}, 1000);
|
||||||
|
if (res.status === 200) {
|
||||||
|
//提交成功,直接关闭当前窗口
|
||||||
|
this.$message.success('提交成功!!!');
|
||||||
|
this.biaoke.dlgShow = false;
|
||||||
|
this.weike.dlgShow = false;
|
||||||
|
//提交成功回调处理
|
||||||
|
this.$emit('submitSuccess');
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
$this.btnLoading = false;
|
$this.btnLoading = false;
|
||||||
}, 1000);
|
this.$message.error('获取审核HRBP失败:'+rs.message);
|
||||||
if (res.status === 200) {
|
|
||||||
//提交成功,直接关闭当前窗口
|
|
||||||
this.$message.success('提交成功!!!');
|
|
||||||
this.biaoke.dlgShow = false;
|
|
||||||
this.weike.dlgShow = false;
|
|
||||||
//提交成功回调处理
|
|
||||||
this.$emit('submitSuccess');
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.message);
|
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// 教师列标,远程查询
|
// 教师列标,远程查询
|
||||||
async remoteFindTeacher(query) {
|
async remoteFindTeacher(query) {
|
||||||
@@ -1250,6 +1454,13 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.red-tip{
|
||||||
|
margin-top: 8px;
|
||||||
|
color: red;
|
||||||
|
font-size: 14px;
|
||||||
|
float: left;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
::v-deep .wei-from{
|
::v-deep .wei-from{
|
||||||
.el-form-item{
|
.el-form-item{
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|||||||
@@ -83,14 +83,7 @@ export default {
|
|||||||
) {
|
) {
|
||||||
return this.fileBaseUrl + this.course.image;
|
return this.fileBaseUrl + this.course.image;
|
||||||
}
|
}
|
||||||
else if (
|
else if (this.course.coverImg == "" || this.course.courseImage == "" || this.course.image == "") {
|
||||||
this.course &&
|
|
||||||
this.course.images &&
|
|
||||||
this.course.images != ""
|
|
||||||
) {
|
|
||||||
return this.fileBaseUrl + this.course.images;
|
|
||||||
}
|
|
||||||
else if (this.course.coverImg == "" || this.course.courseImage == "" || this.course.image == "" || this.course.images == "") {
|
|
||||||
this.isShow = true;
|
this.isShow = true;
|
||||||
return this.webBaseUrl + "/images/bgimg/course.png";
|
return this.webBaseUrl + "/images/bgimg/course.png";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -529,6 +529,7 @@
|
|||||||
import apiCourseFile from '../../api/modules/courseFile.js';
|
import apiCourseFile from '../../api/modules/courseFile.js';
|
||||||
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||||
import {getType} from '../../utils/tools.js';
|
import {getType} from '../../utils/tools.js';
|
||||||
|
import { deepClone } from "../../utils";
|
||||||
export default{
|
export default{
|
||||||
components:{WxEditor,simplePaper,FileUpload,pdfPreview,audioPlayer},
|
components:{WxEditor,simplePaper,FileUpload,pdfPreview,audioPlayer},
|
||||||
props: {
|
props: {
|
||||||
@@ -576,6 +577,23 @@
|
|||||||
// {id:'5',type:'scorm',name:'SCORM(Q2)',img:'el-icon-suitcase',resType: 50},
|
// {id:'5',type:'scorm',name:'SCORM(Q2)',img:'el-icon-suitcase',resType: 50},
|
||||||
{id:'6',type:'link',name:'外部连接',img:'el-icon-link', resType: 52}
|
{id:'6',type:'link',name:'外部连接',img:'el-icon-link', resType: 52}
|
||||||
],
|
],
|
||||||
|
cwareChange:{
|
||||||
|
show:1,//1表新添加,2表选择
|
||||||
|
content:{id:'',contentType:0,sortIndex:1,contentRefId:'',pdfPath:''},
|
||||||
|
findShow:false,//是否显示查询
|
||||||
|
curType:{type:'jpg',name:''},//这一项要去掉的
|
||||||
|
linkInfo:{
|
||||||
|
openType:1,
|
||||||
|
url:''
|
||||||
|
},
|
||||||
|
curriculumData:{
|
||||||
|
url:'',
|
||||||
|
isDrag:true,
|
||||||
|
completeSetup:0,
|
||||||
|
second:5,
|
||||||
|
setupTage:0,
|
||||||
|
},
|
||||||
|
},
|
||||||
cware:{
|
cware:{
|
||||||
show:1,//1表新添加,2表选择
|
show:1,//1表新添加,2表选择
|
||||||
content:{id:'',contentType:0,sortIndex:1,contentRefId:'',pdfPath:''},
|
content:{id:'',contentType:0,sortIndex:1,contentRefId:'',pdfPath:''},
|
||||||
@@ -609,6 +627,48 @@
|
|||||||
submitMode: 3,
|
submitMode: 3,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
homeworkChange:{
|
||||||
|
show:1,
|
||||||
|
content:{id:'',contentType:60,sortIndex:2},
|
||||||
|
dtime:'',
|
||||||
|
info:{
|
||||||
|
id:'',
|
||||||
|
courseId: '',
|
||||||
|
name:'',
|
||||||
|
content:'',
|
||||||
|
file:'',
|
||||||
|
deadTime: '',
|
||||||
|
submitMode: 3,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
examChange:{
|
||||||
|
show:1,
|
||||||
|
content:{id:'',contentType:61,sortIndex:3},
|
||||||
|
paperJson:{items:[]},
|
||||||
|
paperShow:false,
|
||||||
|
customerShow:false,
|
||||||
|
onlyQuestion:true,
|
||||||
|
info:{
|
||||||
|
courseId:'',
|
||||||
|
contentId:'',
|
||||||
|
testName:this.course.name,
|
||||||
|
testDuration:30,
|
||||||
|
showAnalysis:false,
|
||||||
|
showAnswer:false,
|
||||||
|
times:1,
|
||||||
|
qnum:0,//试题数量,只是模式是随机生成试题时才会有
|
||||||
|
arrange:0,
|
||||||
|
scoringType:1,
|
||||||
|
passLine:60,
|
||||||
|
randomMode:false,
|
||||||
|
percentScore:true,
|
||||||
|
paperType:1,//自定义试卷
|
||||||
|
paperId:'',//试卷的id,只有paperType为2的时间才会有值
|
||||||
|
info:'',//考试说明
|
||||||
|
paperContent:'',//试题的json字符串
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
exam:{
|
exam:{
|
||||||
show:1,
|
show:1,
|
||||||
content:{id:'',contentType:61,sortIndex:3},
|
content:{id:'',contentType:61,sortIndex:3},
|
||||||
@@ -713,6 +773,7 @@
|
|||||||
$this.cware.curriculumData.url=con.content;
|
$this.cware.curriculumData.url=con.content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$this.cwareChange = deepClone($this.cware);
|
||||||
}else if(con.sortIndex==2){
|
}else if(con.sortIndex==2){
|
||||||
$this.homework.content=con;
|
$this.homework.content=con;
|
||||||
//查询作业信息,并显示
|
//查询作业信息,并显示
|
||||||
@@ -758,6 +819,7 @@
|
|||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.homework.info=res.result;
|
this.homework.info=res.result;
|
||||||
this.homework.show=3;//显示作业内容
|
this.homework.show=3;//显示作业内容
|
||||||
|
this.homeworkChange = deepClone(this.homework);
|
||||||
}else if(res.status==404){
|
}else if(res.status==404){
|
||||||
//没有找到作业信息
|
//没有找到作业信息
|
||||||
this.homework.info.id='';
|
this.homework.info.id='';
|
||||||
@@ -773,6 +835,7 @@
|
|||||||
this.exam.info=res.result;
|
this.exam.info=res.result;
|
||||||
this.exam.paperJson=JSON.parse(res.result.paperContent);
|
this.exam.paperJson=JSON.parse(res.result.paperContent);
|
||||||
this.exam.show=9;
|
this.exam.show=9;
|
||||||
|
this.examChange = deepClone(this.exam);
|
||||||
}else if(res.status==404){
|
}else if(res.status==404){
|
||||||
//没有找到作业信息
|
//没有找到作业信息
|
||||||
//this.exam.paperJson={items:[]};
|
//this.exam.paperJson={items:[]};
|
||||||
@@ -890,22 +953,26 @@
|
|||||||
}
|
}
|
||||||
if(index==1){
|
if(index==1){
|
||||||
postData.content=this.cware.content;
|
postData.content=this.cware.content;
|
||||||
|
this.cwareChange.content = deepClone(this.cware.content)
|
||||||
if(this.cware.content.contentType==52){
|
if(this.cware.content.contentType==52){
|
||||||
if(this.cware.linkInfo.url==''){
|
if(this.cware.linkInfo.url==''){
|
||||||
this.$message.error("请填写外连URL地址");
|
this.$message.error("请填写外连URL地址");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
postData.content.content=JSON.stringify(this.cware.linkInfo);
|
postData.content.content=JSON.stringify(this.cware.linkInfo);
|
||||||
|
this.cwareChange.linkInfo = deepClone(this.cware.linkInfo)
|
||||||
}else if(this.cware.content.contentType==10 || this.cware.content.contentType==20){
|
}else if(this.cware.content.contentType==10 || this.cware.content.contentType==20){
|
||||||
if(this.cware.curriculumData.url==''){
|
if(this.cware.curriculumData.url==''){
|
||||||
this.$message.error("请选择课件");
|
this.$message.error("请选择课件");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
postData.content.content=JSON.stringify(this.cware.curriculumData);
|
postData.content.content=JSON.stringify(this.cware.curriculumData);
|
||||||
|
this.cwareChange.curriculumData = deepClone(this.cware.curriculumData)
|
||||||
}
|
}
|
||||||
}else if(index==2){
|
}else if(index==2){
|
||||||
postData.content=this.homework.content;
|
postData.content=this.homework.content;
|
||||||
postData.homework=this.homework.info;
|
postData.homework=this.homework.info;
|
||||||
|
this.homeworkChange = deepClone(this.homework)
|
||||||
}else if(index==3){
|
}else if(index==3){
|
||||||
postData.content=this.exam.content;
|
postData.content=this.exam.content;
|
||||||
//检查是不是所有的试题都有了答案
|
//检查是不是所有的试题都有了答案
|
||||||
@@ -932,6 +999,7 @@
|
|||||||
}
|
}
|
||||||
this.exam.info.paperContent=JSON.stringify(this.exam.paperJson);
|
this.exam.info.paperContent=JSON.stringify(this.exam.paperJson);
|
||||||
postData.exam=this.exam.info;
|
postData.exam=this.exam.info;
|
||||||
|
this.examChange = deepClone(this.exam);
|
||||||
}else if(index==4){
|
}else if(index==4){
|
||||||
this.assess.content.content=JSON.stringify(this.assess.json);
|
this.assess.content.content=JSON.stringify(this.assess.json);
|
||||||
postData.content=this.assess.content;
|
postData.content=this.assess.content;
|
||||||
|
|||||||
Reference in New Issue
Block a user