feat(统计): 数据统计从弹框改成独立页面,左边题目、右边学生,一道题看全班每人的每一次
- 课堂看板管这节课,统计管回头看:时间段默认「两节课」,还有这节课、今天、7 天、30 天、这学期、全部、自己选日子;不再自动刷新 - 选一道题看每人在这道题上的方块串,鼠标停上去看那次的代码;选「全部」每人一行、展开按题看 - 没选班级(从题目页进来)先按班级汇总;流程图统计有等级分布、四项雷达、各项平均分、词云和每人最好的一次 - 提交列表、题目页的「数据统计」改成新标签打开这个页面 - 「请假隐藏」挪到课堂看板:点名字旁的 × 藏两个小时,做完人数的分母一起减掉 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f09da88ff7
commit
ed55ee5af6
16 files changed
+2256
-76
No files matched your search
@@ -13,7 +13,7 @@ import { Icon } from "@iconify/vue"
|
||||
import { NFlex, useThemeVars } from "naive-ui"
|
||||
import SubmitCode from "./SubmitCode.vue"
|
||||
import { useProblemPageContext } from "../composables/problemPageContext"
|
||||
import { statisticsOpen, useEditorMenu } from "../composables/editorMenu"
|
||||
import { openStatistics, useEditorMenu } from "../composables/editorMenu"
|
||||
import { useTeacherCollab } from "../composables/teacherCollab"
|
||||
|
||||
const SubmitFlowchart = defineAsyncComponent(() => import("./SubmitFlowchart.vue"))
|
||||
@@ -228,7 +228,7 @@ const changeLanguage = (v: LANGUAGE) => {
|
||||
<n-button
|
||||
v-if="ctx.classStats && statisticsInline && userStore.isTeacherOrAbove"
|
||||
:size="buttonSize"
|
||||
@click="statisticsOpen = true"
|
||||
@click="openStatistics(problem!._id)"
|
||||
>
|
||||
课堂统计
|
||||
</n-button>
|
||||
|
||||
@@ -12,10 +12,12 @@ import { useTeacherCollab } from "./teacherCollab"
|
||||
import { useProblemPageContext } from "./problemPageContext"
|
||||
|
||||
/**
|
||||
* 「课堂统计」弹窗开着没有。弹窗挂在题目页上(StatisticsModal),菜单可能在工具栏里、
|
||||
* 也可能在手机页签行的「⋯」里,所以这个开关放在模块级,大家共用一个
|
||||
* 「课堂统计」:新标签打开数据统计页,带上这道题(原来是题目页上的弹框)。
|
||||
* 工具栏按钮和手机页签行的「⋯」都走这一个。新标签是因为老师多半正开着这道题在看
|
||||
*/
|
||||
export const statisticsOpen = ref(false)
|
||||
export function openStatistics(problemDisplayId: string) {
|
||||
window.open(`/statistics?problem=${encodeURIComponent(problemDisplayId)}`, "_blank")
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑器的「更多」菜单:去自测猫 / 复制代码 / 重置代码 / 编辑题目,放不下时再加上课堂统计。
|
||||
@@ -111,7 +113,7 @@ export function useEditorMenu(statisticsInline: Ref<boolean>) {
|
||||
function select(key: string) {
|
||||
switch (key) {
|
||||
case "statistics":
|
||||
statisticsOpen.value = true
|
||||
openStatistics(problem.value!._id)
|
||||
return true
|
||||
case "testcat":
|
||||
goTestCat()
|
||||
|
||||
@@ -15,7 +15,6 @@ import type { RouteLocationNormalized } from "vue-router"
|
||||
import SubmissionEffects from "./components/SubmissionEffects.vue"
|
||||
import ResultTabLabel from "./components/ResultTabLabel.vue"
|
||||
import ContextBar from "./components/ContextBar.vue"
|
||||
import StatisticsModal from "./components/StatisticsModal.vue"
|
||||
import { useEditorMenu } from "./composables/editorMenu"
|
||||
import {
|
||||
DRAWER_TITLE,
|
||||
@@ -255,7 +254,6 @@ onBeforeUnmount(() => {
|
||||
<template>
|
||||
<template v-if="problem">
|
||||
<SubmissionEffects />
|
||||
<StatisticsModal />
|
||||
<!--
|
||||
桌面:两栏顶满整个内容区(设计稿「机房(方案 B)」),中间一条 1px 分隔线、可拖动。
|
||||
布局给内容区留了 16px 内边距,这里用负边距抵掉
|
||||
|
||||
Reference in new issue
Block a user