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 Z,Q as fa,k as G,a,B as E,E as w,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 Ta,Y as wa,__tla as Ua}from"./index-6e0fa573.js";import{_ as Va,__tla as Da}from"./ContentWrap.vue_vue_type_script_setup_true_lang-bed37a76.js";import{E as Aa,__tla as Fa}from"./el-card-f999e23d.js";import{b as Sa}from"./formCreate-a3356cdc.js";import{a as Ea,__tla as Ra}from"./index-9a32d209.js";import{g as Ba,__tla as Pa}from"./index-b8751d57.js";import{a as ja,r as qa,g as za,__tla as Ha}from"./index-2ed7de54.js";import{_ as Ia,__tla as $a}from"./TaskUpdateAssigneeForm.vue_vue_type_script_setup_true_lang-a1075685.js";import{_ as Ja,__tla as Ka}from"./ProcessInstanceBpmnViewer.vue_vue_type_style_index_0_lang-8473726b.js";import{_ as Na,__tla as Oa}from"./ProcessInstanceTaskList.vue_vue_type_script_setup_true_lang-889e2b13.js";import{_ as Qa,__tla as Ya}from"./TaskReturnDialogForm.vue_vue_type_script_name_TaskRollbackDialogForm_setup_true_lang-7cf0c446.js";import{_ as Za,__tla as Ga}from"./TaskDelegateForm.vue_vue_type_script_setup_true_lang-d25778c8.js";import{_ as La,__tla as Ma}from"./TaskAddSignDialogForm.vue_vue_type_script_setup_true_lang-ceb4418a.js";import{u as Wa,__tla as Xa}from"./useMessage-7f978edc.js";import{__tla as ae}from"./Dialog-a16029e3.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ee}from"./index-f6f28fe0.js";import{__tla as te}from"./bpmn-embedded-da17390b.js";import{__tla as re}from"./XTextButton-d526761c.js";import{__tla as le}from"./XTextButton.vue_vue_type_style_index_0_scoped_7561ab3f_lang-a4d94279.js";import{__tla as se}from"./XButton-fdd634a9.js";import{__tla as oe}from"./el-collapse-item-0400a39e.js";import{__tla as _e}from"./el-link-084f8f9b.js";import{__tla as ne}from"./el-drawer-360f7879.js";import{__tla as ie}from"./dict-33efee75.js";import{__tla as ce}from"./formatTime-4408999b.js";import{__tla as ue}from"./el-timeline-item-248613ef.js";import{__tla as me}from"./DictTag.vue_vue_type_script_lang-66c5118d.js";import"./color-6e929987.js";import{__tla as fe}from"./ProcessInstanceChildrenTaskList.vue_vue_type_script_setup_true_lang-dca15592.js";import{__tla as pe}from"./TaskSubSignDialogForm.vue_vue_type_script_name_TaskRollbackDialogForm_setup_true_lang-e056814e.js";let L,de=Promise.all([(()=>{try{return Ua}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Ma}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 R,B,P,j;R={class:"el-icon-picture-outline"},B={style:{"margin-bottom":"20px","margin-left":"10%","font-size":"14px"}},P={class:"el-icon-document"},j={key:1},L=oa({name:"BpmProcessInstanceDetail",__name:"index",setup(ye){const{query:M}=_a(),A=Wa(),{proxy:W}=na(),X=ia().getUser.id,F=M.id,C=s(!1),o=s({}),q=s(""),S=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(),T=s({rule:[],option:{},value:{}}),z=async(_,e)=>{const l=U.value.indexOf(_),b=W.$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()},H=s(),I=s(),$=s(),J=s(),g=()=>{ea(),ta()},K=s(null),ea=async()=>{try{C.value=!0;const _=await Ba(F);if(!_)return void A.error("\u67E5\u8BE2\u4E0D\u5230\u6D41\u7A0B\u4FE1\u606F\uFF01");o.value=_;const e=_.processDefinition;e.formType===10?(Sa(T,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 Ea(e.id)}finally{C.value=!1}},ta=async()=>{try{S.value=!0;const _=await za(F);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{S.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=Ta,Q=Aa,ra=ma("form-create"),la=Va,Y=wa;return d(),x(la,null,{default:r(()=>[(d(!0),Z(pa,null,fa(a(U),(i,p)=>G((d(),x(Q,{key:p,class:"box-card"},{header:r(()=>[E("span",R,"\u5BA1\u6279\u4EFB\u52A1\u3010"+w(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(w(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(w(a(o).startUser.nickname)+" ",1),t(b,{size:"small",type:"info"},{default:r(()=>[f(w(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"]),E("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 H.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=>{I.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=>{$.value.open(n.id)})(i)},{default:r(()=>[t(u,{icon:"ep:back"}),f(" \u56DE\u9000 ")]),_:2},1032,["onClick"])])]),_:2},1024)]),_:2},1024)),[[Y,a(C)]])),128)),G((d(),x(Q,{class:"box-card"},{header:r(()=>[E("span",P,"\u7533\u8BF7\u4FE1\u606F\u3010"+w(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(T).value,"onUpdate:modelValue":e[0]||(e[0]=sa=>a(T).value=sa),option:a(T).option,rule:a(T).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(),Z("div",j,[t(a(K),{id:a(o).businessKey},null,8,["id"])])):D("",!0)]}),_:1})),[[Y,a(C)]]),t(Na,{loading:a(S),tasks:a(v)},null,8,["loading","tasks"]),t(Ja,{id:`${a(F)}`,"bpmn-xml":a(q),loading:a(C),"process-instance":a(o),tasks:a(v)},null,8,["id","bpmn-xml","loading","process-instance","tasks"]),t(Ia,{ref_key:"taskUpdateAssigneeFormRef",ref:H,onSuccess:g},null,512),t(Qa,{ref_key:"taskReturnDialogRef",ref:$,onSuccess:g},null,512),t(Za,{ref_key:"taskDelegateForm",ref:I,onSuccess:g},null,512),t(La,{ref_key:"taskAddSignDialogForm",ref:J,onSuccess:g},null,512)]),_:1})}}})});export{de as __tla,L as default};
|