index-19d20555.js 8.1 KB

1
  1. import{d as oa,N as _a,am as na,an as ia,r as s,f as ca,z as ua,h as ma,o as d,j as C,w as r,c as G,C as fa,D as H,a,k as E,t as w,i as t,m as f,l as V,F as pa,ao as da,ap as ya,aq as ha,I as ka,al as va,X as ga,J as ba,_ as Ca,q as xa,E as Ta,M as wa,__tla as Ua}from"./index-1e808f2e.js";import{_ as Da,__tla as Va}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{E as qa,__tla as Fa}from"./el-card-03b3588b.js";import{b as Sa}from"./formCreate-a3356cdc.js";import{a as Ea,__tla as za}from"./index-3c6e5ffc.js";import{g as Aa,__tla as Ba}from"./index-76ea2ca5.js";import{a as Ia,r as Pa,g as Ra,__tla as ja}from"./index-b7af8a4a.js";import{_ as Na,__tla as $a}from"./TaskUpdateAssigneeForm.vue_vue_type_script_setup_true_lang-b9027f62.js";import{_ as Ja,__tla as Ka}from"./ProcessInstanceBpmnViewer.vue_vue_type_style_index_0_lang-139a505e.js";import{_ as Ma,__tla as Oa}from"./ProcessInstanceTaskList.vue_vue_type_script_setup_true_lang-266ba4d9.js";import{_ as Qa,__tla as Xa}from"./TaskReturnDialogForm.vue_vue_type_script_name_TaskRollbackDialogForm_setup_true_lang-f445d680.js";import{_ as Ga,__tla as Ha}from"./TaskDelegateForm.vue_vue_type_script_setup_true_lang-dac1fa9f.js";import{_ as La,__tla as Wa}from"./TaskAddSignDialogForm.vue_vue_type_script_setup_true_lang-6c37539f.js";import{u as Ya,__tla as Za}from"./useMessage-5f9e8917.js";import{__tla as ae}from"./Dialog-f44f9d78.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ee}from"./index-684d98da.js";import{__tla as te}from"./bpmn-embedded-fd00c79d.js";import{__tla as re}from"./XTextButton-c7a74f67.js";import{__tla as le}from"./XTextButton.vue_vue_type_style_index_0_scoped_7561ab3f_lang-a71ee685.js";import{__tla as se}from"./XButton-5f4b0954.js";import{__tla as oe}from"./el-collapse-item-e45787ff.js";import{__tla as _e}from"./el-link-1faa17b5.js";import{__tla as ne}from"./el-drawer-6c08a2c2.js";import{__tla as ie}from"./dict-a31cb4ba.js";import{__tla as ce}from"./formatTime-a348c3be.js";import{__tla as ue}from"./el-timeline-item-cb959fb7.js";import{__tla as me}from"./DictTag.vue_vue_type_script_lang-5c02ebfe.js";import"./color-6e929987.js";import{__tla as fe}from"./ProcessInstanceChildrenTaskList.vue_vue_type_script_setup_true_lang-74c6aa40.js";import{__tla as pe}from"./TaskSubSignDialogForm.vue_vue_type_script_name_TaskRollbackDialogForm_setup_true_lang-3722e3c4.js";let L,de=Promise.all([(()=>{try{return Ua}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Wa}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 z,A,B,I;z={class:"el-icon-picture-outline"},A={style:{"margin-bottom":"20px","margin-left":"10%","font-size":"14px"}},B={class:"el-icon-document"},I={key:1},L=oa({name:"BpmProcessInstanceDetail",__name:"index",setup(ye){const{query:W}=_a(),q=Ya(),{proxy:Y}=na(),Z=ia().getUser.id,F=W.id,x=s(!1),o=s({}),P=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"}]}),D=s(),T=s({rule:[],option:{},value:{}}),R=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 Ia(h),q.success("\u5BA1\u6279\u901A\u8FC7\u6210\u529F")):(await Pa(h),q.success("\u5BA1\u6279\u4E0D\u901A\u8FC7\u6210\u529F")),g()},j=s(),N=s(),$=s(),J=s(),g=()=>{ea(),ta()},K=s(null),ea=async()=>{try{x.value=!0;const _=await Aa(F);if(!_)return void q.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=D.value)==null?void 0:l.fapi)==null||b.btn.show(!1),(h=(y=D.value)==null?void 0:y.fapi)==null||h.resetBtn.show(!1),(m=(u=D.value)==null?void 0:u.fapi)==null||m.disabled(!0)})):K.value=ya(_.processDefinition.formCustomViewPath),P.value=await Ea(e.id)}finally{x.value=!1}},ta=async()=>{try{S.value=!0;const _=await Ra(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=[],M(k.value)}finally{S.value=!1}},M=_=>{_.forEach(e=>{ha(e.children)||M(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,O=Ta,Q=qa,ra=ma("form-create"),la=Da,X=wa;return d(),C(la,null,{default:r(()=>[(d(!0),G(pa,null,fa(a(U),(i,p)=>H((d(),C(Q,{key:p,class:"box-card"},{header:r(()=>[E("span",z,"\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(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(w(a(o).name),1)]),_:1})):V("",!0),a(o)&&a(o).startUser?(d(),C(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})):V("",!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"]),E("div",A,[t(m,{type:"success",onClick:c=>R(i,!0)},{default:r(()=>[t(u,{icon:"ep:select"}),f(" \u901A\u8FC7 ")]),_:2},1032,["onClick"]),t(m,{type:"danger",onClick:c=>R(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=>{N.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)),[[X,a(x)]])),128)),H((d(),C(Q,{class:"box-card"},{header:r(()=>[E("span",B,"\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(),C(O,{key:0,offset:6,span:16},{default:r(()=>[t(ra,{ref_key:"fApi",ref:D,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})):V("",!0),((n=(c=a(o))==null?void 0:c.processDefinition)==null?void 0:n.formType)===20?(d(),G("div",I,[t(a(K),{id:a(o).businessKey},null,8,["id"])])):V("",!0)]}),_:1})),[[X,a(x)]]),t(Ma,{loading:a(S),tasks:a(k)},null,8,["loading","tasks"]),t(Ja,{id:`${a(F)}`,"bpmn-xml":a(P),loading:a(x),"process-instance":a(o),tasks:a(k)},null,8,["id","bpmn-xml","loading","process-instance","tasks"]),t(Na,{ref_key:"taskUpdateAssigneeFormRef",ref:j,onSuccess:g},null,512),t(Qa,{ref_key:"taskReturnDialogRef",ref:$,onSuccess:g},null,512),t(Ga,{ref_key:"taskDelegateForm",ref:N,onSuccess:g},null,512),t(La,{ref_key:"taskAddSignDialogForm",ref:J,onSuccess:g},null,512)]),_:1})}}})});export{de as __tla,L as default};