Explorar el Código

增加页面用户类型

liuxiangqi hace 1 año
padre
commit
be9882323e
Se han modificado 1 ficheros con 11 adiciones y 1 borrados
  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"/>
 
     <div class="right-menu">
-      <div class="right-menu-item">{{userName}}</div>
+      <div class="right-menu-item">{{userName}} ({{userType}})</div>
       <!-- <template v-if="device!=='mobile'">
         <screenfull id="screenfull" class="right-menu-item hover-effect" />
 
@@ -76,6 +76,16 @@ export default {
     },
     userName() {
       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: {