From 47b2ce17f588695312d194eb62ffcde99dbb6e4a Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Mon, 5 Aug 2019 14:09:19 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=E6=AF=94=E8=B5=9B=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E5=8D=95=E9=A1=B9=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/submission_contest.ejs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/views/submission_contest.ejs b/views/submission_contest.ejs index ab367a6..f865583 100644 --- a/views/submission_contest.ejs +++ b/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;