除视频音频考试三秒

This commit is contained in:
zhangsir
2024-07-03 11:37:47 +08:00
parent e016e1aacc
commit 3e8ec03c0e
2 changed files with 20 additions and 4 deletions

View File

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

View File

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