ZengTao
2025-11-04 63100c0391d3a4f1d41ac5e580625913b2edd265
UI-Project/src/views/Returns/upreturns2.vue
@@ -31,6 +31,19 @@
const titleSelectJson = ref({
  engineerId: [],
})
const selectGong = async () => {
  try {
    const response = await request.post('/loadGlass/loadglassdevicetaskhistory/queryAllMessage',{
  redisRequest: 'loadGlassRequestTwo',
  stationCell: 6,
  tableName: 'LOAD_GLASS_DEVICE_TWO_TASK',
  webSocketName: 'loadGlassTwo'
});
    if (response.code == 200) {
    }
  } catch (error) {
  }
};
request.post("/loadGlass/up-patten-usage/setUpPattenRequest",{
  state: null,
  stationCell: 6
@@ -54,6 +67,7 @@
};
onMounted(() => {
  socket = initializeWebSocket(socketUrl, handleMessage);
  selectGong()
});
onUnmounted(() => {
  if (socket) {
@@ -234,17 +248,32 @@
// 开始上片
const handleon = async () => {
  let filmRemove = window.localStorage.getItem('filmRemove')
  let engineeringIda = window.localStorage.getItem('engineeringIda')
  let engineeringId = window.localStorage.getItem('engineeringIda')
  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
    try {
      const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
        stationCell: 6,
        stationCell: 5,
        filmRemove: filmRemove,
        engineerId: engineeringIda,
        engineerId: engineeringId,
        state: 1,
      })
      if (response.code == 200) {
        ElMessage.success(response.message);
        let timeoutId = setTimeout(() => {
          // 模拟按下确认按钮
          const confirmBtn = document.querySelector('.el-message-box__btns .el-button--primary');
          if (confirmBtn) {
            confirmBtn.click();
          }
        }, 5000)
        await ElMessageBox.alert(' ', t('basicData.sectionUpperSuccessful'), {
          confirmButtonText: t('searchOrder.sure'),
          type: 'success',
          center: true,
          customClass: 'center-message-box',
        });
        // 清除定时器
        clearTimeout(timeoutId);
        // 执行确认后的逻辑
        canSelectProjecta.value = false;
        canSelectProjectb.value = false;
        canSelectProjectc.value = true;
@@ -276,6 +305,10 @@
      if (response.code == 200) {
        ElMessage.success(response.message);
        blinda.value = false;
        canSelectProjecta.value = true;
        canSelectProjectb.value = true;
        canSelectProjectc.value = false;
        tableData.value = response.data;
      } else {
        ElMessage.error(response.message);
      }