(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-206192f7"],{"111a":function(e,t,n){},"4ed0":function(e,t,n){"use strict";n("111a")},8848:function(e,t,n){e.exports={menuBg:"#304156",menuText:"#bfcbd9",menuActiveText:"#409eff"}},"9ed6":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"login-container"},[n("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,autocomplete:"on","label-position":"left"}},[n("div",{staticClass:"title-container"},[n("h3",{staticClass:"title"},[e._v("\n        Login Form\n      ")])]),n("el-form-item",{attrs:{prop:"account"}},[n("span",{staticClass:"svg-container"},[n("svg-icon",{attrs:{name:"user"}})],1),n("el-input",{ref:"username",attrs:{name:"account",type:"text",autocomplete:"on",placeholder:"account"},model:{value:e.loginForm.account,callback:function(t){e.$set(e.loginForm,"account",t)},expression:"loginForm.account"}})],1),n("el-form-item",{attrs:{prop:"password"}},[n("span",{staticClass:"svg-container"},[n("svg-icon",{attrs:{name:"password"}})],1),n("el-input",{key:e.passwordType,ref:"password",attrs:{type:e.passwordType,placeholder:"password",name:"password",autocomplete:"on"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin.apply(null,arguments)}},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}}),n("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[n("svg-icon",{attrs:{name:"password"===e.passwordType?"eye-off":"eye-on"}})],1)],1),n("el-button",{staticStyle:{width:"100%","margin-bottom":"30px"},attrs:{loading:e.loading,type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin.apply(null,arguments)}}},[e._v("\n      Sign in\n    ")]),n("div",{staticStyle:{position:"relative"}},[n("div",{staticClass:"tips"},[n("span",[e._v(" username: admin ")]),n("span",[e._v(" password: any ")])])])],1)],1)},r=[],o=(n("2397"),n("ac6a"),n("456d"),n("96cf"),n("1da1")),s=n("d4ec"),i=n("bee2"),c=n("99de"),u=n("7e84"),l=n("262e"),p=n("9ab4"),d=n("60a3"),f=n("9dba"),m=n("75fb");function g(e,t,n){return t=Object(u["a"])(t),Object(c["a"])(e,h()?Reflect.construct(t,n||[],Object(u["a"])(e).constructor):t.apply(e,n))}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var w=function(e){function t(){var e;return Object(s["a"])(this,t),e=g(this,t,arguments),e.validateUsername=function(e,t,n){Object(m["d"])(t)?n():n(new Error("Please enter the correct user name"))},e.validatePassword=function(e,t,n){t.length<6?n(new Error("The password can not be less than 6 digits")):n()},e.loginForm={account:"papa",password:"123456"},e.loginRules={account:[{validator:e.validateUsername,trigger:"blur"}],password:[{validator:e.validatePassword,trigger:"blur"}]},e.passwordType="password",e.loading=!1,e.showDialog=!1,e.otherQuery={},e}return Object(l["a"])(t,e),Object(i["a"])(t,[{key:"onRouteChange",value:function(e){var t=e.query;t&&(this.redirect=t.redirect,this.otherQuery=this.getOtherQuery(t))}},{key:"mounted",value:function(){""===this.loginForm.account?this.$refs.username.focus():""===this.loginForm.password&&this.$refs.password.focus()}},{key:"showPwd",value:function(){var e=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){e.$refs.password.focus()}))}},{key:"handleLogin",value:function(){var e=this;this.$refs.loginForm.validate(function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!n){t.next=14;break}return t.prev=1,e.loading=!0,t.next=5,f["a"].Login(e.loginForm);case 5:e.loading=!1,e.$router.push({path:e.redirect||"/",query:e.otherQuery}),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](1),e.loading=!1;case 12:t.next=15;break;case 14:return t.abrupt("return",!1);case 15:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e){return t.apply(this,arguments)}}())}},{key:"getOtherQuery",value:function(e){return Object.keys(e).reduce((function(t,n){return"redirect"!==n&&(t[n]=e[n]),t}),{})}}]),t}(d["i"]);Object(p["a"])([Object(d["j"])("$route",{immediate:!0})],w.prototype,"onRouteChange",null),w=Object(p["a"])([Object(d["a"])({name:"Login"})],w);var v=w,y=v,b=(n("f93f"),n("4ed0"),n("2877")),k=Object(b["a"])(y,a,r,!1,null,"c6942a2e",null);t["default"]=k.exports},f93f:function(e,t,n){"use strict";n("8848")}}]);