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
64
65
66
67
68
| (function(vc){
| vc.extends({
| data:{
| addOrgCommunityInfo:{
| communitys:[],
| communityName:'',
| selectCommunitys:[]
| }
| },
| _initMethod:function(){
| },
| _initEvent:function(){
| vc.on('addOrgCommunity','openAddOrgCommunityModal',function(_param){
| $('#addOrgCommunityModel').modal('show');
| vc.copyObject(_param,vc.component.addOrgCommunityInfo);
| vc.component._refreshChooseOrgInfo();
| vc.component._loadAllCommunityInfo(1,10,'');
| });
| },
| methods:{
| _loadAllCommunityInfo:function(_page,_row,_name){
| var param = {
| params:{
| page:_page,
| row:_row,
| communityId:vc.getCurrentCommunity().communityId,
| name:_name,
| orgLevel:vc.component.addOrgCommunityInfo.orgLevel,
| parentOrgId:vc.component.addOrgCommunityInfo.parentOrgId,
| }
| };
|
| //发送get请求
| vc.http.get('addOrgCommunity',
| 'list',
| param,
| function(json){
| var _orgInfo = JSON.parse(json);
| vc.component.addOrgCommunityInfo.orgs = _orgInfo.orgs;
| },function(){
| console.log('请求失败处理');
| }
| );
| },
| addOrgCommunity:function(_org){
| if(_org.hasOwnProperty('name')){
| _org.orgName = _org.name;
| }
| vc.emit($props.emitChooseOrg,'addOrgCommunity',_org);
| vc.emit($props.emitLoadData,'listOrgData',{
| orgId:_org.orgId
| });
| $('#addOrgCommunityModel').modal('hide');
| },
| queryCommunitys:function(){
| vc.component._loadAllCommunityInfo(1,10,vc.component.addOrgCommunityInfo.communityName);
| },
| _refreshChooseOrgInfo:function(){
| vc.component.addOrgCommunityInfo={
| communitys:[],
| communityName:'',
| selectCommunitys:[]
| };
| }
| }
|
| });
| })(window.vc);
|
|