You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
1.9 KiB
1 lines
1.9 KiB
import{d as E,ar as f,r as w,ag as _,n as b,o as P,b as V,a as o,w as n,f as s,g as F,j as h,F as x,E as U,ai as B,aj as C,G as j,_ as q}from"./index-b0696d90.js";import{q as I}from"./index-de32b8dd.js";const N={class:"dialog-footer"},R=E({__name:"editpwd",props:{tabsid:{type:String,default:"1"},usercont:{type:Object,default(){return{}}}},setup(c){const i=c,e=f({id:"",pwd:"",pwdes:""}),l=w(_),d=w(!1),m=f({pwd:[{required:!0,validator:(r,t,a)=>{if(t==="")a(new Error("请输入新密码"));else{if(e.pwdes!==""){if(!l.value)return;l.value.validateField("pwdes",()=>null)}a()}},trigger:"blur"}],pwdes:[{required:!0,validator:(r,t,a)=>{t===""?a(new Error("请确认新密码")):t!==e.pwd?a(new Error("两次输入不匹配!")):a()},trigger:"blur"}]});b(()=>i.tabsid,()=>{i.tabsid=="12"&&(e.id=i.usercont.keystr.toString())});const v=()=>{d.value=!0,l.value.validate(r=>{r?I(e).then(()=>{U.success("修改成功"),l.value.resetFields()}).finally(()=>{d.value=!1}):d.value=!1})};return(r,t)=>{const a=B,u=C,g=_,y=j;return P(),V(x,null,[o(g,{ref_key:"editUserPwdFormRef",ref:l,model:s(e),rules:s(m),"label-width":"120px"},{default:n(()=>[o(u,{label:"新密码",prop:"pwd"},{default:n(()=>[o(a,{modelValue:s(e).pwd,"onUpdate:modelValue":t[0]||(t[0]=p=>s(e).pwd=p),type:"password",placeholder:"请输入新密码","show-password":"",clearable:"",autocomplete:"off"},null,8,["modelValue"])]),_:1}),o(u,{label:"确认新密码",prop:"pwdes"},{default:n(()=>[o(a,{modelValue:s(e).pwdes,"onUpdate:modelValue":t[1]||(t[1]=p=>s(e).pwdes=p),type:"password",placeholder:"请确认新密码","show-password":"",clearable:"",autocomplete:"off"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"]),F("div",N,[o(y,{type:"primary",loading:s(d),style:{width:"50%"},onClick:v},{default:n(()=>[h("确 定")]),_:1},8,["loading"])])],64)}}});const M=q(R,[["__scopeId","data-v-16a66567"]]);export{M as default};
|
|
|