(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c370c73c"],{"98e4":function(t,e,s){},a55b:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"view"},[t._m(0),e("b-form",{staticClass:"form"},[e("b-form-group",{staticStyle:{"margin-bottom":".5rem"},attrs:{label:"账号","label-for":"input-1","label-cols":"2"}},[e("b-form-input",{staticClass:"inp",staticStyle:{height:"3rem","font-size":"1.1rem","font-weight":"500","letter-spacing":"0.1rem",color:"#fff"},attrs:{id:"input-1",required:"",placeholder:"请输入账号"},model:{value:t.form.account,callback:function(e){t.$set(t.form,"account",e)},expression:"form.account"}})],1),e("b-form-group",{staticStyle:{"margin-bottom":".5rem"},attrs:{label:"密码","label-for":"input-2","label-cols":"2"}},[e("b-form-input",{staticClass:"inp",staticStyle:{height:"3rem","font-size":"1.1rem","font-weight":"500","letter-spacing":"0.1rem"},attrs:{id:"input-2",type:"password",autocomplete:"off",required:"",placeholder:"请输入密码"},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),e("b-form-group",{staticStyle:{margin:".5rem 0"},attrs:{label:"所属站点","label-for":"input-3","label-cols":"4"}},[e("b-form-select",{staticClass:"inp",staticStyle:{height:"3rem",width:"100%",padding:"0 0 0 0.5rem","font-size":"1.1rem","font-weight":"500","letter-spacing":"0.1rem"},attrs:{id:"input-3",options:t.siteList,required:"",placeholder:"请选择站点"},on:{change:t.handleChangeSite},model:{value:t.form.site,callback:function(e){t.$set(t.form,"site",e)},expression:"form.site"}})],1),e("div",{staticClass:"btn_login",staticStyle:{width:"100%","margin-top":"2rem"},on:{click:t.onSubmit}},[e("span",{staticStyle:{color:"#ffffff","font-family":"PingFangSC-Medium, sans-serif","text-shadow":"1px 1px 1px #4FC9F2","letter-spacing":"2px","font-size":"1.2rem"}},[t._v("登录")])])],1)],1)},o=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"header"},[e("img",{attrs:{src:s("c0d8")}})])}],a={data(){return{form:{account:"",password:"",site:"",site_show:""},siteList:[]}},mounted(){const t={url:"http://121.36.142.167:7774/jbl/api/site/all/ignore-action?_allow_anonymous=true"};this.axios.post("/api/testdwyget",t).then(t=>{t.data.forEach(t=>{t.text=t.name,t.value=t.code}),this.siteList=t.data})},methods:{handleChangeSite(t){this.form.site_show=this.siteList.find(e=>e.code===t).name},onSubmit(){const t={post:{name:this.form.account,password:this.form.password,rememberMe:!0},url:"http://121.36.142.167:7774/jbl/api/mes/login",header:["Content-Type:application/json"]};this.axios.post("/api/testdwy",t).then(t=>{if(200===t.code){if("error"===t.data.status)return this.$Message.error(t.data.errorMessage);if(-1===t.data.userDto.roleNames.indexOf("ROLE_HARDWARE"))return this.$Message.error("用户无权访问!");this.$Message.success(t.msg),localStorage.setItem("site",JSON.stringify({site:this.form.site,site_show:this.form.site_show})),localStorage.setItem("token",t.data.token),localStorage.setItem("userDto",JSON.stringify(t.data.userDto)),this.$router.push("/cms/home")}})}}},r=a,n=(s("f361"),s("2877")),l=Object(n["a"])(r,i,o,!1,null,"01207502",null);e["default"]=l.exports},c0d8:function(t,e,s){t.exports=s.p+"static/img/home_title.9a7ca220.png"},f361:function(t,e,s){"use strict";s("98e4")}}]);