浏览代码

权限管理、模块设计

haha600 5 年之前
父节点
当前提交
ef88317e4c

二进制
1.dmp


+ 9 - 1
facade/src/app/service/module.service.ts

@@ -308,7 +308,15 @@ constructor(private http: _HttpClient,
308 308
          * 读取列表数据
309 309
          */
310 310
         getList(name: string, body?: any) {
311
-          return this['http'].get('rest/' + name, {body: JSON.stringify(body || {})} );
311
+          body = body || {};
312
+          if (typeof body['params'] === 'undefined' && typeof body['page'] === 'undefined') {
313
+            body = {
314
+              params: body,
315
+              sort: '',
316
+              page: [1, 10000000],
317
+            };
318
+          }
319
+          return this['http'].get('rest/' + name, {body: JSON.stringify(body)} );
312 320
         }
313 321
 
314 322
         /**

+ 1 - 1
facade/src/app/shared/sp-contextmenu.directive.ts

@@ -16,7 +16,7 @@ export class SpContextMenuDirective {
16 16
         ) {}
17 17
 
18 18
     @HostListener('contextmenu') oncontextmenu() {
19
-        this.el.nativeElement['dropdownSvr'] = this.dropdownSvr.create(<MouseEvent> window.event, this.menu);
19
+        this.menu['dropdownSvr'] = this.dropdownSvr.create(<MouseEvent> window.event, this.menu);
20 20
         return false;
21 21
     }
22 22
 

+ 2 - 1
src/main/java/com/kingkong/bljs/service/UserService.java

@@ -120,7 +120,7 @@ public class UserService {
120 120
             user.put("menu",menuService.getRoleMenus(strRoles,appid));
121 121
 
122 122
 
123
-        //权限
123
+        // 后台判断权限
124 124
         strSQL = "SELECT a.*,b.id m_id\n" +
125 125
                 "FROM k_role_priv t,k_module_priv z,k_module_priv_detail a,k_module b\n" +
126 126
                 "WHERE t.r_id in({0}) and  t.m_code = z.m_code and t.p_code = z.code\n" +
@@ -134,6 +134,7 @@ public class UserService {
134 134
         user.put("privs",privs);
135 135
 
136 136
 
137
+        // 用于在前端判断权限
137 138
         strSQL = "SELECT z.*\n" +
138 139
                 "FROM k_role_priv t,k_module_priv z\n" +
139 140
                 "WHERE t.r_id in({0}) and t.p_code = z.code";