周宾
10 小时以前 9afe58b2eece02fe7054aafdb71a5a9e50ba97a4
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>