update
This commit is contained in:
@@ -320,6 +320,7 @@ export function getFlowchartSubmissions(params: {
|
|||||||
offset?: number
|
offset?: number
|
||||||
limit?: number
|
limit?: number
|
||||||
today?: string
|
today?: string
|
||||||
|
grade?: string
|
||||||
}) {
|
}) {
|
||||||
return http.get("flowchart/submissions", { params })
|
return http.get("flowchart/submissions", { params })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,6 +191,9 @@ watch(() => props.submissionId, loadSubmission, { immediate: true })
|
|||||||
padding: 32px;
|
padding: 32px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
|
/* 改为可滚动块布局,超出视口的大图可以滚动查看 */
|
||||||
|
display: block;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen-toolbar {
|
.fullscreen-toolbar {
|
||||||
@@ -205,6 +208,15 @@ watch(() => props.submissionId, loadSubmission, { immediate: true })
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 全屏时按自然尺寸显示并水平居中,配合容器滚动 */
|
||||||
|
:deep(.flowchart-fullscreen > svg) {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
max-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
.loading-container {
|
.loading-container {
|
||||||
min-height: 600px;
|
min-height: 600px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -79,6 +79,14 @@ const resultOptions: SelectOption[] = [
|
|||||||
{ label: "运行时错误", value: "4" },
|
{ 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[] = [
|
const languageOptions: SelectOption[] = [
|
||||||
{ label: "流程图", value: "Flowchart" },
|
{ label: "流程图", value: "Flowchart" },
|
||||||
{ label: "全部语言", value: "" },
|
{ label: "全部语言", value: "" },
|
||||||
@@ -97,6 +105,7 @@ async function listSubmissions() {
|
|||||||
offset,
|
offset,
|
||||||
limit: query.limit,
|
limit: query.limit,
|
||||||
today: query.today,
|
today: query.today,
|
||||||
|
grade: query.result,
|
||||||
})
|
})
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
flowcharts.value = res.data.results
|
flowcharts.value = res.data.results
|
||||||
@@ -193,10 +202,11 @@ watch(
|
|||||||
listSubmissions,
|
listSubmissions,
|
||||||
)
|
)
|
||||||
|
|
||||||
// 切换语言时刷新今日提交数(流程图与代码分别统计)
|
// 切换语言时重置过滤条件,刷新今日提交数
|
||||||
watch(
|
watch(
|
||||||
() => query.language,
|
() => query.language,
|
||||||
() => {
|
() => {
|
||||||
|
query.result = ""
|
||||||
if (route.name === "submissions") getTodayCount()
|
if (route.name === "submissions") getTodayCount()
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@@ -364,12 +374,11 @@ const flowchartColumns: DataTableColumn<FlowchartSubmissionListItem>[] = [
|
|||||||
:options="languageOptions"
|
:options="languageOptions"
|
||||||
/>
|
/>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item label="状态">
|
<n-form-item :label="query.language === 'Flowchart' ? '等级' : '状态'">
|
||||||
<n-select
|
<n-select
|
||||||
:disabled="query.language === 'Flowchart'"
|
|
||||||
class="select"
|
class="select"
|
||||||
v-model:value="query.result"
|
v-model:value="query.result"
|
||||||
:options="resultOptions"
|
:options="query.language === 'Flowchart' ? gradeOptions : resultOptions"
|
||||||
/>
|
/>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
|
|||||||
Reference in New Issue
Block a user