import{d as I,r as n,o as _,x as m,w as s,g as o,a,q as v,y as R,c as C,F as T,v as j,Q as A,z as B,A as G,B as J,X as P,G as Q,D as X,J as E,_ as H,__tla as L}from"./index-7d5b26d3.js";import{_ as M,__tla as N}from"./Dialog-2be588df.js";import{b as O,c as S,__tla as W}from"./index-206463c2.js";import{u as Y,__tla as Z}from"./useMessage-c81eaa5b.js";let g,$=Promise.all([(()=>{try{return L}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return Z}catch{}})()]).then(async()=>{g=H(I({__name:"TaskReturnDialogForm",emits:["success"],setup(ee,{expose:b,emit:h}){const c=Y(),r=n(!1),u=n(!1),l=n({id:"",targetDefinitionKey:void 0,reason:""}),D=n({targetDefinitionKey:[{required:!0,message:"\u5FC5\u987B\u9009\u62E9\u56DE\u9000\u8282\u70B9",trigger:"change"}],reason:[{required:!0,message:"\u56DE\u9000\u7406\u7531\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),d=n(),f=n([]);b({open:async i=>{if(f.value=await O({taskId:i}),f.value.length===0)return c.warning("\u5F53\u524D\u6CA1\u6709\u53EF\u56DE\u9000\u7684\u8282\u70B9"),!1;r.value=!0,K(),l.value.id=i}});const w=h,V=async()=>{if(d&&await d.value.validate()){u.value=!0;try{await S(l.value),c.success("\u56DE\u9000\u6210\u529F"),r.value=!1,w("success")}finally{u.value=!1}}},K=()=>{var i;l.value={id:"",targetDefinitionKey:void 0,reason:""},(i=d.value)==null||i.resetFields()};return(i,t)=>{const k=B,x=G,y=J,F=P,U=Q,p=X,q=M,z=E;return _(),m(q,{modelValue:a(r),"onUpdate:modelValue":t[3]||(t[3]=e=>A(r)?r.value=e:null),title:"\u56DE\u9000",width:"500"},{footer:s(()=>[o(p,{disabled:a(u),type:"primary",onClick:V},{default:s(()=>[v("\u786E \u5B9A")]),_:1},8,["disabled"]),o(p,{onClick:t[2]||(t[2]=e=>r.value=!1)},{default:s(()=>[v("\u53D6 \u6D88")]),_:1})]),default:s(()=>[R((_(),m(U,{ref_key:"formRef",ref:d,model:a(l),rules:a(D),"label-width":"110px"},{default:s(()=>[o(y,{label:"\u9000\u56DE\u8282\u70B9",prop:"targetDefinitionKey"},{default:s(()=>[o(x,{modelValue:a(l).targetDefinitionKey,"onUpdate:modelValue":t[0]||(t[0]=e=>a(l).targetDefinitionKey=e),clearable:"",style:{width:"100%"}},{default:s(()=>[(_(!0),C(T,null,j(a(f),e=>(_(),m(k,{key:e.definitionKey,label:e.name,value:e.definitionKey},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u56DE\u9000\u7406\u7531",prop:"reason"},{default:s(()=>[o(F,{modelValue:a(l).reason,"onUpdate:modelValue":t[1]||(t[1]=e=>a(l).reason=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u56DE\u9000\u7406\u7531"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[z,a(u)]])]),_:1},8,["modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/bpm/processInstance/detail/TaskReturnDialogForm.vue"]])});export{$ as __tla,g as default};
