|
@@ -174,7 +174,7 @@ export default {
|
|
|
)
|
|
|
},
|
|
|
//查询当前评测的完整信息
|
|
|
- findExamInfo(examId, code) {
|
|
|
+ findExamInfo(examId, code, scope) {
|
|
|
let requestData = {
|
|
|
id: examId,
|
|
|
code: code.includes('Exam-') ? code : 'Exam-' + code
|
|
@@ -195,7 +195,19 @@ export default {
|
|
|
let blob = resData.papers[index].blob
|
|
|
resData.papers[index].examScope = resData.scope
|
|
|
resData.papers[index].examId = resData.id
|
|
|
- resData.papers[index] = await this.$evTools.getFullPaper(resData.papers[index])
|
|
|
+ // resData.papers[index] = await this.$evTools.getFullPaper(resData.papers[index])
|
|
|
+ try {
|
|
|
+ let tmdid = code.includes('Exam-') ? code.substr(code.lastIndexOf("-") + 1) : code
|
|
|
+ if(tmdid != this.$store.state.userInfo.TEAMModelId && scope != 'school') {
|
|
|
+ resData.papers[index] = await this.$evTools.getFullPaperByTmdId(tmdid, resData.papers[index].blob)
|
|
|
+ } else {
|
|
|
+ resData.papers[index] = await this.$evTools.getFullPaper(resData.papers[index])
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ resData.papers[index].item = [];
|
|
|
+ resData.examPaperErr = true;
|
|
|
+ this.$Message.error(this.$t("learnActivity.simple.paperErr"));
|
|
|
+ }
|
|
|
resData.papers[index].blob = blob
|
|
|
//处理试卷渲染组件需要的字段
|
|
|
resData.papers[index].examScope = resData.scope
|
|
@@ -272,8 +284,9 @@ export default {
|
|
|
created() {
|
|
|
let examId = this.$route.query.examId
|
|
|
let code = this.$route.query.code
|
|
|
- if (examId && code) {
|
|
|
- this.findExamInfo(examId, code)
|
|
|
+ let scope = this.$route.query.scope
|
|
|
+ if (examId && code && scope) {
|
|
|
+ this.findExamInfo(examId, code, scope)
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
path: '/home/myCourse'
|