Browse Source

bugfix:比赛最大单项时间

feature/unlimited-reply
zjz1993 5 years ago
parent
commit
47b2ce17f5
  1. 18
      views/submission_contest.ejs

18
views/submission_contest.ejs

@ -336,6 +336,15 @@ if (token != null) {
});
socket.on('finish', function (p) {
console.log("Judge finished");
let max=0;
if (p && p.result && p.result.judge) {
p.result.judge.subtasks.forEach(function (item) {
item.cases.forEach(function (one) {
max = one.result.time
});
});
}
p.roughResult.maxItemTime = max;
vueApp.roughData.running = false;
vueApp.roughData.result = p.roughResult;
vueApp.detailResult = p.result;
@ -343,8 +352,17 @@ if (token != null) {
});
socket.emit('join', token, function (data) {
console.log("join! ", data);
let max=0;
if (data && data.result && data.result.judge) {
data.result.judge.subtasks.forEach(function (item) {
item.cases.forEach(function (one) {
max = one.result.time
});
});
}
if (data && data.ok) {
if (data.finished) {
data.roughResult.maxItemTime = max;
vueApp.roughData.result = data.roughResult;
// if (!data.result) location.reload(true);
vueApp.detailResult = data.result;

Loading…
Cancel
Save