import{I as k,r as h,av as w,aw as x,F as y,W as L}from"./index.17037962789732.js";import"./index.170379627897337.js";import"./index.170379627897315.js";import"./index.170379627897318.js";import"./index.170379627897319.js";import"./index.170379627897327.js";import"./index.170379627897314.js";import{u as C}from"./center.1703796278973.js";import"./default.1703796278973.js";import"./index.1703796278973299.js";import{aN as I}from"./index.17037962789733.js";import{d as U,k as f,o as B,c as J,a,b as e,u as n}from"./vue.1703796278973.js";const A=U({__name:"EditInfoDialog",props:{visible:{type:Boolean},data:null},emits:["ok","update:visible"],setup(v,{emit:r}){const c=v,p=f(!1),l=f(c.data),_=f(),b=()=>{var d;(d=_.value)==null||d.validate().then(()=>{p.value=!0,C(l.value).then(t=>{t.status===200&&(I.success("保存成功"),r("ok"),r("update:visible",!1))}).finally(()=>p.value=!1)})};return(d,t)=>{const s=k,u=h,m=w,i=x,g=y,j=L;return B(),J(j,{visible:"",title:"编辑",onOk:b,width:"770px",onCancel:t[4]||(t[4]=o=>r("update:visible",!1)),confirmLoading:n(p)},{default:a(()=>[e(g,{model:n(l),layout:"vertical",ref_key:"formRef",ref:_},{default:a(()=>[e(i,{gutter:24},{default:a(()=>[e(m,{span:12},{default:a(()=>[e(u,{label:"姓名",name:"name",rules:[{required:!0,message:"姓名必填"},{max:64,message:"最多可输入64个字符"}]},{default:a(()=>[e(s,{value:n(l).name,"onUpdate:value":t[0]||(t[0]=o=>n(l).name=o),placeholder:"请输入姓名"},null,8,["value"])]),_:1})]),_:1}),e(m,{span:12},{default:a(()=>[e(u,{label:"用户名"},{default:a(()=>[e(s,{value:n(l).username,"onUpdate:value":t[1]||(t[1]=o=>n(l).username=o),placeholder:"请输入用户名",disabled:""},null,8,["value"])]),_:1})]),_:1})]),_:1}),e(i,{gutter:24},{default:a(()=>[e(m,{span:12},{default:a(()=>[e(u,{label:"角色"},{default:a(()=>[e(s,{value:n(l).roleList.map(o=>o.name).join(","),placeholder:"请输入角色",disabled:""},null,8,["value"])]),_:1})]),_:1}),e(m,{span:12},{default:a(()=>[e(u,{label:"组织"},{default:a(()=>[e(s,{value:n(l).orgList.map(o=>o.name).join(","),placeholder:"请输入组织",disabled:""},null,8,["value"])]),_:1})]),_:1})]),_:1}),e(i,{gutter:24},{default:a(()=>[e(m,{span:12},{default:a(()=>[e(u,{label:"手机号",name:"telephone",rules:[{pattern:/^1[3456789]\d{9}$/,message:"请输入正确手机号"}]},{default:a(()=>[e(s,{value:n(l).telephone,"onUpdate:value":t[2]||(t[2]=o=>n(l).telephone=o),placeholder:"请输入手机号"},null,8,["value"])]),_:1})]),_:1}),e(m,{span:12},{default:a(()=>[e(u,{label:"邮箱",name:"email",rules:[{type:"email",message:"邮箱不是一个有效的email"}]},{default:a(()=>[e(s,{value:n(l).email,"onUpdate:value":t[3]||(t[3]=o=>n(l).email=o),placeholder:"请输入邮箱"},null,8,["value"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["confirmLoading"])}}});export{A as _};
