wangfei
6 天以前 da30bfc3795305f0bbd400d196bcf4c30612c37f
UI-Project/src/views/Returns/upreturns.vue
@@ -3,7 +3,6 @@
import { useRouter } from "vue-router"
import { ElMessage, ElMessageBox } from 'element-plus'
import { useI18n } from 'vue-i18n'
import { host, WebSocketHost } from '@/utils/constants'
import request from "@/utils/request"
import { closeWebSocket, initializeWebSocket } from '@/utils/WebSocketService';
const router = useRouter()
@@ -81,7 +80,7 @@
  }
});
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlassOne`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/loadGlass/api/talk/loadGlassOne`;
const handleMessage = (data: any) => {
  isLoading.value = true;
  if (data.inkageState != null) {
@@ -185,7 +184,22 @@
        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;