fix: 修复首页问候语数字(211)与实际待办数(91)不一致 — 用去重后的 todos.length 替代未去重的 pendingRisks count
This commit is contained in:
@@ -871,10 +871,10 @@ export async function getDashboardData(orgId: string) {
|
|||||||
|
|
||||||
const hour = new Date().getHours()
|
const hour = new Date().getHours()
|
||||||
const greeting = hour < 12
|
const greeting = hour < 12
|
||||||
? `早上好!今天有 ${pendingRisks} 件事需要处理`
|
? `早上好!今天有 ${todos.length} 件事需要处理`
|
||||||
: hour < 18
|
: hour < 18
|
||||||
? `下午好!今天有 ${pendingRisks} 件事需要处理`
|
? `下午好!今天有 ${todos.length} 件事需要处理`
|
||||||
: `晚上好!今天有 ${pendingRisks} 件事需要处理`
|
: `晚上好!今天有 ${todos.length} 件事需要处理`
|
||||||
|
|
||||||
// 风险趋势:本月新增 vs 上月
|
// 风险趋势:本月新增 vs 上月
|
||||||
const lastMonthStart = new Date(now.getFullYear(), now.getMonth() - 1, 1)
|
const lastMonthStart = new Date(now.getFullYear(), now.getMonth() - 1, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user