var $url="/settings/logsConfig",data=utils.init({config:null,form:{isTimeThreshold:null,timeThreshold:null,isLogSite:null,isLogAdmin:null,isLogUser:null,isLogError:null}}),methods={apiGet:function(){var i=this;$api.get($url).then(function(o){var s=o.data;i.form.isTimeThreshold=s.config.isTimeThreshold,i.form.timeThreshold=s.config.timeThreshold,i.form.isLogSite=s.config.isLogSite,i.form.isLogAdmin=s.config.isLogAdmin,i.form.isLogUser=s.config.isLogUser,i.form.isLogError=s.config.isLogError}).catch(function(i){utils.error(i)}).then(function(){utils.loading(i,!1)})},apiSubmit:function(){var i=this;utils.loading(this,!0),$api.post($url,{isTimeThreshold:this.form.isTimeThreshold,timeThreshold:this.form.timeThreshold,isLogSite:this.form.isLogSite,isLogAdmin:this.form.isLogAdmin,isLogUser:this.form.isLogUser,isLogError:this.form.isLogError}).then(function(i){i.data;utils.success("日志设置保存成功！")}).catch(function(i){utils.error(i)}).then(function(){utils.loading(i,!1)})},btnSubmitClick:function(){var i=this;this.$refs.form.validate(function(o){o&&i.apiSubmit()})}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiGet()}});