import{d as C,r as d,o as n,A as m,B as s,f as u,E as v,a,k as D,c as R,R as q,F as A,a2 as j,S as E,U as K,V as P,a8 as S,W,K as Z,Z as z,__tla as G}from"./index-92ad187a.js";import{_ as H,__tla as J}from"./Dialog-44c9fa34.js";import{d as L,__tla as M}from"./index-ce039456.js";import{g as N,__tla as O}from"./index-343decc0.js";let y,Q=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return M}catch{}})(),(()=>{try{return O}catch{}})()]).then(async()=>{y=C({name:"BpmTaskDelegateForm",__name:"TaskDelegateForm",emits:["success"],setup(X,{expose:g,emit:h}){const r=d(!1),i=d(!1),l=d({id:"",delegateUserId:void 0}),U=d({delegateUserId:[{required:!0,message:"\u63A5\u6536\u4EBA\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}]}),_=d(),c=d([]);g({open:async o=>{r.value=!0,k(),l.value.id=o,c.value=await N()}});const V=h,b=async()=>{if(_&&await _.value.validate()){i.value=!0;try{await L(l.value),r.value=!1,V("success")}finally{i.value=!1}}},k=()=>{var o;l.value={id:"",delegateUserId:void 0},(o=_.value)==null||o.resetFields()};return(o,t)=>{const w=E,I=K,f=P,F=S,x=W,p=Z,B=H,T=z;return n(),m(B,{modelValue:a(r),"onUpdate:modelValue":t[3]||(t[3]=e=>j(r)?r.value=e:null),title:"\u59D4\u6D3E\u4EFB\u52A1",width:"500"},{footer:s(()=>[u(p,{disabled:a(i),type:"primary",onClick:b},{default:s(()=>[v("\u786E \u5B9A")]),_:1},8,["disabled"]),u(p,{onClick:t[2]||(t[2]=e=>r.value=!1)},{default:s(()=>[v("\u53D6 \u6D88")]),_:1})]),default:s(()=>[D((n(),m(x,{ref_key:"formRef",ref:_,model:a(l),rules:a(U),"label-width":"110px"},{default:s(()=>[u(f,{label:"\u63A5\u6536\u4EBA",prop:"delegateUserId"},{default:s(()=>[u(I,{modelValue:a(l).delegateUserId,"onUpdate:modelValue":t[0]||(t[0]=e=>a(l).delegateUserId=e),clearable:"",style:{width:"100%"}},{default:s(()=>[(n(!0),R(A,null,q(a(c),e=>(n(),m(w,{key:e.id,label:e.nickname,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),u(f,{label:"\u59D4\u6D3E\u7406\u7531",prop:"reason"},{default:s(()=>[u(F,{modelValue:a(l).reason,"onUpdate:modelValue":t[1]||(t[1]=e=>a(l).reason=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u59D4\u6D3E\u7406\u7531"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[T,a(i)]])]),_:1},8,["modelValue"])}}})});export{y as _,Q as __tla};
