吴学文
2019-07-10 4ee6445f67bbb56caa2b2f981afce6e87cc602af
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
(function(vc){
    vc.extends({
        data:{
            exitParkingSpaceInfo:{}
        },
        _initEvent:function(){
             vc.on('ownerExitParkingSpace','openExitParkingSpaceModel',function(_parkingSpaceInfo){
                    vc.component.exitParkingSpaceInfo = _parkingSpaceInfo;
                    $('#exitParkingSpaceModel').modal('show');
                });
        },
        methods:{
            closeExitParkingSpaceModel:function(){
                $('#exitParkingSpaceModel').modal('hide');
            },
            doOwnerExitParkingSpace:function(){
 
                vc.component.exitParkingSpaceInfo.communityId = vc.getCurrentCommunity().communityId;
                vc.http.post(
                    'ownerExitParkingSpace',
                    'exit',
                    JSON.stringify(vc.component.exitParkingSpaceInfo),
                    {
                        emulateJSON:true
                     },
                     function(json,res){
                        //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
                        if(res.status == 200){
                            //关闭model
                            $('#exitParkingSpaceModel').modal('hide');
                            vc.emit('showOwnerParkingSpace','notify',vc.component.exitParkingSpaceInfo);
                            return ;
                        }
                        vc.message(json);
                     },
                     function(errInfo,error){
                        console.log('请求失败处理');
 
                        vc.message(errInfo);
                     });
            }
        }
    });
})(window.vc);