|
@@ -188,11 +188,11 @@
|
|
currentTimeDisplay: true, // 当前时间
|
|
currentTimeDisplay: true, // 当前时间
|
|
timeDivider: true, // 时间分割线
|
|
timeDivider: true, // 时间分割线
|
|
durationDisplay: true, // 总时间
|
|
durationDisplay: true, // 总时间
|
|
- progressControl: false, // 进度条
|
|
|
|
|
|
+ progressControl: true, // 进度条
|
|
remainingTimeDisplay: true, //
|
|
remainingTimeDisplay: true, //
|
|
customControlSpacer: true, //
|
|
customControlSpacer: true, //
|
|
fullscreenToggle: true, // 全屏按钮
|
|
fullscreenToggle: true, // 全屏按钮
|
|
- volumePanel: false
|
|
|
|
|
|
+ volumePanel: true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
list: [],
|
|
list: [],
|
|
@@ -234,7 +234,7 @@
|
|
this.$router.push(`/center/exam/${courseId}`);
|
|
this.$router.push(`/center/exam/${courseId}`);
|
|
},
|
|
},
|
|
printCert( ){
|
|
printCert( ){
|
|
- if( this.info.getXs < this.info.totalXs || this.info.score < 60){
|
|
|
|
|
|
+ if( this.info.percent < 100 || this.info.score < 60){
|
|
this.$message.errorMsg("课程还未完成", 2)
|
|
this.$message.errorMsg("课程还未完成", 2)
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -261,12 +261,12 @@
|
|
return `获得${gxs}学时, 总共${axs}学时`;
|
|
return `获得${gxs}学时, 总共${axs}学时`;
|
|
},
|
|
},
|
|
formatExam() {
|
|
formatExam() {
|
|
- let {score, scoreTime} = this.info
|
|
|
|
|
|
+ let {score} = this.info
|
|
if( score == -1 ) return `已答0次,未通过`;
|
|
if( score == -1 ) return `已答0次,未通过`;
|
|
- return `最高${score<1?0:score}分, ${score>60?'通过':'未通过'}`;
|
|
|
|
|
|
+ return `最高${score<1?0:score}分, ${score>=60?'通过':'未通过'}`;
|
|
},
|
|
},
|
|
formatPass() {
|
|
formatPass() {
|
|
- let {score, scoreTime} = this.info
|
|
|
|
|
|
+ let {score} = this.info
|
|
if( score == -1 ) return `未参加`;
|
|
if( score == -1 ) return `未参加`;
|
|
return `${score||0}分,${score>=60?'通过':'未通过'}`;
|
|
return `${score||0}分,${score>=60?'通过':'未通过'}`;
|
|
},
|
|
},
|
|
@@ -277,7 +277,7 @@
|
|
this.info = res.data.info;
|
|
this.info = res.data.info;
|
|
let list = res.data.list;
|
|
let list = res.data.list;
|
|
this.list = list.map( (item)=>{
|
|
this.list = list.map( (item)=>{
|
|
- item.percent = getPercent(item);
|
|
|
|
|
|
+ item.percent = getPercent(item)||0;
|
|
return item;
|
|
return item;
|
|
})
|
|
})
|
|
this.updateShowList()
|
|
this.updateShowList()
|
|
@@ -314,26 +314,17 @@
|
|
this.media.isFinish = item.isFinish
|
|
this.media.isFinish = item.isFinish
|
|
this.media.id = item.id
|
|
this.media.id = item.id
|
|
this.media.percent = getPercent(this.media);
|
|
this.media.percent = getPercent(this.media);
|
|
- if( item.isFinish && !this.options.controlBar.progressControl ){
|
|
|
|
- this.$message.successMsg("视频播放完成", 1);
|
|
|
|
- this.options.controlBar.progressControl = true;
|
|
|
|
- }
|
|
|
|
this.updateShowList()
|
|
this.updateShowList()
|
|
},
|
|
},
|
|
// 加载媒体
|
|
// 加载媒体
|
|
loadMedia( item, index ) {
|
|
loadMedia( item, index ) {
|
|
this.media = item;
|
|
this.media = item;
|
|
this.media.index = index
|
|
this.media.index = index
|
|
- this.options.poster = this.info.tb+'?x-oss-process=image/resize,m_lfit,w_200';
|
|
|
|
- this.options.controlBar.progressControl = !!item.isFinish;
|
|
|
|
- if( item.url ){
|
|
|
|
- this.options.sources = [{src:item.url}];
|
|
|
|
- this.mediaDialog = true;
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
httpServer('course.GetMedia', {id:item.id}).then( ({data, code}) => {
|
|
httpServer('course.GetMedia', {id:item.id}).then( ({data, code}) => {
|
|
item.url = data
|
|
item.url = data
|
|
this.options.sources = [{src:item.url}];
|
|
this.options.sources = [{src:item.url}];
|
|
|
|
+ console.log("position", item.position)
|
|
|
|
+ this.options.playtimes = item.position;
|
|
this.mediaDialog = true;
|
|
this.mediaDialog = true;
|
|
});
|
|
});
|
|
}
|
|
}
|