From 8a63774671aef17807569d6fb631eca20d4696f0 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期一, 25 八月 2025 17:04:46 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue |  200 +++++++++++++++++++++++++-------------------------
 1 files changed, 100 insertions(+), 100 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue b/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue
index da6470a..4d71aaa 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue
@@ -155,27 +155,27 @@
 
 //缁樺埗鑷敱澶氳竟褰�
 const getproject = () => {
-    validate1()
-    if(leafer!==undefined){
-      leafer.clear()
-    }
-    leafer=new Leafer({ view: 'canvas' })
-    points.value = [datas1.value + (parseInt(data5.value) / big), datas2.value - (parseInt(data6.value) / big), datas3.value + (parseInt(data1.value) / big), datas4.value + (parseInt(data2.value) / big),
-      datas5.value - (parseInt(data3.value) / big), datas6.value + (parseInt(data4.value) / big), datas7.value - (parseInt(data7.value) / big), datas8.value - (parseInt(data8.value) / big)]
-    fileJson.value.quadrilateral=[parseInt(data5.value),parseInt(data6.value),parseInt(data1.value),parseInt(data2.value),
-      parseInt(data3.value),parseInt(data4.value),parseInt(data7.value),parseInt(data8.value)]
-    fileJson.value.polygon=null
-    states.value=false
+  validate1()
+  if(leafer!==undefined){
+    leafer.clear()
+  }
+  leafer=new Leafer({ view: 'canvas' })
+  points.value = [datas1.value + (parseInt(data5.value) / big), datas2.value - (parseInt(data6.value) / big), datas3.value + (parseInt(data1.value) / big), datas4.value + (parseInt(data2.value) / big),
+    datas5.value - (parseInt(data3.value) / big), datas6.value + (parseInt(data4.value) / big), datas7.value - (parseInt(data7.value) / big), datas8.value - (parseInt(data8.value) / big)]
+  fileJson.value.quadrilateral=[parseInt(data5.value),parseInt(data6.value),parseInt(data1.value),parseInt(data2.value),
+    parseInt(data3.value),parseInt(data4.value),parseInt(data7.value),parseInt(data8.value)]
+  fileJson.value.polygon=null
+  states.value=false
 
-    const polygon = new Polygon({
-      points: points.value,
-      stroke: '#f00',
-      zIndex: 1
-    })
-    leafer.add(polygon)
-    load()
-    state.value=true
-    exportToDXF(1)
+  const polygon = new Polygon({
+    points: points.value,
+    stroke: '#f00',
+    zIndex: 1
+  })
+  leafer.add(polygon)
+  load()
+  state.value=true
+  exportToDXF(1)
 
 }
 
@@ -188,8 +188,8 @@
     let r=parseInt(circle.value.r)
     if(x>0 && y>0 && r>0){
       const ellipse = new Ellipse({
-        x:x/ big,
-        y:(y-r*2)/ big,
+        x:(x-r)/ big,
+        y:(y-r)/ big,
         width: r*2 / big,
         height: r*2 / big,
         stroke: '#f00',
@@ -342,40 +342,40 @@
 
       for (let i=0;i<list.length;i++) {
         let curr=list[i]
-      // 鎺掗櫎鑷韩鍧愭爣
-      if (curr[0] == xy[0] && curr[1] == xy[1]) {
-        continue;
-      }
-      // 绛涢�墄鈮ョ洰鏍噚鐨勫潗鏍囷紙鍙�冭檻閫掑鏂瑰悜鐨勫�欓�夛級
-      if (curr[0] < xy[0]) {
-        continue;
-      }
-      // 绗竴娆℃壘鍒板�欓�夛紝鐩存帴璧嬪��
-      if (best == null) {
-        best = xy;
-        continue;
-      }
-      if (curr[0] == best[0]) {
-        // x鐩稿悓鍒欐瘮杈儁锛歽鏇村皬鍒欐洿浼�
-        if (curr[1] < best[1]) {
-          best = curr;
-          index=i
+        // 鎺掗櫎鑷韩鍧愭爣
+        if (curr[0] == xy[0] && curr[1] == xy[1]) {
+          continue;
+        }
+        // 绛涢�墄鈮ョ洰鏍噚鐨勫潗鏍囷紙鍙�冭檻閫掑鏂瑰悜鐨勫�欓�夛級
+        if (curr[0] < xy[0]) {
+          continue;
+        }
+        // 绗竴娆℃壘鍒板�欓�夛紝鐩存帴璧嬪��
+        if (best == null) {
+          best = xy;
+          continue;
+        }
+        if (curr[0] == best[0]) {
+          // x鐩稿悓鍒欐瘮杈儁锛歽鏇村皬鍒欐洿浼�
+          if (curr[1] < best[1]) {
+            best = curr;
+            index=i
+          }
         }
       }
-    }
       break;
 
     case 2: // x杞撮�掑噺锛氭壘x鈮ゅ綋鍓峹鐨勫潗鏍囦腑锛寈鏈�澶х殑锛泋鐩稿悓鍒檡鏈�澶х殑
       for (let i=0;i<list.length;i++) {
         let curr=list[i]
-      // 鎺掗櫎鑷韩鍧愭爣
-      if (curr[0] == xy[0] && curr[1] == xy[1]) {
-        continue;
-      }
-      // 绛涢�墄鈮ょ洰鏍噚鐨勫潗鏍囷紙鍙�冭檻閫掑噺鏂瑰悜鐨勫�欓�夛級
-      if (curr[0] > xy[0]) {
-        continue;
-      }
+        // 鎺掗櫎鑷韩鍧愭爣
+        if (curr[0] == xy[0] && curr[1] == xy[1]) {
+          continue;
+        }
+        // 绛涢�墄鈮ょ洰鏍噚鐨勫潗鏍囷紙鍙�冭檻閫掑噺鏂瑰悜鐨勫�欓�夛級
+        if (curr[0] > xy[0]) {
+          continue;
+        }
         // 绗竴娆℃壘鍒板�欓�夛紝鐩存帴璧嬪��
         if (best == null) {
           best = xy;
@@ -388,20 +388,20 @@
             index=i
           }
         }
-    }
+      }
       break;
 
     case 3: // y杞撮�掑锛氭壘y鈮ュ綋鍓峺鐨勫潗鏍囦腑锛寉鏈�灏忕殑锛泍鐩稿悓鍒檟鏈�灏忕殑
       for (let i=0;i<list.length;i++) {
         let curr=list[i]
-      // 鎺掗櫎鑷韩鍧愭爣
-      if (curr[0] == xy[0] && curr[1] == xy[1]) {
-        continue;
-      }
-      // 绛涢�墆鈮ョ洰鏍噛鐨勫潗鏍囷紙鍙�冭檻閫掑鏂瑰悜鐨勫�欓�夛級
-      if (curr[1] < xy[1]) {
-        continue;
-      }
+        // 鎺掗櫎鑷韩鍧愭爣
+        if (curr[0] == xy[0] && curr[1] == xy[1]) {
+          continue;
+        }
+        // 绛涢�墆鈮ョ洰鏍噛鐨勫潗鏍囷紙鍙�冭檻閫掑鏂瑰悜鐨勫�欓�夛級
+        if (curr[1] < xy[1]) {
+          continue;
+        }
         // 绗竴娆℃壘鍒板�欓�夛紝鐩存帴璧嬪��
         if (best == null) {
           best = xy;
@@ -414,24 +414,24 @@
             index=i
           }
         }
-    }
+      }
       break;
 
     case 4: // y杞撮�掑噺锛氭壘y鈮ゅ綋鍓峺鐨勫潗鏍囦腑锛寉鏈�澶х殑锛泍鐩稿悓鍒檟鏈�澶х殑
       for (let i=0;i<list.length;i++) {
         let curr=list[i]
-      // 鎺掗櫎鑷韩鍧愭爣
-      if (curr[0] == xy[0] && curr[1] == xy[1]) {
-        continue;
-      }
-      // 绛涢�墆鈮ょ洰鏍噛鐨勫潗鏍囷紙鍙�冭檻閫掑噺鏂瑰悜鐨勫�欓�夛級
-      if (curr[1] > xy[1]) {
-        continue;
-      }
-      if (best == null) {
-        best = xy;
-        continue;
-      }
+        // 鎺掗櫎鑷韩鍧愭爣
+        if (curr[0] == xy[0] && curr[1] == xy[1]) {
+          continue;
+        }
+        // 绛涢�墆鈮ょ洰鏍噛鐨勫潗鏍囷紙鍙�冭檻閫掑噺鏂瑰悜鐨勫�欓�夛級
+        if (curr[1] > xy[1]) {
+          continue;
+        }
+        if (best == null) {
+          best = xy;
+          continue;
+        }
         if (curr[1] == best[1]) {
           // y鐩稿悓鍒欐瘮杈儀锛歺鏇村皬鍒欐洿浼�
           if (curr[0] > best[0]) {
@@ -439,7 +439,7 @@
             index=i
           }
         }
-    }
+      }
       break;
 
     default: // 鏃犳晥鏂瑰悜
@@ -600,8 +600,8 @@
 
     pointsRect.value.forEach(rect => {
       if(rect.type=="round"){
-        const x = rect.x+rect.width;
-        const y = maxY-minY-rect.y+rect.width;
+        const x = rect.x;
+        const y = maxY-minY-rect.y;
         const radius = rect.width;
         if (dxf.drawCircle) {
           dxf.drawCircle(x, y, radius, { layer: '0' });
@@ -804,37 +804,37 @@
             pointsRect.value.push({id:pointsRect.value.length+1,type:'rect',shap:"鈻�",x:entity.vertices[0].x,y:entity.vertices[0].y,
               width:entity.vertices[2].x-entity.vertices[0].x,
               height:entity.vertices[1].y-entity.vertices[0].y
-                ,x1:entity.vertices[0].x,y1:entity.vertices[0].y})
+              ,x1:round(entity.vertices[0].x),y1:round(entity.vertices[0].y)})
           }
 
-            const polygon = new Polygon({
-              points: point,
-              stroke: '#f00',
-              zIndex: 1
-            })
-            setTimeout(() => {
-              leafer.add(polygon);
-            }, 30);
+          const polygon = new Polygon({
+            points: point,
+            stroke: '#f00',
+            zIndex: 1
+          })
+          setTimeout(() => {
+            leafer.add(polygon);
+          }, 30);
 
 
 
           break;
         case 'CIRCLE':
-            let CIRCLEX=(entity.center.x-minX-entity.radius)/big
-            let CIRCLEY=((maxY - minY)-(entity.center.y-minY+entity.radius))/big
-            if(big<(entity.radius * 2) / 400){
-              big = (entity.radius * 2) / 400
-              main.style.width = entity.radius * 2 / big + "px"
-              main.style.height = entity.radius * 2 / big + "px"
-              width.innerHTML = round(entity.radius * 2, 2)
-              height.innerHTML = round(entity.radius * 2, 2)
-              CIRCLEX=0
-              CIRCLEY=0
-            }
-            let x=entity.center.x-minX-entity.radius
-            let y=(maxY - minY)-(entity.center.y-minY-entity.radius)
+          let CIRCLEX=(entity.center.x-minX-entity.radius)/big
+          let CIRCLEY=((maxY - minY)-(entity.center.y-minY+entity.radius))/big
+          if(big<(entity.radius * 2) / 400){
+            big = (entity.radius * 2) / 400
+            main.style.width = entity.radius * 2 / big + "px"
+            main.style.height = entity.radius * 2 / big + "px"
+            width.innerHTML = round(entity.radius * 2, 2)
+            height.innerHTML = round(entity.radius * 2, 2)
+            CIRCLEX=0
+            CIRCLEY=0
+          }
+          let x=entity.center.x-minX
+          let y=(maxY - minY)-(entity.center.y-minY)
           pointsRect.value.push({id:pointsRect.value.length+1,type:'round',shap:"銆�",x:x,y:y,width:entity.radius,
-            x1:x,y1:entity.center.y-minY-entity.radius})
+            x1:round(x),y1:round(entity.center.y-minY)})
           const ellipse = new Ellipse({
             x:CIRCLEX,
             y:CIRCLEY,
@@ -1243,8 +1243,8 @@
         let y=parseInt(rect.y)
         let r=parseInt(rect.width)
         const ellipse = new Ellipse({
-          x:x/ big,
-          y:(y-r*2)/ big,
+          x:(x-r)/ big,
+          y:(y-r)/ big,
           width: r*2 / big,
           height: r*2 / big,
           stroke: '#f00',
@@ -1311,7 +1311,7 @@
     <el-button type="primary" @click="save()">{{$t('basicData.save')}}</el-button>
   </div>
 
- <div style="position: absolute;margin-top: 373px;margin-left: 300px;">
+  <div style="position: absolute;margin-top: 373px;margin-left: 300px;">
 
     <el-select v-model="select1" @change="handleChange" style="width: 100px;height: 40px;font-size: 8px">
       <el-option value="1" :label="$t('order.edgeAngleCurvature')"></el-option>

--
Gitblit v1.8.0