소스 검색

Merge branch 'flow' of ruiqigogs/yf-portal-vue into master

yanghao 1 일 전
부모
커밋
09b096e475
3개의 변경된 파일15개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      src/views/flow/crmTodoList.vue
  2. 13 3
      src/views/flow/index.vue
  3. 1 1
      src/views/flow/todoList.vue

+ 1 - 1
src/views/flow/crmTodoList.vue

@@ -139,7 +139,7 @@ const goBackPage = async (row) => {
 
     setTimeout(function () {
       newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`;
-    }, 0);
+    }, 50);
   }
 };
 onMounted(async () => {

+ 13 - 3
src/views/flow/index.vue

@@ -3,7 +3,10 @@
     <Header />
     <section class="hero">
       <div class="hero-inner">
-        <h1 class="hero-title">下午好,{{ userStore.getUser.nickname }}</h1>
+        <!-- 判断上下午 -->
+        <h1 class="hero-title">
+          {{ getGreeting() }},{{ userStore.getUser.nickname }}
+        </h1>
         <p class="hero-desc">
           今天是 {{ new Date().toLocaleDateString() }}。您有
           {{ stats[0].number }}条流程待处理。
@@ -170,6 +173,13 @@ const initChartsSafe = (attempt = 0) => {
   }
 };
 
+const getGreeting = () => {
+  const hour = new Date().getHours();
+  if (hour < 12) return "早上好";
+  if (hour < 18) return "下午好";
+  return "晚上好";
+};
+
 // 模拟数据 - 请根据实际 API 返回的数据调整
 const lineChartData = {
   title: "流程处理趋势 (30天)",
@@ -364,7 +374,7 @@ const go = async (item) => {
 
         setTimeout(function () {
           newTab.location.href = item.flowUrl;
-        }, 0);
+        }, 50);
       }
     }
 
@@ -378,7 +388,7 @@ const go = async (item) => {
 
       setTimeout(function () {
         newTab.location.href = item.flowUrl;
-      }, 0);
+      }, 50);
     }
   } else {
     router.push({ path: "/login" });

+ 1 - 1
src/views/flow/todoList.vue

@@ -169,7 +169,7 @@ const goBackPage = async (row) => {
 
     setTimeout(function () {
       newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`;
-    }, 0);
+    }, 50);
   }
 };
 onMounted(async () => {