|
@@ -49,6 +49,12 @@
|
|
type="text"
|
|
type="text"
|
|
@click="handleStudy(scope.row)"
|
|
@click="handleStudy(scope.row)"
|
|
>开始学习</el-button>
|
|
>开始学习</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="handleSeeFile(scope.row)"
|
|
|
|
+ >查看资料</el-button>
|
|
|
|
+
|
|
<el-button
|
|
<el-button
|
|
v-if="scope.row.learningProgress >= 100 && scope.row.isSigned == 0"
|
|
v-if="scope.row.learningProgress >= 100 && scope.row.isSigned == 0"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -247,6 +253,28 @@ export default {
|
|
}
|
|
}
|
|
}, 60000);
|
|
}, 60000);
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ handleSeeFile(row) {
|
|
|
|
+ this.learning = {};
|
|
|
|
+ this.learning.learningTimeRequired = row.learningTimeRequired;
|
|
|
|
+ this.learning.learningTimeStudied = row.learningTimeStudied;
|
|
|
|
+ this.learning.learningProgress = row.learningProgress;
|
|
|
|
+
|
|
|
|
+ //office预览
|
|
|
|
+ this.loadingFlash = true
|
|
|
|
+ this.pdf.open = true
|
|
|
|
+ this.pdf.title = row.fileName
|
|
|
|
+ this.pdf.pdfUrl = ""
|
|
|
|
+ this.ppt = true
|
|
|
|
+
|
|
|
|
+ //如果是PDF等直接可以打开的就不调接口,否则调用接口
|
|
|
|
+ if (row.fileName.endsWith('pdf')) {
|
|
|
|
+ this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
|
|
|
|
+ this.loadingFlash = false
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 状态字典翻译
|
|
// 状态字典翻译
|
|
learningStatusFormat(row, column) {
|
|
learningStatusFormat(row, column) {
|
|
return this.selectDictLabel(this.learningStatusOptions, row.learningStatus);
|
|
return this.selectDictLabel(this.learningStatusOptions, row.learningStatus);
|