wangfei
2024-08-15 65062cbdae525bd0b7e5639a5a149d942e3d1b03
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -36,7 +36,8 @@
  // 更新 tableData 的数据
  if(data.overGlass!=null){
    adjustedRects.value =  data.overGlass[0].map(rect => {  
  let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
      const scaleFactor =  1621.78/5190;
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
      let newX = rect.yCoordinate; 
      if (rect.width < rect.height) {
        widtha = rect.height;
@@ -46,13 +47,13 @@
        heighta = rect.height;
      }
    if (rect.angle === 0) {  
    adjustedWidth = widtha * 0.24;
    adjustedWidth = widtha * scaleFactor;
    adjustedHeight = heighta * 0.16;  
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    // newX = 5190 - (rect.yCoordinate + rect.width); 
  } else {  
    adjustedWidth = heighta * 0.24;
    adjustedWidth = heighta * scaleFactor;
    adjustedHeight = widtha * 0.16;  
    // adjustedWidtha = heighta;  
    // adjustedHeighta = widtha;  
@@ -60,7 +61,7 @@
  }  
  return {  
    ...rect, 
    xcoordinate: newX * 0.24,
    xcoordinate: newX * scaleFactor,
    ycoordinate: rect.xCoordinate * 0.16,
    width: adjustedWidth,  
    height: adjustedHeight,