From 9a2293ea12531e49bb183a1a98e7bc3b065fffa6 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期五, 19 七月 2024 16:09:51 +0800
Subject: [PATCH] feat:通知空数据提示

---
 src/layout/components/Navbar.vue |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 6ce49db..8ca66de 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -5,7 +5,7 @@
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
 
     <div class="right-menu">
-      <div>
+      <div v-if="notify.role === 3">
         <el-badge :value="notify.total" class="item">
           <el-button @click="notifyShow = true" class="share-button" icon="el-icon-bell" type="primary" circle></el-button>
         </el-badge>
@@ -26,16 +26,20 @@
       title="閫氱煡"
       :visible.sync="notifyShow"
       width="400px"
-      :modal="false"
+      :modal="true"
+      :modal-append-to-body="false"
     >
       <div class="notify-warp" v-if="notify.feedBack && notify.feedBack > 0">
         {{notify.feedBack}}鏉�<el-link @click="jump('/exam/feedback/list')" class="core" type="primary">閿欓鍙嶉</el-link>绛夊緟鎮ㄧ殑澶勭悊锛�
       </div>
-      <div class="notify-warp" v-if="notify.mobilize && notify.mobilize > 0">
+      <div class="notify-warp" v-else-if="notify.mobilize && notify.mobilize > 0">
         {{notify.mobilize}}鏉�<el-link @click="jump('/user/departmentExamine/list')" class="core" type="primary">閮ㄩ棬璋冨姩瀹℃牳</el-link>绛夊緟鎮ㄧ殑澶勭悊锛�
       </div>
-      <div class="notify-warp" v-if="notify.status && notify.status > 0">
+      <div class="notify-warp" v-else-if="notify.status && notify.status > 0">
         {{notify.status}}鏉�<el-link @click="jump('/user/UserConditionExamine/list')" class="core" type="primary">鐘舵�佸鏍�</el-link>绛夊緟鎮ㄧ殑澶勭悊锛�
+      </div>
+      <div class="notify-warp" v-else-if="notify.feedBack === 0 && notify.mobilize === 0 && notify.status === 0 ">
+        <el-empty description="鏆傛棤閫氱煡"></el-empty>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button v-if="this.notify.ids && this.notify.ids.length > 0" type="success" @click="allRead">涓�閿叏璇�</el-button>
@@ -122,6 +126,7 @@
 .notify-warp {
   display: flex;
   flex-direction: row;
+  justify-content: center;
 }
 .navbar {
   height: 60px;

--
Gitblit v1.8.0