mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
Merge branch 'pre-master' into 'master'
Pre master See merge request !9
This commit is contained in:
@@ -183,6 +183,9 @@
|
||||
<div v-if="coursewareInfo.content.contentType == 41">
|
||||
<div class="picture-text" v-html="coursewareInfo.content.content"></div>
|
||||
</div>
|
||||
<div v-if="coursewareInfo.content.contentType == 50">
|
||||
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" border="0px" style="width:100%;height:510px;border:0px;"></iframe>
|
||||
</div>
|
||||
<div v-if="coursewareInfo.content.contentType == 52">
|
||||
<div v-if="coursewareInfo.content.content!=''">
|
||||
<!-- <hyper-link :content="coursewareInfo.content"></hyper-link> -->
|
||||
@@ -202,16 +205,16 @@
|
||||
<el-tab-pane label="修改记录" name="record" v-if="isShow">
|
||||
<div class="grid-info">
|
||||
<el-table border style="margin-bottom: 20px" height="350" :data="dataList">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-table border style="margin-bottom: 10px" :data="props.row.logData">
|
||||
<el-table-column label="内容" prop="title"></el-table-column>
|
||||
<el-table-column label="修改前" prop="before" show-overflow-tooltip>
|
||||
<template slot-scope="props">
|
||||
{{props.row.before == 'null' || props.row.before == ''? '--':props.row.before}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修改后" prop="after" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-table border style="margin-bottom: 10px" :data="props.row.logData">
|
||||
<el-table-column label="内容" prop="title"></el-table-column>
|
||||
<el-table-column label="修改前" prop="before" show-overflow-tooltip>
|
||||
<template slot-scope="props">
|
||||
{{props.row.before == 'null' || props.row.before == ''? '--':props.row.before}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修改后" prop="after" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -269,7 +272,7 @@ export default {
|
||||
pdfPreview,
|
||||
videoPlayer,
|
||||
audioPlayer,
|
||||
chooseOrg
|
||||
chooseOrg,
|
||||
// hyperLink
|
||||
},
|
||||
computed: {
|
||||
@@ -303,6 +306,7 @@ export default {
|
||||
converStatus:4,
|
||||
courseType: courseType,
|
||||
isEdit: true,
|
||||
scormUrl:'',
|
||||
homeworkInfo: {},
|
||||
examInfo: {},
|
||||
assessInfo: {},
|
||||
@@ -703,6 +707,35 @@ export default {
|
||||
$this.$message.error('加载pdf课件文件失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
if($this.coursewareInfo.content.contentType == 50){
|
||||
apiCourseFile.detail(con.contentRefId).then(scormFile => {
|
||||
if (!scormFile.status == 200) {
|
||||
$this.$message.error('加载SCORM课件失败');
|
||||
}else{
|
||||
var curContent=scormFile.result;
|
||||
//console.log(curContent,'curContent')
|
||||
if(!curContent.content){
|
||||
this.$message({type: 'error',message: '无SCORM内容,SCORM包解析失败'});
|
||||
return;
|
||||
}
|
||||
//scorm课件的内容,取第一个sco
|
||||
var scorm=JSON.parse(curContent.content);
|
||||
//console.log(scorm,'scorm')
|
||||
if(scorm){
|
||||
let urlPre=window.location.protocol;
|
||||
let configUrl=process.env.VUE_APP_SCORM_URL;
|
||||
configUrl=urlPre+configUrl.substring(configUrl.indexOf(':')+1);
|
||||
//这里需要提取的到配置文件中,实际中只需要传 rowId就可以了
|
||||
this.scormUrl=configUrl+'?mode=preview&scormId='+curContent.id;//播放的首页
|
||||
}else{
|
||||
this.$message({type: 'error',message: 'SCORM包解析失败'});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
} else if (con.sortIndex == 2) {
|
||||
$this.homeworkInfo = con;
|
||||
|
||||
@@ -202,6 +202,9 @@
|
||||
<!-- <iframe :src="contentData.content" style="width: 100%;border:0px;min-height: 473px;" frameborder="0"></iframe> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="contentData.contentType == 50">
|
||||
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" border="0px" style="width:100%;height:510px;border:0px;"></iframe>
|
||||
</div>
|
||||
<div v-if="contentData.contentType == 60">
|
||||
<homework :showTest="showTest" :showRecord="isDetails" :showSubmit="false" :content="contentData" ></homework>
|
||||
</div>
|
||||
@@ -346,6 +349,7 @@ export default {
|
||||
isEdit: true,
|
||||
fileBaseUrl: this.$xpage.constants.fileBaseUrl,
|
||||
contentData: {},
|
||||
scormUrl:'',
|
||||
curCFile:{},//课件内容
|
||||
getType: getType,
|
||||
btnLoading: false,
|
||||
@@ -763,6 +767,31 @@ export default {
|
||||
}
|
||||
});
|
||||
|
||||
}else if(r.contentType == 50){
|
||||
apiCourseFile.detail(r.contentRefId).then(scormFile => {
|
||||
if (!scormFile.status == 200) {
|
||||
$this.$message.error('加载SCORM课件失败');
|
||||
}else{
|
||||
var curContent=scormFile.result;
|
||||
//console.log(curContent,'curContent')
|
||||
if(!curContent.content){
|
||||
this.$message({type: 'error',message: '无SCORM内容,SCORM包解析失败'});
|
||||
return;
|
||||
}
|
||||
//scorm课件的内容,取第一个sco
|
||||
var scorm=JSON.parse(curContent.content);
|
||||
//console.log(scorm,'scorm')
|
||||
if(scorm){
|
||||
let urlPre=window.location.protocol;
|
||||
let configUrl=process.env.VUE_APP_SCORM_URL;
|
||||
configUrl=urlPre+configUrl.substring(configUrl.indexOf(':')+1);
|
||||
//这里需要提取的到配置文件中,实际中只需要传 rowId就可以了
|
||||
this.scormUrl=configUrl+'?mode=preview&scormId='+curContent.id;//播放的首页
|
||||
}else{
|
||||
this.$message({type: 'error',message: 'SCORM包解析失败'});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
this.type = 0;
|
||||
},
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</span> -->
|
||||
</el-dialog>
|
||||
<!--微课-->
|
||||
<el-dialog width="980px" :title="curCourseId == '' ? '新建课程' : '编辑课程'" :visible.sync="weike.dlgShow" :close-on-click-modal="false" custom-class="g-dialog" top="8vh">
|
||||
<el-dialog v-if="weike.dlgShow" width="980px" :title="curCourseId == '' ? '新建课程' : '编辑课程'" :visible.sync="weike.dlgShow" :close-on-click-modal="false" custom-class="g-dialog" top="8vh">
|
||||
<el-form label-width="100px" size="small" class="wei-from" style="min-height: 600px;">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="10">
|
||||
@@ -108,6 +108,9 @@
|
||||
<el-form-item label="目标人群" required>
|
||||
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="visibleShow" label="学员可见">
|
||||
<el-checkbox v-model="courseInfo.visible"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="受众" v-if="!weike.onlyRequired">
|
||||
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple :clearable="false" @remove-tag="removeCrowd" placeholder="请选择">
|
||||
<el-option v-for="item in userGroupList" :key="item.id" :disabled="item.disabled" :label="item.name" :value="item"></el-option>
|
||||
@@ -188,7 +191,7 @@
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--录播课-->
|
||||
<el-dialog width="980px" :title="curCourseId == '' ? '新建课程' : '编辑课程'" :visible.sync="biaoke.dlgShow" :close-on-click-modal="false" custom-class="g-dialog" top="8vh">
|
||||
<el-dialog v-if="biaoke.dlgShow" width="980px" :title="curCourseId == '' ? '新建课程' : '编辑课程'" :visible.sync="biaoke.dlgShow" :close-on-click-modal="false" custom-class="g-dialog" top="8vh">
|
||||
<el-tabs v-model="biaoke.tabIndex" @tab-click="changeBiaokeTab" style="min-height: 600px;">
|
||||
<el-tab-pane label="课程信息" name="base" style="width: 90%;">
|
||||
<!-- :rules="rulesTwo" -->
|
||||
@@ -256,7 +259,14 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="目标人群" required>
|
||||
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
|
||||
<el-col :span="14">
|
||||
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item v-if="visibleShow" label="学员可见">
|
||||
<el-checkbox v-model="courseInfo.visible"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="受众"><!--:disabled="item.disabled"-->
|
||||
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple :clearable="false" @remove-tag="removeCrowd" placeholder="请选择">
|
||||
@@ -463,7 +473,13 @@ export default {
|
||||
status: 1,
|
||||
summary: '',
|
||||
overview: '',
|
||||
visible:true,
|
||||
refId:'',
|
||||
refType:''
|
||||
},
|
||||
visibleShow:false,
|
||||
extendRefId:'',
|
||||
extendRefType:'',
|
||||
courseTeachers: [], //课程的老师
|
||||
courseCrowds:[],//课程的用户受众
|
||||
curContent: { id: '', contentType: 0, csectionId: '', contentName: '', contentRefId: '' }, //当前编辑的内容
|
||||
@@ -534,6 +550,13 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let extendFlag=this.$route.query.f; //是否是管理端过来的
|
||||
this.extendRefId=this.$route.query.refId;
|
||||
this.extendRefType=this.$route.query.refType;
|
||||
if(extendFlag && extendFlag=='choose'){
|
||||
this.visibleShow=true;
|
||||
}
|
||||
//console.log("url参数",extendFlag,this.extendRefId,this.extendRefType)
|
||||
this.curStepIndex = 1; //回到第一步
|
||||
this.btnLoading = false;
|
||||
this.getResOwnerTree().then(rs => {
|
||||
@@ -705,8 +728,13 @@ export default {
|
||||
status: 1,
|
||||
summary: '',
|
||||
overview: '',
|
||||
// checked:false,
|
||||
visible:true,
|
||||
refId:this.extendRefId,
|
||||
refType:this.extendRefType
|
||||
};
|
||||
if(this.extendRefId){
|
||||
this.courseInfo.visible=false;
|
||||
}
|
||||
this.contentInfo.list = [];
|
||||
this.sectionInfo.list = [];
|
||||
this.courseTeachers = [];
|
||||
@@ -842,6 +870,9 @@ export default {
|
||||
const { result, status } = await apiCourse.detail(id);
|
||||
if (status === 200) {
|
||||
//把数据附给三个对象
|
||||
if(result.course.visible==''){
|
||||
result.course.visible=true;
|
||||
}
|
||||
this.courseInfo = result.course;
|
||||
this.checked = false;
|
||||
this.contentInfo.list = result.contents;
|
||||
|
||||
@@ -162,7 +162,10 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||
|
||||
setCurIdentity(iden){
|
||||
this.$store.dispatch('SetCurIdentity',iden);
|
||||
this.$router.push('/manager/index');
|
||||
if(iden>2){
|
||||
this.$router.push('/manager/index');
|
||||
}
|
||||
//
|
||||
// if(this.isTest){
|
||||
// //this.$router.push('/manage/learningpath');
|
||||
// location.href='/manage/learningpath';
|
||||
|
||||
@@ -258,14 +258,13 @@
|
||||
<!-- <i class="el-icon-menu"></i> -->
|
||||
<span slot="title" class="textl">我的考试</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/uc/study/path" v-show="isTest">
|
||||
<!-- <i class="el-icon-menu"></i> -->
|
||||
<!---去掉->
|
||||
<!-- <el-menu-item index="/uc/study/path" v-show="isTest">
|
||||
<span slot="title" class="textl">学习路径图</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/uc/study/project" v-show="isTest">
|
||||
<!-- <i class="el-icon-menu"></i> -->
|
||||
<span slot="title" class="textl">学习项目</span>
|
||||
</el-menu-item>
|
||||
</el-menu-item> -->
|
||||
<!-- <el-menu-item index="/uc/study/history"> -->
|
||||
<!-- <i class="el-icon-menu"></i> -->
|
||||
<!-- <span slot="title" class="textl">历史记录</span>
|
||||
|
||||
Reference in New Issue
Block a user