Ver código fonte

fix:机构管理角色显示逻辑调整

Signed-off-by: tsz <2417024719@qq.com>
tsz 1 ano atrás
pai
commit
ca8af90d36

+ 11 - 5
entbase-mobile/page_entbase_mobile/page/business_management/people_management.html

@@ -86,11 +86,13 @@
                                 <div class="j-cell_rl">
                                 <div class="j-cell_rl">
                                     <p class="username">
                                     <p class="username">
                                         {{value.name}}
                                         {{value.name}}
-                                        {{if value.role == '企业管理员'}}
-                                            <span class="a-admin">{{value.role}}</span>
-                                        {{else if value.role == '部门管理员'}}
-                                            <span class="b-admin">{{value.role}}</span>
-                                        {{/if}}
+                                        <span class="company_position">
+                                          {{if value.role == '企业管理员'}}
+                                              <span class="a-admin">{{value.role}}</span>
+                                          {{else if value.role == '部门管理员'}}
+                                              <span class="b-admin">{{value.role}}</span>
+                                          {{/if}}
+                                        </span>
                                         <span class="niche_show" style="display: none;">
                                         <span class="niche_show" style="display: none;">
                                           {{if value.nicheDis == '0'}}
                                           {{if value.nicheDis == '0'}}
                                             <span class="a-admin">销售</span>
                                             <span class="a-admin">销售</span>
@@ -198,6 +200,10 @@
                               // nicheDis_show == 1有营销功能
                               // nicheDis_show == 1有营销功能
                               if(res.data.nicheDis_show == '1') {
                               if(res.data.nicheDis_show == '1') {
                                 $('.niche_show').show()
                                 $('.niche_show').show()
+                                $('.company_position').hide()
+                              } else {
+                                $('.niche_show').hide()
+                                $('.company_position').show()
                               }
                               }
                               // 企业管理员才展示批量管理按钮、新增部门、新增人员入口
                               // 企业管理员才展示批量管理按钮、新增部门、新增人员入口
                               if (res.data.admin_system) {
                               if (res.data.admin_system) {

+ 6 - 6
entbase-pc/src/views/ent/components/personal.vue

@@ -96,16 +96,16 @@
         <el-table-column :style="{ width: '21.4%' }" label="角色" width="21.4%">
         <el-table-column :style="{ width: '21.4%' }" label="角色" width="21.4%">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <span v-if="scope.row.role == '企业管理员'" class="company_user">
             <span v-if="scope.row.role == '企业管理员'" class="company_user">
-              {{ scope.row.role }}
-              <span v-if="$store.state.companyMsg.nicheDis_show === 1">{{ setAllocition(scope.row.niche_dis) }}</span>
+              <span v-if="$store.state.companyMsg.nicheDis_show !== 1">{{ scope.row.role }}</span>
+              <span v-if="$store.state.companyMsg.nicheDis_show === 1">{{ setAllocition(scope.row.niche_dis) }}</span>
             </span>
             </span>
             <span v-if="scope.row.role == '部门管理员'" class="depart_user">
             <span v-if="scope.row.role == '部门管理员'" class="depart_user">
-              {{ scope.row.role }}
-              <span v-if="$store.state.companyMsg.nicheDis_show === 1">{{ setAllocition(scope.row.niche_dis) }}</span>
+              <span v-if="$store.state.companyMsg.nicheDis_show !== 1">{{ scope.row.role }}</span>
+              <span v-if="$store.state.companyMsg.nicheDis_show === 1">{{ setAllocition(scope.row.niche_dis) }}</span>
             </span>
             </span>
             <span v-if="scope.row.role == ''">
             <span v-if="scope.row.role == ''">
-              {{ $store.state.companyMsg.nicheDis_show === 1 ? '销售' : '员工' }}
-              <span v-if="$store.state.companyMsg.nicheDis_show === 1 && setAllocition(scope.row.niche_dis) !== '销售'">{{ setAllocition(scope.row.niche_dis) }}</span>
+              <span v-if="$store.state.companyMsg.nicheDis_show !== 1">员工</span>
+              <span v-if="$store.state.companyMsg.nicheDis_show === 1">{{ setAllocition(scope.row.niche_dis) }}</span>
             </span>
             </span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>