From ffd516bfb30e4e4991f6bedcf3120da60a5c7e4f Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Mon, 5 Aug 2019 14:04:38 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8D=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E6=B5=8B=E8=AF=84=E6=97=B6=E5=8D=95=E9=A1=B9=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=B8=BA0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/submission.ejs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/views/submission.ejs b/views/submission.ejs index fef0e89..f02dad2 100644 --- a/views/submission.ejs +++ b/views/submission.ejs @@ -336,14 +336,32 @@ if (token != null) { socket.on('finish', function (p) { console.log("Judge finished"); vueApp.roughData.running = false; + 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.result = p.roughResult; vueApp.detailResult = p.result; socket.close(); }); 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;