Kaynağa Gözat

fix(home-new): 基于用户信息隐藏对应页面区块

根据用户是否属于设备维修中心,动态显示/隐藏排名、出勤信息、公告和消息推送组件,仅对维修中心用户展示自检组件
huoyi 4 hafta önce
ebeveyn
işleme
5c21339e7f
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 4 4
      src/pages/home-new/index.vue

+ 4 - 4
src/pages/home-new/index.vue

@@ -4,7 +4,7 @@
4 4
             <user-info :name="checkerName" :sub-title="subTitle" :hello="'欢迎您'" class="userInfo" />
5 5
 
6 6
             <!-- 排名区块 -->
7
-            <div class="rank-container" v-if="!isZhanZhang">
7
+            <div class="rank-container" v-if="!isZhanZhang && !this.userInfo.includes('设备维修中心')">
8 8
                 <div v-for="(item, index) in rankItems" :key="index" class="rank-item">
9 9
                     <div class="rank-content">
10 10
                         <div class="rank-label">{{ item.label }}</div>
@@ -15,7 +15,7 @@
15 15
             </div>
16 16
 
17 17
             <!-- 出勤信息区块 -->
18
-            <div class="attendance-container">
18
+            <div class="attendance-container" v-if="!this.userInfo.includes('设备维修中心')">
19 19
                 <div class="attendance-grid">
20 20
                     <div v-for="(item, index) in attendanceItems" :key="index" class="attendance-item"
21 21
                         @click="handleAttendanceClick(item)">
@@ -31,9 +31,9 @@
31 31
         </div>
32 32
 
33 33
         <div class="content">
34
-            <ReportCarousel />
34
+            <ReportCarousel v-if="!this.userInfo.includes('设备维修中心')"/>
35 35
             <Notice ref="notice" />
36
-            <MessagePush ref="messagePush" />
36
+            <MessagePush v-if="!this.userInfo.includes('设备维修中心')" ref="messagePush" />
37 37
 
38 38
             <!-- 当 currentDepartment === '设备维修中心' 时显示 SelfCheck 组件 -->
39 39
             <SelfCheck v-if="this.userInfo.includes('设备维修中心')" />