(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["Login"],{"07cf":function(t,a,e){},c2ca:function(t,a,e){"use strict";var n=e("07cf"),o=e.n(n);o.a},ede4:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("section",{staticClass:"wrapper"},[e("canvas",{attrs:{id:"canvas"}}),e("div",{staticClass:"login-wrapper"},[t._m(0),e("el-tabs",{on:{"tab-click":function(a){return t.tabHandle()}},model:{value:t.activeName,callback:function(a){t.activeName=a},expression:"activeName"}},[e("el-form",{staticClass:"mar-t-30",model:{value:t.accountForm,callback:function(a){t.accountForm=a},expression:"accountForm"}},[e("div",{staticClass:"mar-b-30 form-item"},[e("label",{staticClass:"icon-box"},[e("i",{staticClass:"iconfont icon-f-user"})]),e("el-input",{attrs:{placeholder:"输入账号",clearable:""},model:{value:t.accountForm.account,callback:function(a){t.$set(t.accountForm,"account",a)},expression:"accountForm.account"}})],1),e("div",{staticClass:"mar-b-30 form-item form-item-code"},[e("label",{staticClass:"icon-box"},[e("i",{staticClass:"iconfont icon-f-password"})]),e("el-input",{attrs:{type:"password",placeholder:"密码",clearable:""},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&t._k(a.keyCode,"enter",13,a.key,"Enter")?null:t.accountLoginHandle(a)}},model:{value:t.accountForm.password,callback:function(a){t.$set(t.accountForm,"password",a)},expression:"accountForm.password"}}),e("router-link",{staticStyle:{display:"none"},attrs:{to:"/forgotPassword"}},[t._v("忘记密码")])],1),e("div",{staticClass:"mar-b-15 text-center"},[e("el-button",{staticStyle:{width:"100%"},attrs:{loading:t.accountLoadingBtn,type:"primary"},on:{click:function(a){return t.accountLoginHandle()}}},[t._v("登录")])],1)])],1)],1)])},o=[function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"text-center"},[n("img",{attrs:{src:e("9d64"),alt:"",width:"100px"}})])}],c={name:"login",data:function(){return{SUCCESS_CODE:1,SSXT:"ssxt",activeName:"first",userName:"",userPassword:"",accountLoadingBtn:!1,codeLoadingBtn:!1,accountForm:{account:"admin",password:"111111"}}},mounted:function(){var t=document.getElementById("canvas"),a=t.getContext("2d"),e=window.innerWidth,n=window.innerHeight;t.width=e,t.height=n;for(var o=18,c=Math.floor(e/o),s=[],r=0;r=t.height&&Math.random()>.99?s[r]=0:s[r]++}}),30)},created:function(){"/login"===this.$route.path&&(localStorage.removeItem("token"),localStorage.removeItem("userInfo"),localStorage.removeItem("functions"))},methods:{accountLoginHandle:function(){return this.$message({type:"success",message:"登录成功"}),this.$router.push("/summarys/index"),!1},successFunc:function(t){var a=this;this.accountLoadingBtn=!0,this.$api.systemModule.login(t).then((function(t){if(t.data.retcode===a.SUCCESS_CODE){var e=t.data.data.phSessionToken;localStorage.setItem("token",e);var n={phSessionToken:e};a.$api.systemModule.userValidator(n).then((function(t){if(t.data.retcode===a.SUCCESS_CODE){var n=t.data.data;a.$store.dispatch("commitToken",e),localStorage.setItem("userInfo",JSON.stringify(n));var o={phSessionToken:e};a.queryUserAllInfo(o)}})).catch((function(t){console.log(t)}))}else 201===t.data.retcode?(a.accountLoadingBtn=!1,a.$message({type:"error",message:t.data.retmsg}),a.editPasswordWrapper=!0):(a.$message({type:"error",message:t.data.retmsg}),a.accountLoadingBtn=!1)})).catch((function(t){console.log(t),a.accountLoadingBtn=!1}))}}},s=c,r=(e("c2ca"),e("5511")),i=Object(r["a"])(s,n,o,!1,null,"6531407c",null);a["default"]=i.exports}}]);