IDCDatasync-vue/dist22-04-07/js/chunk-544f0e70.021a1bad.js

1 line
2.9 KiB
JavaScript
Raw Normal View History

2025-01-15 20:19:34 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-544f0e70"],{2814:function(e,a,s){"use strict";s("bdfa")},"977f":function(e,a,s){"use strict";s.r(a);var t=function(){var e=this,a=e.$createElement,s=e._self._c||a;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=s("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,a=this;a.loading=!0,this.form.validateFields((function(s,t){if(s)a.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(s){if(s.success){var t={username:e.userList.username};setTimeout((function(){a.$emit("nextStep",t)}),1500)}else e.passwordFailed(s.message),a.loading=!1}))}}))},prevStep:function(){this.$emit("prevStep",this.userList)},handlePasswordCheck:function(e,a,s){var t=this.form.getFieldValue("password");a&&t&&a.trim()!==t.trim()&&s(new Error("两次密码不一致")),s()},passwordFailed:function(e){this.$notification["error"]({message:"更改密码失败",description:e,duration:4})}}},n=i,l=(s("2814"),s("2877")),p=Object(l["a"])(n,t,r,!1,null,"7a375bd9",null);a["default"]=p.exports},bdfa:function(e,a,s){}}]);