1 |
- import{d as oa,I as _a,al as na,b as ia,r as s,e as ca,k as ua,aj as ma,o as d,q as C,w as r,c as L,n as fa,v as M,a,g as R,t as T,f as t,m as f,O as D,F as pa,am as da,an as ya,ao as ha,z as ka,ak as va,U as ga,C as ba,_ as Ca,B as xa,E as wa,H as Ta,__tla as Ua}from"./index-2eab2d23.js";import{_ as Va,__tla as Da}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5a63038a.js";import{E as Ea,__tla as Fa}from"./el-card-c558f0ec.js";import{b as Sa}from"./formCreate-a3356cdc.js";import{a as Ra,__tla as qa}from"./index-2d19ea81.js";import{g as za,__tla as Aa}from"./index-a1993285.js";import{a as Ba,r as Ia,g as Pa,__tla as ja}from"./index-86220392.js";import{_ as Oa,__tla as $a}from"./TaskUpdateAssigneeForm.vue_vue_type_script_setup_true_lang-97a4a38e.js";import{_ as Ha,__tla as Ka}from"./ProcessInstanceBpmnViewer.vue_vue_type_style_index_0_lang-b9b61ab3.js";import{_ as Na,__tla as Qa}from"./ProcessInstanceTaskList.vue_vue_type_script_setup_true_lang-0af83543.js";import{_ as Ga,__tla as Ja}from"./TaskReturnDialogForm.vue_vue_type_script_name_TaskRollbackDialogForm_setup_true_lang-77ee0e41.js";import{_ as La,__tla as Ma}from"./TaskDelegateForm.vue_vue_type_script_setup_true_lang-86c1e585.js";import{_ as Wa,__tla as Xa}from"./TaskAddSignDialogForm.vue_vue_type_script_setup_true_lang-b03fc50a.js";import{u as Ya,__tla as Za}from"./useMessage-171aa63e.js";import{__tla as ae}from"./Dialog-c2716df6.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ee}from"./index-e191a423.js";import{__tla as te}from"./bpmn-embedded-7a47b8f8.js";import{__tla as re}from"./XTextButton-caeba438.js";import{__tla as le}from"./XTextButton.vue_vue_type_style_index_0_scoped_7561ab3f_lang-e264c7bf.js";import{__tla as se}from"./XButton-f05c5131.js";import{__tla as oe}from"./el-collapse-item-5ecf4321.js";import{__tla as _e}from"./el-link-f0d278a2.js";import{__tla as ne}from"./el-drawer-7ad3d607.js";import{__tla as ie}from"./dict-1ad71b6f.js";import{__tla as ce}from"./formatTime-41155543.js";import{__tla as ue}from"./el-timeline-item-eddfdd2c.js";import{__tla as me}from"./DictTag.vue_vue_type_script_lang-cb1e47ff.js";import"./color-6e929987.js";import{__tla as fe}from"./ProcessInstanceChildrenTaskList.vue_vue_type_script_setup_true_lang-2dc351f4.js";import{__tla as pe}from"./TaskSubSignDialogForm.vue_vue_type_script_name_TaskRollbackDialogForm_setup_true_lang-b98c6552.js";let W,de=Promise.all([(()=>{try{return Ua}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return Za}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 q,z,A,B;q={class:"el-icon-picture-outline"},z={style:{"margin-bottom":"20px","margin-left":"10%","font-size":"14px"}},A={class:"el-icon-document"},B={key:1},W=oa({name:"BpmProcessInstanceDetail",__name:"index",setup(ye){const{query:X}=_a(),E=Ya(),{proxy:Y}=na(),Z=ia().getUser.id,F=X.id,x=s(!1),o=s({}),I=s(""),S=s(!0),k=s([]),U=s([]),v=s([]),aa=ca({reason:[{required:!0,message:"\u5BA1\u6279\u5EFA\u8BAE\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),V=s(),w=s({rule:[],option:{},value:{}}),P=async(_,e)=>{const l=U.value.indexOf(_),b=Y.$refs["form"+l][0],y=a(b);if(!y||!await y.validate())return;const h={id:_.id,reason:v.value[l].reason};e?(await Ba(h),E.success("\u5BA1\u6279\u901A\u8FC7\u6210\u529F")):(await Ia(h),E.success("\u5BA1\u6279\u4E0D\u901A\u8FC7\u6210\u529F")),g()},j=s(),O=s(),$=s(),H=s(),g=()=>{ea(),ta()},K=s(null),ea=async()=>{try{x.value=!0;const _=await za(F);if(!_)return void E.error("\u67E5\u8BE2\u4E0D\u5230\u6D41\u7A0B\u4FE1\u606F\uFF01");o.value=_;const e=_.processDefinition;e.formType===10?(Sa(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),I.value=await Ra(e.id)}finally{x.value=!1}},ta=async()=>{try{S.value=!0;const _=await Pa(F);k.value=[],_.forEach(e=>{e.result!==4&&k.value.push(e)}),k.value.sort((e,l)=>e.endTime&&l.endTime?l.endTime-e.endTime:e.endTime?1:l.endTime?-1:l.createTime-e.createTime),U.value=[],v.value=[],N(k.value)}finally{S.value=!1}},N=_=>{_.forEach(e=>{ha(e.children)||N(e.children),e.result!==1&&e.result!==6||e.assigneeUser&&e.assigneeUser.id===Z&&(U.value.push({...e}),v.value.push({reason:""}))})};return ua(()=>{g()}),(_,e)=>{const l=ka,b=va,y=ga,h=ba,u=Ca,m=xa,Q=wa,G=Ea,ra=ma("form-create"),la=Va,J=Ta;return d(),C(la,null,{default:r(()=>[(d(!0),L(pa,null,fa(a(U),(i,p)=>M((d(),C(G,{key:p,class:"box-card"},{header:r(()=>[R("span",q,"\u5BA1\u6279\u4EFB\u52A1\u3010"+T(i.name)+"\u3011",1)]),default:r(()=>[t(Q,{offset:6,span:16},{default:r(()=>[t(h,{ref_for:!0,ref:"form"+p,model:a(v)[p],rules:a(aa),"label-width":"100px"},{default:r(()=>[a(o)&&a(o).name?(d(),C(l,{key:0,label:"\u6D41\u7A0B\u540D"},{default:r(()=>[f(T(a(o).name),1)]),_:1})):D("",!0),a(o)&&a(o).startUser?(d(),C(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(v)[p].reason,"onUpdate:modelValue":c=>a(v)[p].reason=c,placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6279\u5EFA\u8BAE",type:"textarea"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1032,["model","rules"]),R("div",z,[t(m,{type:"success",onClick:c=>P(i,!0)},{default:r(()=>[t(u,{icon:"ep:select"}),f(" \u901A\u8FC7 ")]),_:2},1032,["onClick"]),t(m,{type:"danger",onClick:c=>P(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 j.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=>{O.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=>{H.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=>{$.value.open(n.id)})(i)},{default:r(()=>[t(u,{icon:"ep:back"}),f(" \u56DE\u9000 ")]),_:2},1032,["onClick"])])]),_:2},1024)]),_:2},1024)),[[J,a(x)]])),128)),M((d(),C(G,{class:"box-card"},{header:r(()=>[R("span",A,"\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(),C(Q,{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(),L("div",B,[t(a(K),{id:a(o).businessKey},null,8,["id"])])):D("",!0)]}),_:1})),[[J,a(x)]]),t(Na,{loading:a(S),tasks:a(k)},null,8,["loading","tasks"]),t(Ha,{id:`${a(F)}`,"bpmn-xml":a(I),loading:a(x),"process-instance":a(o),tasks:a(k)},null,8,["id","bpmn-xml","loading","process-instance","tasks"]),t(Oa,{ref_key:"taskUpdateAssigneeFormRef",ref:j,onSuccess:g},null,512),t(Ga,{ref_key:"taskReturnDialogRef",ref:$,onSuccess:g},null,512),t(La,{ref_key:"taskDelegateForm",ref:O,onSuccess:g},null,512),t(Wa,{ref_key:"taskAddSignDialogForm",ref:H,onSuccess:g},null,512)]),_:1})}}})});export{de as __tla,W as default};
|