(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7a93d4c9"],{4120:function(e,n,s){"use strict";s("f89c")},"46ea":function(e,n,s){"use strict";s("e57d")},a56b:function(e,n,s){e.exports=s.p+"static/img/loginlan.1ecbd4ab.png"},dd7ba:function(e,n,s){"use strict";s.r(n),s("6a1e");var t=s("9f53"),o=s("61f7"),i=(t={name:"Login",mixins:[t.a],data:function(){return{ver:"",show:!1,loginForm:{username:"",password:""},loginRules:{username:[{required:!0,trigger:"blur",validator:function(e,n,s){""===n?s(new Error("手机号不能为空！")):Object(o.d)(n)?s():s(new Error("请输入正确的手机号"))}}],password:[{required:!0,trigger:"blur",validator:function(e,n,s){""===n?s(new Error("密码不能为空！")):!Object(o.a)(n)||n.length<6||18<n.length?s(new Error("密码为6-18位数字字母组合！")):Object(o.e)(n)?s(new Error("密码不能为纯数字！")):Object(o.f)(n)?s(new Error("密码不能为纯字母！")):s()}}]},passwordType:"password",capsTooltip:!1,loading:!1,showDialog:!1,redirect:void 0,otherQuery:{}}},mounted:function(){""===this.loginForm.username?this.$refs.username.focus():""===this.loginForm.password&&this.$refs.password.focus()},methods:{setVisible:function(e){this.show=e},handleClick:function(){this.show=!0},handleSuccess:function(){this.show=!1,this.handleLogin()},checkCapslock:function(e){e=e.key,this.capsTooltip=e&&1===e.length&&"A"<=e&&e<="Z"},showPwd:function(){var e=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){e.$refs.password.focus()}))},handleLogin:function(){var e=this;this.$refs.loginForm.validate((function(n){if(!n)return!1;e.loading=!0,e.$store.dispatch("user/login",e.loginForm).then((function(n){var s=n.code;n=n.message;e.loading=!1,0===s?e.UserInfor():(e.$message.warning(n),e.loading=!1)})).catch((function(n){e.loading=!1}))}))},UserInfor:function(){var e=this;this.$store.dispatch("user/UserInfor",{}).then((function(n){e.loading=!1,"success"===n?e.$router.push({path:"/demand/index"}):(e.$message.warning("111"),e.loading=!1)})).catch((function(n){e.loading=!1}))}}},s("46ea"),s("4120"),s("2877"));i=Object(i.a)(t,(function(){var e=this,n=e.$createElement;n=e._self._c||n;return n("div",{staticClass:"login-container"},[n("div",{staticClass:"login-form-main"},[n("img",{attrs:{src:s("a56b"),alt:""}}),e._m(0),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("span",[e._v(e._s(e.ver))])])]),n("el-form-item",{attrs:{prop:"username"}},[n("span",{staticClass:"svg-container"},[n("i",{staticClass:"el-icon-user"})]),n("el-input",{ref:"username",attrs:{placeholder:"手机号",name:"username",type:"text",tabindex:"1",autocomplete:"on"},model:{value:e.loginForm.username,callback:function(n){e.$set(e.loginForm,"username",n)},expression:"loginForm.username"}})],1),n("el-tooltip",{attrs:{content:"Caps lock is On",placement:"right",manual:""},model:{value:e.capsTooltip,callback:function(n){e.capsTooltip=n},expression:"capsTooltip"}},[n("el-form-item",{attrs:{prop:"password"}},[n("span",{staticClass:"svg-container"},[n("i",{staticClass:"el-icon-unlock"})]),n("el-input",{key:e.passwordType,ref:"password",attrs:{type:e.passwordType,placeholder:"密码",name:"password",tabindex:"2",autocomplete:"on"},on:{blur:function(n){e.capsTooltip=!1}},nativeOn:{keyup:[function(n){return e.checkCapslock(n)},function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.handleLogin(n)}]},model:{value:e.loginForm.password,callback:function(n){e.$set(e.loginForm,"password",n)},expression:"loginForm.password"}}),n("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[n("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1)],1),n("el-button",{staticStyle:{width:"100%","margin-top":"5px"},attrs:{loading:e.loading,disabled:e.loading,type:"primary"},nativeOn:{click:function(n){return n.preventDefault(),e.handleLogin()}}},[e._v("登 录")])],1)],1)])}),[function(){var e=this,n=e.$createElement;n=e._self._c||n;return n("div",{staticClass:"main-title"},[n("h1",[e._v("欢迎登录")]),n("h3",[e._v("工单管理系统")])])}],!1,null,"45e32554",null);n.default=i.exports},e57d:function(e,n,s){},f89c:function(e,n,s){}}]);