From 0949f8557b1323e525962c5490d0fcdfeb1baf7b Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期二, 20 一月 2026 12:43:55 +0800
Subject: [PATCH] 首页-当待办事项数量大于0时才显示通知提醒

---
 src/views/index.vue |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/views/index.vue b/src/views/index.vue
index e6b22c5..8460309 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -537,13 +537,14 @@
 		const res = await approveAndDeviceTodos()
 		const { approveTodo, deviceRepairTodo } = res.data
 		
-		// 鏄剧ず閫氱煡
-		ElNotification({
-				title: '寰呭姙浜嬮」鎻愰啋',
-				message: `褰撳墠鏈�${approveTodo}鏉″緟瀹℃壒浜嬮」锛�${deviceRepairTodo}鏉″緟缁翠慨浜嬮」`,
-				type: 'warning',
-				duration: 5000
-			})
+		// 褰揳pproveTodo鍜宒eviceRepairTodo鍚�>0鏃舵樉绀洪�氱煡
+    if (approveTodo > 0 || deviceRepairTodo > 0) {
+      ElNotification({
+			title: '寰呭姙浜嬮」鎻愰啋',
+			message: `褰撳墠鏈�${approveTodo}鏉″緟瀹℃壒浜嬮」锛�${deviceRepairTodo}鏉″緟缁翠慨浜嬮」`,
+			type: 'warning',
+			duration: 5000
+		})}
 	} catch (error) {
 		console.error('鑾峰彇鍗忓悓寰呭姙浜嬮」澶辫触:', error)
 	}

--
Gitblit v1.9.3