index-528b4478.js 7.9 KB

1
  1. import{d as na,J as _a,am as ia,b as ca,r as s,e as ua,l as ma,ak as fa,o as d,v as x,w as r,c as L,q as pa,x as M,a,g as S,t as T,f as t,n as f,P as D,F as da,an as ya,ao as ha,ap as va,A as ka,al as ga,V as ba,D as xa,j as Ca,C as wa,E as Ta,I as Ua,_ as Va,__tla as Da}from"./index-00b1998d.js";import{_ as Ea,__tla as Fa}from"./ContentWrap-31b34b9c.js";import{E as Pa,__tla as Sa}from"./el-card-fa7e872f.js";import{b as za}from"./formCreate-a3356cdc.js";import{a as Aa,__tla as Ba}from"./index-55ff0c5b.js";import{g as qa,__tla as Ia}from"./index-243e0512.js";import{a as Ra,r as ja,g as $a,__tla as Ja}from"./index-7fdb611d.js";import Ka,{__tla as Na}from"./TaskUpdateAssigneeForm-2c9ebd71.js";import Oa,{__tla as Ya}from"./ProcessInstanceBpmnViewer-6d87749c.js";import Za,{__tla as Ga}from"./ProcessInstanceTaskList-c8aece9b.js";import Ha,{__tla as La}from"./TaskReturnDialogForm-daf23f9d.js";import Ma,{__tla as Qa}from"./TaskDelegateForm-c6b731c0.js";import Wa,{__tla as Xa}from"./TaskAddSignDialogForm-9f985f19.js";import{u as ae,__tla as ee}from"./useMessage-437e6444.js";import{__tla as te}from"./ContentWrap.vue_vue_type_script_setup_true_lang-d8a41a7a.js";import{__tla as re}from"./Dialog-5ff7ce4c.js";import{__tla as le}from"./index-95f83a81.js";import{__tla as se}from"./bpmn-embedded-38eec6be.js";import{__tla as oe}from"./XTextButton-ebcf92a2.js";import{__tla as ne}from"./XTextButton.vue_vue_type_style_index_0_scoped_bd4a9e34_lang-1295219d.js";import{__tla as _e}from"./XButton-1b10260a.js";import{__tla as ie}from"./el-collapse-item-aae122ad.js";import{__tla as ce}from"./el-link-20ce8117.js";import{__tla as ue}from"./el-drawer-4bd1b164.js";import{__tla as me}from"./dict-29c23f6f.js";import{__tla as fe}from"./formatTime-4e31c660.js";import{__tla as pe}from"./el-timeline-item-7324aad8.js";import{__tla as de}from"./DictTag-5674b0a2.js";import"./color-6e929987.js";import{__tla as ye}from"./ProcessInstanceChildrenTaskList-97012d61.js";import{__tla as he}from"./TaskSubSignDialogForm-b2fc9055.js";let Q,ve=Promise.all([(()=>{try{return Da}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Xa}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 ne}catch{}})(),(()=>{try{return _e}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{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return he}catch{}})()]).then(async()=>{let z,A,B,q,I;z={class:"el-icon-picture-outline"},A={style:{"margin-bottom":"20px","margin-left":"10%","font-size":"14px"}},B={class:"el-icon-document"},q={key:1},I=na({name:"BpmProcessInstanceDetail",__name:"index",setup(ke){const{query:W}=_a(),E=ae(),{proxy:X}=ia(),aa=ca().getUser.id,F=W.id,C=s(!1),o=s({}),R=s(""),P=s(!0),v=s([]),U=s([]),k=s([]),ea=ua({reason:[{required:!0,message:"\u5BA1\u6279\u5EFA\u8BAE\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),V=s(),w=s({rule:[],option:{},value:{}}),j=async(n,e)=>{const l=U.value.indexOf(n),b=X.$refs["form"+l][0],y=a(b);if(!y||!await y.validate())return;const h={id:n.id,reason:k.value[l].reason};e?(await Ra(h),E.success("\u5BA1\u6279\u901A\u8FC7\u6210\u529F")):(await ja(h),E.success("\u5BA1\u6279\u4E0D\u901A\u8FC7\u6210\u529F")),g()},$=s(),J=s(),K=s(),N=s(),g=()=>{ta(),ra()},O=s(null),ta=async()=>{try{C.value=!0;const n=await qa(F);if(!n)return void E.error("\u67E5\u8BE2\u4E0D\u5230\u6D41\u7A0B\u4FE1\u606F\uFF01");o.value=n;const e=n.processDefinition;e.formType===10?(za(w,e.formConf,e.formFields,n.formVariables),ya().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)})):O.value=ha(n.processDefinition.formCustomViewPath),R.value=await Aa(e.id)}finally{C.value=!1}},ra=async()=>{try{P.value=!0;const n=await $a(F);v.value=[],n.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=[],Y(v.value)}finally{P.value=!1}},Y=n=>{n.forEach(e=>{va(e.children)||Y(e.children),e.result!==1&&e.result!==6||e.assigneeUser&&e.assigneeUser.id===aa&&(U.value.push({...e}),k.value.push({reason:""}))})};return ma(()=>{g()}),(n,e)=>{const l=ka,b=ga,y=ba,h=xa,u=Ca,m=wa,Z=Ta,G=Pa,la=fa("form-create"),sa=Ea,H=Ua;return d(),x(sa,null,{default:r(()=>[(d(!0),L(da,null,pa(a(U),(i,p)=>M((d(),x(G,{key:p,class:"box-card"},{header:r(()=>[S("span",z,"\u5BA1\u6279\u4EFB\u52A1\u3010"+T(i.name)+"\u3011",1)]),default:r(()=>[t(Z,{offset:6,span:16},{default:r(()=>[t(h,{ref_for:!0,ref:"form"+p,model:a(k)[p],rules:a(ea),"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",A,[t(m,{type:"success",onClick:c=>j(i,!0)},{default:r(()=>[t(u,{icon:"ep:select"}),f(" \u901A\u8FC7 ")]),_:2},1032,["onClick"]),t(m,{type:"danger",onClick:c=>j(i,!1)},{default:r(()=>[t(u,{icon:"ep:close"}),f(" \u4E0D\u901A\u8FC7 ")]),_:2},1032,["onClick"]),t(m,{type:"primary",onClick:c=>{return _=i.id,void $.value.open(_);var _}},{default:r(()=>[t(u,{icon:"ep:edit"}),f(" \u8F6C\u529E ")]),_:2},1032,["onClick"]),t(m,{type:"primary",onClick:c=>(async _=>{J.value.open(_.id)})(i)},{default:r(()=>[t(u,{icon:"ep:position"}),f(" \u59D4\u6D3E ")]),_:2},1032,["onClick"]),t(m,{type:"primary",onClick:c=>(async _=>{N.value.open(_.id)})(i)},{default:r(()=>[t(u,{icon:"ep:plus"}),f(" \u52A0\u7B7E ")]),_:2},1032,["onClick"]),t(m,{type:"warning",onClick:c=>(async _=>{K.value.open(_.id)})(i)},{default:r(()=>[t(u,{icon:"ep:back"}),f(" \u56DE\u9000 ")]),_:2},1032,["onClick"])])]),_:2},1024)]),_:2},1024)),[[H,a(C)]])),128)),M((d(),x(G,{class:"box-card"},{header:r(()=>[S("span",B,"\u7533\u8BF7\u4FE1\u606F\u3010"+T(a(o).name)+"\u3011",1)]),default:r(()=>{var i,p,c,_;return[((p=(i=a(o))==null?void 0:i.processDefinition)==null?void 0:p.formType)===10?(d(),x(Z,{key:0,offset:6,span:16},{default:r(()=>[t(la,{ref_key:"fApi",ref:V,modelValue:a(w).value,"onUpdate:modelValue":e[0]||(e[0]=oa=>a(w).value=oa),option:a(w).option,rule:a(w).rule},null,8,["modelValue","option","rule"])]),_:1})):D("",!0),((_=(c=a(o))==null?void 0:c.processDefinition)==null?void 0:_.formType)===20?(d(),L("div",q,[t(a(O),{id:a(o).businessKey},null,8,["id"])])):D("",!0)]}),_:1})),[[H,a(C)]]),t(Za,{loading:a(P),tasks:a(v)},null,8,["loading","tasks"]),t(Oa,{id:`${a(F)}`,"bpmn-xml":a(R),loading:a(C),"process-instance":a(o),tasks:a(v)},null,8,["id","bpmn-xml","loading","process-instance","tasks"]),t(Ka,{ref_key:"taskUpdateAssigneeFormRef",ref:$,onSuccess:g},null,512),t(Ha,{ref_key:"taskReturnDialogRef",ref:K,onSuccess:g},null,512),t(Ma,{ref_key:"taskDelegateForm",ref:J,onSuccess:g},null,512),t(Wa,{ref_key:"taskAddSignDialogForm",ref:N,onSuccess:g},null,512)]),_:1})}}}),Q=Va(I,[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/bpm/processInstance/detail/index.vue"]])});export{ve as __tla,Q as default};