瀏覽代碼

正式图片

zhangjie 1 年之前
父節點
當前提交
49cf97ef19

+ 2 - 2
src/features/arbitrate/Arbitrate.vue

@@ -115,8 +115,8 @@ async function updateTask() {
 
   if (res.data.studentId) {
     let rawTask = res.data;
-    // newTask.sheetUrls = newTask.sheetUrls || [];
-    rawTask.sheetUrls = ["/1-1.jpg", "/1-2.jpg"];
+    rawTask.sheetUrls = rawTask.sheetUrls || [];
+    // rawTask.sheetUrls = ["/1-1.jpg", "/1-2.jpg"];
     rawTask.sliceUrls = [...rawTask.sheetUrls];
     store.currentTask = rawTask;
   } else {

+ 4 - 4
src/features/check/ObjectiveAnswer.vue

@@ -261,10 +261,10 @@ async function getStudent(studentId: string) {
   }
 
   const stu = res.data;
-  stu.sheetUrls = [
-    { index: 1, url: "/1-1.jpg" },
-    { index: 2, url: "/1-2.jpg" },
-  ];
+  // stu.sheetUrls = [
+  //   { index: 1, url: "/1-1.jpg" },
+  //   { index: 2, url: "/1-2.jpg" },
+  // ];
   currentStudentId = stu.studentId;
   currentImage = 0;
   browsedImageIndexes = [0];

+ 2 - 2
src/features/check/SubjectiveAnswer.vue

@@ -202,8 +202,8 @@ async function updateTask(studentId) {
   }
   res.data.taskId = res.data.studentId;
   const newTask = res.data;
-  // newTask.sheetUrls = newTask.sheetUrls || [];
-  newTask.sheetUrls = ["/1-1.jpg", "/1-2.jpg"];
+  newTask.sheetUrls = newTask.sheetUrls || [];
+  // newTask.sheetUrls = ["/1-1.jpg", "/1-2.jpg"];
   newTask.sliceUrls = [...newTask.sheetUrls];
   newTask.specialTagList = newTask.headerTagList.length
     ? newTask.headerTagList

+ 2 - 2
src/features/mark/Mark.vue

@@ -153,8 +153,8 @@ async function updateTask() {
   const res = await getTask();
   if (res.data?.taskId) {
     const newTask = res.data;
-    // newTask.sheetUrls = newTask.sheetUrls || [];
-    newTask.sheetUrls = ["/1-1.jpg", "/1-2.jpg"];
+    newTask.sheetUrls = newTask.sheetUrls || [];
+    // newTask.sheetUrls = ["/1-1.jpg", "/1-2.jpg"];
     try {
       preDrawing = true;
       newTask.sliceUrls = await processSliceUrls(newTask);

+ 2 - 2
src/features/student/studentTrack/StudentTrack.vue

@@ -65,8 +65,8 @@ async function updateTask() {
 
   if (res.data.studentId) {
     let rawTask = res.data;
-    // newTask.sheetUrls = newTask.sheetUrls || [];
-    rawTask.sheetUrls = ["/1-1.jpg", "/1-2.jpg"];
+    rawTask.sheetUrls = rawTask.sheetUrls || [];
+    // rawTask.sheetUrls = ["/1-1.jpg", "/1-2.jpg"];
     rawTask.sliceUrls = [...rawTask.sheetUrls];
     rawTask.subject = {
       code: rawTask.courseCode,

+ 1 - 1
src/utils/utils.ts

@@ -305,7 +305,7 @@ export async function preDrawImageHistory(_currentTask: Task | undefined) {
 
   // const hasSliceConfig = store.currentTask?.sliceConfig?.length;
   const hasSliceConfig = _currentTask?.sliceConfig?.length;
-  _currentTask.sheetUrls = ["/1-1.jpg", "/1-2.jpg"];
+  // _currentTask.sheetUrls = ["/1-1.jpg", "/1-2.jpg"];
   _currentTask.sliceUrls = await processSliceUrls(_currentTask);
 
   const images = [];

+ 5 - 0
vite.config.ts

@@ -48,6 +48,11 @@ export default defineConfig({
         changeOrigin: true,
         // rewrite: (path) => path.replace(/^\/api/, ""),
       },
+      "/sheet/": {
+        target: SERVER_URL,
+        changeOrigin: true,
+        // rewrite: (path) => path.replace(/^\/api/, ""),
+      },
     },
   },
   resolve: {