From f5fda138c30964ffe3c449757499c96b7d1a1012 Mon Sep 17 00:00:00 2001 From: wangpeng Date: Wed, 21 Feb 2024 08:39:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E7=A7=8D=E4=BD=9C=E4=B8=9A=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E8=AF=81=E4=BB=B6=E4=B8=B4=E6=9C=9F=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/header/index.vue | 21 ++++++++++++++++++++- src/request/api.js | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/layout/header/index.vue b/src/layout/header/index.vue index af2a93d..5ae904d 100644 --- a/src/layout/header/index.vue +++ b/src/layout/header/index.vue @@ -66,12 +66,18 @@ import { useRouter } from "vue-router"; import { useMenuStore } from "@/pinia/menu"; import { useUserStore } from "@/pinia/user"; import { MENU } from "@/assets/js/constant"; -import { getInfo, getUserInfo, logout } from "@/request/api"; +import { + getInfo, + getUserInfo, + logout, + getPersonnelManagementWarnAmount, +} from "@/request/api"; import UpdateInfo from "./components/update_info.vue"; import UpdateAvatar from "./components/update_avatar.vue"; import { checkImgExists, addingPrefixToFile } from "@/assets/js/utils.js"; import { useWebSocket } from "@vueuse/core"; import { nanoid } from "nanoid"; +import { ElNotification } from "element-plus"; defineOptions({ name: "LayoutHeader", @@ -151,6 +157,19 @@ const fnSignOut = async () => { userStore.$reset(); await router.replace("/login"); }; +const fnPersonnelManagementWarnAmount = async () => { + const resData = await getPersonnelManagementWarnAmount(); + if (resData.message) { + ElNotification({ + title: "温馨提示", + dangerouslyUseHTMLString: true, + message: resData.message, + duration: 0, + type: "warning", + }); + } +}; +fnPersonnelManagementWarnAmount();