var $url="/settings/logsAdmin",data=utils.init({items:null,count:null,formInline:{dateFrom:"",dateTo:"",userName:"",keyword:"",currentPage:1,offset:0,limit:30}}),methods={apiGet:function(){var t=this;$api.post($url,this.formInline).then(function(i){var n=i.data;t.items=n.items,t.count=n.count}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},apiDelete:function(){var t=this;utils.loading(this,!0),$api.delete($url).then(function(i){i.data;t.items=[]}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},btnAdminView:function(t){utils.openLayer({title:"管理员查看",url:utils.getCommonUrl("adminLayerView",{adminId:t}),full:!0})},btnDeleteClick:function(){var t=this;utils.alertDelete({title:"清空管理员日志",text:"此操作将会清空管理员日志，且数据无法恢复，请谨慎操作！",callback:function(){t.apiDelete()}})},btnSearchClick(){var t=this;this.formInline.currentPage=1,this.formInline.offset=0,this.formInline.limit=30,utils.loading(this,!0),$api.post($url,this.formInline).then(function(i){var n=i.data;t.items=n.items,t.count=n.count}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},handleCurrentChange:function(t){var i=this;this.formInline.currentValue=t,this.formInline.offset=this.formInline.limit*(t-1),utils.loading(this,!0),$api.post($url,this.formInline).then(function(t){var n=t.data;i.items=n.items,i.count=n.count}).catch(function(t){utils.error(t)}).then(function(){utils.loading(i,!1)}),window.scrollTo(0,0)}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiGet()}});