Browse Source

从账户中心登入可以修改默认角色权限

dongbw 8 years ago
parent
commit
4530175dc7

+ 2 - 2
src/main/webapp/resources/js/index/app.js

@@ -5214,7 +5214,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             }, function (response) {
                 toaster.pop('error', '提示', response.data);
             });
-        }
+        };
         loadData();
 
         // 当前时间
@@ -11564,7 +11564,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         BaseService.scrollBackToTop();
         // 获取当前用户是否为管理员
         CurrentRole.isManager({}, {}, function (data) {
-            $scope.isManager = data.isManager;
+            $scope.isManager = data.isManager || $scope.user.sys;
         });
         $scope.role = role;
         $scope.master = angular.copy($scope.role);

+ 1 - 1
src/main/webapp/resources/tpl/index/approvalFlow/user.html

@@ -457,7 +457,7 @@
 						<!-- ng-show="user.sys && enterprise.enAdminuu != u.userUU" -->
 						<td class="row-operator" ng-if="isManager">
 							<a class="operator-trigger" href="javascript:void(0);"><i class="fa fa-pencil fa-lg" ng-show="(user.sys && enterprise.enAdminuu != u.userUU) || $data.length == 1"></i></a>
-							<ul class="list-unstyle list-inline operator-menu" ng-show="(user.sys && enterprise.enAdminuu != u.userUU) || $data.length == 1">
+							<ul class="list-unstyle list-inline operator-menu" ng-show="(user.sys && enterprise.enAdminuu != u.userUU) || $data.length == 1 || u.userUU < 0">
 								<li><a ng-click="editUserRole(u)"><i class="fa fa-fw fa-pencil-square-o" style="color: #fff"></i>编辑</a></li>
 								<li><a ng-click="removeUser(u)" ng-if="u.userUU != user.userUU"><i class="fa fa-fw fa-trash-o" style="color: #fff"></i>删除</a></li>
 							</ul>