index-6c1c0afc.js 8.1 KB

1
  1. import{d as oa,Z as _a,j as na,aw as ia,r as s,x as ca,b as ua,au as ma,o as d,C as x,A as r,c as Y,Q as fa,k as Z,a,B as S,E as T,f as t,D as f,a2 as D,F as pa,n as da,ax as ya,ay as ha,U as va,av as ka,a8 as ga,V as ba,_ as xa,J as Ca,H as wa,Y as Ta,__tla as Ua}from"./index-f65577b8.js";import{_ as Va,__tla as Da}from"./ContentWrap.vue_vue_type_script_setup_true_lang-9fbbd655.js";import{E as Aa,__tla as Ea}from"./el-card-ab53e6aa.js";import{b as Fa}from"./formCreate-a3356cdc.js";import{a as Sa,__tla as Pa}from"./index-5ac2f171.js";import{g as Ba,__tla as Ra}from"./index-3c854029.js";import{a as ja,r as qa,g as za,__tla as $a}from"./index-bd149bc4.js";import{_ as Ha,__tla as Ia}from"./TaskUpdateAssigneeForm.vue_vue_type_script_setup_true_lang-525552d6.js";import{_ as Ja,__tla as Ka}from"./ProcessInstanceBpmnViewer.vue_vue_type_style_index_0_lang-ce6981c0.js";import{_ as Na,__tla as Oa}from"./ProcessInstanceTaskList.vue_vue_type_script_setup_true_lang-2f876500.js";import{_ as Qa,__tla as Wa}from"./TaskReturnDialogForm.vue_vue_type_script_name_TaskRollbackDialogForm_setup_true_lang-29453bae.js";import{_ as Ya,__tla as Za}from"./TaskDelegateForm.vue_vue_type_script_setup_true_lang-e5361bdd.js";import{_ as Ga,__tla as La}from"./TaskAddSignDialogForm.vue_vue_type_script_setup_true_lang-0be705d4.js";import{u as Ma,__tla as Xa}from"./useMessage-4dbf0ae4.js";import{__tla as ae}from"./Dialog-bd3317a7.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ee}from"./index-87264ddf.js";import{__tla as te}from"./bpmn-embedded-6bcd7e67.js";import{__tla as re}from"./XTextButton-1cf89f94.js";import{__tla as le}from"./XTextButton.vue_vue_type_style_index_0_scoped_7561ab3f_lang-69a44bd6.js";import{__tla as se}from"./XButton-e49ad8a2.js";import{__tla as oe}from"./el-collapse-item-4be43cd6.js";import{__tla as _e}from"./el-link-88f90ac7.js";import{__tla as ne}from"./el-drawer-7511f7ca.js";import{__tla as ie}from"./dict-fa3ffbd2.js";import{__tla as ce}from"./formatTime-411ed1a1.js";import{__tla as ue}from"./el-timeline-item-f70fc29c.js";import{__tla as me}from"./DictTag.vue_vue_type_script_lang-48f8deb5.js";import"./color-6e929987.js";import{__tla as fe}from"./ProcessInstanceChildrenTaskList.vue_vue_type_script_setup_true_lang-1acee641.js";import{__tla as pe}from"./TaskSubSignDialogForm.vue_vue_type_script_name_TaskRollbackDialogForm_setup_true_lang-11403acb.js";let G,de=Promise.all([(()=>{try{return Ua}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return ee}catch{}})(),(()=>{try{return te}catch{}})(),(()=>{try{return re}catch{}})(),(()=>{try{return le}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return oe}catch{}})(),(()=>{try{return _e}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return ie}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return ue}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return pe}catch{}})()]).then(async()=>{let P,B,R,j;P={class:"el-icon-picture-outline"},B={style:{"margin-bottom":"20px","margin-left":"10%","font-size":"14px"}},R={class:"el-icon-document"},j={key:1},G=oa({name:"BpmProcessInstanceDetail",__name:"index",setup(ye){const{query:L}=_a(),A=Ma(),{proxy:M}=na(),X=ia().getUser.id,E=L.id,C=s(!1),o=s({}),q=s(""),F=s(!0),v=s([]),U=s([]),k=s([]),aa=ca({reason:[{required:!0,message:"\u5BA1\u6279\u5EFA\u8BAE\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),V=s(),w=s({rule:[],option:{},value:{}}),z=async(_,e)=>{const l=U.value.indexOf(_),b=M.$refs["form"+l][0],y=a(b);if(!y||!await y.validate())return;const h={id:_.id,reason:k.value[l].reason};e?(await ja(h),A.success("\u5BA1\u6279\u901A\u8FC7\u6210\u529F")):(await qa(h),A.success("\u5BA1\u6279\u4E0D\u901A\u8FC7\u6210\u529F")),g()},$=s(),H=s(),I=s(),J=s(),g=()=>{ea(),ta()},K=s(null),ea=async()=>{try{C.value=!0;const _=await Ba(E);if(!_)return void A.error("\u67E5\u8BE2\u4E0D\u5230\u6D41\u7A0B\u4FE1\u606F\uFF01");o.value=_;const e=_.processDefinition;e.formType===10?(Fa(w,e.formConf,e.formFields,_.formVariables),da().then(()=>{var l,b,y,h,u,m;(b=(l=V.value)==null?void 0:l.fapi)==null||b.btn.show(!1),(h=(y=V.value)==null?void 0:y.fapi)==null||h.resetBtn.show(!1),(m=(u=V.value)==null?void 0:u.fapi)==null||m.disabled(!0)})):K.value=ya(_.processDefinition.formCustomViewPath),q.value=await Sa(e.id)}finally{C.value=!1}},ta=async()=>{try{F.value=!0;const _=await za(E);v.value=[],_.forEach(e=>{e.result!==4&&v.value.push(e)}),v.value.sort((e,l)=>e.endTime&&l.endTime?l.endTime-e.endTime:e.endTime?1:l.endTime?-1:l.createTime-e.createTime),U.value=[],k.value=[],N(v.value)}finally{F.value=!1}},N=_=>{_.forEach(e=>{ha(e.children)||N(e.children),e.result!==1&&e.result!==6||e.assigneeUser&&e.assigneeUser.id===X&&(U.value.push({...e}),k.value.push({reason:""}))})};return ua(()=>{g()}),(_,e)=>{const l=va,b=ka,y=ga,h=ba,u=xa,m=Ca,O=wa,Q=Aa,ra=ma("form-create"),la=Va,W=Ta;return d(),x(la,null,{default:r(()=>[(d(!0),Y(pa,null,fa(a(U),(i,p)=>Z((d(),x(Q,{key:p,class:"box-card"},{header:r(()=>[S("span",P,"\u5BA1\u6279\u4EFB\u52A1\u3010"+T(i.name)+"\u3011",1)]),default:r(()=>[t(O,{offset:6,span:16},{default:r(()=>[t(h,{ref_for:!0,ref:"form"+p,model:a(k)[p],rules:a(aa),"label-width":"100px"},{default:r(()=>[a(o)&&a(o).name?(d(),x(l,{key:0,label:"\u6D41\u7A0B\u540D"},{default:r(()=>[f(T(a(o).name),1)]),_:1})):D("",!0),a(o)&&a(o).startUser?(d(),x(l,{key:1,label:"\u6D41\u7A0B\u53D1\u8D77\u4EBA"},{default:r(()=>[f(T(a(o).startUser.nickname)+" ",1),t(b,{size:"small",type:"info"},{default:r(()=>[f(T(a(o).startUser.deptName),1)]),_:1})]),_:1})):D("",!0),t(l,{label:"\u5BA1\u6279\u5EFA\u8BAE",prop:"reason"},{default:r(()=>[t(y,{modelValue:a(k)[p].reason,"onUpdate:modelValue":c=>a(k)[p].reason=c,placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6279\u5EFA\u8BAE",type:"textarea"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1032,["model","rules"]),S("div",B,[t(m,{type:"success",onClick:c=>z(i,!0)},{default:r(()=>[t(u,{icon:"ep:select"}),f(" \u901A\u8FC7 ")]),_:2},1032,["onClick"]),t(m,{type:"danger",onClick:c=>z(i,!1)},{default:r(()=>[t(u,{icon:"ep:close"}),f(" \u4E0D\u901A\u8FC7 ")]),_:2},1032,["onClick"]),t(m,{type:"primary",onClick:c=>{return n=i.id,void $.value.open(n);var n}},{default:r(()=>[t(u,{icon:"ep:edit"}),f(" \u8F6C\u529E ")]),_:2},1032,["onClick"]),t(m,{type:"primary",onClick:c=>(async n=>{H.value.open(n.id)})(i)},{default:r(()=>[t(u,{icon:"ep:position"}),f(" \u59D4\u6D3E ")]),_:2},1032,["onClick"]),t(m,{type:"primary",onClick:c=>(async n=>{J.value.open(n.id)})(i)},{default:r(()=>[t(u,{icon:"ep:plus"}),f(" \u52A0\u7B7E ")]),_:2},1032,["onClick"]),t(m,{type:"warning",onClick:c=>(async n=>{I.value.open(n.id)})(i)},{default:r(()=>[t(u,{icon:"ep:back"}),f(" \u56DE\u9000 ")]),_:2},1032,["onClick"])])]),_:2},1024)]),_:2},1024)),[[W,a(C)]])),128)),Z((d(),x(Q,{class:"box-card"},{header:r(()=>[S("span",R,"\u7533\u8BF7\u4FE1\u606F\u3010"+T(a(o).name)+"\u3011",1)]),default:r(()=>{var i,p,c,n;return[((p=(i=a(o))==null?void 0:i.processDefinition)==null?void 0:p.formType)===10?(d(),x(O,{key:0,offset:6,span:16},{default:r(()=>[t(ra,{ref_key:"fApi",ref:V,modelValue:a(w).value,"onUpdate:modelValue":e[0]||(e[0]=sa=>a(w).value=sa),option:a(w).option,rule:a(w).rule},null,8,["modelValue","option","rule"])]),_:1})):D("",!0),((n=(c=a(o))==null?void 0:c.processDefinition)==null?void 0:n.formType)===20?(d(),Y("div",j,[t(a(K),{id:a(o).businessKey},null,8,["id"])])):D("",!0)]}),_:1})),[[W,a(C)]]),t(Na,{loading:a(F),tasks:a(v)},null,8,["loading","tasks"]),t(Ja,{id:`${a(E)}`,"bpmn-xml":a(q),loading:a(C),"process-instance":a(o),tasks:a(v)},null,8,["id","bpmn-xml","loading","process-instance","tasks"]),t(Ha,{ref_key:"taskUpdateAssigneeFormRef",ref:$,onSuccess:g},null,512),t(Qa,{ref_key:"taskReturnDialogRef",ref:I,onSuccess:g},null,512),t(Ya,{ref_key:"taskDelegateForm",ref:H,onSuccess:g},null,512),t(Ga,{ref_key:"taskAddSignDialogForm",ref:J,onSuccess:g},null,512)]),_:1})}}})});export{de as __tla,G as default};