(function(){
    X.pageLogic['eventmanagement'] = {
        init : function(){
            var me = this;
            me.eventmanagementlist(); 
            layui.table.on('tool(eventmanagementtest)', function(obj){
                var data = obj.data;
                if(obj.event === 'edit'){
                    X.parametersopen(data,"personalsettingsedit",'auto',function(){
                        
                      me.eventmanagementlist();
                    })
                }
            })


        },
        eventmanagementlist : function(){
            X.laytabledata("#eventmanagement-table","data_mana/event_list",[[
                {field:'name', title: '事件名', sort: true}
                ,{field:'show_name', title: '显示名'}
                ,{field:'desc', title: '备注'}
                ,{field:'is_show', title: '显示状态', minWidth: 100,templet:function(d){
                    if(d.is_show){
                        return '显示'
                    }else {
                        return '<span style="color: #acbad0">隐藏</span>'
                    }
                }}
                ,{field:'event_count', title: '昨日事件量', sort: true}
                ,{fixed: 'right', title:'操作', toolbar: '#eventmanagementDemo', width:80}
            ]]);
        }



    };
})();
