zhoushihao
2024-08-01 f011d7d23d598a3b0974cc0ba8e9d4ea4e50dc04
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -37,23 +37,36 @@
        widtha = rect.width;
        heighta = rect.height;
      }
  if (rect.angle === 0) {
          adjustedWidth = heighta * 0.12;
          adjustedHeight = widtha * 0.1;
          adjustedWidtha = heighta;
          adjustedHeighta = widtha;
          newX = 5087 - (rect.xCoordinate + heighta);
        } else {
          adjustedWidth = widtha * 0.12;
          adjustedHeight = heighta * 0.1;
          adjustedWidtha = widtha;
          adjustedHeighta = heighta;
          newX = 5087 - (rect.xCoordinate + widtha);
        }
      if (rect.angle === 0) {
    adjustedWidth = widtha * 0.12;
    adjustedHeight = heighta * 0.1;
    adjustedWidtha = widtha;
    adjustedHeighta = heighta;
    newX = 5087 - (rect.yCoordinate + widtha);
    } else {
    adjustedWidth = heighta * 0.12;
    adjustedHeight = widtha * 0.1;
    adjustedWidtha = heighta;
    adjustedHeighta = widtha;
    newX = 5087 - (rect.yCoordinate + heighta);
  }
  // if (rect.angle === 0) {
  //         adjustedWidth = heighta * 0.12;
  //         adjustedHeight = widtha * 0.1;
  //         adjustedWidtha = heighta;
  //         adjustedHeighta = widtha;
  //         newX = 5087 - (rect.xCoordinate + heighta);
  //       } else {
  //         adjustedWidth = widtha * 0.12;
  //         adjustedHeight = heighta * 0.1;
  //         adjustedWidtha = widtha;
  //         adjustedHeighta = heighta;
  //         newX = 5087 - (rect.xCoordinate + widtha);
  //       }
        return {  
        ...rect, 
        xcoordinate: newX * 0.12,
        ycoordinate: rect.yCoordinate * 0.1,
        ycoordinate: rect.xCoordinate * 0.1,
        width: adjustedWidth,  
        height: adjustedHeight,  
        widtha: adjustedWidtha, 
@@ -76,22 +89,35 @@
        heighta = rect.height;
      }
      if (rect.angle === 0) {  
          adjustedWidth = heighta * 0.12;
          adjustedHeight = widtha * 0.1;
          adjustedWidtha = heighta;
          adjustedHeighta = widtha;
          newX = 5087 - (rect.xCoordinate + heighta);
  } else {
          adjustedWidth = widtha * 0.12;
          adjustedHeight = heighta * 0.1;
          adjustedWidtha = widtha;
          adjustedHeighta = heighta;
          newX = 5087 - (rect.xCoordinate + widtha);
    adjustedWidth = widtha * 0.12;
    adjustedHeight = heighta * 0.1;
    adjustedWidtha = widtha;
    adjustedHeighta = heighta;
    newX = 5087 - (rect.yCoordinate + widtha);
    } else {
    adjustedWidth = heighta * 0.12;
    adjustedHeight = widtha * 0.1;
    adjustedWidtha = heighta;
    adjustedHeighta = widtha;
    newX = 5087 - (rect.yCoordinate + heighta);
  }  
  //     if (rect.angle === 0) {
  //         adjustedWidth = heighta * 0.12;
  //         adjustedHeight = widtha * 0.1;
  //         adjustedWidtha = heighta;
  //         adjustedHeighta = widtha;
  //         newX = 5087 - (rect.xCoordinate + heighta);
  // } else {
  //         adjustedWidth = widtha * 0.12;
  //         adjustedHeight = heighta * 0.1;
  //         adjustedWidtha = widtha;
  //         adjustedHeighta = heighta;
  //         newX = 5087 - (rect.xCoordinate + widtha);
  // }
        return {  
        ...rect, 
        xcoordinate: newX * 0.12,
        ycoordinate: rect.yCoordinate * 0.1,
        ycoordinate: rect.xCoordinate * 0.1,
        width: adjustedWidth,  
        height: adjustedHeight,  
        widtha: adjustedWidtha,