import{d as I,r as n,o as _,l as m,w as r,i as o,a,j as v,C as R,c as j,F as q,k as H,y as P,D as T,G as A,H as E,U as J,K as N,J as O,N as z,_ as B,__tla as L}from"./index-2c56227b.js";import{_ as M,__tla as Q}from"./Dialog-1050d437.js";import{b as S,c as W,__tla as X}from"./index-f96e4e1e.js";import{u as Y,__tla as Z}from"./useMessage-96878a4a.js";let g,$=Promise.all([(()=>{try{return L}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return Z}catch{}})()]).then(async()=>{g=B(I({__name:"TaskReturnDialogForm",emits:["success"],setup(ee,{expose:b,emit:h}){const c=Y(),s=n(!1),u=n(!1),l=n({id:"",targetDefinitionKey:void 0,reason:""}),w=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 S({taskId:i}),f.value.length===0)return c.warning("\u5F53\u524D\u6CA1\u6709\u53EF\u56DE\u9000\u7684\u8282\u70B9"),!1;s.value=!0,k(),l.value.id=i}});const K=h,V=async()=>{if(d&&await d.value.validate()){u.value=!0;try{await W(l.value),c.success("\u56DE\u9000\u6210\u529F"),s.value=!1,K("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 D=T,F=A,y=E,U=J,x=N,p=O,C=M,G=z;return _(),m(C,{modelValue:a(s),"onUpdate:modelValue":t[3]||(t[3]=e=>P(s)?s.value=e:null),title:"\u56DE\u9000",width:"500"},{footer:r(()=>[o(p,{disabled:a(u),type:"primary",onClick:V},{default:r(()=>[v("\u786E \u5B9A")]),_:1},8,["disabled"]),o(p,{onClick:t[2]||(t[2]=e=>s.value=!1)},{default:r(()=>[v("\u53D6 \u6D88")]),_:1})]),default:r(()=>[R((_(),m(x,{ref_key:"formRef",ref:d,model:a(l),rules:a(w),"label-width":"110px"},{default:r(()=>[o(y,{label:"\u9000\u56DE\u8282\u70B9",prop:"targetDefinitionKey"},{default:r(()=>[o(F,{modelValue:a(l).targetDefinitionKey,"onUpdate:modelValue":t[0]||(t[0]=e=>a(l).targetDefinitionKey=e),clearable:"",style:{width:"100%"}},{default:r(()=>[(_(!0),j(q,null,H(a(f),e=>(_(),m(D,{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:r(()=>[o(U,{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"])),[[G,a(u)]])]),_:1},8,["modelValue"])}}}),[["__file","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/views/bpm/processInstance/detail/TaskReturnDialogForm.vue"]])});export{$ as __tla,g as default};
