yanghao пре 4 дана
родитељ
комит
98761c8a37
2 измењених фајлова са 9 додато и 5 уклоњено
  1. 4 2
      src/views/flow/srmDone.vue
  2. 5 3
      src/views/flow/srmTodo.vue

+ 4 - 2
src/views/flow/srmDone.vue

@@ -128,6 +128,8 @@ const pagination = ref({
   total: 0,
 });
 
+const SRM_LOGIN_DELAY = 2000;
+
 const goBackPage = async (row) => {
   const res = await srmLogin({
     username: userStore.getUser.username,
@@ -146,7 +148,7 @@ const goBackPage = async (row) => {
             dd.biz.util.openLink({
               url: `https://srm.deepoil.cc/#/workflow-process/request-${row.requestId}`,
             });
-          }, 100);
+          }, SRM_LOGIN_DELAY);
         },
       });
     } else {
@@ -162,7 +164,7 @@ const goBackPage = async (row) => {
         setTimeout(() => {
           loading.close();
         }, 500);
-      }, 500);
+      }, SRM_LOGIN_DELAY);
     }
   }
 };

+ 5 - 3
src/views/flow/srmTodo.vue

@@ -128,6 +128,8 @@ const pagination = ref({
   total: 0,
 });
 
+const SRM_LOGIN_DELAY = 2000;
+
 const goBackPage = async (row) => {
   const res = await srmLogin({
     username: userStore.getUser.username,
@@ -146,7 +148,7 @@ const goBackPage = async (row) => {
             dd.biz.util.openLink({
               url: `https://srm.deepoil.cc/#/workflow-process/request-${row.requestId}`,
             });
-          }, 100);
+          }, SRM_LOGIN_DELAY);
         },
       });
     } else {
@@ -158,11 +160,11 @@ const goBackPage = async (row) => {
       const newTab = window.open("", "_blank");
       newTab.location.href = `https://srm.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`;
       setTimeout(function () {
-        newTab.location.href = `https://srm.deepoil.cc/#/workflow-process/request-${row.requestId}`;
         setTimeout(() => {
           loading.close();
         }, 500);
-      }, 500);
+        newTab.location.href = `https://srm.deepoil.cc/#/workflow-process/request-${row.requestId}`;
+      }, SRM_LOGIN_DELAY);
     }
   }
 };