刘洋 7 сар өмнө
parent
commit
5c26010c19

+ 6 - 2
src/features/OnlineExam/Examing/UploadPhotos.vue

@@ -20,7 +20,7 @@ const handGetAnswer = () => {
 const props = defineProps<{
   defaultList: string[];
   qrValue: string;
-  pictureAnswer?: { order: number; fileUrl: string };
+  pictureAnswer?: { order: number; fileUrl: string; cover?: boolean };
   uploadModalVisible: boolean;
 }>();
 
@@ -49,7 +49,11 @@ watch(
   (value) => {
     uploaded = true;
     if (value?.order === order) {
-      totalList.push(...[...new Set(value.fileUrl.split(","))]);
+      if (value?.cover) {
+        totalList = [...new Set(value.fileUrl.split(","))];
+      } else {
+        totalList.push(...[...new Set(value.fileUrl.split(","))]);
+      }
     }
   }
 );

+ 1 - 0
src/features/OnlineExam/Examing/setups/useWXSocket.ts

@@ -34,6 +34,7 @@ export const useHandGetAnswer = () => {
           order: res.data.questionOrder,
           fileUrl: res.data.filePath,
           transferFileType: res.data.transferFileType,
+          cover: true,
         });
 
         logger({

+ 1 - 0
src/store/store.ts

@@ -83,6 +83,7 @@ export const useStore = defineStore("ecs", {
       order: number;
       fileUrl: string;
       transferFileType: string;
+      cover?: boolean;
     }) {
       // 先清理之前保存过的记录
       store.exam.questionAnswerFileUrl =

+ 3 - 2
vite.config.ts

@@ -8,7 +8,8 @@ import vueJsx from "@vitejs/plugin-vue-jsx";
 // import obfuscator from "rollup-plugin-obfuscator";
 
 // const SERVER_URL = "https://192.168.10.240";
-const SERVER_URL = "https://192.168.10.39";
+// const SERVER_URL = "https://192.168.10.39";
+const SERVER_URL = "https://192.168.10.41";
 const path = require("path");
 
 const disableObfuse = process.env.DISABLE_OBFUSE;
@@ -148,7 +149,7 @@ export default defineConfig({
         target: SERVER_URL,
         changeOrigin: true,
         secure: false,
-        ws: false,
+        ws: true,
       },
       "/admin": {
         target: SERVER_URL,