Browse Source

bugfix:修复编辑比赛某些题目无法展示的bug

pull/12/head
zjz1993 5 years ago
parent
commit
f420c02291
  1. 8
      libs/judger.js
  2. 2
      views/contest_edit.ejs
  3. 1
      views/submission.ejs

8
libs/judger.js

@ -171,13 +171,9 @@ async function connect() {
const convertedResult = judgeResult.convertResult(result.taskId, result.progress);
winston.verbose('Reporting report finished: ' + result.taskId);
progressPusher.cleanupProgress(result.taskId);
console.log(convertedResult);
if (!judge_state) return;
if ( convertedResult.time < 900) {
judge_state.score = convertedResult.score + (convertedResult.time / 1000).toFixed(2)*convertedResult.score;
} else {
judge_state.score = convertedResult.score;
}
judge_state.score = convertedResult.score;
judge_state.pending = false;
judge_state.status = convertedResult.statusString;
judge_state.total_time = convertedResult.time;

2
views/contest_edit.ejs

@ -151,7 +151,7 @@ new window.Vue({
}
});
const userselectarrayId = originUserselectarray.map(item=>item.id);
const userSelectArray = this.datas.filter((item) => {
const userSelectArray = this.allproblemList.filter((item) => {
return userselectarrayId.includes(item.id);
})
this.toggleSelection(userSelectArray);

1
views/submission.ejs

@ -34,6 +34,7 @@
<table class="ui very basic center aligned table" id="status_table">
<thead>
<tr>
<th>已分享</th>
<th>编号</th>
<th>题目</th>
<th>状态</th>

Loading…
Cancel
Save