From 2938316f6374f687513d2d17b3ee592633625698 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期三, 02 四月 2025 10:30:00 +0800
Subject: [PATCH] 时间获取更改接口,历史任务中时间选择器新增快捷键,掰片模块算法优化

---
 UI-Project/src/views/Identify/identify.vue |   43 +++++++++++++++++++++++++------------------
 1 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/UI-Project/src/views/Identify/identify.vue b/UI-Project/src/views/Identify/identify.vue
index ae7f372..6a1e5f0 100644
--- a/UI-Project/src/views/Identify/identify.vue
+++ b/UI-Project/src/views/Identify/identify.vue
@@ -82,6 +82,8 @@
 const totalPages = ref(0);
 const pageSize = ref(1);
 const currentPage = ref('');
+const realwidth = ref('');
+const realheight = ref('');
 const disabled = false;
 const size = 'small';
 const rawData = ref([]);
@@ -153,22 +155,23 @@
     var url="/cacheGlass/taskCache/queryCutDrawingByEngineerId?engineerId="+engineerId.value+ "&patternSequence=" + 1;
     const response = await request.post(url)
     if (response.code === 200) {
-      
       const rawRects = response.data.currentCutDrawing;
       rawData.value = response.data;
       totalPages.value = response.data.totalPatternSequence;
-      const scaleFactor =  1621.78/6000; 
-      const scaleFactory =  750/3300; 
+      realwidth.value = response.data.upPattenUsage.width;
+      realheight.value = response.data.upPattenUsage.height;
+      const realx = realwidth.value;
+      const realy = realheight.value;
+      const scaleFactor =  1621.78/realx; 
+      const scaleFactory =  750/realy; 
       adjustedRects.value = rawRects.map(rect => ({
         ...rect,
-        xaxisa: rect.xaxis * scaleFactor * 1.1,
-        yaxisa: (3300 - (rect.yaxis + rect.edgHeight + 300)) * scaleFactory * 1.1,
-        // xaxisa: (6000 -(rect.xaxis + rect.edgWidth)) * scaleFactor * 1.1,
-        // yaxisa: rect.yaxis * scaleFactory * 1.1,
-        width: rect.edgWidth * scaleFactor  * 1.1,
-        widtha: rect.edgWidth ,
+        xaxisa: rect.xaxis * scaleFactor,
+        yaxisa: (realy - (rect.yaxis + rect.edgHeight )) * scaleFactory,
+        width: rect.edgWidth * scaleFactor,
+        widtha: rect.edgWidth,
         heighta: rect.edgHeight ,
-        height: rect.edgHeight * scaleFactory * 1.1,
+        height: rect.edgHeight * scaleFactory,
         state: rect.state
       })); 
        currentPage.value = 1;
@@ -181,16 +184,20 @@
     if (response.code === 200) {
       const rawRects = response.data.currentCutDrawing;
       rawData.value = response.data;
-      const scaleFactor =  1621.78/6000; 
-      const scaleFactory =  750/3300; 
+      realwidth.value = response.data.upPattenUsage.width;
+      realheight.value = response.data.upPattenUsage.height;
+      const realx = realwidth.value;
+      const realy = realheight.value;
+      const scaleFactor =  1621.78/realx; 
+      const scaleFactory =  750/realy; 
       adjustedRects.value = rawRects.map(rect => ({  
         ...rect,
-        xaxisa: rect.xaxis * scaleFactor * 1.1,
-        yaxisa: (3300 - (rect.yaxis + rect.edgHeight + 300)) * scaleFactory * 1.1,
-        width: rect.edgWidth * scaleFactor  * 1.1,
-        widtha: rect.edgWidth ,
-        heighta: rect.edgHeight ,
-        height: rect.edgHeight * scaleFactory * 1.1,
+        xaxisa: rect.xaxis * scaleFactor,
+        yaxisa: (realy - (rect.yaxis + rect.edgHeight )) * scaleFactory,
+        width: rect.edgWidth * scaleFactor,
+        widtha: rect.edgWidth,
+        heighta: rect.edgHeight,
+        height: rect.edgHeight * scaleFactory,
         state: rect.state
       })); 
     }

--
Gitblit v1.8.0