From 2dd69d02cea907d011eb92126142e83918728770 Mon Sep 17 00:00:00 2001
From: 于杰 <1210123631@qq.com>
Date: 星期五, 01 八月 2025 14:06:14 +0800
Subject: [PATCH] 解决前端调整与数控图像显示不一致的问题,解决方向按键移动相反的问题

---
 north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/OptimizationRect.vue |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/OptimizationRect.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/OptimizationRect.vue
index d8e2286..df8057f 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/OptimizationRect.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/OptimizationRect.vue
@@ -266,7 +266,7 @@
   return {
     position: 'absolute',
     left: `${layout.leftTrim * scale}px`,
-    top: `${layout.upTrim * scale}px`,
+    bottom: `${layout.upTrim * scale}px`,
     width: `${layout.width * scale}px`,
     height: `${layout.height * scale}px`,
     overflow: 'visible',
@@ -314,7 +314,7 @@
   return {
     position: 'absolute',
     left: `${glassDetail.x * scale}px`,
-    bottom: `${glassDetail.y * scale}px`,
+    top: `${glassDetail.y * scale}px`,
     width: `${glassDetail.width * scale}px`,
     height: `${glassDetail.height * scale}px`,
     backgroundColor: glassDetail.isRemain ? '#f0f0f0' : themeColor.value,
@@ -332,7 +332,7 @@
   return {
     position: 'absolute',
     left: `${glassDetail.x * scale}px`,
-    bottom: `${glassDetail.y * scale}px`,
+    top: `${glassDetail.y * scale}px`,
     width: `${glassDetail.width * scale}px`,
     height: `${glassDetail.height * scale}px`,
     backgroundColor: glassDetail.isRemain ? '#f0f0f0' : themeColor.value,
@@ -620,19 +620,19 @@
   const threshold = Math.max(glassDetail.width, glassDetail.height) * 0.1;
 
   otherRects.forEach(otherRect => {
-    // 姘村钩瀵归綈淇濇寔涓嶅彉
+    // 姘村钩瀵归綈
     if (Math.abs(glassDetail.x - otherRect.x) < threshold) {
       glassDetail.x = Math.round((glassDetail.x + otherRect.x) / 2);
     }
-    // 姘村钩瀵归綈鍙充晶杈圭紭淇濇寔涓嶅彉
+    // 姘村钩瀵归綈鍙充晶杈圭紭
     if (Math.abs((glassDetail.x + glassDetail.width) - (otherRect.x + otherRect.width)) < threshold) {
       glassDetail.x = Math.round((otherRect.x + otherRect.width - glassDetail.width));
     }
-    // 鍨傜洿瀵归綈闇�瑕佽皟鏁达紙鍩轰簬宸︿笅瑙掑潗鏍囩郴锛�
+    // 鍨傜洿瀵归綈
     if (Math.abs(glassDetail.y - otherRect.y) < threshold) {
       glassDetail.y = Math.round((glassDetail.y + otherRect.y) / 2);
     }
-    // 鍨傜洿瀵归綈涓婅竟缂橈紙鍩轰簬宸︿笅瑙掑潗鏍囩郴锛�
+    // 鍨傜洿瀵归綈涓婅竟缂�
     if (Math.abs((glassDetail.y + glassDetail.height) - (otherRect.y + otherRect.height)) < threshold) {
       glassDetail.y = Math.round((otherRect.y + otherRect.height - glassDetail.height));
     }
@@ -1028,7 +1028,7 @@
       event.preventDefault();
       if (!moveInterval) {
         moveInterval = setInterval(() => {
-          moveRect(layoutIndex, rectIndex, 'up');
+          moveRect(layoutIndex, rectIndex, 'down');
         }, 50);
       }
       break;
@@ -1036,7 +1036,7 @@
       event.preventDefault();
       if (!moveInterval) {
         moveInterval = setInterval(() => {
-          moveRect(layoutIndex, rectIndex, 'down');
+          moveRect(layoutIndex, rectIndex, 'up');
         }, 50);
       }
       break;

--
Gitblit v1.8.0