var $url="/settings/administratorsConfig",data=utils.init({form:{adminUserNameMinLength:null,adminPasswordMinLength:null,adminPasswordRestriction:null,isAdminLockLogin:null,adminLockLoginCount:null,adminLockLoginType:null,adminLockLoginHours:null,isAdminEnforcePasswordChange:null,adminEnforcePasswordChangeDays:null,isAdminEnforceLogout:null,adminEnforceLogoutMinutes:null}}),methods={apiGet:function(){var n=this;utils.loading(this,!0),$api.get($url).then(function(i){var o=i.data;n.form.adminUserNameMinLength=o.config.adminUserNameMinLength,n.form.adminPasswordMinLength=o.config.adminPasswordMinLength,n.form.adminPasswordRestriction=o.config.adminPasswordRestriction,n.form.isAdminLockLogin=o.config.isAdminLockLogin,n.form.adminLockLoginCount=o.config.adminLockLoginCount,n.form.adminLockLoginType=o.config.adminLockLoginType,n.form.adminLockLoginHours=o.config.adminLockLoginHours,n.form.isAdminEnforcePasswordChange=o.config.isAdminEnforcePasswordChange,n.form.adminEnforcePasswordChangeDays=o.config.adminEnforcePasswordChangeDays,n.form.isAdminEnforceLogout=o.config.isAdminEnforceLogout,n.form.adminEnforceLogoutMinutes=o.config.adminEnforceLogoutMinutes}).catch(function(n){utils.error(n)}).then(function(){utils.loading(n,!1)})},apiSubmit:function(){var n=this;utils.loading(this,!0),$api.post($url,{adminUserNameMinLength:this.form.adminUserNameMinLength,adminPasswordMinLength:this.form.adminPasswordMinLength,adminPasswordRestriction:this.form.adminPasswordRestriction,isAdminLockLogin:this.form.isAdminLockLogin,adminLockLoginCount:this.form.adminLockLoginCount,adminLockLoginType:this.form.adminLockLoginType,adminLockLoginHours:this.form.adminLockLoginHours,isAdminEnforcePasswordChange:this.form.isAdminEnforcePasswordChange,adminEnforcePasswordChangeDays:this.form.adminEnforcePasswordChangeDays,isAdminEnforceLogout:this.form.isAdminEnforceLogout,adminEnforceLogoutMinutes:this.form.adminEnforceLogoutMinutes}).then(function(n){n.data;utils.success("管理员设置保存成功！")}).catch(function(n){utils.error(n)}).then(function(){utils.loading(n,!1)})},getPasswordRestrictionText:function(n){return"LetterAndDigit"===n?"字母和数字组合":"LetterAndDigitAndSymbol"===n?"字母、数字以及符号组合":"不限制"},btnSubmitClick:function(){var n=this;this.$refs.form.validate(function(i){i&&n.apiSubmit()})}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiGet()}});