import{d as S,u as T,r as s,f as F,B as H,aj as N,a as r,o as m,l as p,w as t,C as R,i as a,j as f,t as k,g as E,y as U,L as X,ak as z,v as K,J as V,M as Y,E as q,N as Q,_ as W,__tla as Z}from"./index-2c56227b.js";import{E as $,__tla as aa}from"./el-card-9c148b4f.js";import{_ as ta,__tla as ra}from"./ContentWrap-f1610353.js";import{_ as ea,__tla as la}from"./DictTag-cfe1898d.js";import{D as _a,__tla as oa}from"./dict-763dd292.js";import{b as sa,a as na,__tla as ia}from"./index-aba24586.js";import{c as ca,__tla as ua}from"./index-0f0f70fa.js";import{b as ma}from"./formCreate-a3356cdc.js";import pa,{__tla as fa}from"./ProcessInstanceBpmnViewer-852344be.js";import{u as ya,__tla as da}from"./useMessage-96878a4a.js";import"./color-6e929987.js";import{__tla as va}from"./bpmn-embedded-3761c479.js";import{__tla as ha}from"./Dialog-1050d437.js";import{__tla as ba}from"./XTextButton-83d96f48.js";import{__tla as ga}from"./XButton-c87840c8.js";import{__tla as Ca}from"./el-collapse-item-a4dfc79a.js";import{__tla as wa}from"./el-link-dfb00afa.js";import{__tla as xa}from"./el-drawer-b586217d.js";import{__tla as ka}from"./formatTime-7f0ec2bf.js";let P,Ea=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return ka}catch{}})()]).then(async()=>{let y,d;y={class:"clearfix"},d={class:"el-icon-document"},P=W(S({name:"BpmProcessInstanceCreate",__name:"index",setup(Pa){const v=T(),I=ya(),c=s(!0),h=s([]),A=F({suspensionState:1}),b=s(null),_=s(),u=s({rule:[],option:{}}),o=s(),B=async g=>{if(_.value&&o.value){_.value.btn.loading(!0);try{await ca({processDefinitionId:o.value.id,variables:g}),I.success("\u53D1\u8D77\u6D41\u7A0B\u6210\u529F"),v.go(-1)}finally{_.value.btn.loading(!1)}}};return H(()=>{(async()=>{c.value=!0;try{h.value=await sa(A)}finally{c.value=!1}})()}),(g,i)=>{const n=X,J=ea,M=z,C=K,w=V,O=Y,x=ta,j=N("form-create"),D=q,G=$,L=Q;return r(o)?(m(),p(x,{key:1},{default:t(()=>[a(G,{class:"box-card"},{default:t(()=>[E("div",y,[E("span",d,"\u7533\u8BF7\u4FE1\u606F\u3010"+k(r(o).name)+"\u3011",1),a(w,{style:{float:"right"},type:"primary",onClick:i[0]||(i[0]=e=>o.value=void 0)},{default:t(()=>[a(C,{icon:"ep:delete"}),f(" \u9009\u62E9\u5176\u5B83\u6D41\u7A0B ")]),_:1})]),a(D,{span:16,offset:6,style:{"margin-top":"20px"}},{default:t(()=>[a(j,{rule:r(u).rule,api:r(_),"onUpdate:api":i[1]||(i[1]=e=>U(_)?_.value=e:null),option:r(u).option,onSubmit:B},null,8,["rule","api","option"])]),_:1})]),_:1}),a(pa,{"bpmn-xml":r(b)},null,8,["bpmn-xml"])]),_:1})):(m(),p(x,{key:0},{default:t(()=>[R((m(),p(O,{data:r(h)},{default:t(()=>[a(n,{label:"\u6D41\u7A0B\u540D\u79F0",align:"center",prop:"name"}),a(n,{label:"\u6D41\u7A0B\u5206\u7C7B",align:"center",prop:"category"},{default:t(e=>[a(J,{type:r(_a).BPM_MODEL_CATEGORY,value:e.row.category},null,8,["type","value"])]),_:1}),a(n,{label:"\u6D41\u7A0B\u7248\u672C",align:"center",prop:"version"},{default:t(e=>[a(M,null,{default:t(()=>[f("v"+k(e.row.version),1)]),_:2},1024)]),_:1}),a(n,{label:"\u6D41\u7A0B\u63CF\u8FF0",align:"center",prop:"description"}),a(n,{label:"\u64CD\u4F5C",align:"center"},{default:t(e=>[a(w,{link:"",type:"primary",onClick:Ia=>(async l=>{o.value=l,l.formType==10?(ma(u,l.formConf,l.formFields),b.value=await na(l.id)):l.formCustomCreatePath&&await v.push({path:l.formCustomCreatePath})})(e.row)},{default:t(()=>[a(C,{icon:"ep:plus"}),f(" \u9009\u62E9 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[L,r(c)]])]),_:1}))}}}),[["__file","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/views/bpm/processInstance/create/index.vue"]])});export{Ea as __tla,P as default};
