update
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
|||||||
getFlowchartSubmissions,
|
getFlowchartSubmissions,
|
||||||
getSubmissions,
|
getSubmissions,
|
||||||
getTodaySubmissionCount,
|
getTodaySubmissionCount,
|
||||||
|
retryFlowchartSubmission,
|
||||||
} from "oj/api"
|
} from "oj/api"
|
||||||
import { parseTime } from "utils/functions"
|
import { parseTime } from "utils/functions"
|
||||||
import type {
|
import type {
|
||||||
@@ -150,6 +151,12 @@ async function rejudge(submissionID: string) {
|
|||||||
listSubmissions()
|
listSubmissions()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function retryFlowchart(submissionId: string) {
|
||||||
|
await retryFlowchartSubmission(submissionId)
|
||||||
|
message.success("重新评分已提交")
|
||||||
|
listSubmissions()
|
||||||
|
}
|
||||||
|
|
||||||
function problemClicked(row: SubmissionListItem | FlowchartSubmissionListItem) {
|
function problemClicked(row: SubmissionListItem | FlowchartSubmissionListItem) {
|
||||||
if (route.name === "contest submissions") {
|
if (route.name === "contest submissions") {
|
||||||
const path = router.resolve({
|
const path = router.resolve({
|
||||||
@@ -300,7 +307,8 @@ const columns = computed(() => {
|
|||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
|
|
||||||
const flowchartColumns: DataTableColumn<FlowchartSubmissionListItem>[] = [
|
const flowchartColumns = computed(() => {
|
||||||
|
const res: DataTableColumn<FlowchartSubmissionListItem>[] = [
|
||||||
{
|
{
|
||||||
title: renderTableTitle("提交时间", "noto:seven-oclock"),
|
title: renderTableTitle("提交时间", "noto:seven-oclock"),
|
||||||
key: "create_time",
|
key: "create_time",
|
||||||
@@ -355,6 +363,25 @@ const flowchartColumns: DataTableColumn<FlowchartSubmissionListItem>[] = [
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
if (!route.params.contestID && userStore.isTeacherOrAbove) {
|
||||||
|
res.push({
|
||||||
|
title: renderTableTitle("选项", "streamline-emojis:wrench"),
|
||||||
|
key: "retry",
|
||||||
|
render: (row) =>
|
||||||
|
h(
|
||||||
|
NButton,
|
||||||
|
{
|
||||||
|
quaternary: true,
|
||||||
|
size: "small",
|
||||||
|
type: "primary",
|
||||||
|
onClick: () => retryFlowchart(row.id),
|
||||||
|
},
|
||||||
|
() => "重新判题",
|
||||||
|
),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<n-flex vertical size="large">
|
<n-flex vertical size="large">
|
||||||
|
|||||||
Reference in New Issue
Block a user