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
| (function(vc){
| //员工权限
| vc.extends({
| data:{
| staffPrivilegeInfo:{
| privileges:[],
| _currentStaffId:'',
| }
| },
| _initMethod:function(){
|
| },
| _initEvent:function(){
| vc.on('staffPrivilege','_loadStaffPrivileges',function(_param){
| vc.component._loadStaffPrivileges(_param);
| });
| },
| methods:{
| _loadStaffPrivileges:function(_param){
| vc.component.staffPrivilegeInfo._currentStaffId=_param.staffId;
| var param = {
| params:{
| staffId:_param.staffId
| }
| };
| //发送get请求
| vc.http.get('staffPrivilege',
| 'listStaffPrivileges',
| param,
| function(json){
| var _staffPrivilegeInfo = JSON.parse(json);
| vc.component.staffPrivilegeInfo.privileges = _staffPrivilegeInfo.datas;
|
| },function(){
| console.log('请求失败处理');
| });
| },
| _openDeleteStaffPrivilegeModel:function(_staffPrivilege){
| _staffPrivilege.staffId = vc.component.staffPrivilegeInfo._currentStaffId;
| vc.emit('deleteStaffPrivilege','openStaffPrivilegeModel',_staffPrivilege);
| }
| }
| });
|
| })(window.vc);
|
|