(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b388bcc4"],{"09e0":function(t,e,s){"use strict";s("2fc6")},"2fc6":function(t,e,s){},"9ed6":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"login-container"},[s("div",{staticClass:"animated-bg"},[s("div",{staticClass:"particles"},t._l(15,(function(e){return s("div",{key:e,staticClass:"particle",style:t.getParticleStyle(e)})})),0),t._m(0)]),s("div",{staticClass:"login-wrapper"},[t._m(1),s("div",{staticClass:"form-section"},[s("div",{staticClass:"login-form-wrapper"},[t._m(2),s("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:t.loginForm,rules:t.loginRules},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleLogin(e)}}},[s("el-form-item",{attrs:{prop:"account"}},[s("el-input",{ref:"account",attrs:{placeholder:t.$t("login.username"),name:"account",type:"text",tabindex:"1",autocomplete:"on",size:"large","prefix-icon":"el-icon-user"},model:{value:t.loginForm.account,callback:function(e){t.$set(t.loginForm,"account",e)},expression:"loginForm.account"}})],1),s("el-form-item",{attrs:{prop:"password"}},[s("el-input",{ref:"password",attrs:{type:t.passwordType,placeholder:t.$t("login.password"),name:"password",tabindex:"2",autocomplete:"on",size:"large","prefix-icon":"el-icon-lock"},model:{value:t.loginForm.password,callback:function(e){t.$set(t.loginForm,"password",e)},expression:"loginForm.password"}},[s("i",{staticClass:"show-pwd",class:"password"===t.passwordType?"el-icon-view":"el-icon-hide",attrs:{slot:"suffix"},on:{click:t.showPwd},slot:"suffix"})])],1),s("el-button",{staticClass:"login-btn",attrs:{loading:t.loading,type:"primary",size:"large"},nativeOn:{click:function(e){return e.preventDefault(),t.handleLogin(e)}}},[t._v("\n "+t._s(t.loading?"登录中...":t.$t("login.logIn"))+"\n ")])],1),t._m(3)],1)])])])},a=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"gradient-waves"},[s("div",{staticClass:"wave wave-1"}),s("div",{staticClass:"wave wave-2"}),s("div",{staticClass:"wave wave-3"})])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"brand-section"},[s("div",{staticClass:"brand-content"},[s("div",{staticClass:"system-section"},[s("h1",{staticClass:"system-title"},[t._v("绿纤ERP")]),s("p",{staticClass:"system-desc"},[t._v("智能化企业资源管理平台")])]),s("div",{staticClass:"data-visualization"},[s("div",{staticClass:"chart-container"},[s("div",{staticClass:"chart-item"},[s("div",{staticClass:"chart-bar",staticStyle:{height:"60%"}}),s("div",{staticClass:"chart-bar",staticStyle:{height:"80%"}}),s("div",{staticClass:"chart-bar",staticStyle:{height:"45%"}}),s("div",{staticClass:"chart-bar",staticStyle:{height:"90%"}}),s("div",{staticClass:"chart-bar",staticStyle:{height:"70%"}})]),s("p",{staticClass:"chart-label"},[t._v("实时数据分析")])])]),s("div",{staticClass:"core-feature"},[s("div",{staticClass:"feature-highlight"},[s("i",{staticClass:"el-icon-s-data"}),s("span",[t._v("数据驱动决策")])])])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"form-header"},[s("h2",[t._v("欢迎登录")]),s("p",[t._v("请输入您的账号信息")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"footer"},[s("p",[t._v("© 2024 绿纤ERP. All rights reserved.")])])}],o=(s("ac6a"),s("456d"),{name:"Login",data:function(){return{loginForm:{account:"",password:"",hospitalname:""},loginRules:{account:[{required:!0,trigger:"blur",message:this.$t("login.accountTip")}],password:[{required:!0,trigger:"blur",message:this.$t("login.passwordTip")}]},passwordType:"password",capsTooltip:!1,loading:!1,showDialog:!1,redirect:void 0,otherQuery:{}}},computed:{loginLoading:function(){return this.$store.state.user.loginLoading}},watch:{loginLoading:function(t){t||(this.loading=!1)},$route:{handler:function(t){var e=t.query;e&&(this.redirect=e.redirect)},immediate:!0}},created:function(){},mounted:function(){this.handlemyLogin()},destroyed:function(){document.onkeydown=function(t){t.keyCode}},methods:{getParticleStyle:function(t){var e=4*Math.random()+2,s=100*Math.random(),i=20*Math.random(),a=10*Math.random()+15;return{width:"".concat(e,"px"),height:"".concat(e,"px"),left:"".concat(s,"%"),animationDelay:"".concat(i,"s"),animationDuration:"".concat(a,"s")}},showPwd:function(){var t=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){t.$refs.password.focus()}))},checkCapslock:function(t){var e=t.key;this.capsTooltip=e&&1===e.length&&e>="A"&&e<="Z"},handleLogin:function(){var t=this;this.loading||this.$refs.loginForm.validate((function(e){if(!e)return!1;t.loading=!0,t.$store.commit("user/SET_LOGIN_LOADING",!0),t.$store.dispatch("user/login",t.loginForm).then((function(){t.$router.push({path:t.redirect||"/home",query:t.otherQuery})})).catch((function(){t.$store.commit("user/SET_LOGIN_LOADING",!1)}))}))},handlemyLogin:function(){var t=this;if(console.log("开始执行单点登录!"),!this.loading){var e=this.$route.query.username,s=this.$route.query.hospitalname;console.log("username:"+e),null!=e&&""!=e&&(this.loginForm.account=e,this.loginForm.hospitalname=s,this.loading=!0,this.$store.commit("user/SET_LOGIN_LOADING",!0),this.$store.dispatch("user/pislogin",this.loginForm).then((function(){t.$router.push({path:t.redirect||"/home",query:t.otherQuery})})).catch((function(){t.$store.commit("user/SET_LOGIN_LOADING",!1)})))}},getOtherQuery:function(t){return Object.keys(t).reduce((function(e,s){return"redirect"!==s&&(e[s]=t[s]),e}),{})}}}),n=o,r=(s("09e0"),s("2877")),c=Object(r["a"])(n,i,a,!1,null,"5f8a748e",null);e["default"]=c.exports}}]);