|
|
@@ -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" });
|