index-7551beaa.js 3.3 KB

1
  1. import{d as M,u as T,r as n,f as q,x as A,h as G,a as t,o as f,j as c,w as e,B as J,i as a,m as d,t as x,k as h,P as K,I as L,aj as R,_ as U,q as X,J as Y,E as V,K as W}from"./index-df709923.js";import{E as z}from"./el-card-91c2276d.js";import{_ as H}from"./ContentWrap.vue_vue_type_script_setup_true_lang-e908c5dd.js";import{_ as N}from"./DictTag.vue_vue_type_script_lang-6753827b.js";import{D as Q}from"./dict-017bf708.js";import{b as Z,a as $}from"./index-59b01260.js";import{c as aa}from"./index-f023ef50.js";import{b as ea}from"./formCreate-a3356cdc.js";import{_ as ta}from"./ProcessInstanceBpmnViewer.vue_vue_type_style_index_0_lang-66ad3e84.js";import{u as oa}from"./useMessage-89e9d1aa.js";import"./color-6e929987.js";import"./bpmn-embedded-b559db32.js";import"./Dialog-2f8bd685.js";import"./_plugin-vue_export-helper-1b428a4d.js";import"./XTextButton-02c835a8.js";import"./XTextButton.vue_vue_type_style_index_0_scoped_f7cd2dd8_lang-f32597a6.js";import"./XButton-8658597e.js";import"./el-collapse-item-ab99f940.js";import"./el-link-de9b6dfd.js";import"./el-drawer-24e8ff75.js";import"./formatTime-c6262bd7.js";const la={class:"clearfix"},ra={class:"el-icon-document"},sa=M({name:"BpmProcessInstanceCreate",__name:"index",setup(ia){const v=T(),k=oa(),m=n(!0),y=n([]),P=q({suspensionState:1}),_=n(null),s=n(),u=n({rule:[],option:{}}),i=n(),D=async b=>{if(s.value&&i.value){s.value.btn.loading(!0);try{await aa({processDefinitionId:i.value.id,variables:b}),k.success("\u53D1\u8D77\u6D41\u7A0B\u6210\u529F"),v.go(-1)}finally{s.value.btn.loading(!1)}}};return A(()=>{(async()=>{m.value=!0;try{y.value=await Z(P)}finally{m.value=!1}})()}),(b,o)=>{const p=L,E=N,B=R,g=U,C=X,I=Y,w=H,O=G("form-create"),S=V,j=z,F=W;return t(i)?(f(),c(w,{key:1},{default:e(()=>[a(j,{class:"box-card"},{default:e(()=>[h("div",la,[h("span",ra,"\u7533\u8BF7\u4FE1\u606F\u3010"+x(t(i).name)+"\u3011",1),a(C,{style:{float:"right"},type:"primary",onClick:o[0]||(o[0]=l=>i.value=void 0)},{default:e(()=>[a(g,{icon:"ep:delete"}),o[3]||(o[3]=d(" \u9009\u62E9\u5176\u5B83\u6D41\u7A0B "))]),_:1})]),a(S,{span:16,offset:6,style:{"margin-top":"20px"}},{default:e(()=>[a(O,{rule:t(u).rule,api:t(s),"onUpdate:api":o[1]||(o[1]=l=>K(s)?s.value=l:null),option:t(u).option,onSubmit:D},null,8,["rule","api","option"])]),_:1})]),_:1}),a(ta,{"bpmn-xml":t(_)},null,8,["bpmn-xml"])]),_:1})):(f(),c(w,{key:0},{default:e(()=>[J((f(),c(I,{data:t(y)},{default:e(()=>[a(p,{label:"\u6D41\u7A0B\u540D\u79F0",align:"center",prop:"name"}),a(p,{label:"\u6D41\u7A0B\u5206\u7C7B",align:"center",prop:"category"},{default:e(l=>[a(E,{type:t(Q).BPM_MODEL_CATEGORY,value:l.row.category},null,8,["type","value"])]),_:1}),a(p,{label:"\u6D41\u7A0B\u7248\u672C",align:"center",prop:"version"},{default:e(l=>[a(B,null,{default:e(()=>[d("v"+x(l.row.version),1)]),_:2},1024)]),_:1}),a(p,{label:"\u6D41\u7A0B\u63CF\u8FF0",align:"center",prop:"description"}),a(p,{label:"\u64CD\u4F5C",align:"center"},{default:e(l=>[a(C,{link:"",type:"primary",onClick:na=>(async r=>{i.value=r,r.formType==10?(ea(u,r.formConf,r.formFields),_.value=await $(r.id)):r.formCustomCreatePath&&await v.push({path:r.formCustomCreatePath})})(l.row)},{default:e(()=>[a(g,{icon:"ep:plus"}),o[2]||(o[2]=d(" \u9009\u62E9 "))]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[F,t(m)]])]),_:1}))}}});export{sa as default};