feat(提交列表): 「数据统计」改回在当前页弹框里看,不再开新标签页;按钮和「今日统计」一个样子
弹框带着列表现在的班级、学生、题号打开,「在提交列表里看」直接改背后的列表。 今日统计里点班级名也开同一个弹框。统计主体抽成 StatisticsView,/statistics 页面 留给课堂看板「回头看」、题目页这些别处的入口。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
13051926cf
commit
e3eb41288c
4 files changed
+581
-434
No files matched your search
@@ -16,6 +16,8 @@ import { classLabel } from "../utils"
|
||||
const emit = defineEmits<{
|
||||
close: []
|
||||
openProblem: [problem: string]
|
||||
/** 点班级名:在提交列表的数据统计弹框里看这个班今天 */
|
||||
openClass: [className: string]
|
||||
/** 拉到数之后把总数报回去:按钮上的数只在进页面时拉过一次,停久了会对不上 */
|
||||
loaded: [total: number]
|
||||
}>()
|
||||
@@ -131,14 +133,6 @@ const scatteredText = computed(() =>
|
||||
.join("、"),
|
||||
)
|
||||
|
||||
function openClass(className: string) {
|
||||
const href = router.resolve({
|
||||
name: "statistics",
|
||||
query: { className, period: "today" },
|
||||
}).href
|
||||
window.open(href, "_blank")
|
||||
}
|
||||
|
||||
const judgedResults = computed(() => stats.value?.results ?? [])
|
||||
|
||||
const languageText = computed(() => {
|
||||
@@ -221,7 +215,7 @@ const meText = computed(() => {
|
||||
<div class="timeline">
|
||||
<div v-for="item in stats.classes" :key="item.className" class="lane">
|
||||
<div class="lane-label">
|
||||
<a href="#" class="lane-name" @click.prevent="openClass(item.className)">
|
||||
<a href="#" class="lane-name" @click.prevent="emit('openClass', item.className)">
|
||||
{{ classLabel(item.className) }}
|
||||
</a>
|
||||
<n-text depth="3" class="tiny">
|
||||
|
||||
Reference in new issue
Block a user