Prechádzať zdrojové kódy

开始执行 建立连接

jiaxiaoqiang 3 mesiacov pred
rodič
commit
9b725c4e17
1 zmenil súbory, kde vykonal 2 pridanie a 4 odobranie
  1. 2 4
      src/views/modules/runTest/run-test.vue

+ 2 - 4
src/views/modules/runTest/run-test.vue

@@ -153,6 +153,8 @@ const currentTestingProject = ref<any>();
 const startToRunTest = async () => {
   if (!checkStartEnable()) return;
 
+  wsClient.open();
+
   let params = {
     configList: testingMachines.value,
     engineeringId: route.params.engineerId,
@@ -280,10 +282,6 @@ const wsClient = useWebSocket(import.meta.env.VITE_WEBSOCKET_URL as string, {
   },
 });
 
-onMounted(() => {
-  wsClient.open();
-});
-
 onBeforeUnmount(() => {
   wsClient.close();
 });