ZengTao
2025-09-11 924ce82faeec6d896fcdc360b279215e84b69fb9
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -1,43 +1,51 @@
<script setup lang="ts">
import {Search ,Delete, Upload,Edit} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {nextTick, onBeforeUnmount, onMounted, ref} from "vue";
import request from "@/utils/request"
import { ref, onMounted, onBeforeUnmount,nextTick  } from 'vue';
import { WebSocketHost ,host} from '@/utils/constants'
import { ElMessage, ElMessageBox } from 'element-plus'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
  import { useI18n } from 'vue-i18n'
  import { useRouter } from 'vue-router'
  const { t } = useI18n()
  let language = ref(localStorage.getItem('lang') || 'zh')
import {host, WebSocketHost} from '@/utils/constants'
import {ElMessage} from 'element-plus'
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
import {useI18n} from 'vue-i18n'
import {useRouter} from 'vue-router'
const {t} = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(true)
const dialogFormVisibleb = ref(false)
const dialogFormVisiblec = ref(false)
const blind1 = ref(false)
const blind2 = ref(false)
const blind3 = ref(false)
const blind4 = ref(false)
const blinda = ref(false)
const blindb = ref(false)
const dialogVisible = ref(false)
const width = ref();
const height = ref();
const currentRect = ref(null);
const canSelectProject1 = ref(true);
const canSelectProject2 = ref(true);
const canSelectProject3 = ref(true);
const canSelectProject4 = ref(true);
const canSelectProjecta = ref(true);
const cantakea = ref(true);
const cantakeb = ref(true);
const canona = ref(true);
const canons = ref(true);
const cantakeall = ref(true);
const canonb = ref(true);
const canSelectProjectb = ref(true);
const adjustedRects1 = ref([]);
const adjustedRects2 = ref([]);
const adjustedRects3 = ref([]);
const adjustedRects4 = ref([]);
const adjustedRectsa = ref([]);
const adjustedRectsb = ref([]);
const tableData = ref([])
const engineerId = ref('')
const router = useRouter()
const currentGlassId = ref(null);
const currentstartSlot = ref(null);
const currentengineerId = ref(null);
const currenttemperingLayoutId = ref(null);
const currenttemperingFeedSequence = ref(null);
onMounted(async () => {  
  try {  
@@ -49,7 +57,7 @@
          tableData.value = response.data
          console.log(response.data);
    } else {  
      ElMessage.warning(res.msg)
      ElMessage.warning(response.message)
    }  
  } catch (error) {  
    // console.error('Error fetching rects :', error);  
@@ -69,29 +77,6 @@
    ElMessage.error(response.message);
  }
};
const printing = async () => {
  let postData = {
    type: 9,
    workingProcedure: '钢化',
    ...(engineerId.value !== '' && { engineerId: engineerId.value }),
  };
  console.log(engineerId.value);
  const response = await request.post("/loadGlass/damage/selectDamagePrintDetails", postData)
  if (response.code === 200) {
  dialogVisible.value = true;
    tableData.value = response.data;
    await nextTick();
  window.print();
} else {
    ElMessage.error(response.message);
  }
};
const printTable = () => {
  // 这里可以添加一些CSS样式来优化打印效果
  // 例如,可以添加一个隐藏的打印样式表
  window.print();
};
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
const handleMessage = (data) => {  
  // 进炉中右
@@ -102,9 +87,9 @@
    const existingRects = adjustedRects2.value.filter(rect => newGlassIds.has(rect.glassId));  
    // 计算新的矩形  
    const newRects = data.intoGlass2[0].map(rect => {  
      const scaleFactor =  794.67/5087;
      const scaleFactorY =  430/2800;
        let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
      const scaleFactor =  800/5000;
      const scaleFactorY =  407/2750;
        let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
        let newX = rect.yCoordinate; 
      if (rect.width < rect.height) {
        widtha = rect.height;
@@ -118,13 +103,13 @@
    adjustedHeight = heighta * scaleFactorY;
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;   
    newX = 5087 - (rect.yCoordinate + widtha);
    newX = 5000 - (rect.yCoordinate + widtha);
    } else {  
    adjustedWidth = heighta * scaleFactor;  
    adjustedHeight = widtha * scaleFactorY;  
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    newX = 5087 - (rect.yCoordinate + heighta);
    newX = 5000 - (rect.yCoordinate + heighta);
  } 
        return {  
        ...rect, 
@@ -148,14 +133,17 @@
  else if (data.intoGlass2 == null) {
    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;;
  // 进炉中1
  if (data.intoGlass1 && data.intoGlass1.length > 0) {
    console.log(data.intoGlass1);
    const newGlassIds = new Set(data.intoGlass1[0].map(rect => rect.glassId));
    const existingRects = adjustedRects1.value.filter(rect => newGlassIds.has(rect.glassId));
    const newRects = data.intoGlass1[0].map(rect => {
      const scaleFactor =  800/5000;
      const scaleFactorY =  407/2750;
      // const scaleFactor =  600/5087;
      // const scaleFactorY =  200/2800;
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
      let newX = rect.yCoordinate; 
      if (rect.width < rect.height) {
        widtha = rect.height;
@@ -169,13 +157,13 @@
    adjustedHeight = heighta * scaleFactorY;
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    newX = 5087 - (rect.yCoordinate + widtha);
    newX = 5000 - (rect.yCoordinate + widtha);
    } else {  
    adjustedWidth = heighta * scaleFactor;  
    adjustedHeight = widtha * scaleFactorY;  
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    newX = 5087 - (rect.yCoordinate + heighta);
    newX = 5000 - (rect.yCoordinate + heighta);
  } 
        return {  
        ...rect, 
@@ -196,9 +184,116 @@
      return oldRect; // 如果旧矩形在新数据中不存在,但保留在newGlassIds中,则保留原样  
    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));  
  }  
  else if (data.overGlass == null) {
  else {
    adjustedRects1.value = []
  }
  // 进炉中3
  if (data.intoGlass3 && data.intoGlass3.length > 0) {
    console.log(data.intoGlass3);
    const newGlassIds = new Set(data.intoGlass3[0].map(rect => rect.glassId));
    const existingRects = adjustedRects3.value.filter(rect => newGlassIds.has(rect.glassId));
    const newRects = data.intoGlass3[0].map(rect => {
      const scaleFactor =  800/5000;
      const scaleFactorY =  407/2750;
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
      let newX = rect.yCoordinate;
      if (rect.width < rect.height) {
        widtha = rect.height;
        heighta = rect.width;
      }else {
        widtha = rect.width;
        heighta = rect.height;
      }
      if (rect.angle === 0) {
    adjustedWidth = widtha * scaleFactor;
    adjustedHeight = heighta * scaleFactorY;
    // adjustedWidtha = widtha;
    // adjustedHeighta = heighta;
    newX = 5000 - (rect.yCoordinate + widtha);
    } else {
    adjustedWidth = heighta * scaleFactor;
    adjustedHeight = widtha * scaleFactorY;
    // adjustedWidtha = widtha;
    // adjustedHeighta = heighta;
    newX = 5000 - (rect.yCoordinate + heighta);
  }
        return {
        ...rect,
        xcoordinate: newX * scaleFactor,
        ycoordinate: rect.xCoordinate * scaleFactorY,
        width: adjustedWidth,
        height: adjustedHeight,
        widtha: rect.width,
        heighta: rect.height,
      }
    });
    // 合并新旧矩形,并保留 isActive 状态
    adjustedRects3.value = existingRects.map(oldRect => {
      const newRect = newRects.find(r => r.glassId === oldRect.glassId);
      if (newRect) {
        return { ...oldRect, ...newRect, isActive: oldRect.isActive };
      }
      return oldRect; // 如果旧矩形在新数据中不存在,但保留在newGlassIds中,则保留原样
    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
  }
  else {
    adjustedRects3.value = []
  }
  // 进炉中4
  if (data.intoGlass4 && data.intoGlass4.length > 0) {
    // 提取新的矩形ID
    const newGlassIds = new Set(data.intoGlass4[0].map(rect => rect.glassId));
    // 过滤出已存在的矩形
    const existingRects = adjustedRects4.value.filter(rect => newGlassIds.has(rect.glassId));
    // 计算新的矩形
    const newRects = data.intoGlass4[0].map(rect => {
      const scaleFactor =  800/5000;
      const scaleFactorY =  407/2750;
        let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
        let newX = rect.yCoordinate;
      if (rect.width < rect.height) {
        widtha = rect.height;
        heighta = rect.width;
      }else {
        widtha = rect.width;
        heighta = rect.height;
      }
      if (rect.angle === 0) {
    adjustedWidth = widtha * scaleFactor;
    adjustedHeight = heighta * scaleFactorY;
    // adjustedWidtha = widtha;
    // adjustedHeighta = heighta;
    newX = 5000 - (rect.yCoordinate + widtha);
    } else {
    adjustedWidth = heighta * scaleFactor;
    adjustedHeight = widtha * scaleFactorY;
    // adjustedWidtha = widtha;
    // adjustedHeighta = heighta;
    newX = 5000 - (rect.yCoordinate + heighta);
  }
        return {
        ...rect,
        xcoordinate: newX * scaleFactor,
        ycoordinate: rect.xCoordinate * scaleFactorY,
        width: adjustedWidth,
        height: adjustedHeight,
        widtha: rect.width,
        heighta: rect.height,
      }
    });
    // 合并新旧矩形,并保留 isActive 状态
    adjustedRects4.value = existingRects.map(oldRect => {
      const newRect = newRects.find(r => r.glassId === oldRect.glassId);
      if (newRect) {
        return { ...oldRect, ...newRect, isActive: oldRect.isActive };
      }
      return oldRect; // 如果旧矩形在新数据中不存在,但保留在newGlassIds中,则保留原样
    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
  }
  else if (data.intoGlass4 == null) {
    adjustedRects4.value = []
  }
// 进炉前
  if (data.waitingGlass && data.waitingGlass.length > 0) {  
    const newGlassIds = new Set(data.waitingGlass[0].map(rect => rect.glassId));  
    const existingRects = adjustedRectsa.value.filter(rect => newGlassIds.has(rect.glassId));  
@@ -249,6 +344,7 @@
  else if (data.waitingGlass == null) {
    adjustedRectsa.value = []
  }
  // 已出炉
  if (data.outGlass && data.outGlass.length > 0) {  
    // 提取新的矩形ID  
    const newGlassIds = new Set(data.outGlass[0].map(rect => rect.glassId));  
@@ -257,8 +353,8 @@
    // 计算新的矩形  
    const newRects = data.outGlass[0].map(rect => {  
      const scaleFactor =  1390/5190; 
      const scaleFactory =  750/2800;
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta,newY;
      const scaleFactorY =  750/2800;
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
  let newX = rect.yCoordinate; 
      if (rect.width < rect.height) {
        widtha = rect.height;
@@ -269,29 +365,64 @@
      }
  if (rect.angle === 0) {  
    adjustedWidth = widtha * scaleFactor;  
    adjustedHeight = heighta * scaleFactory;
    adjustedHeight = heighta * scaleFactorY;
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    // newX = 5190 - (rect.yCoordinate + widtha);
    newY = 2800 - (rect.xCoordinate + heighta);
  } else {
    newX = 5190 - (rect.yCoordinate + widtha);
    } else {
    adjustedWidth = heighta * scaleFactor;  
    adjustedHeight = widtha * scaleFactory;
    // adjustedWidtha = heighta;
    // adjustedHeighta = widtha;
    // newX = 5190 - (rect.yCoordinate + heighta);
    newY = 2800 - (rect.xCoordinate + widtha);
    adjustedHeight = widtha * scaleFactorY;
    // adjustedWidtha = widtha;
    // adjustedHeighta = heighta;
    newX = 5190 - (rect.yCoordinate + heighta);
  }  
  return {  
        ...rect, // 复制原始对象的其他属性
        x: newX * scaleFactor,
        y: newY * scaleFactory,
        width: adjustedWidth,
        height: adjustedHeight,
        widtha: rect.width,
        heighta: rect.height,
    ...rect,
    x: newX * scaleFactor,
    y: rect.xCoordinate * scaleFactorY,
    width: adjustedWidth,
    height: adjustedHeight,
    widtha: rect.width,
    heighta: rect.height,
  }
    });
    });
  //   const newRects = data.outGlass[0].map(rect => {
  //     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) {
  //       widtha = rect.height;
  //       heighta = rect.width;
  //     }else {
  //       widtha = rect.width;
  //       heighta = rect.height;
  //     }
  // if (rect.angle === 0) {
  //   adjustedWidth = widtha * scaleFactor;
  //   adjustedHeight = heighta * scaleFactory;
  //   // adjustedWidtha = widtha;
  //   // adjustedHeighta = heighta;
  //   // newX = 5190 - (rect.yCoordinate + widtha);
  //   newY = 2800 - (rect.xCoordinate + heighta);
  // } else {
  //   adjustedWidth = heighta * scaleFactor;
  //   adjustedHeight = widtha * scaleFactory;
  //   // adjustedWidtha = heighta;
  //   // adjustedHeighta = widtha;
  //   // newX = 5190 - (rect.yCoordinate + heighta);
  //   newY = 2800 - (rect.xCoordinate + widtha);
  // }
  // return {
  //       ...rect, // 复制原始对象的其他属性
  //       x: newX * scaleFactor,
  //       y: newY * scaleFactory,
  //       width: adjustedWidth,
  //       height: adjustedHeight,
  //       widtha: rect.width,
  //       heighta: rect.height,
  // }
  //   });
  
    // 合并新旧矩形,并保留 isActive 状态  
    adjustedRectsb.value = existingRects.map(oldRect => {  
@@ -322,7 +453,35 @@
      rect.state = 9;
    }
  });  
}
}
function updateoutColorsc() {
  adjustedRects1.value.forEach(rect => {
    if (rect.glassId === glassId) {
      rect.state = 9;
    }
  });
}
function updateoutColors3() {
  adjustedRects3.value.forEach(rect => {
    if (rect.glassId === glassId) {
      rect.state = 9;
    }
  });
}
function updateoutColorsd() {
  adjustedRects2.value.forEach(rect => {
    if (rect.glassId === glassId) {
      rect.state = 9;
    }
  });
}
function updateoutColors4() {
  adjustedRects4.value.forEach(rect => {
    if (rect.glassId === glassId) {
      rect.state = 9;
    }
  });
}
function updateonColorsa() {
  adjustedRectsa.value.forEach(rect => {  
    if (rect.glassId === glassId) {  
@@ -358,14 +517,68 @@
    }
  });
}  
function updateRectColors3() {
  adjustedRects3.value.forEach(rect => {
    if (rect.glassId === glassId) {
      rect.state = 8;
    }
  });
}
function updateRectColors2() {  
  adjustedRects2.value.forEach(rect => {  
    if (rect.glassId === glassId) {  
      rect.state = 8;
    }
  });  
}
function getRectColora(state) {
}
function updateRectColors4() {
  adjustedRects4.value.forEach(rect => {
    if (rect.glassId === glassId) {
      rect.state = 8;
    }
  });
}
function getRectColor1(state) {
  switch (state) {
    case 2:
      return 'lightblue';
    case 8:
      return '#911005';
    case 9:
      return '#4682B4';
  }
}
function getRectColor2(state) {
  switch (state) {
    case 2:
      return 'lightblue';
    case 8:
      return '#911005';
    case 9:
      return '#4682B4';
  }
}
function getRectColor3(state) {
  switch (state) {
    case 2:
      return 'lightblue';
    case 8:
      return '#911005';
    case 9:
      return '#4682B4';
  }
}
function getRectColor4(state) {
  switch (state) {
    case 2:
      return 'lightblue';
    case 8:
      return '#911005';
    case 9:
      return '#4682B4';
  }
}
function getRectColora(state) {
  switch (state) {  
    case 0:  
      return '#7AC5CD';
@@ -391,12 +604,20 @@
      return '#4682B4'; 
  }  
}
// 定义导航到新页面的方法
const navigateToPrintPage = () => {
  // 使用路由实例的 push 方法导航到新页面
  router.push('/PurchaseReturn/purchaseprint');
};
function showDialog1(rect) {
  const index = adjustedRects1.value.findIndex(r => r.glassId === rect.glassId);  
  if (index !== -1) {  
    adjustedRects1.value[index].isActive = true;  
  }  
  currentGlassId.value = rect.glassId;  
  currentstartSlot.value = rect.slot;
  currentengineerId.value = rect.engineerId;
  currenttemperingLayoutId.value = rect.temperingLayoutId;
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
  blind1.value = true;  
  currentRect.value = rect;
@@ -405,6 +626,44 @@
  } else if (currentRect.value.state !== 8) {
    canSelectProject1.value = true;
  }
  if (currentRect.value.state == 9) {
    alla.value = false;
  } else if (currentRect.value.state !== 9) {
    cantakea.value = true;
  }
  if (currentRect.value.state > 5) {
    cantakeall.value = false;
  } else{
    cantakeall.value = true;
  }
}
function showDialog3(rect) {
  const index = adjustedRects3.value.findIndex(r => r.glassId === rect.glassId);
  if (index !== -1) {
    adjustedRects3.value[index].isActive = true;
  }
  currentGlassId.value = rect.glassId;
  currentstartSlot.value = rect.slot;
  currentengineerId.value = rect.engineerId;
  currenttemperingLayoutId.value = rect.temperingLayoutId;
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;
  blind3.value = true;
  currentRect.value = rect;
  if (currentRect.value.state == 8) {
    canSelectProject3.value = false;
  } else if (currentRect.value.state !== 8) {
    canSelectProject3.value = true;
  }
  if (currentRect.value.state == 9) {
    alla.value = false;
  } else if (currentRect.value.state !== 9) {
    cantakea.value = true;
  }
  if (currentRect.value.state > 5) {
    cantakeall.value = false;
  } else{
    cantakeall.value = true;
  }
function showDialog2(rect) {
  const index = adjustedRects2.value.findIndex(r => r.glassId === rect.glassId);  
@@ -412,6 +671,9 @@
    adjustedRects2.value[index].isActive = true;  
  }  
  currentGlassId.value = rect.glassId;  
  currentstartSlot.value = rect.slot;
  currentengineerId.value = rect.engineerId;
  currenttemperingLayoutId.value = rect.temperingLayoutId;
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
  blind2.value = true;  
  currentRect.value = rect;
@@ -420,6 +682,44 @@
  } else if (currentRect.value.state !== 8) {
    canSelectProject2.value = true;
  }
  if (currentRect.value.state == 9) {
    cantakea.value = false;
  } else if (currentRect.value.state !== 9) {
    cantakea.value = true;
  }
  if (currentRect.value.state > 5) {
    cantakeall.value = false;
  } else{
    cantakeall.value = true;
  }
}
function showDialog4(rect) {
  const index = adjustedRects4.value.findIndex(r => r.glassId === rect.glassId);
  if (index !== -1) {
    adjustedRects4.value[index].isActive = true;
  }
  currentGlassId.value = rect.glassId;
  currentstartSlot.value = rect.slot;
  currentengineerId.value = rect.engineerId;
  currenttemperingLayoutId.value = rect.temperingLayoutId;
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;
  blind4.value = true;
  currentRect.value = rect;
  if (currentRect.value.state == 8) {
    canSelectProject4.value = false;
  } else if (currentRect.value.state !== 8) {
    canSelectProject4.value = true;
  }
  if (currentRect.value.state == 9) {
    cantakea.value = false;
  } else if (currentRect.value.state !== 9) {
    cantakea.value = true;
  }
  if (currentRect.value.state > 5) {
    cantakeall.value = false;
  } else{
    cantakeall.value = true;
  }
function showDialoga(rect) {
  const index = adjustedRectsa.value.findIndex(r => r.glassId === rect.glassId);  
@@ -427,6 +727,9 @@
    adjustedRectsa.value[index].isActive = true;  
  }  
  currentGlassId.value = rect.glassId;  
  currentstartSlot.value = rect.slot;
  currentengineerId.value = rect.engineerId;
  currenttemperingLayoutId.value = rect.temperingLayoutId;
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
  blinda.value = true; 
  currentRect.value = rect;
@@ -442,8 +745,19 @@
  } 
  if (currentRect.value.state == 1) {
    canona.value = false;
  } else if (currentRect.value.state == 0) {
  } else if (currentRect.value.state == 0||currentRect.value.state == -1) {
    canona.value = true;
  }
  if (currentRect.value.state == 1) {
    canons.value = false;
  } else if (currentRect.value.state == -1) {
    canons.value = true;
  }
  if (currentRect.value.state > 5) {
    cantakeall.value = false;
  } else{
    cantakeall.value = true;
  } 
function showDialogb(rect) {
@@ -451,7 +765,10 @@
  if (index !== -1) {  
    adjustedRectsb.value[index].isActive = true;  
  }  
  currentGlassId.value = rect.glassId;
  currentGlassId.value = rect.glassId;
  currentstartSlot.value = rect.slot;
  currentengineerId.value = rect.engineerId;
  currenttemperingLayoutId.value = rect.temperingLayoutId;
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
  blindb.value = true;  
  currentRect.value = rect;
@@ -470,6 +787,11 @@
  } else if (currentRect.value.state !== 3) {
    canonb.value = true;
  } 
  if (currentRect.value.state > 5) {
    cantakeall.value = false;
  } else{
    cantakeall.value = true;
  }
  const handleDialogClose1 = () => {  
  adjustedRects1.value.forEach(rect => {  
@@ -477,8 +799,20 @@
  });  
  blind1.value = false; 
};  
  const handleDialogClose3 = () => {
  adjustedRects3.value.forEach(rect => {
    rect.isActive = false;
  });
  blind1.value = false;
};
  const handleDialogClose2 = () => {  
  adjustedRects2.value.forEach(rect => {  
    rect.isActive = false;
  });
  blind2.value = false;
};
  const handleDialogClose4 = () => {
  adjustedRects4.value.forEach(rect => {
    rect.isActive = false;  
  });  
  blind2.value = false; 
@@ -541,6 +875,51 @@
    console.error(error);
  }
}
const handleDamage3 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
    glassId: currentGlassId.value,
    // temperingFeedSequence: currenttemperingFeedSequence.value,
    line: 4001,
    status: 8,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind3.value = false;
      updateRectColors3();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleDamage4 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
    glassId: currentGlassId.value,
    line: 4001,
    status: 8,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind4.value = false;
      updateRectColors4();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 进炉前破损
const handleDamagea = async () => {
  try  {
@@ -556,6 +935,46 @@
      updateRectColorsa();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 进炉前全部拿走
const handletakeall3 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 9,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blinda.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 钢化炉
const handleal11 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 2,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blinda.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
@@ -587,6 +1006,28 @@
    console.error(error);
  }
}
// 进炉前出片
const outTask = async (line) => {
  try  {
  const response = await request.post('/cacheVerticalGlass/bigStorageCageOutTask/temperingOut', {
    glassId: currentGlassId.value,
    endSlot: line,
    startSlot: currentstartSlot.value,
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      blinda.value = false;
      updateoutColorsa();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 进炉前放回
const takeona = async () => {
  try  {
@@ -600,6 +1041,289 @@
      ElMessage.success('成功!');
      blinda.value = false;
      updateonColorsa();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handletakeall1 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 9,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind1.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleall1 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 3,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind1.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handletakeall33 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 9,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind3.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleall3 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 3,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind3.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handletakeall2 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 9,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind2.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleall2 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 3,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind2.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handletakeall44 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 9,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind4.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleall4 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 3,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind4.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handletakeall4 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 9,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind4.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 出片
const handleall14 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
    temperingLayoutId: currenttemperingLayoutId.value,
    engineerId: currentengineerId.value,
    state: 4,
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind4.value = false;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 进炉中人工拿走
const takeoutc = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
    glassId: currentGlassId.value,
    line: 4001,
    status: 9,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind1.value = false;
      updateoutColorsc();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 进炉中人工拿走3
const takeout3 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
    glassId: currentGlassId.value,
    line: 4001,
    status: 9,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind3.value = false;
      updateoutColors3();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 进炉中人工拿走4
const takeout4 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
    glassId: currentGlassId.value,
    line: 4001,
    status: 9,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind4.value = false;
      updateoutColors4();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 进炉中人工拿走
const takeoutd = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
    glassId: currentGlassId.value,
    line: 4001,
    status: 9,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success('成功!');
      blind2.value = false;
      updateoutColorsd();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
@@ -675,9 +1399,9 @@
    }
}
catch (error) {
    // 处理错误
    // console.error(error);
  }
  // 处理错误
  // console.error(error);
}
}
onBeforeUnmount(() => {
  console.log("关闭了")
@@ -685,19 +1409,88 @@
});
</script>
<template>
  <div style="margin-top: 10px;">
     <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;dialogFormVisiblec = false;" >{{ $t('processCard.beforefurnace') }}</el-button>
     <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;dialogFormVisiblec = false;">{{ $t('processCard.intofurnace') }}</el-button>
    <el-button  id="searchButton" type="success" @click="dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false;dialogFormVisiblec = false;">{{ $t('processCard.outfurnace') }}</el-button>
    <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: 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="430px" style="background-color: #e9e9eb;">
  <div style="height: 500px;">
    <div style="margin-top: 10px;">
      <el-button style="margin-left: 15px;" id="searchButton" type="primary"
                 @click="dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;dialogFormVisiblec = false;">
        {{ $t('processCard.beforefurnace') }}
      </el-button>
      <el-button style="margin-left: 15px;" id="searchButton" type="primary"
                 @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;dialogFormVisiblec = false;">
        {{ $t('processCard.intofurnace') }}
      </el-button>
      <el-button id="searchButton" type="success"
                 @click="dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false;dialogFormVisiblec = false;">
        {{ $t('processCard.outfurnace') }}
      </el-button>
      <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: 1000px;"
                 v-loading="loading">
   <div style="width: 800px;float: right;background-color: #f4f4f5;height: 430px;margin-top: 20px;">
     <div v-if="adjustedRects3.length > 0">
       <!-- <div style="text-align: center;">炉号3:{{ engineerIdDisplay }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
       <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRects3[0].engineerId }}-{{ adjustedRects3[0].temperingLayoutId }} </div>
    <el-scrollbar height="417px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
      <div
      v-for="(rect, index) in adjustedRects3"
      :key="index"
      @click="showDialog3(rect)"
      class="rect"
      :style="{ position: 'absolute',
       top: `${rect.ycoordinate}px`,
       left: `${rect.xcoordinate}px`,
        width: `${rect.width}px`,
        height: `${rect.height}px`,
        backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor3(rect.state) }">
     <div  class="centered-text">
    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
    <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
  </div>
  </div>
   </div>
   </el-scrollbar>
   </div>
          </div>
        <div style="width: 800px;float: left;background-color: #f4f4f5;height: 430px;margin-top: 20px;">
    <div v-if="adjustedRects4.length > 0">
    <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRects4[0].engineerId }}-{{ adjustedRects4[0].temperingLayoutId }} </div>
    <!-- <div style="text-align: center;">炉号4:{{ engineerIdDisplay2 }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
    <el-scrollbar height="417px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">
      <div
      v-for="(rect, index) in adjustedRects4"
      :key="index"
      @click="showDialog4(rect)"
      class="rect"
      :style="{ position: 'absolute',
       top: `${rect.ycoordinate}px`,
       left: `${rect.xcoordinate}px`,
       width: `${rect.width}px`,
       height: `${rect.height}px`,
        backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor4(rect.state) }">
     <div  class="centered-text">
    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
    <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
  </div>
  </div>
   </div>
   </el-scrollbar>
   </div>
        </div>
 <div style="width: 800px;float: right;background-color: #f4f4f5;height: 430px;margin-top: 20px;">
   <div v-if="adjustedRects1.length > 0">
              <!-- <div style="text-align: center;">炉号1:{{ engineerIdDisplay }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
     <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRects1[0].engineerId }}-{{ adjustedRects1[0].temperingLayoutId }} </div>
    <el-scrollbar height="417px" style="background-color: #e9e9eb;">
    <div  style="position: relative;">
      <div  
      v-for="(rect, index) in adjustedRects1"
      :key="index"  
@@ -708,8 +1501,7 @@
       left: `${rect.xcoordinate}px`,
        width: `${rect.width}px`, 
        height: `${rect.height}px`,
        backgroundColor: rect.isActive ? '#ADFF2F' : rect.state === 8 ? '#911005' : 'lightblue' }"
    >
        backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor1(rect.state) }">
     <div  class="centered-text">
    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>  
    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>  
@@ -719,12 +1511,12 @@
   </div>
   </el-scrollbar>
   </div>
  </div>
<div style="width: 49%;float: right;background-color: #f4f4f5;height: 430px;">
    </div>
     <div style="width: 800px;float: left;background-color: #f4f4f5;height: 430px;margin-top: 20px;">
    <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="430px" style="background-color: #e9e9eb;">
    <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRects2[0].engineerId }}-{{ adjustedRects2[0].temperingLayoutId }} </div>
    <!-- <div style="text-align: center;">炉号2:{{ engineerIdDisplay2 }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
    <el-scrollbar height="417px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
      <div  
      v-for="(rect, index) in adjustedRects2"
@@ -736,8 +1528,7 @@
       left: `${rect.xcoordinate}px`, 
       width: `${rect.width}px`, 
       height: `${rect.height}px`,
       backgroundColor: rect.isActive ? '#ADFF2F' : rect.state === 8 ? '#911005' : 'lightblue' }"
       >
        backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor2(rect.state) }">
     <div  class="centered-text">
    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>  
    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>  
@@ -747,14 +1538,14 @@
   </div>
   </el-scrollbar>
   </div>
</div>
        </div>
   </el-card>
    </div>
<div v-if="dialogFormVisiblea">
  <!-- 进炉前 -->
  <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;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRectsa[0].engineerId }}-{{ adjustedRectsa[0].temperingLayoutId }} </div>
    <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplaya }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
      <el-scrollbar height="750px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
@@ -781,7 +1572,7 @@
  <!-- 已出炉 -->
  <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;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRectsb[0].engineerId }}-{{ adjustedRectsb[0].temperingLayoutId }} </div>
    <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplayb }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
      <el-scrollbar height="750px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
@@ -811,9 +1602,8 @@
    <div style="display: flex; flex-direction: row; align-items: center; margin-top: 5px;margin-left: 10px;">  
    <el-input :placeholder="$t('processCard.projectnumber')" v-model="engineerId" autocomplete="off" style="width: 300px;"/>
    <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('processCard.inquire') }}</el-button>
    <el-button type="info" style="margin-left: 10px;" @click="printing()">{{ $t('processCard.printing') }}</el-button>
    <el-button type="info" style="margin-left: 10px;" @click="navigateToPrintPage">{{ $t('processCard.printing') }}</el-button>
  </div>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
    <el-table
@@ -839,10 +1629,60 @@
        <el-button :disabled="!canSelectProject1" type="warning" plain :icon="Delete" @click="handleDamage1"  style="width: 150px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
        <el-button :disabled="!cantakea" type="danger" plain @click="takeoutc"  style="width: 150px;margin-left: 10px;margin-top: 10px;">
          <el-icon class="el-icon--right"><Upload /></el-icon>
          {{ $t('order.takeaway') }}
        </el-button>
        <el-button type="info" plain @click="handletakeall1" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('order.takeall') }}
        </el-button>
        <el-button type="info" plain @click="handleall1" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('processCard.outfurnace') }}
        </el-button>
  </el-dialog>  
<el-dialog v-model="blind2" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose2">
        <el-button :disabled="!canSelectProject2" type="warning" plain :icon="Delete" @click="handleDamage2"  style="width: 150px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
        <el-button :disabled="!cantakea" type="danger" plain @click="takeoutd"  style="width: 150px;margin-left: 10px;margin-top: 10px;">
          <el-icon class="el-icon--right"><Upload /></el-icon>
          {{ $t('order.takeaway') }}
        </el-button>
        <el-button type="info" plain @click="handletakeall2" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('order.takeall') }}
        </el-button>
        <el-button type="info" plain @click="handleall2" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('processCard.outfurnace') }}
        </el-button>
  </el-dialog>
<el-dialog v-model="blind3" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose3">
        <el-button :disabled="!canSelectProject3" type="warning" plain :icon="Delete" @click="handleDamage3"  style="width: 150px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
        <el-button :disabled="!cantakea" type="danger" plain @click="takeout3"  style="width: 150px;margin-left: 10px;margin-top: 10px;">
          <el-icon class="el-icon--right"><Upload /></el-icon>
          {{ $t('order.takeaway') }}
        </el-button>
        <el-button type="info" plain @click="handletakeall33" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('order.takeall') }}
        </el-button>
        <el-button type="info" plain @click="handleall3" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('processCard.outfurnace') }}
        </el-button>
  </el-dialog>
<el-dialog v-model="blind4" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose4">
        <el-button :disabled="!canSelectProject4" type="warning" plain :icon="Delete" @click="handleDamage4"  style="width: 150px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
        <el-button :disabled="!cantakea" type="danger" plain @click="takeout4"  style="width: 150px;margin-left: 10px;margin-top: 10px;">
          <el-icon class="el-icon--right"><Upload /></el-icon>
          {{ $t('order.takeaway') }}
        </el-button>
        <el-button type="info" plain @click="handletakeall44" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('order.takeall') }}
        </el-button>
        <el-button type="info" plain @click="handleall4" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('processCard.outfurnace') }}
        </el-button>
  </el-dialog>  
  <!-- 进炉前 -->
@@ -857,6 +1697,18 @@
        <el-button type="success" plain :icon="Edit" @click="takeona" :disabled="!canona" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('order.takeon') }}
        </el-button>
        <el-button type="info" plain @click="handletakeall3" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('order.takeall') }}
        </el-button>
        <el-button type="info" plain @click="handleal11" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('processCard.intofurnace') }}
        </el-button>
        <el-button type="success" plain :icon="Edit" @click="outTask(3002)" :disabled="!canons" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('searchOrder.specifyout') }}
        </el-button>
        <el-button type="success" plain :icon="Edit" @click="outTask(3001)" :disabled="!canons" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('searchOrder.outfilm') }}
        </el-button>
  </el-dialog>  
  <!-- 已出炉 -->
<el-dialog v-model="blindb" top="30vh" width="15%" style="text-align: center;" @close="handleDialogCloseb">
@@ -867,33 +1719,18 @@
          <el-icon class="el-icon--right"><Upload /></el-icon>
          {{ $t('order.takeaway') }}
        </el-button>
        <el-button type="info" plain @click="handletakeall4" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('order.takeall') }}
        </el-button>
        <el-button type="info" plain @click="handleall14" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('searchOrder.outfilm') }}
        </el-button>
        <!-- <el-button type="success" plain :icon="Edit" @click="takeonb" :disabled="!canonb" style="width: 150px;margin-left: 10px;margin-top: 10px;">
          {{ $t('order.takeon') }}
        </el-button> -->
  </el-dialog> 
  <el-dialog
      v-model="dialogVisible"
      width="100%"
      top="0vh"
      :show-close="false"
      >
      <div class="custom-title" style="text-align: center; margin-bottom: 20px;">
      {{ $t('processCard.glasstakeout') }}
    </div>
      <el-table
        :data="tableData"
        style="width: 100%;height: 760px"
      >
      <el-table-column prop="flowCardId" :label="$t('processCard.flowcard')" width="140" align="center"/>
      <el-table-column prop="layer" :label="$t('processCard.layer')" align="center" width="52"/>
      <el-table-column prop="engineerId" :label="$t('processCard.project')" align="center" width="110"/>
      <el-table-column prop="temperingLayoutId" :label="$t('processCard.temperinglayout')" align="center" width="52"/>
      <el-table-column prop="temperingFeedSequence" :label="$t('processCard.temperingfeed')" align="center" width="52"/>
      <el-table-column prop="width" :label="$t('processCard.width')" align="center" width="80"/>
      <el-table-column prop="height" :label="$t('processCard.height')" align="center" width="80"/>
      <el-table-column prop="thickness" :label="$t('processCard.thickness')" align="center" width="52"/>
      </el-table>
    </el-dialog>
    </div>
  </div>
</template>
<style scoped>
@@ -979,5 +1816,21 @@
.custom-title {  
  font-size: 20px;
  font-weight: bold;
}
}
/* @media print {
  .el-table {
    page-break-inside: avoid;
  }
} */
@media print {
    body {
        margin: 0;
        padding: 0;
    }
    .el-table {
        width: 100%;
        break-inside: avoid; /* 避免表格在打印时被拆分 */
    }
    /* 根据需要添加更多样式 */
}
</style>