|
|
|
@ -89,7 +89,7 @@ |
|
|
|
|
<!-- 考核成绩 --> |
|
|
|
|
<view v-show="curTab === 3"> |
|
|
|
|
<view v-if="ass.length" class="list"> |
|
|
|
|
<view v-for="(item, i) in ass" :key="i" class="item" @click="toDetail(item)"> |
|
|
|
|
<view v-for="(item, i) in ass" :key="i" class="item" @click="toReport(item)"> |
|
|
|
|
<view class="c-name">{{ item.experimentalName }}</view> |
|
|
|
|
<view class="line">得分:{{ item.score }}  耗时:{{ item.timeSum }}min</view> |
|
|
|
|
<view class="line">考核开始时间:{{ item.startTime }}</view> |
|
|
|
@ -104,7 +104,7 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { queryChaptersAndSubsections, detailsOfGoods, queryPracticeByStudent, queryAssessmentByStudent, getPlayAuth, playRecordSave, recordRecentUsage } from '@/apis/modules/course.js' |
|
|
|
|
import { queryChaptersAndSubsections, detailsOfGoods, queryPracticeByStudent, queryAssessmentByStudent, getPlayAuth, playRecordSave, recordRecentUsage, getALinkToTheExperimentReport, getExamPaperReportUrl } from '@/apis/modules/course.js' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -303,6 +303,46 @@ |
|
|
|
|
toPrac(row) { |
|
|
|
|
this.$util.to(`../practiceDetail/practiceDetail?cid=${this.cid}&projectId=${row.projectId || ''}&paperId=${row.paperId || ''}`) |
|
|
|
|
}, |
|
|
|
|
// 考核查看实验报告 |
|
|
|
|
async toReport(row) { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '加载中', |
|
|
|
|
mask: true |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
let res |
|
|
|
|
if (row.paperId) { |
|
|
|
|
// 理论 |
|
|
|
|
res = await getExamPaperReportUrl({ |
|
|
|
|
reportId: row.reportId |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
// 导出 |
|
|
|
|
res = await getALinkToTheExperimentReport(row.reportId) |
|
|
|
|
} |
|
|
|
|
// 下载文件资源到本地 |
|
|
|
|
uni.downloadFile({ |
|
|
|
|
url: res.url, |
|
|
|
|
success: function(res) { |
|
|
|
|
console.log(11, res) |
|
|
|
|
// 新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx。 |
|
|
|
|
uni.openDocument({ |
|
|
|
|
filePath: res.tempFilePath, |
|
|
|
|
fileType: 'docx', // 文件类型,指定文件类型打开文件,有效值 doc, xls, ppt, pdf, docx, xlsx, pptx |
|
|
|
|
showMenu: true, // 允许出现分享功能 |
|
|
|
|
success: res => { |
|
|
|
|
uni.hideLoading() |
|
|
|
|
}, |
|
|
|
|
fail: openError => { |
|
|
|
|
uni.hideLoading() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
fail: function(err) { |
|
|
|
|
uni.hideLoading() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 判断文件是图片/视频/pdf等 |
|
|
|
|
handleFileType(row) { |
|
|
|
@ -322,64 +362,6 @@ |
|
|
|
|
this.playListVisible = false |
|
|
|
|
this.videoFullScreen = false |
|
|
|
|
this.handleFileType(row) |
|
|
|
|
// debugger |
|
|
|
|
if (this.curRow.isVideo) { |
|
|
|
|
// 阿里云视频点播 |
|
|
|
|
if (row.fileId) { |
|
|
|
|
getPlayAuth(row.fileId).then(res => { |
|
|
|
|
this.playAuth = res.playAuth; |
|
|
|
|
// 如果已经产生了实例,则销毁重新创建,不然播放器会播放上一个视频 |
|
|
|
|
if (this.player) { |
|
|
|
|
this.player.dispose() |
|
|
|
|
this.player = null |
|
|
|
|
} |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
if (this.player) { |
|
|
|
|
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth); |
|
|
|
|
} else { |
|
|
|
|
this.player = new Aliplayer({ |
|
|
|
|
id: "player", |
|
|
|
|
width: "100%", |
|
|
|
|
autoplay: false, |
|
|
|
|
vid: row.fileId, |
|
|
|
|
playauth: this.playAuth, |
|
|
|
|
encryptType: 1 //当播放私有加密流时需要设置。 |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}).catch(res => { }); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// const that = this |
|
|
|
|
// uni.downloadFile({ |
|
|
|
|
// // url: this.curRow.fileUrl, |
|
|
|
|
// url: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/1732589800544.xlsx', |
|
|
|
|
// success: function(res) { |
|
|
|
|
// console.log(11, res) |
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
// uni.showLoading({ |
|
|
|
|
// title: '正在打开', |
|
|
|
|
// mask: true |
|
|
|
|
// }) |
|
|
|
|
// // 新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx。 |
|
|
|
|
// uni.openDocument({ |
|
|
|
|
// filePath: res.tempFilePath, |
|
|
|
|
// // fileType: that.curRow.fileType, // 文件类型,指定文件类型打开文件,有效值 doc, xls, ppt, pdf, docx, xlsx, pptx |
|
|
|
|
// fileType: 'xlsx', |
|
|
|
|
// showMenu: true, // 允许出现分享功能 |
|
|
|
|
// success: res => { |
|
|
|
|
// uni.hideLoading() |
|
|
|
|
// }, |
|
|
|
|
// fail: openError => { |
|
|
|
|
// uni.hideLoading() |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// }, |
|
|
|
|
// fail: function(err) { |
|
|
|
|
// uni.hideLoading() |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 视频全屏回调 |
|
|
|
|
fullScreenChange(e) { |
|
|
|
|