diff --git a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/impl/ProblemServiceImpl.java b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/impl/ProblemServiceImpl.java index c90b2235..c47a6226 100644 --- a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/impl/ProblemServiceImpl.java +++ b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/impl/ProblemServiceImpl.java @@ -441,7 +441,7 @@ public class ProblemServiceImpl extends ServiceImpl impl for (ProblemCase problemCase : problemCaseList) { JSONObject jsonObject = new JSONObject(); - jsonObject.set("caseId", null); + jsonObject.set("caseId", problemCase.getId()); jsonObject.set("score", problemCase.getScore()); jsonObject.set("inputName", problemCase.getInput()); jsonObject.set("outputName", problemCase.getOutput()); diff --git a/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java b/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java index 7c3d09e4..8b757d48 100644 --- a/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java +++ b/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java @@ -98,6 +98,11 @@ public class JudgeRun { final Integer score = ((JSONObject) testcaseList.get(index)).getInt("score", 0); final Long maxOutputSize = Math.max(((JSONObject) testcaseList.get(index)).getLong("outputSize", 0L) * 2, 16 * 1024 * 1024L); + + // 输入文件名 + final String inputFileName = ((JSONObject) testcaseList.get(index)).getStr("inputName"); + // 输出文件名 + final String outputFileName = ((JSONObject) testcaseList.get(index)).getStr("outputName"); if (!isSpj) { futureTasks.add(new FutureTask<>(new Callable() { @Override @@ -114,6 +119,8 @@ public class JudgeRun { isRemoveEOFBlank); result.set("caseId", caseId); result.set("score", score); + result.set("inputFileName", inputFileName); + result.set("outputFileName", outputFileName); return result; } })); @@ -136,6 +143,8 @@ public class JudgeRun { getUserOutput); result.set("caseId", caseId); result.set("score", score); + result.set("inputFileName", inputFileName); + result.set("outputFileName", outputFileName); return result; } })); diff --git a/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java b/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java index cc7afa69..83362957 100644 --- a/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java +++ b/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java @@ -186,9 +186,13 @@ public class JudgeStrategy { Integer memory = jsonObject.getLong("memory").intValue(); Integer status = jsonObject.getInt("status"); Long caseId = jsonObject.getLong("caseId"); + String inputFileName = jsonObject.getStr("inputFileName"); + String outputFileName = jsonObject.getStr("outputFileName"); JudgeCase judgeCase = new JudgeCase(); judgeCase.setTime(time).setMemory(memory) .setStatus(status) + .setInputData(inputFileName) + .setOutputData(outputFileName) .setPid(problem.getId()) .setUid(judge.getUid()) .setCaseId(caseId) diff --git a/hoj-vue/src/i18n/oj/en-US.js b/hoj-vue/src/i18n/oj/en-US.js index 80961c4c..848fac39 100644 --- a/hoj-vue/src/i18n/oj/en-US.js +++ b/hoj-vue/src/i18n/oj/en-US.js @@ -233,6 +233,9 @@ export const m = { Shared:'Shared', Unshared:'Unshared', Shared_successfully:'Shared successfully', + Input_File:'Input File', + Output_File:'Output File', + Unknown:'Unknown', // /views/oj/rank/ACMRank.vue ACM_Ranklist: 'ACM Ranklist', diff --git a/hoj-vue/src/i18n/oj/zh-CN.js b/hoj-vue/src/i18n/oj/zh-CN.js index 4c9cbded..f6923f40 100644 --- a/hoj-vue/src/i18n/oj/zh-CN.js +++ b/hoj-vue/src/i18n/oj/zh-CN.js @@ -235,6 +235,9 @@ export const m = { Shared:'分享', Unshared:'不分享', Shared_successfully:'分享成功', + Input_File:'输入文件', + Output_File:'输出文件', + Unknown:'未知', // /views/oj/rank/ACMRank.vue ACM_Ranklist: 'ACM 排行榜', diff --git a/hoj-vue/src/views/oj/status/SubmissionDetails.vue b/hoj-vue/src/views/oj/status/SubmissionDetails.vue index 5fc2b2d2..f2cbe32d 100644 --- a/hoj-vue/src/views/oj/status/SubmissionDetails.vue +++ b/hoj-vue/src/views/oj/status/SubmissionDetails.vue @@ -123,45 +123,54 @@ v-for="(item, index) in testCaseResult" :key="index" > -
- Test #{{ index + 1 }}: -

{{ JUDGE_STATUS[item.status]['short'] }}

-
- {{ item.time }}ms/{{ item.memory }}KB + +
+ {{ $t('m.Input_File') }}:{{ + item.inputData ? item.inputData : $t('m.Unknown') + }}
{{ $t('m.Output_File') }}:{{ + item.outputData ? item.outputData : $t('m.Unknown') + }}
-
- - {{ item.score }} - - - - +
+ Test #{{ index + 1 }}: +

{{ JUDGE_STATUS[item.status]['short'] }}

+
+ {{ item.time }}ms/{{ item.memory }}KB +
+
+ + {{ item.score }} + + + + +
-
-
- Test #{{ index + 1 }}: -

{{ JUDGE_STATUS[item.status]['short'] }}

-
- {{ item.time }}ms/{{ item.memory }}KB +
+ Test #{{ index + 1 }}: +

{{ JUDGE_STATUS[item.status]['short'] }}

+
+ {{ item.time }}ms/{{ item.memory }}KB +
+
+ + {{ item.score }} + + + + +
-
- - {{ item.score }} - - - - -
-
+