Parcourir la source

remove InspectStore type

Michael Wang il y a 3 ans
Parent
commit
877c8d74ad
3 fichiers modifiés avec 4 ajouts et 35 suppressions
  1. 2 2
      src/api/jsonMark.ts
  2. 2 2
      src/components/ZoomPaper.vue
  3. 0 31
      src/types/index.ts

+ 2 - 2
src/api/jsonMark.ts

@@ -1,12 +1,12 @@
 import { httpApp } from "@/plugins/axiosApp";
-import { RichTextQuestion, UnionStore } from "@/types";
+import { RichTextQuestion, MarkStore } from "@/types";
 
 /** 清理复核任务 */
 export async function getJSON(url: string) {
   return httpApp.get(url, { withCredentials: false });
 }
 
-export async function getPaper(store: UnionStore) {
+export async function getPaper(store: MarkStore) {
   const res = await getJSON(store.setting.subject.paperUrl);
   store.setting.subject.questions = [];
   if (res.data.questions) {

+ 2 - 2
src/components/ZoomPaper.vue

@@ -28,7 +28,7 @@
 </template>
 
 <script setup lang="ts">
-import type { UnionStore } from "@/types";
+import type { MarkStore } from "@/types";
 import {
   ZoomInOutlined,
   ZoomOutOutlined,
@@ -36,7 +36,7 @@ import {
 } from "@ant-design/icons-vue";
 import { computed } from "vue";
 
-const props = defineProps<{ store: UnionStore }>();
+const props = defineProps<{ store: MarkStore }>();
 const { store } = props;
 
 const upScale = () => {

+ 0 - 31
src/types/index.ts

@@ -184,35 +184,6 @@ export interface MarkResult {
   unselective: boolean; // 当前task是否为学生未选做
 }
 
-export interface InspectStore {
-  setting: {
-    examType: "SCAN_IMAGE" | "MULTI_MEDIA"; // 扫描图片或者多媒体,多媒体只允许 common mode
-    fileServer: string;
-    userName: string;
-    subject: {
-      name: string;
-      code: string;
-      paperUrl: string;
-      questions: Array<RichTextQuestion>;
-    };
-    uiSetting: {
-      "answer.paper.scale": number;
-      "score.board.collapse": boolean;
-    };
-    splitConfig: Array<number>; //使用裁切整图时的裁切配置 [0,1]|[0,0.3,0.25,0.55],
-  };
-  status: {
-    totalCount: number; //总数量
-    markedCount?: number; // 仅仲裁使用
-  };
-  currentTask?: Task; // 用来切换task,还有回看
-  historyOpen: boolean; // 是否打开回评侧边栏
-  historyTasks: Array<Task>;
-  focusTracks: Array<Track>;
-  message: string | null;
-  selective: boolean; // 当前分组是否有选做题
-}
-
 // 前端自用,用来渲染裁切图
 export interface SliceImage {
   url: string; // 当前是 ObjectURL , 因为 DataURL 性能太差
@@ -253,8 +224,6 @@ export interface getHistory {
   (historyQuery: HistoryQueryParams): any;
 }
 
-export type UnionStore = MarkStore | InspectStore;
-
 export interface RichTextQuestion {
   unionOrder: string; // 题目的综合题号 1-2-4
   body: RichTextJSON;