|
|
@ -278,6 +278,7 @@ export default { |
|
|
|
resultsDetails: Cookie.get('admin-resultsDetails'), |
|
|
|
resultsDetails: Cookie.get('admin-resultsDetails'), |
|
|
|
resultAnnouncementTime: Cookie.get('admin-resultAnnouncementTime'), |
|
|
|
resultAnnouncementTime: Cookie.get('admin-resultAnnouncementTime'), |
|
|
|
curriculumName: Cookie.get('admin-curriculumName') ? unescape(Cookie.get('admin-curriculumName')) : 'python', // 课程名称 |
|
|
|
curriculumName: Cookie.get('admin-curriculumName') ? unescape(Cookie.get('admin-curriculumName')) : 'python', // 课程名称 |
|
|
|
|
|
|
|
fromManager: Cookie.get('admin-fromManager'), // 是否是从教师端进入 |
|
|
|
curSystemId: 1, |
|
|
|
curSystemId: 1, |
|
|
|
projectPermissions: 0, // 项目权限(0、练习 1、考核 2、竞赛) |
|
|
|
projectPermissions: 0, // 项目权限(0、练习 1、考核 2、竞赛) |
|
|
|
isSubmit: Cookie.get('admin-isSubmit') == 'true' ? true : false, // 是否提交的标识 |
|
|
|
isSubmit: Cookie.get('admin-isSubmit') == 'true' ? true : false, // 是否提交的标识 |
|
|
@ -381,6 +382,7 @@ export default { |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
systemId: this.systemId, |
|
|
|
systemId: this.systemId, |
|
|
|
cId: this.courseId, // 课程id |
|
|
|
cId: this.courseId, // 课程id |
|
|
|
|
|
|
|
mallId: this.mallId, |
|
|
|
permissions: this.projectPermissions // 练习/考核/竞赛 |
|
|
|
permissions: this.projectPermissions // 练习/考核/竞赛 |
|
|
|
} |
|
|
|
} |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
@ -444,8 +446,7 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.reportPoints = reportPoints |
|
|
|
this.reportPoints = reportPoints |
|
|
|
if (points.length) this.reportTab = reportPoints[0].judgmentId + '' |
|
|
|
if (points.length) this.reportTab = reportPoints[0].judgmentId + '' |
|
|
|
console.log("🚀 ~ file: TestPanel.vue:423 ~ returnnewPromise ~ this.reportTab:", points, this.reportTab) |
|
|
|
this.taskList = this.isSubmit ? this.$store.state.taskList : points // 实验任务 |
|
|
|
this.taskList = points // 实验任务 |
|
|
|
|
|
|
|
this.judgmentId = points[0].judgmentId // 默认取第一个判分点 |
|
|
|
this.judgmentId = points[0].judgmentId // 默认取第一个判分点 |
|
|
|
this.experimentTarget = project.experimentTarget |
|
|
|
this.experimentTarget = project.experimentTarget |
|
|
|
this.experimentDescription = project.experimentDescription |
|
|
|
this.experimentDescription = project.experimentDescription |
|
|
@ -675,7 +676,20 @@ export default { |
|
|
|
// 查看实验报告 |
|
|
|
// 查看实验报告 |
|
|
|
toReport () { |
|
|
|
toReport () { |
|
|
|
Cookie.set('doneProjectId', this.projectId) // 进入实验报告之前先存储当前项目id,从实验报告返回来后把这个id恢复 |
|
|
|
Cookie.set('doneProjectId', this.projectId) // 进入实验报告之前先存储当前项目id,从实验报告返回来后把这个id恢复 |
|
|
|
this.$router.push(`/report?reportId=${this.$store.state.reportId}`) |
|
|
|
const { reportId } = this.$store.state |
|
|
|
|
|
|
|
// 老师端进来的,直接跳转到实验报告,学生端进来的,跳转到实验记录里的实验报告 |
|
|
|
|
|
|
|
if (this.fromManager) { |
|
|
|
|
|
|
|
this.$router.push(`/report?reportId=${reportId}`) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
let href = location.origin |
|
|
|
|
|
|
|
if (!this.$config.isPro && !this.$config.isZxy) href += '/student' |
|
|
|
|
|
|
|
href += `/#/record/show?python=1&reportId=${reportId}` |
|
|
|
|
|
|
|
// 练习 |
|
|
|
|
|
|
|
if (this.projectPermissions == 0) { |
|
|
|
|
|
|
|
href += `&curriculumId=${this.courseId}&projectId=${this.projectId}` |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
location.href = href |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
//重新开始 |
|
|
|
//重新开始 |
|
|
|
reload () { |
|
|
|
reload () { |
|
|
@ -811,7 +825,7 @@ export default { |
|
|
|
clearInterval(this.statusTimer) |
|
|
|
clearInterval(this.statusTimer) |
|
|
|
this.reportVisible = false |
|
|
|
this.reportVisible = false |
|
|
|
let list = retInfo |
|
|
|
let list = retInfo |
|
|
|
let taskList = this.taskList |
|
|
|
let { taskList } = this |
|
|
|
let score = 0 |
|
|
|
let score = 0 |
|
|
|
// 给判分列表添加分数和运行结果 |
|
|
|
// 给判分列表添加分数和运行结果 |
|
|
|
taskList.map(e => { |
|
|
|
taskList.map(e => { |
|
|
@ -827,6 +841,7 @@ export default { |
|
|
|
this.grade = util.handleZero(score) // 前置加0(竞赛不显示分数) |
|
|
|
this.grade = util.handleZero(score) // 前置加0(竞赛不显示分数) |
|
|
|
this.reportId = reportId |
|
|
|
this.reportId = reportId |
|
|
|
this.$store.commit('setReportId', reportId) |
|
|
|
this.$store.commit('setReportId', reportId) |
|
|
|
|
|
|
|
this.$store.commit('setTaskList', taskList) |
|
|
|
this.editReport(reportId) |
|
|
|
this.editReport(reportId) |
|
|
|
// 如果是竞赛,并且勾选了公布成绩详情的选项,则弹框提示 |
|
|
|
// 如果是竞赛,并且勾选了公布成绩详情的选项,则弹框提示 |
|
|
|
this.competitionId && this.resultsDetails == 0 && this.$alert('提交成功,成绩将在' + this.resultAnnouncementTime + '小时后发布,请去参赛信息模块查看', '提示', { |
|
|
|
this.competitionId && this.resultsDetails == 0 && this.$alert('提交成功,成绩将在' + this.resultAnnouncementTime + '小时后发布,请去参赛信息模块查看', '提示', { |
|
|
|