chunk-b8e74848.f177ca23.js 2.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b8e74848"],{"2c14":function(e,s,a){},f4c1:function(e,s,a){"use strict";a("2c14")},f6d9:function(e,s,a){"use strict";a.r(s);var t=function(){var e=this,s=e._self._c;return s("div",[s("a-form",{staticStyle:{"max-width":"500px",margin:"40px auto 0"},attrs:{form:e.form}},[s("a-form-item",{attrs:{label:"账号名",labelCol:{span:5},wrapperCol:{span:19}}},[s("a-input",{attrs:{type:"text",autocomplete:"false",value:e.accountName,disabled:""}})],1),s("a-form-item",{staticClass:"stepFormText",attrs:{label:"新密码",labelCol:{span:5},wrapperCol:{span:19}}},[s("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",e.validatorRules.password],expression:"['password',validatorRules.password]"}],attrs:{type:"password",autocomplete:"false"}})],1),s("a-form-item",{staticClass:"stepFormText",attrs:{label:"确认密码",labelCol:{span:5},wrapperCol:{span:19}}},[s("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["confirmPassword",e.validatorRules.confirmPassword],expression:"['confirmPassword',validatorRules.confirmPassword]"}],attrs:{type:"password",autocomplete:"false"}})],1),s("a-form-item",{attrs:{wrapperCol:{span:19,offset:5}}},[s("a-button",{staticStyle:{"margin-left":"8px"},on:{click:e.prevStep}},[e._v("上一步")]),s("a-button",{staticStyle:{"margin-left":"20px"},attrs:{loading:e.loading,type:"primary"},on:{click:e.nextStep}},[e._v("提交")])],1)],1)],1)},r=[],o=a("0fea"),i={name:"Step3",props:["userList"],data:function(){return{loading:!1,form:this.$form.createForm(this),accountName:this.userList.username,validatorRules:{username:{rules:[{required:!0,message:"用户名不能为空!"}]},password:{rules:[{required:!0,pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/,message:"密码由8位数字、大小写字母和特殊符号组成!!"},{validator:this.handlePasswordLevel}]},confirmPassword:{rules:[{required:!0,message:"密码不能为空!"},{validator:this.handlePasswordCheck}]}}}},methods:{nextStep:function(){var e=this,s=this;s.loading=!0,this.form.validateFields((function(a,t){if(a)s.loading=!1;else{var r={};r.username=e.userList.username,r.password=t.password,r.smscode=e.userList.smscode,r.phone=e.userList.phone,Object(o["c"])("/sys/user/passwordChange",r).then((function(a){if(a.success){var t={username:e.userList.username};setTimeout((function(){s.$emit("nextStep",t)}),1500)}else e.passwordFailed(a.message),s.loading=!1}))}}))},prevStep:function(){this.$emit("prevStep",this.userList)},handlePasswordCheck:function(e,s,a){var t=this.form.getFieldValue("password");s&&t&&s.trim()!==t.trim()&&a(new Error("两次密码不一致")),a()},passwordFailed:function(e){this.$notification["error"]({message:"更改密码失败",description:e,duration:4})}}},n=i,l=(a("f4c1"),a("2877")),p=Object(l["a"])(n,t,r,!1,null,"1bbf13ad",null);s["default"]=p.exports}}]);