wu
2024-07-22 b6480bb8991e83a2efd5e4835ccc8ed0e87c067a
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -29,16 +29,17 @@
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
  if(data.overGlass!=null){
  adjustedRects.value =  data.overGlass[0].map(rect => ({  
        ...rect, // 复制原始对象的其他属性  
        xcoordinate: rect.xCoordinate * 0.5, // 将x值除以3
        ycoordinate: rect.ycoordinate * 0.5,
        xcoordinate: rect.xCoordinate * 0.4, // 将x值除以3
        ycoordinate: rect.yCoordinate * 0.4,
        width: rect.width * 0.4,
        height: rect.height * 0.4,
        widtha: rect.width,
        heighta: rect.height,
      })); 
      console.log(adjustedRects.value);
    }
};
onMounted(() => {
  // fetchFlowCardId();
@@ -56,6 +57,8 @@
  <div style="margin-top: 10px;">
<div>
    <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
      <div v-if="adjustedRects.length > 0">
    <div style="text-align: center;">流程卡: {{ adjustedRects[0].flowCardId }}</div>
    <el-scrollbar height="600px">
    <div  style="position: relative;width: 1400px;">  
      <div  
@@ -66,12 +69,13 @@
       width: `${rect.width}px`, height: `${rect.height}px`,
       backgroundColor: rect.state === 4 ? '#d1edc4' : '#f8e3c5' }">
     <div  class="centered-text">
    <div >{{ rect.flowcardId }}</div>
    <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
    <div >{{ rect.glassId }}</div>
    <div style="margin-top: 50px;margin-left: -85px;">{{ rect.widtha }}*{{ rect.heighta }}</div>
  </div>
  </div> 
   </div>
   </el-scrollbar>
   </div>
    </el-card>
    </div>
  </div>