吴学文
2019-04-08 6b62159b5f2627e0931a0e6503ed549a66855dbe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
    权限组
**/
(function(vc){
 
    vc.extends({
        data:{
            privilegeGroupInfo:{
                groups:[]
            }
        },
        _initMethod:function(){
            vc.component.loadPrivilegeGroup();
        },
        methods:{
            loadPrivilegeGroup:function(){
                var param = {
                    msg:234
                };
 
                //发送get请求
               vc.http.get('privilegeGroup',
                            'listPrivilegeGroup',
                             param,
                             function(json){
                                var _groupsInfo = JSON.parse(json);
                                vc.component.privilegeGroupInfo.groups = _groupsInfo;
                                if(_groupsInfo.length > 0){
                                    vc.component.$emit('privilege_group_event',{
                                                                    _pgId:_groupsInfo[0].pgId,
                                                                    _pgName:_groupsInfo[0].name
                                                                });
                                }
 
 
                             },function(){
                                console.log('请求失败处理');
                             }
                           );
            },
            notifyQueryPrivilege:function(_pGroup){
                vc.component.$emit('privilege_group_event',{
                    _pgId:_pGroup.pgId,
                    _pgName:_pGroup.name
                });
            },
            openPrivilegeGroup:function(){
 
            }
        }
    });
 
})(window.vc);