Browse Source

当用户同时认证为机构和个人时,优先显示个人信息

sunjh 5 năm trước cách đây
mục cha
commit
68f3c8f5f7
1 tập tin đã thay đổi với 12 bổ sung8 xóa
  1. 12 8
      src/components/commons/Header.vue

+ 12 - 8
src/components/commons/Header.vue

@@ -104,7 +104,7 @@
                   </el-link>
                 </router-link>
               </el-dropdown-item>
-              <el-dropdown-item v-if="user.authStatus.text == '审核通过' && user.userVO.authType=='agency'">
+              <el-dropdown-item v-if="user.authStatus.text == '审核通过' && user.roleList.indexOf('generalUser')===-1 && user.roleList.indexOf('evaluationAgency')===-1">
                 <router-link :to="{ name: 'Agency',params:{userId:user.userVO.id}}">
                   <el-link icon="el-icon-edit" :underline="false">
                     修改机构信息
@@ -475,24 +475,28 @@ export default {
       //this.getAuthInfo()
     },
     handleClickAuthPass () {
-      if (this.user.userVO.authType == 'agency') {
+      const generalUser = 'generalUser'
+      const evaluationAgency = 'evaluationAgency'
+      const enterpriseUser = 'enterpriseUser'
+      const roleList = this.user.roleList;
+      if (roleList.indexOf(generalUser) !== -1) {
         this.$router.push({
-          name: 'AgencyAuthentication',
+          name: 'IndividualAuthentication',
           params: {userId: this.user.userVO.id}
         })
-      }
-      if (this.user.userVO.authType == 'enterprise') {
+      }else if (roleList.indexOf(evaluationAgency) !== -1) {
         this.$router.push({
-          name: 'EnterpriseAuthentication',
+          name: 'AgencyAuthentication',
           params: {userId: this.user.userVO.id}
         })
       }
-      if (this.user.userVO.authType == 'personal') {
+      else if (roleList.indexOf(enterpriseUser) !== -1) {
         this.$router.push({
-          name: 'IndividualAuthentication',
+          name: 'EnterpriseAuthentication',
           params: {userId: this.user.userVO.id}
         })
       }
+
       //this.getAuthInfo()
     },
     handleClickAuthChecking () {