import{d as C,r as i,o as n,A as c,B as s,f as u,E as p,a as l,k as R,c as q,R as D,F as S,a2 as T,S as j,U as E,V as K,a8 as P,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{t as M,__tla as N}from"./index-ce039456.js";import{g as O,__tla as Q}from"./index-343decc0.js";import{u as X,__tla as Y}from"./useMessage-d9788660.js";let h,$=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return Y}catch{}})()]).then(async()=>{h=C({name:"BpmTaskUpdateAssigneeForm",__name:"TaskAddSignDialogForm",emits:["success"],setup(ee,{expose:b,emit:g}){const k=X(),d=i(!1),o=i(!1),t=i({id:"",userIdList:[],type:""}),V=i({userIdList:[{required:!0,message:"\u52A0\u7B7E\u5904\u7406\u4EBA\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],reason:[{required:!0,message:"\u52A0\u7B7E\u7406\u7531\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}]}),_=i(),f=i([]);b({open:async r=>{d.value=!0,L(),t.value.id=r,f.value=await O()}});const w=g,y=async r=>{if(_&&await _.value.validate()){o.value=!0,t.value.type=r;try{await M(t.value),k.success("\u52A0\u7B7E\u6210\u529F"),d.value=!1,w("success")}finally{o.value=!1}}},L=()=>{var r;t.value={id:"",userIdList:[],type:""},(r=_.value)==null||r.resetFields()};return(r,e)=>{const I=j,U=E,v=K,x=P,F=W,m=Z,A=H,B=z;return n(),c(A,{modelValue:l(d),"onUpdate:modelValue":e[5]||(e[5]=a=>T(d)?d.value=a:null),title:"\u52A0\u7B7E",width:"500"},{footer:s(()=>[u(m,{disabled:l(o),type:"primary",onClick:e[2]||(e[2]=a=>y("before"))},{default:s(()=>[p(" \u5411\u524D\u52A0\u7B7E ")]),_:1},8,["disabled"]),u(m,{disabled:l(o),type:"primary",onClick:e[3]||(e[3]=a=>y("after"))},{default:s(()=>[p(" \u5411\u540E\u52A0\u7B7E ")]),_:1},8,["disabled"]),u(m,{onClick:e[4]||(e[4]=a=>d.value=!1)},{default:s(()=>[p("\u53D6 \u6D88")]),_:1})]),default:s(()=>[R((n(),c(F,{ref_key:"formRef",ref:_,model:l(t),rules:l(V),"label-width":"110px"},{default:s(()=>[u(v,{label:"\u52A0\u7B7E\u5904\u7406\u4EBA",prop:"userIdList"},{default:s(()=>[u(U,{modelValue:l(t).userIdList,"onUpdate:modelValue":e[0]||(e[0]=a=>l(t).userIdList=a),multiple:"",clearable:"",style:{width:"100%"}},{default:s(()=>[(n(!0),q(S,null,D(l(f),a=>(n(),c(I,{key:a.id,label:a.nickname,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),u(v,{label:"\u52A0\u7B7E\u7406\u7531",prop:"reason"},{default:s(()=>[u(x,{modelValue:l(t).reason,"onUpdate:modelValue":e[1]||(e[1]=a=>l(t).reason=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u52A0\u7B7E\u7406\u7531"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[B,l(o)]])]),_:1},8,["modelValue"])}}})});export{h as _,$ as __tla};
