(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-cc3d02d4"],{
/***/"0bcd":
/***/function(e,t,o){"use strict";
/* harmony import */o("819e");
/* harmony import */},
/***/"819e":
/***/function(e,t,o){
// extracted by mini-css-extract-plugin
/***/},
/***/8409:
/***/function(e,t,o){"use strict";
/* harmony import */o("e3dd");
/* harmony import */},
/***/a351:
/***/function(e,t,o){"use strict";
// ESM COMPAT FLAG
o.r(t);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
o("b0c0");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"411544a2-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/login/LoginPhone.vue?vue&type=template&id=c76485a4&scoped=true
var s=o("5530"),a=(o("14d9"),o("d808")),r=o("93d6"),i=o("b775"),n=o("2f62"),c=o("8237"),l=o.n(c),g={name:"Login",i18n:o("89fe"),components:{CommonLayout:a.a},data:function(){return{logging:!1,error:"",form:this.$form.createForm(this)}},created:function(){if(this.isMobile){var e=localStorage.getItem("phoneUser"),t=localStorage.getItem("phonePassword");e&&t&&this.autoLogin(e,t)}else this.$router.push("/login")},computed:Object(s.a)(Object(s.a)({},Object(n.e)("setting",["langList","isMobile","lang"])),{},{systemName:function(){return this.$store.state.setting.systemName},systemLogo:function(){return this.$store.state.setting.SystemLogo}}),methods:Object(s.a)(Object(s.a)(Object(s.a)({},Object(n.d)("setting",["setLang"])),Object(n.d)("account",["setUser","setPermissions","setRoles"])),{},{autoLogin:function(e,t){var o=this,s=e,a=t;Object(r.k)(s,a).then(this.afterLogin).catch((function(){o.logging=!1,o.$message.error(o.$t("loginPage.serverError"),3)}))},onSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields((function(e){if(!e){t.logging=!0;var o=t,s=t.form.getFieldValue("name"),a=l()(t.form.getFieldValue("password"));localStorage.setItem("phoneUser",s),localStorage.setItem("phonePassword",a),Object(r.k)(s,a).then(t.afterLogin).catch((function(){o.logging=!1,localStorage.removeItem("phoneUser"),localStorage.removeItem("phonePassword"),o.$message.error(o.$t("loginPage.serverError"),3)}))}}))},afterLogin:function(e){this.logging=!1;var t=e.data;if(1e3==t.code){var o=t.data,s=o.user,a=o.roles;this.setUser(s),this.setRoles(a),Object(i.h)({token:t.data.token,expireAt:t.data.expireAt}),"User"==a[0].id?(Object(i.h)({token:s.ProjectUUID},i.a.AUTH1),this.$router.push("/UserDisplayList/"+s.Uuid),this.$message.success(this.$t("loginPage.logonSuccess"),3)):(localStorage.removeItem("phoneUser"),localStorage.removeItem("phonePassword"),this.$message.error(this.$t("loginPage.userLoginTips"),3))}else localStorage.removeItem("phoneUser"),localStorage.removeItem("phonePassword"),this.$message.error(this.$t("loginPage.logonFailed"),3)}})},m=(o("8409"),o("2877")),u=Object(m.a)(g,(function(){var e=this,t=e._self._c;return t("common-layout",[t("div",{staticClass:"top"},[t("div",{staticClass:"header"},[t("img",{staticClass:"logo",attrs:{alt:"logo",src:e.systemLogo}})])]),t("div",{staticClass:"login"},[t("a-form",{attrs:{form:e.form},on:{submit:e.onSubmit}},[t("a-tabs",{staticStyle:{padding:"0 2px"},attrs:{size:"large",tabBarStyle:{textAlign:"center"}}},[t("a-tab-pane",{key:"1",attrs:{tab:"登录"}},[t("a-alert",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticStyle:{"margin-bottom":"24px"},attrs:{type:"error",closable:!0,message:e.error,showIcon:""}}),t("a-form-item",[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:e.$t("loginPage.logonUserTips"),whitespace:!0}]}],expression:"['name', {rules: [{ required: true, message:  $t('loginPage.logonUserTips'), whitespace: true}]}]"}],staticClass:"form-control",attrs:{autocomplete:"autocomplete",size:"large"}},[t("a-icon",{staticStyle:{position:"absolute",right:"-15px",color:"#13c2c2","font-size":"20px"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),t("a-form-item",[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:e.$t("loginPage.logonPasswordTips"),whitespace:!0}]}],expression:"['password', {rules: [{ required: true, message: $t('loginPage.logonPasswordTips'), whitespace: true}]}]"}],staticClass:"form-control",attrs:{size:"large",autocomplete:"autocomplete",type:"password"}},[t("a-icon",{staticStyle:{position:"absolute",right:"-15px",color:"#13c2c2","font-size":"20px"},attrs:{slot:"prefix",type:"lock",size:"large"},slot:"prefix"})],1)],1)],1)],1),t("a-form-item",[t("a-button",{staticClass:"login",staticStyle:{width:"100%","margin-top":"2px"},attrs:{loading:e.logging,size:"large",htmlType:"submit",type:"primary"}},[e._v(e._s(e.$t("loginPage.logonBtn")))])],1)],1),t("div",[t("a-breadcrumb",e._l(e.langList,(function(o){return t("a-breadcrumb-item",{key:o.key},[t("a",{on:{click:function(t){return e.setLang(o.key)}}},[e._v(e._s(o.name))])])})),1)],1)],1)])}),[],!1,null,"c76485a4",null)
/* harmony default export */;t.default=u.exports},
/***/d808:
/***/function(e,t,o){"use strict";
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"411544a2-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/layouts/CommonLayout.vue?vue&type=template&id=63c094a6&scoped=true
var s=o("5530"),a=o("613e"),r=o("2f62"),i={name:"CommonLayout",components:{PageFooter:a.a},computed:Object(s.a)({},Object(r.e)("setting",["footerLinks","copyright"]))},n=(o("0bcd"),o("2877")),c=Object(n.a)(i,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"common-layout"},[t("div",{staticClass:"content"},[e._t("default")],2),t("page-footer",{attrs:{"link-list":e.footerLinks,copyright:e.copyright}})],1)}),[],!1,null,"63c094a6",null)
/* harmony default export */;t.a=c.exports},
/***/e3dd:
/***/function(e,t,o){
// extracted by mini-css-extract-plugin
/***/}}]);