From f2564a1459696e8190965637cdb2920a31f90f79 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Mon, 29 Jul 2019 17:38:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=AF=94=E8=B5=9B?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=A1=B5=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/judger.js | 1 + views/submission_contest.ejs | 442 +++++++++++++++++++++++++++++++++++ 2 files changed, 443 insertions(+) create mode 100644 views/submission_contest.ejs diff --git a/libs/judger.js b/libs/judger.js index e77f836..08d5ee9 100644 --- a/libs/judger.js +++ b/libs/judger.js @@ -158,6 +158,7 @@ async function connect() { } const result = msgPack.decode(payload); + console.log(result); winston.verbose('Received report for task ' + result.taskId); const judge_state = await JudgeState.findOne({ diff --git a/views/submission_contest.ejs b/views/submission_contest.ejs new file mode 100644 index 0000000..79fcf77 --- /dev/null +++ b/views/submission_contest.ejs @@ -0,0 +1,442 @@ +<% this.title = '提交记录 #' + info.submissionId %> +<% include util %> +<% include header %> + + + + + + + + 编号 + 题目 + 状态 + 分数 + 总时间 + 单项时间 + 内存 + 代码 / 答案文件 + 提交者 + 提交时间 + 重新评测 + 分享 + + + + + + + <%= cid %> + <%= pid %> + <%= sid %> + + <% if (formattedCode !== null) { %> + + + 显示原始代码 + + + 格式化代码 + + + <% } %> + + + + + + + + + + + 子任务 #{{ $index + 1 }} + + + + + + 得分:{{ Math.trunc(subtask.score) }} + + + + + + + + + + + 测试点 #{{ $caseIndex + 1 }} + + + + + + + 得分:{{ Math.trunc(curCase.result.scoringRate * 100) }} + + + 用时:{{ curCase.result.time }} ms + + + 内存:{{ curCase.result.memory }} KiB + + + + + + + + + + + + + + + + + + + + + + + + + +<% include submissions_item %> + + + + + + +<% include footer %>