(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7130ce44"],{"35b4":function(t,e,s){},"4b90":function(t,e,s){"use strict";s.d(e,"d",(function(){return i})),s.d(e,"b",(function(){return o})),s.d(e,"a",(function(){return r})),s.d(e,"c",(function(){return a}));let i="https://fxcszxhd.dgut.edu.cn",o=i+"/TestCenter/casLogin",r=i+"/TestCenter/XWgoLogin",a="https://dxyqgx.dgut.edu.cn/equipment"},b775:function(t,e,s){"use strict";s.d(e,"b",(function(){return n})),s.d(e,"a",(function(){return l}));var i=s("bc3a"),o=s("fa7d"),r=s("4b90");const a=i["a"].create({baseURL:r["d"]+"/TestCenter/HomePage",timeout:5e3});function n(t,e){return new Promise((e,s)=>{let i=null;t.el&&(i=Object(o["b"])(el,"加载中。。。")),a({method:t.method||"POST",url:t.url,data:t.data}).then(t=>{"200"==t.data.status?e(t.data):s(t)},t=>{s("请求失败，请刷新重试!")}).catch(()=>{s("请求失败，请刷新重试!")})})}let l={get:function(t,e,s){return n({method:"get",url:t,data:e})},post:function(t,e,s){return n({method:"post",url:t,data:e})}}},dc3f9:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"login-background"},[e("div",{staticClass:"login-box"},[e("div",{staticClass:"login-title"},[t._v("登录")]),t.rules.error.show?e("div",{staticClass:"tips-1"},[e("span",[t._v(t._s(t.rules.error.message))]),304==t.rules.error.status?e("router-link",{attrs:{to:"/password"}},[t._v("修改密码")]):t._e()],1):t._e(),e("div",{staticClass:"dialog-inner"},[e("div",{staticClass:"login-form"},[e("div",{staticClass:"form-item"},[e("svg",{staticClass:"el-input__icon el-icon-date",attrs:{slot:"prefix",t:"1668070586565",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2694",width:"200",height:"200"},slot:"prefix"},[e("path",{attrs:{d:"M512 590.75c-142.5 0-258.75-116.25-258.75-258.75s116.25-262.5 258.75-262.5 258.75 116.25 258.75 258.75-116.25 262.5-258.75 262.5zM512 144.5c-101.25 0-183.75 82.5-183.75 183.75s82.5 183.75 183.75 183.75 183.75-82.5 183.75-183.75-82.5-183.75-183.75-183.75z","p-id":"2695",fill:"#0B7342"}}),e("path",{attrs:{d:"M170.75 950.75c-18.75 0-37.5-15-37.5-37.5 0-7.5 0-11.25 0-15 0-210 172.5-382.5 382.5-382.5 22.5 0 37.5 15 37.5 37.5s-15 37.5-37.5 37.5c-168.75 0-307.5 138.75-307.5 307.5v11.25c0 22.5-18.75 41.25-37.5 41.25v0z","p-id":"2696",fill:"#0B7342"}}),e("path",{attrs:{d:"M853.25 947v0c-22.5 0-37.5-15-37.5-37.5v-11.25c0-168.75-138.75-307.5-307.5-307.5-22.5 0-37.5-15-37.5-37.5s15-37.5 37.5-37.5c210 0 382.5 172.5 382.5 382.5 0 3.75 0 7.5 0 11.25 0 22.5-15 37.5-37.5 37.5z","p-id":"2697",fill:"#0B7342"}})]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.loginForm.username,expression:"loginForm.username"}],attrs:{placeholder:"请输入账号"},domProps:{value:t.loginForm.username},on:{input:[function(e){e.target.composing||t.$set(t.loginForm,"username",e.target.value)},function(e){return t.input(e,"username")}],blur:t.blur}}),t.rules.username.show?e("div",{staticClass:"tips"},[t._v(t._s(t.rules.username.message))]):t._e()]),e("div",{staticClass:"form-item",staticStyle:{"margin-top":"30px"}},[e("svg",{staticClass:"el-input__icon el-icon-date",attrs:{slot:"prefix",t:"1668070814908",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4510",width:"200",height:"200"},slot:"prefix"},[e("path",{attrs:{d:"M288 384v-74.666667c0-123.722667 100.266667-224 224-224s224 100.224 224 224v74.666667h10.677333C811.445333 384 864 436.597333 864 501.333333v320c0 64.821333-52.469333 117.333333-117.322667 117.333334H277.333333C212.554667 938.666667 160 886.069333 160 821.333333V501.333333c0-64.821333 52.469333-117.333333 117.322667-117.333333H288z m64 0h320v-74.666667c0-88.426667-71.605333-160-160-160-88.384 0-160 71.626667-160 160v74.666667zM224 501.333333v320c0 29.397333 23.914667 53.333333 53.322667 53.333334H746.666667A53.269333 53.269333 0 0 0 800 821.333333V501.333333c0-29.397333-23.914667-53.333333-53.322667-53.333333H277.333333A53.269333 53.269333 0 0 0 224 501.333333z","p-id":"4511",fill:"#0B7342"}})]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.loginForm.password,expression:"loginForm.password"}],attrs:{placeholder:"请输入密码",type:"password"},domProps:{value:t.loginForm.password},on:{input:[function(e){e.target.composing||t.$set(t.loginForm,"password",e.target.value)},function(e){return t.input(e,"password")}],blur:t.blur}}),t.rules.password.show?e("div",{staticClass:"tips"},[t._v(t._s(t.rules.password.message))]):t._e()]),e("div",{staticClass:"form-item",staticStyle:{"margin-top":"30px"}},[e("div",{staticClass:"milstright"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.loginForm.vcode,expression:"loginForm.vcode"}],attrs:{placeholder:"请输入验证码"},domProps:{value:t.loginForm.vcode},on:{input:[function(e){e.target.composing||t.$set(t.loginForm,"vcode",e.target.value)},function(e){return t.input(e,"vcode")}],blur:t.blur}}),t.rules.vcode.show?e("div",{staticClass:"tips"},[t._v(t._s(t.rules.vcode.message))]):t._e()]),e("div",{staticClass:"milstright"},[e("img",{staticClass:"imglsit",attrs:{src:t.imgUrl,alt:"点我刷新"},on:{click:t.imgverification}})])])]),e("div",{staticClass:"footer"},[e("div",{staticClass:"bt",on:{click:t.toLogin}},[t._v("登录")])])])])])])},o=[],r=s("b775"),a=s("4b90"),n={data(){return{imgUrl:a["d"]+"/TestCenter/code",timer:null,login:{loginName:"",password:"",loginType:"",checked:!0},loginForm:{username:"",password:"",vcode:""},rules:{username:{show:!1,message:"请输入账号"},password:{show:!1,message:"请输入密码"},vcode:{show:!1,message:"请输入验证码"},error:{show:!1,message:"",status:""},mode:0}}},computed:{homePath(){return setting.homePath}},created(){1==this.$store.state.status&&this.toReturn()},mounted(){},methods:{toLoginCenter(){window.open("https://fxcszxdd.dgut.edu.cn/","_blank")},imgverification(){this.imgUrl=ProjectUrl+"/code??tim="+(new Date).getTime()},validate(){let t=!0;for(let e in this.rules)""==this.loginForm[e]&&(this.rules[e].show=!0,t=!1);return t},input(t,e){null!=this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.rules[e].show=!1},200)},blur(t){this.rules.error.show=!1},imgverification(){this.imgUrl=a["d"]+"/TestCenter/code??tim="+(new Date).getTime()},async toLogin(){if(this.validate()){var t={loginName:this.loginForm.username,password:this.loginForm.password,loginType:"manage",vcode:this.loginForm.vcode};""!=t.L001&&""!=t.L002&&r["a"].post(a["a"],t).then(t=>{"200"==t.status?(window.localStorage.setItem("token",t.data.token),window.localStorage.setItem("LoginMessage",JSON.stringify(t.data.loginMessage)),this.$store.commit("setToken",t.data.token),this.$store.commit("setUserInfo",t.data.loginMessage),this.toReturn()):(this.imgverification(),console.log("登录失败"))}).catch(t=>{304==t.data.status&&(window.sessionStorage.clear(),window.localStorage.clear(),window.localStorage.setItem("update_token",t.data.data.token),this.rules.error.status=304),this.rules.error.message=t.data.message,this.rules.error.show=!0,this.imgverification()})}},gologin(){this.errorTitle="",this.$refs.loginForm.validate(t=>{if(!t)return!1;this.$store.dispatch("user/login",this.login).then(t=>{window.localStorage.setItem("autoLogin",this.login.checked),this.redirect?this.$router.push(this.redirect):this.$router.push(this.homePath)}).catch(t=>{console.log(t),this.errorTitle=t.messageVo.message,"5006"!==t.messageVo.conNumber&&"5007"!==t.messageVo.conNumber||(this.remakeForm.key=t.data,this.remakeForm.loginName=this.login.loginName,this.remakeDialog=!0)})})},toReturn(){let t=(this.$route.query.url||"")+this.$route.hash;t?(-1==t.indexOf("http")&&(t="https://"+t),window.location.href=t):this.$router.push("/")}}},l=n,c=(s("f144"),s("2877")),u=Object(c["a"])(l,i,o,!1,null,null,null);e["default"]=u.exports},f144:function(t,e,s){"use strict";s("35b4")},fa7d:function(t,e,s){"use strict";s.d(e,"b",(function(){return o})),s.d(e,"a",(function(){return r}));var i=s("2b0e");function o(t,e="加载失败"){const s={functional:!0,props:["level","title","icon"],render(t,s){let i="1",o=t("h"+i,{attrs:{}},e);return o}};return new Promise((t,e)=>{this.$nextTick(()=>{i["default"].extend(s);t()})})}function r(t){let e=t;return t?(e=e.replace(/\s*/g,""),e=e.replace(/<[^>]+>/g,""),e=e.replace(/↵/g,""),e=e.replace(/[\r\n]/g,""),e=e.replace(/&nbsp;/g,""),e=e.replace(/\u0025/g,""),e):""}}}]);