数通互联化工云平台
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

import{d as y,ax as f,r as w,ao as _,w as E,G as P,a as V,f as h,e as o,b as i,h as s,q as x,H as F,F as U,bX as B,a7 as C,aj as k,an as q,ab as I,_ as N}from"./index-e450010e.js";const R={class:"dialog-footer"},S=y({__name:"editpwd",props:{tabsid:{type:String,default:"1"},usercont:{type:Object,default(){return{}}}},setup(c){const l=c,e=f({id:"",pwd:"",pwdes:""}),d=w(_),r=w(!1),m=f({pwd:[{required:!0,validator:(n,t,a)=>{if(t==="")a(new Error("请输入新密码"));else{if(e.pwdes!==""){if(!d.value)return;d.value.validateField("pwdes",()=>null)}a()}},trigger:"blur"}],pwdes:[{required:!0,validator:(n,t,a)=>{t===""?a(new Error("请确认新密码")):t!==e.pwd?a(new Error("两次输入不匹配!")):a()},trigger:"blur"}]});E(()=>l.tabsid,()=>{l.tabsid=="12"&&(e.id=l.usercont.keystr.toString())}),P(()=>{e.id=l.usercont.keystr.toString()});const v=()=>{r.value=!0,d.value.validate(n=>{n?B(e).then(()=>{C.success("修改成功"),d.value.resetFields()}).finally(()=>{r.value=!1}):r.value=!1})};return(n,t)=>{const a=k,u=q,b=_,g=I;return V(),h(U,null,[o(b,{ref_key:"editUserPwdFormRef",ref:d,model:s(e),rules:s(m),"label-width":"120px"},{default:i(()=>[o(u,{label:"新密码",prop:"pwd"},{default:i(()=>[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:i(()=>[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"]),x("div",R,[o(g,{type:"primary",loading:s(r),style:{width:"50%"},onClick:v},{default:i(()=>[F("确 定")]),_:1},8,["loading"])])],64)}}});const H=N(S,[["__scopeId","data-v-f3d5b03a"]]);export{H as default};