Kaynağa Gözat

增加页面用户类型

liuxiangqi 1 yıl önce
ebeveyn
işleme
be9882323e
1 değiştirilmiş dosya ile 11 ekleme ve 1 silme
  1. 11 1
      src/layout/components/Navbar.vue

+ 11 - 1
src/layout/components/Navbar.vue

@@ -6,7 +6,7 @@
     <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
     <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
 
 
     <div class="right-menu">
     <div class="right-menu">
-      <div class="right-menu-item">{{userName}}</div>
+      <div class="right-menu-item">{{userName}} ({{userType}})</div>
       <!-- <template v-if="device!=='mobile'">
       <!-- <template v-if="device!=='mobile'">
         <screenfull id="screenfull" class="right-menu-item hover-effect" />
         <screenfull id="screenfull" class="right-menu-item hover-effect" />
 
 
@@ -76,6 +76,16 @@ export default {
     },
     },
     userName() {
     userName() {
       return this.$store.state.user.name
       return this.$store.state.user.name
+    },
+    userType() {
+      let userType = this.$store.state.user.userType
+      if (userType == 'ADMIN') {
+        return '科德用户'
+      } else if(userType == 'GOV_PROV' || userType == 'GOV_CITY' || userType == 'GOV_DISTRI') {
+        return '政务用户'
+      } else if(userType == 'ENT_ADMIN' || userType == 'ENT_TECH' || userType == 'ENT_ADMIN_TECH' || userType == 'ENT_FIN' || userType == 'ENT_ADMIN_FIN') {
+        return '企业用户'
+      }
     }
     }
   },
   },
   methods: {
   methods: {