From 71594bd2dc9201834aa533099e9e49a9b84506cd Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 12 六月 2025 15:32:25 +0800
Subject: [PATCH] 新增韩语

---
 UI-Project/src/views/NewPage.vue |   52 +++++++++++++++++++++++++++-------------------------
 1 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/UI-Project/src/views/NewPage.vue b/UI-Project/src/views/NewPage.vue
index 9b7f1d6..96c235d 100644
--- a/UI-Project/src/views/NewPage.vue
+++ b/UI-Project/src/views/NewPage.vue
@@ -5,11 +5,11 @@
 <el-input v-model="current" style="margin-left: 20px;margin-top: 15px;width: 240px" placeholder="璇疯緭鍏ュ伐绋嬪彿" @input="updateUrl"/>
     <el-button style="margin-top: 15px;margin-left: 15px;"  type="primary" @click="fetchData">鏌ヨ</el-button>  
   </div>  
-  <el-card style="flex: 1;margin-left: 400px;margin-top: 50px;margin-right: 10px;width: 1000px;" height="900" v-loading="loading">
+  <el-card style="flex: 1;margin-left: 400px;margin-top: 50px;margin-right: 10px;width: 1100px;" height="900" >
   <div v-for="(row, rowIndex) in divsData" :key="rowIndex" class="row">  
       <div v-for="(rect, colIndex) in row" :key="colIndex" class="div-container">  
-    <div style="text-align: center;">鐐夊彿锛歿{ getAdjustedRectsForRow(rowIndex)[0].layout_id }}</div>  
-  <el-scrollbar height="550px" width="958px" style="background-color: #e9e9eb;">
+    <div style="text-align: center;">鐐夊彿锛歿{ getAdjustedRectsForRow(rowIndex)[0].layout_id }}  ----   瑁呰浇鐜囷細{{ getAdjustedRectsForRow(rowIndex)[0].olLayoutRate }}</div>  
+  <el-scrollbar height="550px" width="1000px" style="background-color: #e9e9eb;">
   <div  style="position: relative;width: 100%;height: 100%;">
     <div
       v-for="(rect, index) in getAdjustedRectsForRow(rowIndex)"
@@ -22,6 +22,7 @@
        height: `${rect.height}px`,  
       backgroundColor:  'lightblue'}">
    <div  class="centered-text">
+  <div style="font-size: 15px;font-weight: bold;">{{ rect.sort }}</div>  
   <div style="font-size: 15px;font-weight: bold;">{{ rect.process_id }}</div>  
   <div style="font-size: 15px;font-weight: bold;">{{ rect.project_no }}</div>  
   <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
@@ -59,11 +60,9 @@
          if (response.code === 200) {  
            rawData.value = response.data;
                  processData(rawData.value);
-         } else {  
-          //  ElMessage.warning(res.msg)
+         } else {
          }  
-       } catch (error) {  
-         // console.error('Error fetching rects :', error);  
+       } catch (error) {
        }  
      }); 
    watch(  
@@ -80,8 +79,7 @@
           rawData.value = response.data;
           processData(rawData.value);
   }  
-} catch (error) {  
-  console.error('Failed to fetch data:', error);  
+} catch (error) { 
 } finally {  
   loading.value = false;  
 }  
@@ -95,24 +93,30 @@
 const rowIndex = divsData.value;
   adjustedRectsPerRow.value = divsData.value.map(() => []);
 divsData.value.forEach((row, rowIndex) => {
-  const rawRowData = rawData.value[rowIndex];
+  const rawRowData = rawData.value[rowIndex].listGlass;
   if (rawRowData) {
 adjustedRectsPerRow.value[rowIndex] = rawRowData.map(rect => {
-      let adjustedWidth, adjustedHeight,newX;
+      let adjustedWidth, adjustedHeight,newX,widtha,heighta;
+      if (rect.width < rect.height) {
+        widtha = rect.height;
+        heighta = rect.width;
+      }else {
+        widtha = rect.width;
+        heighta = rect.height;
+      }
       if (rect.rotate_angle  === 90) {
-       newX = rect.olHeight -(rect.y_axis + rect.height); 
-       adjustedWidth = rect.height * (958/rect.olHeight);
-       adjustedHeight = rect.width * (550/rect.olWidth);
-      } else {  
-        newX = rect.olHeight -(rect.y_axis + rect.width); 
-       adjustedWidth = rect.width * (958/rect.olHeight);
-       adjustedHeight = rect.height * (550/rect.olWidth);
-      } 
+       newX = rect.olHeight -(rect.y_axis + heighta); 
+       adjustedWidth = heighta * (1000/rect.olHeight);
+       adjustedHeight = widtha * (550/rect.olWidth);
+      } else {
+        newX = rect.olHeight -(rect.y_axis + widtha); 
+       adjustedWidth = widtha * (1000/rect.olHeight);
+       adjustedHeight = heighta * (550/rect.olWidth);
+  } 
       let adjustedRect = {  
         ...rect,
         y_axis: rect.x_axis * (550/rect.olWidth),
-        x_axis: newX * (958/rect.olHeight),
-        // y_axis: rect.x_axis * (550/rect.olWidth),
+        x_axis: newX * (1000/rect.olHeight),
         width: adjustedWidth,  
         height: adjustedHeight,  
         widtha: rect.width,  
@@ -127,9 +131,7 @@
 function getAdjustedRectsForRow(rowIndex) {
 return adjustedRectsPerRow.value[rowIndex] || [];  
 }  
-   </script>  
-     
-  
+</script>
 <style scoped>  
 .row {  
 display: flex;  
@@ -137,7 +139,7 @@
 margin-bottom: 20px;
 }
 .div-container {  
-width: 958px;
+width: 1000px;
 float: left;
 background-color: #f4f4f5;
 height: 550px;

--
Gitblit v1.8.0