刘洋 1 жил өмнө
parent
commit
78100015bf

+ 15 - 15
src/devLoginParams.ts

@@ -86,26 +86,26 @@
 // };
 
 /** 255 评卷员 */
-// export const LOGIN_CONFIG = {
-//   isAdmin: false,
-//   forceChange: true,
-//   loginName: "4-1-1",
-//   password: "123456",
-//   examId: "128",
-//   markerId: "2258",
-// };
-
-/** 225 管理员 */
-
 export const LOGIN_CONFIG = {
-  isAdmin: true,
+  isAdmin: false,
   forceChange: true,
-  loginName: "admin031",
+  loginName: "spj111-02",
   password: "123456",
-  examId: "347",
-  markerId: "null",
+  examId: "348",
+  markerId: "3717",
 };
 
+/** 225 管理员 */
+
+// export const LOGIN_CONFIG = {
+//   isAdmin: true,
+//   forceChange: true,
+//   loginName: "admin031",
+//   password: "123456",
+//   examId: "347",
+//   markerId: "null",
+// };
+
 // export const loginName = "admin-ch";
 // export const password = "123456";
 // export const examId = "1";

+ 1 - 1
src/features/mark/CommonMarkBody.vue

@@ -221,7 +221,7 @@ async function processSliceConfig() {
       sliceConfig.h = image.naturalHeight;
     }
 
-    if (x <= 1 && y <= 1 && w <= 1 && h <= 1) {
+    if (x <= 1 && y <= 1 && sliceConfig.w <= 1 && sliceConfig.h <= 1) {
       sliceConfig.x = image.naturalWidth * x;
       sliceConfig.y = image.naturalHeight * y;
       sliceConfig.w = image.naturalWidth * w;

+ 4 - 5
src/utils/utils.ts

@@ -168,7 +168,7 @@ export async function getDataUrlForSplitConfig(
 }
 
 export async function preDrawImage(_currentTask: Task | undefined) {
-  console.log("preDrawImage=>curTask:", store.currentTask);
+  console.log("preDrawImage=>curTask:", _currentTask);
 
   if (!_currentTask?.libraryId) return;
 
@@ -200,7 +200,7 @@ export async function preDrawImage(_currentTask: Task | undefined) {
         sliceConfig.w = image.naturalWidth;
         sliceConfig.h = image.naturalHeight;
       }
-      if (x <= 1 && y <= 1 && w <= 1 && h <= 1) {
+      if (x <= 1 && y <= 1 && sliceConfig.w <= 1 && sliceConfig.h <= 1) {
         sliceConfig.x = image.naturalWidth * x;
         sliceConfig.y = image.naturalHeight * y;
         sliceConfig.w = image.naturalWidth * w;
@@ -209,7 +209,6 @@ export async function preDrawImage(_currentTask: Task | undefined) {
     }
 
     maxSliceWidth = Math.max(..._currentTask.sliceConfig.map((v) => v.w));
-
     // 用来保存sliceImage在整个图片容器中(不包括image-seperator)的高度范围
     for (const sliceConfig of _currentTask.sliceConfig) {
       const url = _currentTask.sliceUrls[sliceConfig.i - 1];
@@ -254,7 +253,7 @@ export async function preDrawImage(_currentTask: Task | undefined) {
 }
 
 export async function preDrawImageHistory(_currentTask: Task | undefined) {
-  console.log("preDrawImageHistory=>curTask:", store.currentTask);
+  console.log("preDrawImageHistory=>curTask:", _currentTask);
 
   if (!_currentTask?.libraryId) return;
 
@@ -286,7 +285,7 @@ export async function preDrawImageHistory(_currentTask: Task | undefined) {
         sliceConfig.w = image.naturalWidth;
         sliceConfig.h = image.naturalHeight;
       }
-      if (x <= 1 && y <= 1 && w <= 1 && h <= 1) {
+      if (x <= 1 && y <= 1 && sliceConfig.w <= 1 && sliceConfig.h <= 1) {
         sliceConfig.x = image.naturalWidth * x;
         sliceConfig.y = image.naturalHeight * y;
         sliceConfig.w = image.naturalWidth * w;