|
@@ -116,6 +116,9 @@
|
|
|
v-dialogDrag :title="pdf.title"
|
|
|
:visible.sync="pdf.open" width="1300px" height="800px" :center="true" append-to-body
|
|
|
@close="handleClose">
|
|
|
+ <div style="margin-top: -60px;float: right;margin-right: 40px;">
|
|
|
+ <br/>累计学习时长:{{learnTime}} min
|
|
|
+ </div>
|
|
|
<div style="margin-top: -30px">
|
|
|
<iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"
|
|
|
v-if="ppt"></iframe>
|
|
@@ -241,6 +244,7 @@ export default {
|
|
|
data: {}
|
|
|
},
|
|
|
ppt: false,
|
|
|
+ learnTime: null,
|
|
|
pdf: {
|
|
|
title: '',
|
|
|
pdfUrl: '',
|
|
@@ -411,25 +415,34 @@ export default {
|
|
|
this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
|
|
|
|
|
|
}
|
|
|
+ this.learnTime = row.timer;
|
|
|
let _this = this;
|
|
|
if (this.planType === 1) {
|
|
|
timer = window.setInterval(function () {
|
|
|
updateLjLearnTime(row).then(res => {
|
|
|
+ this.file.data.timer = res.data
|
|
|
+ this.learnTime+=res.data;
|
|
|
})
|
|
|
}, 60000);
|
|
|
} else if (this.planType === 2) {
|
|
|
timer = window.setInterval(function () {
|
|
|
updateYsLearnTime(row).then(res => {
|
|
|
+ this.file.data.timer = res.data
|
|
|
+ this.learnTime+=res.data;
|
|
|
})
|
|
|
}, 60000);
|
|
|
} else if (this.planType === 3) {
|
|
|
timer = window.setInterval(function () {
|
|
|
updateFlLearnTime(row).then(res => {
|
|
|
+ this.file.data.timer = res.data
|
|
|
+ this.learnTime+=res.data;
|
|
|
})
|
|
|
}, 60000);
|
|
|
} else if (this.planType === 4) {
|
|
|
timer = window.setInterval(function () {
|
|
|
updateFtLearnTime(row).then(res => {
|
|
|
+ this.file.data.timer = res.data
|
|
|
+ this.learnTime+=res.data;
|
|
|
})
|
|
|
}, 60000);
|
|
|
}
|
|
@@ -448,7 +461,7 @@ export default {
|
|
|
let item = this.dsdtList[i];
|
|
|
if (item.id === row.id) {
|
|
|
if (row.id !== this.dsdtList[i - 1].id) {
|
|
|
- if (this.dsdtList[i - 1].planStatus !== 5) {
|
|
|
+ if (this.dsdtList[i - 1].planStatus !== 5&&this.dsdtList[i - 1].planStatus !== 3) {
|
|
|
this.$alert('您必须完成上一项考试才可学习当前资料!', "注意", {dangerouslyUseHTMLString: true});
|
|
|
return;
|
|
|
}
|