(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f2a525d2","chunk-a3dc9a12"],{"04ab":function(e,t,s){},"18f1":function(e,t,s){"use strict";s.r(t);var r=function(){var e=this,t=e._self._c;return t("div",[t("el-dialog",{staticStyle:{"border-radius":"15px"},attrs:{title:"注册",visible:e.centerDialogVisible,width:"50%",left:""},on:{"update:visible":function(t){e.centerDialogVisible=t}}},[t("el-card",[t("el-row",{attrs:{gutter:10}},[t("el-col",{attrs:{span:24}},[t("el-form",{ref:"regisiForm",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[t("el-row",{attrs:{gutter:10}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"用户名:",prop:"user_name"}},[t("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini"},model:{value:e.form.user_name,callback:function(t){e.$set(e.form,"user_name",t)},expression:"form.user_name"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"密码:",prop:"user_password"}},[t("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini",type:"password"},model:{value:e.form.user_password,callback:function(t){e.$set(e.form,"user_password",t)},expression:"form.user_password"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"企业名称:",prop:"companyName"}},[t("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini"},model:{value:e.form.companyName,callback:function(t){e.$set(e.form,"companyName",t)},expression:"form.companyName"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"姓名:",prop:"name"}},[t("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"联系方式:",prop:"phone"}},[t("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini"},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"部门:",prop:"department"}},[t("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini"},model:{value:e.form.department,callback:function(t){e.$set(e.form,"department",t)},expression:"form.department"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"职位:",prop:"job"}},[t("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini"},model:{value:e.form.job,callback:function(t){e.$set(e.form,"job",t)},expression:"form.job"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"了解渠道:",prop:"konwlage"}},[t("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini"},model:{value:e.form.konwlage,callback:function(t){e.$set(e.form,"konwlage",t)},expression:"form.konwlage"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"用途:",prop:"usetype"}},[t("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini",placeholder:"交流/学习/供应商与采购/其他"},model:{value:e.form.usetype,callback:function(t){e.$set(e.form,"usetype",t)},expression:"form.usetype"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"留言:",prop:"message"}},[t("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini",type:"textarea",rows:"2"},model:{value:e.form.message,callback:function(t){e.$set(e.form,"message",t)},expression:"form.message"}})],1)],1)],1)],1)],1)],1)],1),t("el-row",{staticStyle:{"margin-top":"15px"},attrs:{gutter:10,type:"flex",justify:"center"}},[t("el-col",{attrs:{span:6}},[t("el-button",{attrs:{type:"primary"},on:{click:e.toLogin}},[e._v("去登录")]),t("el-button",{attrs:{type:"success"},on:{click:e.regist}},[e._v("注册")])],1)],1)],1)],1)},i=[],o=s("7884"),a={data(){return{centerDialogVisible:!1,form:{},rules:{user_name:[{required:!0,message:"用户名不能为空",trigger:"blur"}],user_password:[{required:!0,message:"密码不能为空",trigger:"blur"}],companyName:[{required:!0,message:"企业名称不能为空",trigger:"blur"}],phone:[{required:!0,message:"联系方式不能为空",trigger:"blur"},{pattern:/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,message:"请输入正确的格式"}],name:[{required:!0,message:"姓名不能为空",trigger:"blur"}],department:[{required:!0,message:"部门不能为空",trigger:"blur"}],job:[{required:!0,message:"职位不能为空",trigger:"blur"}],konwlage:[{required:!0,message:"了解渠道不能为空",trigger:"blur"}],usetype:[{required:!0,message:"用途不能为空",trigger:"blur"}]}}},methods:{show(){this.centerDialogVisible=!0},regist(){this.$refs["regisiForm"].validate(e=>{e&&(this.form.date=new Date,this.form.status="0",this.form.blongCompanyCode="W"+Date.parse(new Date).toString(),Object(o["b"])(this.form).then(e=>{console.log(e),200==e.code?(this.$message({type:"success",message:"注册成功"}),this.centerDialogVisible=!1):this.$message({type:"warning",message:e.message})}).catch(e=>{}))})},toLogin(){this.centerDialogVisible=!1}}},n=a,l=(s("706f"),s("1805")),m=Object(l["a"])(n,r,i,!1,null,"3467f0c8",null);t["default"]=m.exports},"706f":function(e,t,s){"use strict";s("d515")},7884:function(e,t,s){"use strict";s.d(t,"a",(function(){return a})),s.d(t,"b",(function(){return n}));var r=s("751a"),i=s("01ea");const{basePath:o}=i["a"];function a(e){return Object(r["b"])("/login",{params:e})}function n(e){return Object(r["b"])("/regist",{params:e})}},adec:function(e,t,s){"use strict";s("c7c5")},bd8f:function(e,t,s){"use strict";s("04ab")},c7c5:function(e,t,s){},cb48:function(e,t,s){"use strict";s.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"login"},[t("div",{staticClass:"content"},[t("div",{staticClass:"left"}),t("div",{staticClass:"right"},[t("div",{staticClass:"right-box"},[t("div",{staticClass:"f-title"},[e._v("碳资产管理系统")]),t("el-form",{ref:"form",attrs:{"label-position":"top","label-width":"80px",model:e.form,rules:e.rules,size:"medium"}},[t("el-form-item",{attrs:{label:"用户名",prop:"userName"}},[t("el-input",{attrs:{placeholder:"请输入用户名"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}},[t("i",{staticClass:"el-input__icon el-icon-user",attrs:{slot:"prefix"},slot:"prefix"})])],1),t("el-form-item",{attrs:{label:"密码",prop:"user_password"}},[t("div",{staticClass:"p-box"},[t("el-input",{attrs:{placeholder:"请输入密码","show-password":""},model:{value:e.form.user_password,callback:function(t){e.$set(e.form,"user_password",t)},expression:"form.user_password"}},[t("i",{staticClass:"el-input__icon el-icon-lock",attrs:{slot:"prefix"},slot:"prefix"})])],1)]),e.show?t("el-form-item",{attrs:{label:"验证码",prop:"verCode"}},[t("div",{staticClass:"v-box"},[t("el-input",{staticClass:"v-input",attrs:{placeholder:"验证码"},model:{value:e.form.verCode,callback:function(t){e.$set(e.form,"verCode",t)},expression:"form.verCode"}}),t("div",{on:{click:e.refreshCode}},[t("SIdentify",{attrs:{identifyCode:e.identifyCode}})],1)],1)]):e._e(),t("el-form-item",[t("p",{staticClass:"errorMsg"},[e._v(e._s(e.msg))]),t("el-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:e.login}},[e._v("登录")])],1)],1)],1),t("div",{staticClass:"icon"})])]),t("regist",{ref:"regist"})],1)},i=[],o=(s("fcd3"),s("7884")),a=s("18f1"),n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"s-canvas"},[t("canvas",{attrs:{id:"s-canvas",width:e.contentWidth,height:e.contentHeight}})])},l=[],m={name:"SIdentify",props:{identifyCode:{type:String,default:"1234"},fontSizeMin:{type:Number,default:25},fontSizeMax:{type:Number,default:30},backgroundColorMin:{type:Number,default:255},backgroundColorMax:{type:Number,default:255},colorMin:{type:Number,default:0},colorMax:{type:Number,default:160},lineColorMin:{type:Number,default:100},lineColorMax:{type:Number,default:255},dotColorMin:{type:Number,default:0},dotColorMax:{type:Number,default:255},contentWidth:{type:Number,default:112},contentHeight:{type:Number,default:31}},methods:{randomNum(e,t){return Math.floor(Math.random()*(t-e)+e)},randomColor(e,t){let s=this.randomNum(e,t),r=this.randomNum(e,t),i=this.randomNum(e,t);return"rgb("+s+","+r+","+i+")"},drawPic(){let e=document.getElementById("s-canvas"),t=e.getContext("2d");t.textBaseline="bottom",t.fillStyle=this.randomColor(this.backgroundColorMin,this.backgroundColorMax),t.fillRect(0,0,this.contentWidth,this.contentHeight);for(let s=0;s{if(!e)return!1;this.identifyCode==this.form.verCode?(this.msg="",Object(o["a"])(this.form).then(e=>{200==e.code?(this.$router.push("/"),this.$store.dispatch("setUserInfo",e.data[0]),sessionStorage.setItem("token",e.token)):this.msg=e.message})):this.msg="验证码不正确"})}}},h=p,g=(s("adec"),Object(c["a"])(h,r,i,!1,null,"2098cfb6",null));t["default"]=g.exports},d515:function(e,t,s){}}]);