From 2e77330d87341624c88301562fd137b58f9a101a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 25 十二月 2025 10:57:35 +0800
Subject: [PATCH] 1.海川开心-录入日期都默认当天,封装公用组件和方法

---
 src/views/index.vue |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/src/views/index.vue b/src/views/index.vue
index 3618550..e6b22c5 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -181,7 +181,8 @@
 	homeTodos,
 	qualityStatistics,
 	statisticsReceivablePayable,
-	approveAndDeviceTodos
+	approveAndDeviceTodos,
+	noticesCount
 } from "@/api/viewIndex.js";
 import { getCurrentUserLatestScheduling } from "@/api/personnelManagement/scheduling.js";
 import dayjs from "dayjs";
@@ -373,6 +374,7 @@
 	getAmountHalfYearNum()
 	getCurrentUserSchedule()
 	getApproveAndDeviceTodos()
+	getOngoingAnnouncementNoticeNumber()
 })
 // 鏁版嵁缁熻
 const getBusinessData = () => {
@@ -546,6 +548,26 @@
 		console.error('鑾峰彇鍗忓悓寰呭姙浜嬮」澶辫触:', error)
 	}
 }
+// 杩涜涓叕鍛婇�氱煡
+const getOngoingAnnouncementNoticeNumber = async () => {
+	try {
+		const res = await noticesCount()
+		// const { approveTodo, deviceRepairTodo } = res.data
+		const _noticesCount = res.data
+		if(!_noticesCount){
+			return
+		}
+		// 鏄剧ず閫氱煡
+		ElNotification({
+				title: '閫氱煡鍏憡閫氱煡',
+				message: `褰撳墠鏈�${_noticesCount}鏉″叕鍛婇�氱煡锛屾敞鎰忔煡鐪媊,
+				type: 'warning',
+				duration: 5000
+			})
+	} catch (error) {
+		console.error('鑾峰彇鍗忓悓寰呭姙浜嬮」澶辫触:', error)
+	}
+}
 </script>
 
 <style scoped>

--
Gitblit v1.9.3