update
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled

This commit is contained in:
2026-06-05 09:58:55 -06:00
parent 0a0d53124d
commit fe51ad94cc
3 changed files with 26 additions and 4 deletions

View File

@@ -320,6 +320,7 @@ export function getFlowchartSubmissions(params: {
offset?: number
limit?: number
today?: string
grade?: string
}) {
return http.get("flowchart/submissions", { params })
}

View File

@@ -191,6 +191,9 @@ watch(() => props.submissionId, loadSubmission, { immediate: true })
padding: 32px;
box-sizing: border-box;
background: #ffffff;
/* 改为可滚动块布局,超出视口的大图可以滚动查看 */
display: block;
overflow: auto;
}
.fullscreen-toolbar {
@@ -205,6 +208,15 @@ watch(() => props.submissionId, loadSubmission, { immediate: true })
height: 100%;
}
/* 全屏时按自然尺寸显示并水平居中,配合容器滚动 */
:deep(.flowchart-fullscreen > svg) {
display: block;
margin: 0 auto;
width: auto;
height: auto;
max-width: none;
}
.loading-container {
min-height: 600px;
display: flex;

View File

@@ -79,6 +79,14 @@ const resultOptions: SelectOption[] = [
{ label: "运行时错误", value: "4" },
]
const gradeOptions: SelectOption[] = [
{ label: "全部", value: "" },
{ label: "S级", value: "S" },
{ label: "A级", value: "A" },
{ label: "B级", value: "B" },
{ label: "C级", value: "C" },
]
const languageOptions: SelectOption[] = [
{ label: "流程图", value: "Flowchart" },
{ label: "全部语言", value: "" },
@@ -97,6 +105,7 @@ async function listSubmissions() {
offset,
limit: query.limit,
today: query.today,
grade: query.result,
})
total.value = res.data.total
flowcharts.value = res.data.results
@@ -193,10 +202,11 @@ watch(
listSubmissions,
)
// 切换语言时刷新今日提交数(流程图与代码分别统计)
// 切换语言时重置过滤条件,刷新今日提交数
watch(
() => query.language,
() => {
query.result = ""
if (route.name === "submissions") getTodayCount()
},
)
@@ -364,12 +374,11 @@ const flowchartColumns: DataTableColumn<FlowchartSubmissionListItem>[] = [
:options="languageOptions"
/>
</n-form-item>
<n-form-item label="状态">
<n-form-item :label="query.language === 'Flowchart' ? '等级' : '状态'">
<n-select
:disabled="query.language === 'Flowchart'"
class="select"
v-model:value="query.result"
:options="resultOptions"
:options="query.language === 'Flowchart' ? gradeOptions : resultOptions"
/>
</n-form-item>
</n-form>