| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d4845520"],{"07d8":function(e,t){e.exports="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAPAIMDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAII/8QAGhAAAQUBAAAAAAAAAAAAAAAAAAECElGh0f/EABUBAQEAAAAAAAAAAAAAAAAAAAAJ/8QAHREAAQMFAQAAAAAAAAAAAAAAAVGR8AACERIhYf/aAAwDAQACEQMRAD8A2tBtavRBtavSgWJyVLmo46hL2nsHZg2tXog2tXpQGSpc01CXtPYOzBtavRBtavSgMlS5pqEvaewdmDa1eiDa1elAZKlzTUJe09g7MG1q9EG1q9KAyVLmmoS9p7B2YNrV6INrV6UBkqXNNQl7T2DswbWr0QbWr0oDJUuaahL2nsHZg2tXog2tXpQGSpc01CXtPYOzBtavQUBkqXNNQl7T2Dv/2Q=="},"1d1d":function(e,t,o){e.exports=o.p+"978061e6b37737b696c2cdd88c6448da.png"},"21f2":function(e,t,o){"use strict";o.d(t,"b",(function(){return r})),o.d(t,"a",(function(){return l}));var a=o("24e5"),n=o.n(a),i="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\nnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ==",s="MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY\n7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN\nPuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA\nkM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow\ncSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv\nDQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh\nYhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3\nUP8iWi1Qw0Y=";function r(e){var t=new n.a;return t.setPublicKey(i),t.encrypt(e)}function l(e){var t=new n.a;return t.setPrivateKey(s),t.decrypt(e)}},bba2:function(e,t,o){"use strict";o("de10")},dd7b:function(e,t,o){"use strict";o.r(t);var a=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"login"},[a("div",{staticClass:"floating-component-left",staticStyle:{width:"100%",height:"30px",color:"#00549e"}},[a("span",{staticStyle:{cursor:"pointer",float:"left","margin-left":"5%","font-size":"19px"}},[a("img",{staticStyle:{"max-width":"260px","max-height":"90px"},attrs:{src:e.logo}})])]),a("div",{staticClass:"floating-component",staticStyle:{width:"100%",height:"30px",color:"#00549e"}},[a("el-dropdown",{staticStyle:{cursor:"pointer",float:"right","margin-right":"20px","font-size":"19px"},attrs:{trigger:"click"}},[a("span",{staticClass:"el-dropdown-link"},[a("div",{staticStyle:{float:"left"}},[e._v(e._s(e.$t("changeLanguage"))+" "),a("i",{staticClass:"el-icon-caret-bottom"})])]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.language,(function(t){return a("el-dropdown-item",{key:t.key,attrs:{disabled:t.key==e.chooseLanguage,label:t.value,value:t.key},nativeOn:{click:function(o){return e.handleChangeLanguage(t.key)}}},[e._v(e._s(t.value))])})),1)],1)],1),a("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules}},[a("div",{staticClass:"system-name",staticStyle:{"margin-bottom":"40px"}},[a("span",[a("img",{staticStyle:{width:"50px"},attrs:{src:o("07d8")}})]),a("span",[a("h1",[a("strong",[e._v(e._s(e.$t("hybtnLogin")))])])]),a("span",[a("h1",[a("strong",[e._v(e._s(e.$t("loginFormTitle2")))])])])]),a("el-form-item",{attrs:{prop:"username"}},[a("el-input",{staticClass:"inputDeep",attrs:{type:"text","auto-complete":"off",placeholder:this.$t("formAccountRules")},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}},[a("svg-icon",{staticClass:"el-input__icon input-icon",attrs:{slot:"prefix","icon-class":"user"},slot:"prefix"})],1)],1),a("el-form-item",{attrs:{prop:"password"}},[a("el-input",{staticClass:"inputDeep",attrs:{type:"password","auto-complete":"off",placeholder:this.$t("formPasswordRules")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin(t)}},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}},[a("svg-icon",{staticClass:"el-input__icon input-icon",attrs:{slot:"prefix","icon-class":"password"},slot:"prefix"})],1)],1),a("el-checkbox",{staticStyle:{margin:"0px 0px 25px 0px"},model:{value:e.loginForm.rememberMe,callback:function(t){e.$set(e.loginForm,"rememberMe",t)},expression:"loginForm.rememberMe"}},[e._v(e._s(e.$t("rememberPassword")))]),a("el-form-item",{staticStyle:{width:"100%"}},[a("el-button",{staticStyle:{width:"45%","background-color":"#5E83F6"},attrs:{loading:e.loading,size:"medium",type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin(t)}}},[e.loading?a("span",[e._v(e._s(e.$t("btnLogining")))]):a("span",[e._v(e._s(e.$t("btnLogin")))])])],1)],1),a("div",{staticClass:"bottom-div"},[a("span",[e._v(e._s(e.$t("loginFormTitle3")))])])],1)},n=[],i=(o("14d9"),o("d3b7"),o("ac1f"),o("3ca3"),o("5319"),o("ddb0"),o("7ded"),o("852e")),s=o.n(i),r=o("21f2"),l=o("7ba4"),g={name:"Login",components:{"change-langue":function(){return o.e("chunk-6d7bc89e").then(o.bind(null,"42c5"))}},data:function(){return{language:[{key:"zh-CN",value:"简体中文",id:"1"},{key:"en-US",value:"English",id:"2"},{key:"ru-RU",value:"Русский язык",id:"3"}],chooseLanguage:"",codeUrl:"",loginForm:{username:"",password:"",rememberMe:!1,code:"",uuid:"",type:""},logo:o("1d1d"),loginRules:{},loading:!1,captchaEnabled:!0,register:!1,redirect:void 0,imageWidth:300,imageHeight:200}},computed:{imageStyle:function(){return{width:"".concat(this.imageWidth,"px"),height:"".concat(this.imageHeight,"px")}}},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},created:function(){this.systemConfiguration(),this.getCookie(),this.loginForm.type="userLogin"},methods:{systemConfiguration:function(){var e=this;setTimeout((function(){Object(l["m"])({}).then((function(t){if(null!=t.data){""!=t.data.logo&&void 0!=t.data.logo&&null!=t.data.logo&&(e.logo=t.data.logo);var o=t.data,a=(o.webSocket,o.systemLanguage);s.a.get("flowinnIotLanguage");if(""!=a&&null!=a)for(var n=0;n<e.language.length;n++){var i=e.language[n];if(a==i.id){var r=s.a.get("flowinnIotLanguage");r!=i.key&&(e.chooseLanguage=i.key,s.a.set("flowinnIotLanguage",e.chooseLanguage,{expires:3e3}),e.setWebLanguage())}}else e.setWebLanguage()}}))}),500)},setWebLanguage:function(){var e=s.a.get("flowinnIotLanguage");if(null!=e&&""!=e&&void 0!=e)this.chooseLanguage=e;else{var t=(navigator.language||navigator.userLanguage).substring(0,2);null!=t&&""!=t&&void 0!=t&&(this.chooseLanguage=t)}"zh"==this.chooseLanguage||"zh-CN"==this.chooseLanguage?this.chooseLanguage="zh-CN":"zh-TW"==this.chooseLanguage?this.chooseLanguage="zh-TW":"ru-RU"==this.chooseLanguage?this.chooseLanguage="ru-RU":this.chooseLanguage="en-US";var o=(new Date).getTime(),a=o+94608e3;s.a.set("flowinnIotLanguage",this.chooseLanguage,{expires:a}),localStorage.setItem("language",this.chooseLanguage),this.$i18n.locale=this.chooseLanguage,document.title=this.$i18n.t("loginFormTitle").replace("PDU",""),window.location.reload()},handleChangeLanguage:function(e){for(var t=this,o=0;o<this.language.length;o++){var a=this.language[o];if(e==a.key){var n={};return n.lang=a.key,void Object(l["b"])(n).then((function(o){"200"==o.code?(t.chooseLanguage=e,s.a.set("flowinnIotLanguage",t.chooseLanguage,{expires:3e4}),t.setWebLanguage(),window.location.reload(),console.info("change-language:"+value)):t.$modal.msgError(t.$t("qhsb"))}))}}},getCode:function(){},getCookie:function(){var e=s.a.get("username"),t=s.a.get("password"),o=s.a.get("rememberMe");this.loginForm={username:void 0===e?this.loginForm.username:e,password:void 0===t?this.loginForm.password:Object(r["a"])(t),rememberMe:void 0!==o&&Boolean(o)}},handleLogin:function(){var e=this;this.$refs.loginForm.validate((function(t){t&&(e.loading=!0,e.loginForm.rememberMe?(s.a.set("username",e.loginForm.username,{expires:30}),s.a.set("password",Object(r["b"])(e.loginForm.password),{expires:30}),s.a.set("rememberMe",e.loginForm.rememberMe,{expires:30})):(s.a.remove("username"),s.a.remove("password"),s.a.remove("rememberMe")),console.log(e.loginForm),e.$store.dispatch("Login",e.loginForm).then((function(){e.$router.push({path:e.redirect||"/"}).catch((function(){}))})).catch((function(){e.loading=!1,e.captchaEnabled&&e.getCode()})))}))}}},A=g,c=(o("bba2"),o("2877")),u=Object(c["a"])(A,a,n,!1,null,null,null);t["default"]=u.exports},de10:function(e,t,o){}}]);
|