|
|
@@ -1,30 +1,30 @@
|
|
|
<template>
|
|
|
- <el-descriptions class="commit-description">
|
|
|
- <el-descriptions-item
|
|
|
- label-class-name="label-bold"
|
|
|
- label="编号:">{{ commit.id }}</el-descriptions-item>
|
|
|
- <el-descriptions-item
|
|
|
- :width="600"
|
|
|
- label-class-name="label-bold"
|
|
|
- label="提交时间:">{{ formatTimestamp(commit.createdAt) }}</el-descriptions-item>
|
|
|
- <el-descriptions-item
|
|
|
- :width="200"
|
|
|
- label-class-name="label-bold"
|
|
|
- label="分数:">{{ commit.score }}</el-descriptions-item>
|
|
|
- <el-descriptions-item
|
|
|
- label-class-name="label-bold"
|
|
|
- label="Git Commit ID:" :span="2">{{ commit.hash }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+<!-- <el-descriptions class="commit-description">-->
|
|
|
+<!-- <el-descriptions-item-->
|
|
|
+<!-- label-class-name="label-bold"-->
|
|
|
+<!-- label="编号:">{{ commit.id }}</el-descriptions-item>-->
|
|
|
+<!-- <el-descriptions-item-->
|
|
|
+<!-- :width="600"-->
|
|
|
+<!-- label-class-name="label-bold"-->
|
|
|
+<!-- label="提交时间:">{{ formatTimestamp(commit.createdAt) }}</el-descriptions-item>-->
|
|
|
+<!-- <el-descriptions-item-->
|
|
|
+<!-- :width="200"-->
|
|
|
+<!-- label-class-name="label-bold"-->
|
|
|
+<!-- label="分数:">{{ commit.score }}</el-descriptions-item>-->
|
|
|
+<!-- <el-descriptions-item-->
|
|
|
+<!-- label-class-name="label-bold"-->
|
|
|
+<!-- label="Git Commit ID:" :span="2">{{ commit.hash }}</el-descriptions-item>-->
|
|
|
+<!-- </el-descriptions>-->
|
|
|
|
|
|
<el-card
|
|
|
- class="son-card"
|
|
|
- style="background: none; box-shadow:none;border: none;">
|
|
|
- <template #header>
|
|
|
- <page-header>
|
|
|
- <span style="font-size: 24px;font-family: 'Inter',sans-serif">提交列表</span>
|
|
|
- </page-header>
|
|
|
- </template>
|
|
|
- <el-table :data="commit.records">
|
|
|
+ class="son-card" border
|
|
|
+ style="background:none ; box-shadow: none; border: none">
|
|
|
+<!-- <template #header>-->
|
|
|
+<!-- <page-header>-->
|
|
|
+<!-- <span style="font-size: 24px;font-family: 'Inter',sans-serif;margin-left: 10px">提交列表</span>-->
|
|
|
+<!-- </page-header>-->
|
|
|
+<!-- </template>-->
|
|
|
+ <el-table :data="commit.records" border>
|
|
|
<el-table-column label="题目">
|
|
|
<template #default="scope">
|
|
|
<span>{{ scope.row.problem.name }}</span>
|
|
|
@@ -43,7 +43,7 @@
|
|
|
<template #default="scope">
|
|
|
<el-button
|
|
|
type="text"
|
|
|
- @click="$router.push(`${$route.path}/record/${scope.row.id}`)"
|
|
|
+ @click="this.openRecordDetail(scope.row.id)"
|
|
|
>详情</el-button>
|
|
|
<el-button
|
|
|
v-if="stopRecordButton(scope.row.status)"
|
|
|
@@ -58,19 +58,28 @@
|
|
|
</el-table>
|
|
|
</el-card>
|
|
|
|
|
|
+ <el-dialog width="70%" v-model="recordDetailVisible" title="运行详情">
|
|
|
+ <RecordDetail :exam-id="this.examId" :record-id="this.selectedRecordId"></RecordDetail>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {formatTimestamp, buildStatusToTagType, buildStatusToTagContent} from "@/utils/coder-utils";
|
|
|
import PageHeader from "@/views/ProblemPage/components/PageHeader.vue";
|
|
|
+import RecordDetail from "@/views/CoderPage/ResultPage/CommitPage/RecordPage/RecordDetail";
|
|
|
|
|
|
export default {
|
|
|
name: "CommitBoard",
|
|
|
- components: {PageHeader},
|
|
|
+ components: {RecordDetail},
|
|
|
props: {
|
|
|
commitId: {
|
|
|
type: Number,
|
|
|
required: true
|
|
|
+ },
|
|
|
+ examId:{
|
|
|
+ type: Number,
|
|
|
+ required: true
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
@@ -79,7 +88,9 @@ export default {
|
|
|
dialog: {
|
|
|
stop: -1
|
|
|
},
|
|
|
- loading: false
|
|
|
+ loading: false,
|
|
|
+ recordDetailVisible:false,
|
|
|
+ selectedRecordId:0
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -90,12 +101,20 @@ export default {
|
|
|
this.$apis.getCommitByCommitId(this.commitId)
|
|
|
.then(_res => {
|
|
|
this.commit = _res.data.res;
|
|
|
- console.log(this.commit);
|
|
|
+ console.log("commit",this.commit);
|
|
|
}).catch(_err => {
|
|
|
console.log(_err);
|
|
|
|
|
|
});
|
|
|
},
|
|
|
+ openRecordDetail(id){
|
|
|
+ console.log("jumpToRecordDetail!");
|
|
|
+ this.selectedRecordId=id;
|
|
|
+ console.log("examId",this.examId);
|
|
|
+ console.log("recordId",this.selectedRecordId);
|
|
|
+ this.recordDetailVisible=true;
|
|
|
+ // this.$router.push(`${this.$route.path}/commit/${this.commitId}/record/${id}`);
|
|
|
+ },
|
|
|
formatTimestamp,
|
|
|
buildStatusToTagType,
|
|
|
buildStatusToTagContent,
|