wangfei
2024-09-24 f38a8c1d95e84d609faf6133071eb789e7e0ec1d
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -152,13 +152,15 @@
    adjustedRects2.value = []
  }
  // 进炉中左
  if (data.intoGlass && data.intoGlass.length > 0) {
    const newGlassIds = new Set(data.intoGlass[0].map(rect => rect.glassId));
    const existingRects = adjustedRects1.value.filter(rect => newGlassIds.has(rect.glassId));
    const newRects = data.intoGlass[0].map(rect => {
      const scaleFactor =  810.89/5087;
      const scaleFactorY =  430/2800;
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
  if (data.intoGlass && data.intoGlass.length > 0) {
    console.log(data.intoGlass);
    const newGlassIds = new Set(data.intoGlass[0].map(rect => rect.glassId));
    const existingRects = adjustedRects1.value.filter(rect => newGlassIds.has(rect.glassId));
    const newRects = data.intoGlass[0].map(rect => {
      const scaleFactor =  810.89/5087;
      const scaleFactorY =  430/2800;
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
      let newX = rect.yCoordinate; 
      if (rect.width < rect.height) {
        widtha = rect.height;
@@ -199,7 +201,7 @@
      return oldRect; // 如果旧矩形在新数据中不存在,但保留在newGlassIds中,则保留原样  
    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));  
  }  
  else if (data.overGlass == null) {
  else {
    adjustedRects1.value = []
  }
  if (data.waitingGlass && data.waitingGlass.length > 0) {