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
54
55
56
57
58
59
60
61
62
63
| /**
| 权限组
| **/
| (function(vc){
|
| vc.extends({
| data:{
| privilegeGroupInfo:{
| groups:[]
| }
| },
| _initMethod:function(){
| vc.component.loadPrivilegeGroup();
| },
| _initEvent:function(){
| vc.component.$on('privilegeGroup_loadPrivilegeGroup',function(_params){
| 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,
| _storeId:_groupsInfo[0].storeId
| });
| }
|
|
| },function(){
| console.log('请求失败处理');
| }
| );
| },
| notifyQueryPrivilege:function(_pGroup){
| vc.component.$emit('privilege_group_event',{
| _pgId:_pGroup.pgId,
| _pgName:_pGroup.name,
| _storeId:_pGroup.storeId
| });
| },
| openPrivilegeGroupModel:function(){
| vc.component.$emit('addPrivilegeGroup_openPrivilegeGroupModel',{});
| },
| openDeletePrivilegeGroupModel:function(_pGroup){
| vc.component.$emit('deletePrivilegeGroup_openDeletePrivilegeGroupModel',_pGroup);
| }
| }
| });
|
| })(window.vc);
|
|