Forráskód Böngészése

5.0.3开发完成

刘洋 1 éve
szülő
commit
8540768f8f

+ 18 - 1
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -239,7 +239,24 @@ addInterval(() => checkRemoteApp(), 3 * 60 * 1000);
 
 const userInfo = $computed(() => {
   //todo
-  return store.user.displayName + " - " + store.user.studentCodeList.join(",");
+  let showInfo: string = store.QECSConfig.SHOW_INFO || "";
+  let arr = showInfo.split(",");
+  const a = arr.includes("STU_NAME") ? store.user.displayName : "";
+  const b = arr.includes("STU_CODE")
+    ? store.user.studentCodeList.join(",")
+    : "";
+  const c = arr.includes("IDENTITY_NUMBER")
+    ? store.user.identityNumber + ""
+    : "";
+  let split1 = a && (b || c) ? " - " : "";
+  let split2 = c && (a || b) ? " - " : "";
+  return arr.length
+    ? a + split1 + b + split2 + c
+    : store.user.displayName +
+        " - " +
+        store.user.studentCodeList.join(",") +
+        " - " +
+        store.user.identityNumber;
 });
 </script>
 

+ 9 - 6
src/features/OnlineExam/Examing/setups/useCheckMultipleAnswer.ts

@@ -1,12 +1,15 @@
 import { store } from "@/store/store";
 export function useCheckMultipleAnswer() {
   const currentQuestion = store.exam.currentQuestion;
-  const canToggle = !(
-    currentQuestion &&
-    currentQuestion.questionType == "MULTIPLE_CHOICE" &&
-    typeof currentQuestion.studentAnswer === "string" &&
-    currentQuestion.studentAnswer?.length == 1
-  );
+  const canToggle =
+    store.exam.SHOW_MULTIPLE_CHOICE_WARNING == "true"
+      ? !(
+          currentQuestion &&
+          currentQuestion.questionType == "MULTIPLE_CHOICE" &&
+          typeof currentQuestion.studentAnswer === "string" &&
+          currentQuestion.studentAnswer?.length == 1
+        )
+      : true;
   const rejectHandler = (callback: any) => {
     $dialog.warning({
       title: "提示",

+ 3 - 2
src/features/OnlineExam/Examing/setups/useInitExamData.ts

@@ -45,10 +45,11 @@ export async function initExamData(examId: number, examRecordDataId: number) {
       PRACTICE_TYPE: string | null;
       FREEZE_TIME: number | null;
       SNAPSHOT_INTERVAL: number;
+      SHOW_MULTIPLE_CHOICE_WARNING?: any;
     }>(
       "/api/ecs_exam_work/exam/getExamPropertyFromCacheByStudentSession/" +
         examId +
-        `/SNAPSHOT_INTERVAL,PRACTICE_TYPE,FREEZE_TIME`,
+        `/SNAPSHOT_INTERVAL,PRACTICE_TYPE,FREEZE_TIME,SHOW_MULTIPLE_CHOICE_WARNING`,
       { "axios-retry": { retries: 4 }, noErrorMessage: true }
     ),
     // 按ID查询考试批次信息
@@ -86,7 +87,7 @@ export async function initExamData(examId: number, examRecordDataId: number) {
 
   exam.freezeTime = JSON.parse("" + examProp.FREEZE_TIME);
   exam.SNAPSHOT_INTERVAL = JSON.parse("" + examProp.SNAPSHOT_INTERVAL);
-
+  exam.SHOW_MULTIPLE_CHOICE_WARNING = examProp.SHOW_MULTIPLE_CHOICE_WARNING;
   exam.WEIXIN_ANSWER_ENABLED = weixinAnswerEnabled;
 
   store.exam.faceCheckEnabled = faceCheckEnabled;

+ 2 - 0
src/types/student-client.d.ts

@@ -64,6 +64,7 @@ export type Store = {
     ROOT_ORG_ID: number;
     /** @deprecated 登录支持的客户端类型。新版只支持Electron包。 */
     LOGIN_SUPPORT: Partial<["NATIVE", "BROWSER"]>;
+    SHOW_INFO?: string;
   };
   /** 电脑时间管理 */
   sysTime: {
@@ -189,6 +190,7 @@ export type Store = {
     isExceededSwitchCount: boolean;
     /** 是否正在交卷 */
     isSubmittingPaper: boolean;
+    SHOW_MULTIPLE_CHOICE_WARNING?: any;
   };
   // /** 考试中的状态 */
   // examing: {};

+ 1 - 1
vite.config.ts

@@ -7,7 +7,7 @@ import legacy from "@vitejs/plugin-legacy";
 import vueJsx from "@vitejs/plugin-vue-jsx";
 // import obfuscator from "rollup-plugin-obfuscator";
 
-const SERVER_URL = "https://192.168.10.39";
+const SERVER_URL = "https://192.168.10.240";
 const path = require("path");
 
 const disableObfuse = process.env.DISABLE_OBFUSE;