- classLabel / groupClassOptions / classSelectOptions 挪到 utils/classes.ts,useTone 挪到 shared/composables/tone.ts:原来放在 oj/submission/ 下,被前台、后台、shared 引了 50 多处 - 流程图编辑器的草稿键改由题目页传进来(键名不变,学生存着的草稿照样读得到)。原来编辑器 自己读题目页的 store 和路由拼,后台出题页也用这个组件,那边 store 是空的 - SQL 表名补全改由题目页传表进来。原来补全直接读题目页的 store,自学页的 SQL 代码块会 补出上一道看过的题的表名 实跑:提交列表、题目页、排名、后台题目页、SQL 题、流程图题打开无报错;SQL 题输入 stu 补出 students;流程图加一步,草稿照旧存在 flowchart-v2-problem-<题号>。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
465dbfd42f
commit
309ca0ece2
59 files changed
+168
-142
No files matched your search
@@ -14,7 +14,7 @@ import { getSubmission } from "oj/api"
|
||||
import { JUDGE_STATUS, LANGUAGE_FORMAT_VALUE, SubmissionStatus } from "utils/constants"
|
||||
import { parseTime } from "utils/functions"
|
||||
import type { SUBMISSION_RESULT } from "utils/types"
|
||||
import { useTone, type Tone } from "oj/submission/composables/tone"
|
||||
import { useTone, type Tone } from "shared/composables/tone"
|
||||
|
||||
/**
|
||||
* 一个人在一道题上的每一次提交,一格一次、从早到晚(设计稿「统计重设计」)。
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
import { useThemeVars } from "naive-ui"
|
||||
import { NO_CLASS, type SubmissionStatisticsGrid } from "@oj2/contract"
|
||||
import { SubmissionStatus } from "utils/constants"
|
||||
import { useTone } from "oj/submission/composables/tone"
|
||||
import { classLabel, submissionDayText } from "oj/submission/utils"
|
||||
import { useTone } from "shared/composables/tone"
|
||||
import { classLabel } from "utils/classes"
|
||||
import { submissionDayText } from "oj/submission/utils"
|
||||
|
||||
/**
|
||||
* 没选班级、也没填学生时(多半是从题目页进来,只带了题号):先按班级列出来,
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { SubmissionStatistics, SubmissionStatisticsGrid } from "@oj2/contra
|
||||
import { SubmissionStatus } from "utils/constants"
|
||||
import { parseTime } from "utils/functions"
|
||||
import StatusPill from "oj/submission/components/StatusPill.vue"
|
||||
import { useTone } from "oj/submission/composables/tone"
|
||||
import { useTone } from "shared/composables/tone"
|
||||
import UserName from "shared/components/UserName.vue"
|
||||
import AttemptSquares from "./AttemptSquares.vue"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { Bar, Doughnut, Radar } from "vue-chartjs"
|
||||
import type { FlowchartStatistics } from "@oj2/contract"
|
||||
import { useChartTheme } from "shared/composables/chartTheme"
|
||||
import { FLOWCHART_CRITERIA_ORDER } from "utils/constants"
|
||||
import { useTone } from "oj/submission/composables/tone"
|
||||
import { useTone } from "shared/composables/tone"
|
||||
import RingChart from "./RingChart.vue"
|
||||
import StatItem from "./StatItem.vue"
|
||||
import UserName from "shared/components/UserName.vue"
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Icon } from "@iconify/vue"
|
||||
import { useThemeVars } from "naive-ui"
|
||||
import type { SubmissionLessons } from "@oj2/contract"
|
||||
import { parseTime, zonedParts } from "utils/functions"
|
||||
import { useTone } from "oj/submission/composables/tone"
|
||||
import { classLabel } from "oj/submission/utils"
|
||||
import { useTone } from "shared/composables/tone"
|
||||
import { classLabel } from "utils/classes"
|
||||
import { resultName, useResultColor } from "../results"
|
||||
|
||||
type Lesson = SubmissionLessons["lessons"][number]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useThemeVars } from "naive-ui"
|
||||
import { useTone, type Tone } from "oj/submission/composables/tone"
|
||||
import { useTone, type Tone } from "shared/composables/tone"
|
||||
|
||||
/** 数字行的一格:小字标签 + 大号数字 + 单位 */
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -16,8 +16,8 @@ import {
|
||||
} from "oj/api"
|
||||
import { useConfigStore } from "shared/store/config"
|
||||
import { fromPickerValue, toPickerValue } from "utils/functions"
|
||||
import { useTone } from "oj/submission/composables/tone"
|
||||
import { classSelectOptions } from "oj/submission/utils"
|
||||
import { useTone } from "shared/composables/tone"
|
||||
import { classSelectOptions } from "utils/classes"
|
||||
import { DEFAULT_PERIOD, PERIOD_OPTIONS, dayStartOfDate, periodRange, type Period } from "../period"
|
||||
import { resultName, useResultColor } from "../results"
|
||||
import ByClass from "./ByClass.vue"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useThemeVars } from "naive-ui"
|
||||
import { JUDGE_STATUS } from "utils/constants"
|
||||
import type { SUBMISSION_RESULT } from "utils/types"
|
||||
import { useTone, type Tone } from "oj/submission/composables/tone"
|
||||
import { useTone, type Tone } from "shared/composables/tone"
|
||||
|
||||
export function resultName(result: number) {
|
||||
return JUDGE_STATUS[result as SUBMISSION_RESULT]?.name ?? "其他"
|
||||
|
||||
Reference in new issue
Block a user