wangfei
2024-08-27 3048ae014effa8f8ba92395eeb1e69f18e76ebf0
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -93,6 +93,7 @@
    // 计算新的矩形  
    const newRects = data.intoGlass2[0].map(rect => {  
      const scaleFactor =  794.67/5087; 
      const scaleFactorY =  430/2800;
        let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
        let newX = rect.yCoordinate; 
      if (rect.width < rect.height) {
@@ -104,13 +105,13 @@
      }
      if (rect.angle === 0) {  
    adjustedWidth = widtha * scaleFactor;
    adjustedHeight = heighta * 0.1;
    adjustedHeight = heighta * scaleFactorY;
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;   
    newX = 5087 - (rect.yCoordinate + widtha); 
    } else {  
    adjustedWidth = heighta * scaleFactor;  
    adjustedHeight = widtha * 0.1;
    adjustedHeight = widtha * scaleFactorY;
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    newX = 5087 - (rect.yCoordinate + heighta); 
@@ -118,7 +119,7 @@
        return {  
        ...rect, 
        xcoordinate: newX * scaleFactor,
        ycoordinate: rect.xCoordinate * 0.1,
        ycoordinate: rect.xCoordinate * scaleFactorY,
        width: adjustedWidth,  
        height: adjustedHeight,  
        widtha: rect.width, 
@@ -145,6 +146,7 @@
    // 计算新的矩形  
    const newRects = data.intoGlass[0].map(rect => {  
      const scaleFactor =  794.67/5087; 
      const scaleFactorY =  430/2800;
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
      let newX = rect.yCoordinate; 
      if (rect.width < rect.height) {
@@ -156,13 +158,13 @@
      }
      if (rect.angle === 0) {  
    adjustedWidth = widtha * scaleFactor;
    adjustedHeight = heighta * 0.1;
    adjustedHeight = heighta * scaleFactorY;
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    newX = 5087 - (rect.yCoordinate + widtha); 
    } else {  
    adjustedWidth = heighta * scaleFactor;  
    adjustedHeight = widtha * 0.1;
    adjustedHeight = widtha * scaleFactorY;
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    newX = 5087 - (rect.yCoordinate + heighta);  
@@ -170,7 +172,7 @@
        return {  
        ...rect, 
        xcoordinate: newX * scaleFactor,
        ycoordinate: rect.xCoordinate * 0.1,
        ycoordinate: rect.xCoordinate * scaleFactorY,
        width: adjustedWidth,  
        height: adjustedHeight,  
        widtha: rect.width, 
@@ -196,7 +198,8 @@
    const existingRects = adjustedRectsa.value.filter(rect => newGlassIds.has(rect.glassId));  
    // 计算新的矩形  
    const newRects = data.waitingGlass[0].map(rect => {  
      const scaleFactor =  1621.78/5190;
      const scaleFactor =  1390/5190;
      const scaleFactorY =  750/2800;
  let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;; 
  let newX = rect.yCoordinate; 
      if (rect.width < rect.height) {
@@ -208,13 +211,13 @@
      }
  if (rect.angle === 0) {  
    adjustedWidth = widtha * scaleFactor;  
    adjustedHeight = heighta * 0.16;
    adjustedHeight = heighta * scaleFactorY;
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    newX = 5190 - (rect.yCoordinate + widtha); 
    } else {  
    adjustedWidth = heighta * scaleFactor;  
    adjustedHeight = widtha * 0.16;
    adjustedHeight = widtha * scaleFactorY;
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    newX = 5190 - (rect.yCoordinate + heighta);  
@@ -222,7 +225,7 @@
  return {  
    ...rect, 
    x: newX * scaleFactor,  
    y: rect.xCoordinate * 0.16,
    y: rect.xCoordinate * scaleFactorY,
    width: adjustedWidth,  
    height: adjustedHeight,  
    widtha: rect.width, 
@@ -248,8 +251,8 @@
    const existingRects = adjustedRectsb.value.filter(rect => newGlassIds.has(rect.glassId));  
    // 计算新的矩形  
    const newRects = data.outGlass[0].map(rect => {  
      const scaleFactor =  1621.78/5190;
      const scaleFactory =  550/2800;
      const scaleFactor =  1390/5190;
      const scaleFactory =  750/2800;
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta,newY;
  let newX = rect.yCoordinate; 
      if (rect.width < rect.height) {
@@ -517,11 +520,11 @@
    <el-button  id="searchButton" type="info" @click="dialogFormVisiblec = true;dialogFormVisibleb = false;dialogFormVisible = false;dialogFormVisiblea = false">{{ $t('processCard.print') }}</el-button>
<div v-if="dialogFormVisible" >
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
<div style="width: 49%;float: left;background-color: #f4f4f5;height: 550px;">
<div style="width: 50%;float: left;background-color: #f4f4f5;height: 430px;">
    <div v-if="adjustedRects1.length > 0">
      <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplay }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
    <div style="text-align: center;"> 炉号:{{ adjustedRects1[0].engineerId }}-{{ adjustedRects1[0].temperingLayoutId }} </div>
    <el-scrollbar height="550px" style="background-color: #e9e9eb;">
    <el-scrollbar height="430px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
      <div  
      v-for="(rect, index) in adjustedRects1"
@@ -545,11 +548,11 @@
   </el-scrollbar>
   </div>
  </div>
<div style="width: 49%;float: right;background-color: #f4f4f5;height: 550px;">
<div style="width: 49%;float: right;background-color: #f4f4f5;height: 430px;">
    <div v-if="adjustedRects2.length > 0">
    <div style="text-align: center;"> 炉号:{{ adjustedRects2[0].engineerId }}-{{ adjustedRects2[0].temperingLayoutId }} </div>
    <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplay2 }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
    <el-scrollbar height="550px" style="background-color: #e9e9eb;">
    <el-scrollbar height="430px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
      <div  
      v-for="(rect, index) in adjustedRects2"
@@ -577,11 +580,11 @@
    </div>
<div v-if="dialogFormVisiblea">
  <!-- 进炉前 -->
  <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
  <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" v-loading="loading">
    <div v-if="adjustedRectsa.length > 0">
    <div style="text-align: center;"> 炉号:{{ adjustedRectsa[0].engineerId }}-{{ adjustedRectsa[0].temperingLayoutId }} </div>
    <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplaya }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
      <el-scrollbar height="550px" style="background-color: #e9e9eb;">
      <el-scrollbar height="750px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
      <div  
      v-for="(rect, index) in adjustedRectsa"  
@@ -604,11 +607,11 @@
</div>
<div v-if="dialogFormVisibleb">
  <!-- 已出炉 -->
  <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
  <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" v-loading="loading">
      <div v-if="adjustedRectsb.length > 0">
    <div style="text-align: center;"> 炉号:{{ adjustedRectsb[0].engineerId }}-{{ adjustedRectsb[0].temperingLayoutId }} </div>
    <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplayb }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
      <el-scrollbar height="550px" style="background-color: #e9e9eb;">
      <el-scrollbar height="750px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
      <div  
      v-for="(rect, index) in adjustedRectsb"