import{d as T,u as U,r as o,e as j,q,ag as A,a as r,o as m,x as p,w as t,z as F,f as a,y as f,t as k,g as P,l as H,I as J,ah as L,j as X,G as V,J as Y,E as N,K as Q,_ as W,__tla as Z}from"./index-8dc1e40a.js";import{E as $,__tla as aa}from"./el-card-18df90f0.js";import{_ as ta,__tla as ra}from"./ContentWrap-0aca5216.js";import{_ as ea,__tla as la}from"./DictTag-85aade2b.js";import{D as _a,__tla as sa}from"./dict-f13a3c8f.js";import{b as oa,a as na,__tla as ia}from"./index-9502b3b8.js";import{c as ca,__tla as ua}from"./index-7c267f71.js";import{b as ma}from"./formCreate-a3356cdc.js";import pa,{__tla as fa}from"./ProcessInstanceBpmnViewer-87224015.js";import{u as ya,__tla as da}from"./useMessage-7a27dd80.js";import"./color-6e929987.js";import{__tla as ha}from"./bpmn-embedded-da753b1b.js";import{__tla as va}from"./Dialog-41802231.js";import{__tla as ba}from"./XTextButton-8c2fbcf2.js";import{__tla as ga}from"./XButton-bca72e5c.js";import{__tla as Ca}from"./el-collapse-item-7e888ef0.js";import{__tla as wa}from"./el-link-a41356f3.js";import{__tla as xa}from"./el-drawer-b2e1f1a3.js";import{__tla as ka}from"./formatTime-8a155b2e.js";let I,Pa=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return va}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"},I=W(T({name:"BpmProcessInstanceCreate",__name:"index",setup(Ia){const h=U(),z=ya(),c=o(!0),v=o([]),E=j({suspensionState:1}),b=o(null),_=o(),u=o({rule:[],option:{}}),s=o(),D=async g=>{if(_.value&&s.value){_.value.btn.loading(!0);try{await ca({processDefinitionId:s.value.id,variables:g}),z.success("\u53D1\u8D77\u6D41\u7A0B\u6210\u529F"),h.go(-1)}finally{_.value.btn.loading(!1)}}};return q(()=>{(async()=>{c.value=!0;try{v.value=await oa(E)}finally{c.value=!1}})()}),(g,i)=>{const n=J,M=ea,B=L,C=X,w=V,G=Y,x=ta,K=A("form-create"),O=N,R=$,S=Q;return r(s)?(m(),p(x,{key:1},{default:t(()=>[a(R,{class:"box-card"},{default:t(()=>[P("div",y,[P("span",d,"\u7533\u8BF7\u4FE1\u606F\u3010"+k(r(s).name)+"\u3011",1),a(w,{style:{float:"right"},type:"primary",onClick:i[0]||(i[0]=e=>s.value=void 0)},{default:t(()=>[a(C,{icon:"ep:delete"}),f(" \u9009\u62E9\u5176\u5B83\u6D41\u7A0B ")]),_:1})]),a(O,{span:16,offset:6,style:{"margin-top":"20px"}},{default:t(()=>[a(K,{rule:r(u).rule,api:r(_),"onUpdate:api":i[1]||(i[1]=e=>H(_)?_.value=e:null),option:r(u).option,onSubmit:D},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(()=>[F((m(),p(G,{data:r(v)},{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(M,{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(B,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:za=>(async l=>{s.value=l,l.formType==10?(ma(u,l.formConf,l.formFields),b.value=await na(l.id)):l.formCustomCreatePath&&await h.push({path:l.formCustomCreatePath})})(e.row)},{default:t(()=>[a(C,{icon:"ep:plus"}),f(" \u9009\u62E9 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[S,r(c)]])]),_:1}))}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/bpm/processInstance/create/index.vue"]])});export{Pa as __tla,I as default};
