ZengTao
2025-12-10 4bef3c1a0dd435b4c6bf8f8429db67dac027ed6b
UI-Project/src/views/Returns/upreturns2.vue
@@ -86,7 +86,7 @@
  }
};
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlassTwo`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/loadGlass/api/talk/loadGlassTwo`;
const handleMessage = (data: any) => {
  isLoading.value = true;
@@ -248,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,
        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;