Browse Source

根据角色判断是否显示话机功能

seimin 3 years ago
parent
commit
122528f07d

+ 30 - 0
assets/js/controllers/loginCtrl.js

@@ -158,6 +158,16 @@ app.controller('LoginCtrl', ['$rootScope', '$scope', '$state', '$translate', '$l
158
                                 $rootScope.user = JSON.parse(localStorage.getItem("jry_user"));
158
                                 $rootScope.user = JSON.parse(localStorage.getItem("jry_user"));
159
                                 $rootScope.login_requester = JSON.parse(localStorage.getItem("login_requester"));
159
                                 $rootScope.login_requester = JSON.parse(localStorage.getItem("login_requester"));
160
                                 $rootScope.getMsgNum($rootScope.user.id)
160
                                 $rootScope.getMsgNum($rootScope.user.id)
161
+                                $rootScope.isFuwutai = false;//服务台人员和服务台经理才显示右上角呼叫功能
162
+                                if ($rootScope.user) {
163
+                                    if($rootScope.user.role&&angular.isArray($rootScope.user.role)&&$rootScope.user.role.length){
164
+                                        $rootScope.isFuwutai = $rootScope.user.role.some(function(v){
165
+                                            return v.rolecode == 'call center' || v.rolecode == 'call center admin';
166
+                                        })
167
+                                    }else{
168
+                                        $rootScope.isFuwutai = false;
169
+                                    }
170
+                                }
161
                                 // $rootScope.userMenus = JSON.parse(localStorage.getItem("jry_user")).menu;
171
                                 // $rootScope.userMenus = JSON.parse(localStorage.getItem("jry_user")).menu;
162
                                 var allJurisdiction = JSON.parse(localStorage.getItem("jry_user")).menu;
172
                                 var allJurisdiction = JSON.parse(localStorage.getItem("jry_user")).menu;
163
                                 var onlyMenu = [];
173
                                 var onlyMenu = [];
@@ -269,6 +279,16 @@ app.controller('LoginCtrl', ['$rootScope', '$scope', '$state', '$translate', '$l
269
                                     $rootScope.user = JSON.parse(localStorage.getItem("jry_user"));
279
                                     $rootScope.user = JSON.parse(localStorage.getItem("jry_user"));
270
                                     $rootScope.login_requester = JSON.parse(localStorage.getItem("login_requester"));
280
                                     $rootScope.login_requester = JSON.parse(localStorage.getItem("login_requester"));
271
                                     $rootScope.getMsgNum($rootScope.user.id)
281
                                     $rootScope.getMsgNum($rootScope.user.id)
282
+                                    $rootScope.isFuwutai = false;//服务台人员和服务台经理才显示右上角呼叫功能
283
+                                    if ($rootScope.user) {
284
+                                        if($rootScope.user.role&&angular.isArray($rootScope.user.role)&&$rootScope.user.role.length){
285
+                                            $rootScope.isFuwutai = $rootScope.user.role.some(function(v){
286
+                                                return v.rolecode == 'call center' || v.rolecode == 'call center admin';
287
+                                            })
288
+                                        }else{
289
+                                            $rootScope.isFuwutai = false;
290
+                                        }
291
+                                    }
272
                                     // $rootScope.userMenus = JSON.parse(localStorage.getItem("jry_user")).menu;
292
                                     // $rootScope.userMenus = JSON.parse(localStorage.getItem("jry_user")).menu;
273
                                     var allJurisdiction = JSON.parse(localStorage.getItem("jry_user")).menu;
293
                                     var allJurisdiction = JSON.parse(localStorage.getItem("jry_user")).menu;
274
                                     var onlyMenu = [];
294
                                     var onlyMenu = [];
@@ -381,6 +401,16 @@ app.controller('LoginCtrl', ['$rootScope', '$scope', '$state', '$translate', '$l
381
                                         $rootScope.user = JSON.parse(localStorage.getItem("jry_user"));
401
                                         $rootScope.user = JSON.parse(localStorage.getItem("jry_user"));
382
                                         $rootScope.login_requester = JSON.parse(localStorage.getItem("login_requester"));
402
                                         $rootScope.login_requester = JSON.parse(localStorage.getItem("login_requester"));
383
                                         $rootScope.getMsgNum($rootScope.user.id)
403
                                         $rootScope.getMsgNum($rootScope.user.id)
404
+                                        $rootScope.isFuwutai = false;//服务台人员和服务台经理才显示右上角呼叫功能
405
+                                        if ($rootScope.user) {
406
+                                            if($rootScope.user.role&&angular.isArray($rootScope.user.role)&&$rootScope.user.role.length){
407
+                                                $rootScope.isFuwutai = $rootScope.user.role.some(function(v){
408
+                                                    return v.rolecode == 'call center' || v.rolecode == 'call center admin';
409
+                                                })
410
+                                            }else{
411
+                                                $rootScope.isFuwutai = false;
412
+                                            }
413
+                                        }
384
                                         // $rootScope.userMenus = JSON.parse(localStorage.getItem("jry_user")).menu;
414
                                         // $rootScope.userMenus = JSON.parse(localStorage.getItem("jry_user")).menu;
385
                                         var allJurisdiction = JSON.parse(localStorage.getItem("jry_user")).menu;
415
                                         var allJurisdiction = JSON.parse(localStorage.getItem("jry_user")).menu;
386
                                         var onlyMenu = [];
416
                                         var onlyMenu = [];

+ 2 - 0
assets/views/customform/tpl/ui-handlerLog.html

@@ -7,6 +7,7 @@
7
                     <thead>
7
                     <thead>
8
                         <tr>
8
                         <tr>
9
                             <th class="center" style="width:50px">序号</th>
9
                             <th class="center" style="width:50px">序号</th>
10
+                            <th class="center" style="width:100px">处理人</th>
10
                             <th class="center" style="width:200px">时间</th>
11
                             <th class="center" style="width:200px">时间</th>
11
                             <th class="center">内容</th>
12
                             <th class="center">内容</th>
12
                         </tr>
13
                         </tr>
@@ -14,6 +15,7 @@
14
                     <tbody>
15
                     <tbody>
15
                         <tr ng-repeat="item in model.incident.handlerLogs">
16
                         <tr ng-repeat="item in model.incident.handlerLogs">
16
                             <td class="center">{{$index + 1}}</td>
17
                             <td class="center">{{$index + 1}}</td>
18
+                            <td class="center">{{item.userName}}</td>
17
                             <td class="center">{{item.opTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
19
                             <td class="center">{{item.opTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
18
                             <td class="center" style="white-space: normal;word-break:break-all">{{item.opValue}}</td>
20
                             <td class="center" style="white-space: normal;word-break:break-all">{{item.opValue}}</td>
19
                         </tr>
21
                         </tr>

+ 2 - 2
assets/views/partials/top-navbar.html

@@ -55,7 +55,7 @@
55
         <!-- <li class="dropdown current-user" dropdown style="width:100px">
55
         <!-- <li class="dropdown current-user" dropdown style="width:100px">
56
             <div class="newOrderBtn" ng-click="newOrder()">快速建单</div>
56
             <div class="newOrderBtn" ng-click="newOrder()">快速建单</div>
57
         </li> -->
57
         </li> -->
58
-        <li class="dropdown current-user" dropdown style="width:100px">
58
+        <li class="dropdown current-user" dropdown style="width:100px" ng-if="isFuwutai">
59
             <div>
59
             <div>
60
                 <!-- 东经呼叫中心 -->
60
                 <!-- 东经呼叫中心 -->
61
                 <!-- 来电  -->
61
                 <!-- 来电  -->
@@ -135,7 +135,7 @@
135
 	</div> -->
135
 	</div> -->
136
     <!-- end: MENU TOGGLER FOR MOBILE DEVICES -->
136
     <!-- end: MENU TOGGLER FOR MOBILE DEVICES -->
137
 </div>
137
 </div>
138
-<a class="dropdown-off-sidebar" ng-click="toggle('off-sidebar')">
138
+<a class="dropdown-off-sidebar" ng-click="toggle('off-sidebar')" ng-if="isFuwutai">
139
     &nbsp;
139
     &nbsp;
140
 </a>
140
 </a>
141
 <!-- end: NAVBAR COLLAPSE -->
141
 <!-- end: NAVBAR COLLAPSE -->