|
@@ -1,63 +1,15 @@
|
|
|
import { useMarkStore } from "@/store";
|
|
|
-import type { PaperRecogData, Question } from "@/types";
|
|
|
+import type {
|
|
|
+ PaperRecogData,
|
|
|
+ Question,
|
|
|
+ QuestionArea,
|
|
|
+ UserMapType,
|
|
|
+ AnswerTagItem,
|
|
|
+ ObjectiveAnswerTagItem,
|
|
|
+ TrackSummaryItem,
|
|
|
+} from "@/types";
|
|
|
import { calcSumPrecision, maxNum } from "@/utils/utils";
|
|
|
|
|
|
-export interface MarkDetailUserItem {
|
|
|
- userId: string;
|
|
|
- userName: string;
|
|
|
- prename: string;
|
|
|
- color: string;
|
|
|
- scores: Array<{ subNumber: string; score: number }>;
|
|
|
- score: number;
|
|
|
-}
|
|
|
-export type UserMapType = Record<string, MarkDetailUserItem>;
|
|
|
-export interface MarkDetailItem {
|
|
|
- mainNumber: number;
|
|
|
- subNumber: string;
|
|
|
- isFillQuestion: boolean;
|
|
|
- score: number;
|
|
|
- maxScore: number;
|
|
|
- users: MarkDetailUserItem[];
|
|
|
- area: QuestionArea;
|
|
|
- style: Record<string, string>;
|
|
|
-}
|
|
|
-
|
|
|
-export interface QuestionItem {
|
|
|
- mainNumber: number;
|
|
|
- subNumber: number | string;
|
|
|
-}
|
|
|
-export interface QuestionArea {
|
|
|
- i: number;
|
|
|
- x: number;
|
|
|
- y: number;
|
|
|
- w: number;
|
|
|
- h: number;
|
|
|
- qStruct: string;
|
|
|
-}
|
|
|
-
|
|
|
-export interface AnswerTagItem {
|
|
|
- mainNumber: number;
|
|
|
- subNumber: string;
|
|
|
- answer: string;
|
|
|
- style: Record<string, string>;
|
|
|
-}
|
|
|
-
|
|
|
-export interface ObjectiveAnswerTagItem {
|
|
|
- id: string;
|
|
|
- mainNumber: number;
|
|
|
- subNumbers: string;
|
|
|
- score: number;
|
|
|
- totalScore: number;
|
|
|
- style: Record<string, string | number>;
|
|
|
-}
|
|
|
-
|
|
|
-export interface SummaryItem {
|
|
|
- mainNumber: number;
|
|
|
- subNumber: string;
|
|
|
- score: number;
|
|
|
- markerName: string;
|
|
|
-}
|
|
|
-
|
|
|
export default function useTrackTag() {
|
|
|
const markStore = useMarkStore();
|
|
|
|
|
@@ -144,7 +96,7 @@ export default function useTrackTag() {
|
|
|
}
|
|
|
|
|
|
// 解析各试题答题区域
|
|
|
- function parseQuestionAreas(questions: QuestionItem[]) {
|
|
|
+ function parseQuestionAreas(questions: Question[]) {
|
|
|
if (!questions.length || !markStore.currentTask.cardData?.length) return [];
|
|
|
|
|
|
const pictureConfigs: QuestionArea[] = [];
|
|
@@ -550,7 +502,7 @@ export default function useTrackTag() {
|
|
|
}
|
|
|
|
|
|
// 模式4的解析
|
|
|
- function parseMode4Data(): SummaryItem[] {
|
|
|
+ function parseMode4Data(): TrackSummaryItem[] {
|
|
|
// 只有单评才展示summary
|
|
|
const isDoubleMark = (markStore.currentTask.questionList || []).some(
|
|
|
(question) => {
|