import{d as j,u as A,r as o,e as F,l as H,M as L,a as r,o as m,v as p,w as t,x as U,f as a,n as f,t as P,g as k,P as W,G as Y,al as J,j as V,C as X,H as q,E as K,I as N,_ as Q,__tla as Z}from"./index-04f8d540.js";import{E as $,__tla as aa}from"./el-card-3a265a8d.js";import{_ as ta,__tla as ra}from"./ContentWrap-0137c911.js";import{_ as la,__tla as ea}from"./DictTag-774e4f97.js";import{D as _a,__tla as sa}from"./dict-ef06f7f7.js";import{b as oa,a as na,__tla as ia}from"./index-2d7865e0.js";import{c as ca,__tla as ua}from"./index-70fab4a2.js";import{b as ma}from"./formCreate-a3356cdc.js";import pa,{__tla as fa}from"./ProcessInstanceBpmnViewer-f65f1441.js";import{u as ya,__tla as da}from"./useMessage-9c37e840.js";import{__tla as ha}from"./ContentWrap.vue_vue_type_script_setup_true_lang-d7df3a9f.js";import"./color-6e929987.js";import{__tla as va}from"./bpmn-embedded-11660d25.js";import{__tla as ba}from"./Dialog-9afb5ba5.js";import{__tla as ga}from"./XTextButton-47706236.js";import{__tla as wa}from"./XTextButton.vue_vue_type_style_index_0_scoped_bd4a9e34_lang-004a8066.js";import{__tla as xa}from"./XButton-b7f15a82.js";import{__tla as Ca}from"./el-collapse-item-1c98eed0.js";import{__tla as Pa}from"./el-link-990f27c6.js";import{__tla as ka}from"./el-drawer-6a413aa1.js";import{__tla as Ea}from"./formatTime-81f0c591.js";let E,Ia=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return ea}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 wa}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ea}catch{}})()]).then(async()=>{let y,d;y={class:"clearfix"},d={class:"el-icon-document"},E=Q(j({name:"BpmProcessInstanceCreate",__name:"index",setup(Ma){const h=A(),I=ya(),c=o(!0),v=o([]),M=F({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}),I.success("\u53D1\u8D77\u6D41\u7A0B\u6210\u529F"),h.go(-1)}finally{_.value.btn.loading(!1)}}};return H(()=>{(async()=>{c.value=!0;try{v.value=await oa(M)}finally{c.value=!1}})()}),(g,i)=>{const n=Y,R=la,z=J,w=V,x=X,B=q,C=ta,G=L("form-create"),O=K,S=$,T=N;return r(s)?(m(),p(C,{key:1},{default:t(()=>[a(S,{class:"box-card"},{default:t(()=>[k("div",y,[k("span",d,"\u7533\u8BF7\u4FE1\u606F\u3010"+P(r(s).name)+"\u3011",1),a(x,{style:{float:"right"},type:"primary",onClick:i[0]||(i[0]=l=>s.value=void 0)},{default:t(()=>[a(w,{icon:"ep:delete"}),f(" \u9009\u62E9\u5176\u5B83\u6D41\u7A0B ")]),_:1})]),a(O,{span:16,offset:6,style:{"margin-top":"20px"}},{default:t(()=>[a(G,{rule:r(u).rule,api:r(_),"onUpdate:api":i[1]||(i[1]=l=>W(_)?_.value=l: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(C,{key:0},{default:t(()=>[U((m(),p(B,{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(l=>[a(R,{type:r(_a).BPM_MODEL_CATEGORY,value:l.row.category},null,8,["type","value"])]),_:1}),a(n,{label:"\u6D41\u7A0B\u7248\u672C",align:"center",prop:"version"},{default:t(l=>[a(z,null,{default:t(()=>[f("v"+P(l.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(l=>[a(x,{link:"",type:"primary",onClick:Da=>(async e=>{s.value=e,e.formType==10?(ma(u,e.formConf,e.formFields),b.value=await na(e.id)):e.formCustomCreatePath&&await h.push({path:e.formCustomCreatePath})})(l.row)},{default:t(()=>[a(w,{icon:"ep:plus"}),f(" \u9009\u62E9 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[T,r(c)]])]),_:1}))}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/bpm/processInstance/create/index.vue"]])});export{Ia as __tla,E as default};
