|
|
@ -35,7 +35,7 @@ |
|
|
|
v-if="$parent.language === 'vscode' && !isSubmit && !competitionId">填写实验报告</el-button> |
|
|
|
v-if="$parent.language === 'vscode' && !isSubmit && !competitionId">填写实验报告</el-button> |
|
|
|
<el-button @click="toReport" v-if="isSubmit && !competitionId">查看实验报告</el-button> |
|
|
|
<el-button @click="toReport" v-if="isSubmit && !competitionId">查看实验报告</el-button> |
|
|
|
<el-button class="reload" @click="reloadConfirm" v-show="projectPermissions == 0">重新开始</el-button> |
|
|
|
<el-button class="reload" @click="reloadConfirm" v-show="projectPermissions == 0">重新开始</el-button> |
|
|
|
<el-button type="primary" class="submit btn" @click="confirmSubmit" |
|
|
|
<el-button type="primary" class="submit btn" :loading="submiting" @click="confirmSubmit" |
|
|
|
:disabled="isSubmit || !projectList.length">提交</el-button> |
|
|
|
:disabled="isSubmit || !projectList.length">提交</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-header> |
|
|
|
</el-header> |
|
|
@ -296,11 +296,13 @@ export default { |
|
|
|
reportVisible: false, |
|
|
|
reportVisible: false, |
|
|
|
tableHeight: 0, |
|
|
|
tableHeight: 0, |
|
|
|
dragIds: ['panelHeader', 'aside', 'main', 'infoContainer'], |
|
|
|
dragIds: ['panelHeader', 'aside', 'main', 'infoContainer'], |
|
|
|
|
|
|
|
confirmSubmiting: false, |
|
|
|
submiting: false, |
|
|
|
submiting: false, |
|
|
|
client: '', |
|
|
|
client: '', |
|
|
|
accountId: '', |
|
|
|
accountId: '', |
|
|
|
runCodeType: '', |
|
|
|
runCodeType: '', |
|
|
|
finishVscodeItem: 0, |
|
|
|
finishVscodeItem: 0, |
|
|
|
|
|
|
|
vscodeRunCodeNum: 0, |
|
|
|
clientTopic: '', |
|
|
|
clientTopic: '', |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -749,7 +751,7 @@ export default { |
|
|
|
this.$parent.workbench[i].codeId = data.codeId |
|
|
|
this.$parent.workbench[i].codeId = data.codeId |
|
|
|
this.$parent.workbench[i].retResult = 1 |
|
|
|
this.$parent.workbench[i].retResult = 1 |
|
|
|
this.finishVscodeItem++ |
|
|
|
this.finishVscodeItem++ |
|
|
|
this.finishVscodeItem === this.$parent.workbench.length && this.submit() |
|
|
|
this.finishVscodeItem === this.vscodeRunCodeNum && this.submit() |
|
|
|
}, |
|
|
|
}, |
|
|
|
emptyRunCode (data) { |
|
|
|
emptyRunCode (data) { |
|
|
|
this.$parent.workbench[0].codeId = data.codeId |
|
|
|
this.$parent.workbench[0].codeId = data.codeId |
|
|
@ -757,8 +759,8 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提交询问 |
|
|
|
// 提交询问 |
|
|
|
confirmSubmit () { |
|
|
|
confirmSubmit () { |
|
|
|
if (this.submiting) return false |
|
|
|
if (this.confirmSubmiting) return false |
|
|
|
this.submiting = true |
|
|
|
this.confirmSubmiting = true |
|
|
|
const isVscode = this.$parent.language === 'vscode' // 是否选择了vscode |
|
|
|
const isVscode = this.$parent.language === 'vscode' // 是否选择了vscode |
|
|
|
const { taskList } = this |
|
|
|
const { taskList } = this |
|
|
|
const pointList = this.$parent.workbench |
|
|
|
const pointList = this.$parent.workbench |
|
|
@ -771,6 +773,7 @@ export default { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (!taskList.find(e => e.code || e.codeResult)) msg = '实验报告未填写,实验成绩为零,是否确认提交?' |
|
|
|
if (!taskList.find(e => e.code || e.codeResult)) msg = '实验报告未填写,实验成绩为零,是否确认提交?' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.vscodeRunCodeNum = 0 |
|
|
|
this.finishVscodeItem = 0 |
|
|
|
this.finishVscodeItem = 0 |
|
|
|
this.$confirm(msg, '提示', { |
|
|
|
this.$confirm(msg, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
confirmButtonText: '确定', |
|
|
@ -783,6 +786,7 @@ export default { |
|
|
|
if (isVscode) { |
|
|
|
if (isVscode) { |
|
|
|
taskList.map(async (e, i) => { |
|
|
|
taskList.map(async (e, i) => { |
|
|
|
if (e.code || e.codeResult) { |
|
|
|
if (e.code || e.codeResult) { |
|
|
|
|
|
|
|
this.vscodeRunCodeNum++ |
|
|
|
this.runCodeType = 'vscodeRunCode' |
|
|
|
this.runCodeType = 'vscodeRunCode' |
|
|
|
await this.$post(this.api.runPythonCode, { |
|
|
|
await this.$post(this.api.runPythonCode, { |
|
|
|
assessmentId: this.assessmentId, |
|
|
|
assessmentId: this.assessmentId, |
|
|
@ -795,6 +799,7 @@ export default { |
|
|
|
type: 'vscode', |
|
|
|
type: 'vscode', |
|
|
|
sort: i |
|
|
|
sort: i |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
this.$parent.workbench[i].finalCode = e.code |
|
|
|
this.$parent.workbench[i].answer = e.codeResult |
|
|
|
this.$parent.workbench[i].answer = e.codeResult |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
@ -811,19 +816,20 @@ export default { |
|
|
|
projectId: this.projectId, |
|
|
|
projectId: this.projectId, |
|
|
|
type: this.$parent.language |
|
|
|
type: this.$parent.language |
|
|
|
}).then(res => { }).catch(err => { |
|
|
|
}).then(res => { }).catch(err => { |
|
|
|
this.submiting = false |
|
|
|
this.confirmSubmiting = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.submit() |
|
|
|
this.submit() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
this.submiting = false |
|
|
|
this.confirmSubmiting = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
|
async submit () { |
|
|
|
async submit () { |
|
|
|
if (this.isSubmit) return false |
|
|
|
if (this.isSubmit || this.submiting) return false |
|
|
|
|
|
|
|
this.submiting = true |
|
|
|
const pointList = this.$parent.workbench |
|
|
|
const pointList = this.$parent.workbench |
|
|
|
const date = await this.getNow() |
|
|
|
const date = await this.getNow() |
|
|
|
const { entryTime } = this |
|
|
|
const { entryTime } = this |
|
|
@ -889,7 +895,7 @@ export default { |
|
|
|
this.reportId = reportId |
|
|
|
this.reportId = reportId |
|
|
|
this.$store.commit('setReportId', reportId) |
|
|
|
this.$store.commit('setReportId', reportId) |
|
|
|
this.$store.commit('setTaskList', taskList) |
|
|
|
this.$store.commit('setTaskList', taskList) |
|
|
|
this.editReport(reportId) |
|
|
|
this.confirmSubmiting = false |
|
|
|
this.submiting = false |
|
|
|
this.submiting = false |
|
|
|
// 如果是竞赛,并且勾选了公布成绩详情的选项,则弹框提示 |
|
|
|
// 如果是竞赛,并且勾选了公布成绩详情的选项,则弹框提示 |
|
|
|
if (this.competitionId) { |
|
|
|
if (this.competitionId) { |
|
|
|