update
This commit is contained in:
@@ -320,6 +320,7 @@ export function getFlowchartSubmissions(params: {
|
||||
offset?: number
|
||||
limit?: number
|
||||
today?: string
|
||||
grade?: string
|
||||
}) {
|
||||
return http.get("flowchart/submissions", { params })
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user