刘洋 2 vuotta sitten
vanhempi
commit
64dd452192
4 muutettua tiedostoa jossa 41 lisäystä ja 29 poistoa
  1. 17 17
      src/devLoginParams.ts
  2. 14 8
      src/features/arbitrate/Arbitrate.vue
  3. 9 3
      src/features/mark/Mark.vue
  4. 1 1
      vite.config.ts

+ 17 - 17
src/devLoginParams.ts

@@ -9,39 +9,39 @@
 // export const markerId="419";
 
 /** 244 评卷员 */
-export const LOGIN_CONFIG = {
-  isAdmin: false,
-  forceChange: true,
-  loginName: "1-339-5-1",
-  // loginName: "liuyang",
-  password: "123456",
-  examId: "1",
-  markerId: "147",
-  // markerId: "482",
-  // markerId: "483",
-};
 // export const LOGIN_CONFIG = {
 //   isAdmin: false,
 //   forceChange: true,
-//   loginName: "spj111-01",
+//   loginName: "1-339-5-1",
 //   // loginName: "liuyang",
 //   password: "123456",
-//   examId: "295",
-//   markerId: "3132",
+//   examId: "1",
+//   markerId: "147",
 //   // markerId: "482",
 //   // markerId: "483",
 // };
 // export const LOGIN_CONFIG = {
 //   isAdmin: false,
 //   forceChange: true,
-//   loginName: "6-X-M_pj01",
+//   loginName: "spj111-01",
 //   // loginName: "liuyang",
 //   password: "123456",
-//   examId: "432",
-//   markerId: "3123",
+//   examId: "295",
+//   markerId: "3132",
 //   // markerId: "482",
 //   // markerId: "483",
 // };
+export const LOGIN_CONFIG = {
+  isAdmin: false,
+  forceChange: true,
+  loginName: "6-X-M_pj01",
+  // loginName: "liuyang",
+  password: "123456",
+  examId: "432",
+  markerId: "3123",
+  // markerId: "482",
+  // markerId: "483",
+};
 // export const LOGIN_CONFIG = {
 //   isAdmin: false,
 //   forceChange: false,

+ 14 - 8
src/features/arbitrate/Arbitrate.vue

@@ -52,7 +52,7 @@ import PaperModal from "../mark/PaperModal.vue";
 import { getPaper } from "@/api/jsonMark";
 import { getArbitrateHistory } from "@/api/arbitratePage";
 import EventBus from "@/plugins/eventBus";
-import { addFileServerPrefixToTask,preDrawImage } from "@/utils/utils";
+import { addFileServerPrefixToTask, preDrawImage } from "@/utils/utils";
 import { isNumber } from "lodash-es";
 import type { Question } from "@/types";
 
@@ -116,8 +116,8 @@ async function updateTask() {
     let rawTask = res.data;
     let t = addFileServerPrefixToTask(rawTask);
     if (store.isScanImage && !!t) {
-        await preDrawImage(t);
-      }
+      await preDrawImage(t);
+    }
     store.currentTask = t;
   } else {
     store.message = res.data.message;
@@ -190,11 +190,17 @@ const saveTaskToServer = async (unselective: boolean) => {
       const question = store.currentTask.questionList[index];
       let error;
       if (!isNumber(score)) {
-        error = `${question.mainNumber}-${question.subNumber} 没有赋分不能提交。`;
+        error = `${question.mainNumber}-${question.subNumber}${
+          question.questionName ? "(" + question.questionName + ")" : ""
+        } 没有赋分不能提交。`;
       } else if (isNumber(question.maxScore) && score > question.maxScore) {
-        error = `${question.mainNumber}-${question.subNumber} 赋分大于最高分不能提交。`;
+        error = `${question.mainNumber}-${question.subNumber}${
+          question.questionName ? "(" + question.questionName + ")" : ""
+        } 赋分大于最高分不能提交。`;
       } else if (isNumber(question.minScore) && score < question.minScore) {
-        error = `${question.mainNumber}-${question.subNumber} 赋分小于最低分不能提交。`;
+        error = `${question.mainNumber}-${question.subNumber}${
+          question.questionName ? "(" + question.questionName + ")" : ""
+        } 赋分小于最低分不能提交。`;
       }
       if (error) {
         errors.push({ question, index, error });
@@ -212,8 +218,8 @@ const saveTaskToServer = async (unselective: boolean) => {
     res = await saveArbitrateTask(
       store.currentTask.libraryId + "",
       store.currentTask.studentId + "",
-      store.currentTask.markResult.markerScore as number,
-      store.currentTask.markResult.scoreList as Array<number>,
+      store.currentTask.markResult.markerScore,
+      store.currentTask.markResult.scoreList,
       false
     );
   }

+ 9 - 3
src/features/mark/Mark.vue

@@ -395,11 +395,17 @@ const saveTaskToServer = async () => {
     const question = store.currentTask.questionList[index]!;
     let error;
     if (!isNumber(score)) {
-      error = `${question.mainNumber}-${question.subNumber} 没有赋分不能提交。`;
+      error = `${question.mainNumber}-${question.subNumber}${
+        question.questionName ? "(" + question.questionName + ")" : ""
+      } 没有赋分不能提交。`;
     } else if (isNumber(question.maxScore) && score > question.maxScore) {
-      error = `${question.mainNumber}-${question.subNumber} 赋分大于最高分不能提交。`;
+      error = `${question.mainNumber}-${question.subNumber}${
+        question.questionName ? "(" + question.questionName + ")" : ""
+      } 赋分大于最高分不能提交。`;
     } else if (isNumber(question.minScore) && score < question.minScore) {
-      error = `${question.mainNumber}-${question.subNumber} 赋分小于最低分不能提交。`;
+      error = `${question.mainNumber}-${question.subNumber}${
+        question.questionName ? "(" + question.questionName + ")" : ""
+      } 赋分小于最低分不能提交。`;
     }
     if (error) {
       errors.push({ question, index, error });

+ 1 - 1
vite.config.ts

@@ -3,7 +3,7 @@ import vue from "@vitejs/plugin-vue";
 import ViteComponents from "unplugin-vue-components/vite";
 import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
 
-const SERVER_URL = "http://192.168.10.224";
+const SERVER_URL = "http://192.168.10.225";
 // const SERVER_URL = "http://192.168.11.103:8090";
 
 const path = require("path");