/* empty css                                                              */import{n as a}from"./vueComponentNormalizer.9ef17bb1.js";import{F as i}from"./FormLayout.c7820bdd.js";/* empty css                                                    */import{D as l}from"./DialogLayout.e3af3567.js";/* empty css                                                               *//* empty css                                                                   */import{g as n}from"./user.529e3486.js";import"./ActionBar.1725b1a3.js";/* empty css                                                     */import"./index.51e15757.js";var m=function(){var r=this,t=r.$createElement,o=r._self._c||t;return o("DialogLayout",{attrs:{title:"\u4FEE\u6539\u5BC6\u7801",visible:r.$store.update_password_dialog.visible},on:{onCancel:r.onClose,onConfirm:r.onConfirm}},[o("FormLayout",{ref:"formLayoutRef",staticClass:"mr-12",attrs:{items:r.form_items,model:r.form_data,rules:r.rules,"label-width":"100px","label-position":"right"}})],1)},d=[];const p={components:{DialogLayout:l,FormLayout:i},data:()=>({form_data:null}),created(){this.form_data={oldPassword:"",password:"",confirmPassword:""},this.form_items=[{prop:"oldPassword",label:"\u65E7\u5BC6\u7801",model:{tag:"el-input",type:"password",attrs:{maxlength:12}}},{prop:"password",label:"\u65B0\u5BC6\u7801",model:{tag:"el-input",type:"password",attrs:{maxlength:12,placeholder:"6-12\u4F4D\u5B57\u6BCD\u52A0\u6570\u5B57"}}},{prop:"confirmPassword",label:"\u786E\u8BA4\u5BC6\u7801",model:{tag:"el-input",type:"password",attrs:{maxlength:12}}}];const r=(t,o,s)=>/^(?![0-9]+$)(?![a-zA-Z]+$)[a-zA-Z0-9]{6,12}$/.test(o)?s():s(Error());this.rules={oldPassword:{required:!0,message:"\u65E7\u5BC6\u7801\u8F93\u5165\u4E0D\u5408\u6CD5",trigger:"blur"},password:{required:!0,validator:r,message:"\u65B0\u5BC6\u7801\u8F93\u5165\u4E0D\u5408\u6CD5",trigger:"blur"},confirmPassword:{required:!0,validator:r,message:"\u786E\u8BA4\u5BC6\u7801\u8F93\u5165\u4E0D\u5408\u6CD5",trigger:"blur"}}},methods:{async onConfirm(){await this.$refs.formLayoutRef.validate(),await n(this.form_data),this.$message.success("\u5BC6\u7801\u4FEE\u6539\u6210\u529F"),this.$store.logout()},onClose(){this.$store.update_password_dialog.visible=!1}}},e={};var u=a(p,m,d,!1,f,null,null,null);function f(r){for(let t in e)this[t]=e[t]}const x=function(){return u.exports}();export{x as default};
