Merge branch 'boe_0701_icon' into dev0515

# Conflicts:
#	src/views/study/coursenew.vue
This commit is contained in:
zhangsir
2024-07-03 11:40:10 +08:00
2 changed files with 20 additions and 4 deletions

View File

@@ -326,6 +326,7 @@ export default {
return qitems; return qitems;
}, },
startTest(){ startTest(){
this.$emit('startTest',true);
if(this.info.paperType==2){ if(this.info.paperType==2){
apiExamPaper.getPaperContent(this.info.paperId).then(rs=>{ apiExamPaper.getPaperContent(this.info.paperId).then(rs=>{
if(rs.status=200){ if(rs.status=200){

View File

@@ -102,7 +102,7 @@
<homework v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework> <homework v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework>
</div> </div>
<div v-if="resType == 61"> <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>
<div v-if="resType == 62" style="padding:5px"> <div v-if="resType == 62" style="padding:5px">
<assess v-if="resType == 62 && studyId != '' && contentData.id" :studyId="studyId" :content="contentData"> <assess v-if="resType == 62 && studyId != '' && contentData.id" :studyId="studyId" :content="contentData">
@@ -742,9 +742,11 @@
} }
if (this.contentData.status < 2) { if (this.contentData.status < 2) {
// this.contentData.status = 2; //进行中 // this.contentData.status = 2; //进行中
setTimeout(() => { if(r.contentType != 61&&r.contentType != 20 && r.contentType != 10){
this.contentData.status = 2; // 一秒后变为进行中 setTimeout(() => {
}, 3000); this.contentData.status = 2;
}, 3000);
}
} }
//以下是学习记录,50是scorm项目 //以下是学习记录,50是scorm项目
if (this.contentData.contentType > 20 && this.contentData.contentType !== 50) { //非视频类的 if (this.contentData.contentType > 20 && this.contentData.contentType !== 50) { //非视频类的
@@ -1286,6 +1288,9 @@
}, },
audioPlay() { audioPlay() {
//console.log("开始播放"); //console.log("开始播放");
if(this.contentData.contentType == 20){
this.contentData.status = 2;
}
let $this = this; let $this = this;
this.isAppendTime=true; this.isAppendTime=true;
this.appendStudyTime();//启动追加学习时长 this.appendStudyTime();//启动追加学习时长
@@ -1510,9 +1515,19 @@
} }
}); });
}, },
startTest(val){
if(this.contentData.contentType == 61){
this.contentData.status = 2;
}
},
progress(val) { progress(val) {
const progressValue = parseFloat(val) * 100; const progressValue = parseFloat(val) * 100;
this.sendEventProgress = Number(progressValue.toFixed(2)); this.sendEventProgress = Number(progressValue.toFixed(2));
if(this.contentData.contentType == 10){
if(this.sendEventProgress>0&&this.sendEventProgress<3){
this.contentData.status = 2;
}
}
}, },
saveStudyDuration(duration) { //保存本地存储的学习时长 saveStudyDuration(duration) { //保存本地存储的学习时长
if (duration > 0) { if (duration > 0) {