shiyj
2019-07-16 6d8a43de07062234a05716fcbb94273709cab21e
java110-code-generator/src/main/resources/web/manage/manage.js
@@ -9,11 +9,12 @@
            @@templateCode@@ManageInfo:{
                @@templateCode@@s:[],
                total:0,
                records:1
                records:1,
                @@searchCode@@:''
            }
        },
        _initMethod:function(){
            vc.component.list@@TemplateCode@@(DEFAULT_PAGE, DEFAULT_ROWS);
            vc.component._list@@TemplateCode@@s(DEFAULT_PAGE, DEFAULT_ROWS);
        },
        _initEvent:function(){
            vc.on('@@templateCode@@Manage','list@@TemplateCode@@',function(_param){
@@ -28,7 +29,8 @@
                var param = {
                    params:{
                        page:_page,
                        row:_rows
                        row:_rows,
                        @@searchCode@@:vc.component.@@templateCode@@ManageInfo.@@searchCode@@
                    }
               }
@@ -41,19 +43,27 @@
                                vc.component.@@templateCode@@ManageInfo.total = _@@templateCode@@ManageInfo.total;
                                vc.component.@@templateCode@@ManageInfo.records = _@@templateCode@@ManageInfo.records;
                                vc.component.@@templateCode@@ManageInfo.@@templateCode@@s = _@@templateCode@@ManageInfo.@@templateCode@@s;
                                vc.emit('pagination','init',{
                                     total:vc.component.@@templateCode@@ManageInfo.records,
                                     currentPage:_page
                                 });
                             },function(errInfo,error){
                                console.log('请求失败处理');
                             }
                           );
            },
            _openAdd@@TemplateCode@@Modal:function(){
                vc.emit('add@@TemplateCode@@','openAdd@@TemplateCode@@',{});
                vc.emit('add@@TemplateCode@@','openAdd@@TemplateCode@@Modal',{});
            },
            _openEdit@@TemplateCode@@Model:function(_@@templateCode@@){
                vc.emit('edit@@TemplateCode@@','openEdit@@TemplateCode@@Modal',_@@templateCode@@);
            },
            _openDelete@@TemplateCode@@Model:function(_@@templateCode@@){
                vc.emit('delete@@TemplateCode@@','openDelete@@TemplateCode@@Modal',_@@templateCode@@);
            },
            _query@@TemplateCode@@Method:function(){
                vc.component._list@@TemplateCode@@s(DEFAULT_PAGE, DEFAULT_ROWS);
            }
        }
    });