Merge branch 'boe_0705_master' into zcwy-master

# Conflicts:
#	src/assets/images/ban.png
#	src/views/study/coursenew.vue
This commit is contained in:
zhangsir
2024-07-05 17:31:29 +08:00
8 changed files with 102 additions and 20 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
src/assets/images/ban1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -135,13 +135,14 @@
</el-table-column>
<el-table-column label="操作" width="180px" fixed="right">
<template slot-scope="scope" class="btn-gl">
<el-button type="text" size="mini" v-if="scope.row.status == 5 && !scope.row.published" @click="releaseData(scope.row)">发布</el-button>
<el-button v-if="pageManage && scope.row.published" @click="showStudent(scope.row)" type="text" size="mini">学员</el-button>
<el-button v-if="!forChoose && scope.row.published" @click="showManageStudy(scope.row)" type="text" size="mini">管理</el-button>
<el-button v-if="!forChoose && scope.row.status == 2" @click="withdraw(scope.row)" type="text" size="mini">撤回</el-button>
<el-button v-if="scope.row.status != 2" type="text" size="mini" @click="editCurriculum(scope.row)">编辑</el-button>
<el-button v-if="(scope.row.status != 2 && !scope.row.published) || !scope.row.enabled" type="text" size="mini" @click="delItem(scope.row)">删除</el-button>
<el-dropdown v-if="scope.row.published" type="text" size="mini" style="margin-left:10px">
<!-- 20240621 修改scope.row.isPermission = fasle 时不展示操作按钮-->
<el-button type="text" size="mini" v-if="scope.row.isPermission && scope.row.status == 5 && !scope.row.published" @click="releaseData(scope.row)">发布</el-button>
<el-button v-if="scope.row.isPermission && pageManage && scope.row.published" @click="showStudent(scope.row)" type="text" size="mini">学员</el-button>
<el-button v-if="scope.row.isPermission && !forChoose && scope.row.published" @click="showManageStudy(scope.row)" type="text" size="mini">管理</el-button>
<el-button v-if="scope.row.isPermission && !forChoose && scope.row.status == 2" @click="withdraw(scope.row)" type="text" size="mini">撤回</el-button>
<el-button v-if="scope.row.isPermission && scope.row.status != 2" type="text" size="mini" @click="editCurriculum(scope.row)">编辑</el-button>
<el-button v-if="scope.row.isPermission && (scope.row.status != 2 && !scope.row.published) || scope.row.isPermission &&!scope.row.enabled" type="text" size="mini" @click="delItem(scope.row)">删除</el-button>
<el-dropdown v-if="scope.row.isPermission && scope.row.published" type="text" size="mini" style="margin-left:10px">
<el-button type="text" size="mini">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="copyCourse(scope.row)">复制</el-dropdown-item>
@@ -294,6 +295,7 @@ import {courseType} from '../../utils/tools.js';
import apiCourse from '../../api/modules/course.js';
// import {resOwnerIndexName,sysTypeIndexName} from '@/utils/type.js';
import { mapGetters,mapActions } from 'vuex';
import apiUserbasic from "@/api/boe/userbasic.js"
export default {
name: 'manageCourse',
components: {courseForm, manager, auditCourse1, auditCourse2,adminPage},
@@ -302,6 +304,7 @@ export default {
},
data() {
return {
audiences: [],
forChoose:false,
pageManage:false,
showDetails: false,
@@ -384,6 +387,7 @@ export default {
};
},
mounted() {
this.getAudiences()
let chooseFlag=this.$route.query.f;
this.extendRefId=this.$route.query.refId;
this.extendRefType=this.$route.query.refType;
@@ -400,7 +404,7 @@ export default {
}
// this.getTree();
// this.getTypeData();
this.searchData();
// this.searchData();
this.getResOwnerTree().then(rs=>{
this.resOwnerListMap=rs;
});
@@ -414,6 +418,14 @@ export default {
},
methods: {
getAudiences(){
apiUserbasic.getInAudienceIds().then(res=>{
if (res.status == 200) {
this.audiences = res.result;
}
this.searchData();
})
},
showStudent(row){
//出现学员管理
window.parent.openSelectStu(row);
@@ -644,6 +656,16 @@ export default {
this.params.sysType1 = this.sysTypeList[0];
this.params.sysType2 = this.sysTypeList[1];
this.params.sysType3 = this.sysTypeList[2];
if(this.$route.query.courseIds) this.params.courseIds = this.$route.query.courseIds.split(',');
if(this.$route.query.projectId) this.params.projectId = this.$route.query.projectId;
if(this.audiences && this.audiences.length > 0){
this.params.audiences = this.audiences.join(',');
}
if(this.pageManage){
this.params.isCreateCourse = false
}else{
this.params.isCreateCourse = true
}
apiCourse.pageList(this.params).then(rs=>{
if(rs.status==200){
this.pageData = rs.result.list;

View File

@@ -408,7 +408,7 @@ export default {
},
finishStudyItem(){ //设置完成学习的内容,针对于音视频的内容
if(!this.contentData.studyItemId){
//这种可能没有不过这里也是为了万中那个1
// 这种可能没有不过这里也是为了万中那个1
this.saveStudyInfo();
}else{
let params={

View File

@@ -99,10 +99,10 @@
</div>
</div>
<div v-if="resType == 60">
<homework v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework>
<homework @submit="homeWorkSubmit" v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework>
</div>
<div v-if="resType == 61">
<exam v-if="resType == 61 && studyId != '' " :studyId="studyId" :content="contentData"></exam>
<exam @startTest="startTest" v-if="resType == 61 && studyId != '' " :studyId="studyId" :content="contentData"></exam>
</div>
<div v-if="resType == 62" style="padding:5px">
<assess v-if="resType == 62 && studyId != '' && contentData.id" :studyId="studyId" :content="contentData">
@@ -193,10 +193,13 @@
<div style="width: 200px;font-size: 16px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" :title="ele.contentName">{{i+1}}. {{ ele.contentName }}</div>
<div>
<span v-if="contentData.id == ele.id" style="color: #387DF7;font-size: 14px;margin-right: 4px;">学习中</span>
<img v-if="contentData.id == ele.id" :src="`${webBaseUrl}/images/playicon.png`" alt="">
<img v-if="contentData.id != ele.id && ele.status == 9" style="width: 16px;height: 16px;" src="@/assets/images/over.png" alt="">
<!-- <img v-if="contentData.id == ele.id" :src="`${webBaseUrl}/images/playicon.png`" alt=""> -->
<img v-if="contentData.id == ele.id && ele.status == 9" style="width: 16px;height: 16px;" src="@/assets/images/over.png" alt="">
<img v-if="contentData.id == ele.id && ele.status == 0" style="width: 16px;height: 16px;" src="@/assets/images/nowNot.png" alt="">
<img v-if="contentData.id == ele.id && (ele.status != 9&&ele.status != 0)" style="width: 16px;height: 16px;" src="@/assets/images/ban1.png" alt="">
<img v-if="contentData.id != ele.id && ele.status == 9" style="width: 16px;height: 16px;" src="@/assets/images/notNew.png" alt="">
<img v-if="contentData.id != ele.id && ele.status == 0" style="width: 16px;height: 16px;" src="@/assets/images/not.png" alt="">
<img v-if="contentData.id != ele.id && (ele.status != 9&&ele.status != 0)" style="width: 16px;height: 16px;" src="@/assets/images/ban.png" alt="">
<img v-if="contentData.id != ele.id && (ele.status != 9&&ele.status != 0)" style="width: 16px;height: 16px;" src="@/assets/images/newBan.png" alt="">
</div>
</div>
</el-menu-item>
@@ -215,10 +218,21 @@
</div>
<div v-else class="catalog">
<!-- contentList -->
<div class="units-info" v-for="(list, index) in contentList" :key="index" :name="index" @click="showRes(list,-1,index)" :class="{'units-active':contentData.id == list.id}">
<div class="units-info" style="display: flex;justify-content: space-between" v-for="(list, index) in contentList" :key="index" :name="index" @click="showRes(list,-1,index)" :class="{'units-active':contentData.id == list.id}">
<!-- <div class="units-info" :class="{'units-active':contentData.id == ele.id}" @click="showRes(ele,i,index)" v-for="(ele, i) in item.children" :key="i"> -->
<img v-if="contentData.id == list.id" :src="`${webBaseUrl}/images/playicon.png`" alt=""> {{index+1}}.
{{ list.contentName }}
<!-- <img v-if="contentData.id == list.id" :src="`${webBaseUrl}/images/playicon.png`" alt=""> -->
<div style="max-width: 193px;;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
{{index+1}}.{{ list.contentName }}
</div>
<div style="margin-left: 5px">
<span v-if="contentData.id == list.id" style="color: #387DF7;font-size: 14px;margin-right: 4px;">学习中</span>
<img v-if="contentData.id == list.id && list.status == 9" style="width: 16px;height: 16px;" src="@/assets/images/over.png" alt="">
<img v-if="contentData.id == list.id && list.status == 0" style="width: 16px;height: 16px;" src="@/assets/images/nowNot.png" alt="">
<img v-if="contentData.id == list.id && (list.status != 9&&list.status != 0)" style="width: 16px;height: 16px;" src="@/assets/images/ban1.png" alt="">
<img v-if="contentData.id != list.id && list.status == 9" style="width: 16px;height: 16px;" src="@/assets/images/notNew.png" alt="">
<img v-if="contentData.id != list.id && list.status == 0" style="width: 16px;height: 16px;" src="@/assets/images/not.png" alt="">
<img v-if="contentData.id != list.id && (list.status != 9&&list.status != 0)" style="width: 16px;height: 16px;" src="@/assets/images/newBan.png" alt="">
</div>
<!-- </div> -->
</div>
</div>
@@ -355,6 +369,8 @@
},
data() {
return {
isContentTypeTwo: null,
isContentType: null,
activeId: '',
isFalse: false,
defaultOpeneds: [],
@@ -734,7 +750,13 @@
//console.log('评估处理');
}
if (this.contentData.status < 2) {
this.contentData.status = 2; //进行中
// this.contentData.status = 2; //进行中
if(r.contentType != 61&&r.contentType != 20 && r.contentType != 10){
setTimeout(() => {
this.isContentTypeTwo = r.contentType
$this.isShowTime()
}, 2000);
}
}
//以下是学习记录,50是scorm项目
if (this.contentData.contentType > 20 && this.contentData.contentType !== 50) { //非视频类的
@@ -763,6 +785,7 @@
$this.appendStudyOtherTime();
}, 15000); //非音视频课程学习,十五秒后记录
//this.appendStudyTime();
this.isContentType = this.contentData.contentType
if (this.contentData.contentType != 50) {
this.handleTimeout = setTimeout(function(){
$this.saveStudyInfo();
@@ -791,6 +814,12 @@
//console.log(h,$this.controlHeight,'$this.controlHeight');
})
},
isShowTime(){
if(this.isContentTypeTwo != this.contentData.contentType){
return
}
this.contentData.status = 2;
},
showRes(r, i, index,item) { //i:子节下标index:章下标
// 无权限查看不能点击
if(!this.isCrowd){
@@ -1080,6 +1109,11 @@
onPlayerPlay() {
//console.log("开始播放");
// if(this.contentData.contentType == 10){
// if(this.contentData.status<2){
// this.contentData.status = 2;
// }
// }
this.playerBoxShow = false;
let $this = this;
//这里有些不准备,如果文件未能加载,这个事件就是错误的
@@ -1182,6 +1216,7 @@
audioPlaying(item, currentTime) {
//console.log("当前播放"+item);
let intTime = parseInt(currentTime);
this.handleAudioTimeUpdate(intTime)
//判断是否完成
let completeType = this.curriculumData.completeSetup;
let completeSecond = this.curriculumData.second;
@@ -1221,6 +1256,9 @@
},
audioPlay() {
//console.log("开始播放");
// if(this.contentData.contentType == 20 && this.contentData.status < 2){
// this.contentData.status = 2;
// }
let $this = this;
this.isAppendTime=true;
this.appendStudyTime();//启动追加学习时长
@@ -1416,6 +1454,12 @@
});
},
saveStudyInfo() {
if(this.isContentType){
if(this.isContentType != this.contentData.contentType){
//定时器产生的,不记录
return
}
}
//记录课件学习信息
if (this.contentData.contentType >= 60) {
//只有在课件页面停留超过5秒才会记录
@@ -1444,7 +1488,19 @@
}
});
},
progress(val) {
homeWorkSubmit(){
if(this.contentData.contentType == 60){
this.contentData.status = 9;
}
},
startTest(val){
if(this.contentData.contentType == 61){
if(this.contentData.status < 2){
this.contentData.status = 2;
}
}
},
progress(val) {
const progressValue = parseFloat(val) * 100;
this.sendEventProgress = Number(progressValue.toFixed(2));
},
@@ -1661,7 +1717,11 @@
contentTotal: this.totalContent
};
if(currentTime > 2 && this.trueFalse){
apiStudy.studyContent(params)
apiStudy.studyContent(params).then(()=>{
if(this.contentData.status<2){
this.contentData.status = 2;
}
})
this.trueFalse = false
}
// }