|
|
|
@ -51,7 +51,7 @@ |
|
|
|
|
<el-button @click="toReport" |
|
|
|
|
v-if="isSubmit && !competitionId">查看实验报告</el-button> |
|
|
|
|
<el-button class="reload" |
|
|
|
|
@click="reload" |
|
|
|
|
@click="reloadConfirm" |
|
|
|
|
v-show="projectPermissions == 0">重新开始</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
class="submit btn" |
|
|
|
@ -821,7 +821,6 @@ export default { |
|
|
|
|
location.href = href |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//重新开始 |
|
|
|
|
async reload () { |
|
|
|
|
this.reloadCount() |
|
|
|
|
this.grade = '00' |
|
|
|
@ -843,6 +842,24 @@ export default { |
|
|
|
|
this.clearReport() |
|
|
|
|
this.entryTime = await this.getNow() |
|
|
|
|
}, |
|
|
|
|
//重新开始 |
|
|
|
|
async reloadConfirm () { |
|
|
|
|
// 已提交状态则直接重新开始,未提交则询问弹框 |
|
|
|
|
if (this.isSubmit) { |
|
|
|
|
this.reload() |
|
|
|
|
} else { |
|
|
|
|
try { |
|
|
|
|
await this.$confirm('<p style="color: #f56c6c;">点击重新开始,之前操作会清空。</p><p>确定重新开始吗?</p>', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
closeOnClickModal: false, |
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
}) |
|
|
|
|
this.reload() |
|
|
|
|
} catch (e) { } |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 页面加载完后重置编辑框大小 |
|
|
|
|
ready (i) { |
|
|
|
|
if (this.$refs['codemirror' + i]) { |
|
|
|
@ -1583,4 +1600,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.text-danger { |
|
|
|
|
color: #f56c6c; |
|
|
|
|
} |
|
|
|
|
</style> |