1 |
- import{d as na,O as _a,al as ia,e as ca,r as s,f as ua,B as ma,aj as fa,o as d,l as x,w as r,c as G,k as pa,C as L,a,g as A,t as T,i as t,j as f,a2 as V,F as da,am as ya,an as ha,ao as va,H as ka,ak as ga,U as ba,K as xa,v as Ca,J as wa,E as Ta,N as Ua,_ as Da,__tla as Va}from"./index-af173888.js";import{_ as Sa,__tla as Ea}from"./ContentWrap-b959c1be.js";import{E as Fa,__tla as Aa}from"./el-card-178b9654.js";import{b as Ra}from"./formCreate-a3356cdc.js";import{a as ja,__tla as za}from"./index-caf5919d.js";import{g as Ba,__tla as Pa}from"./index-91d7c295.js";import{a as qa,r as Ha,g as Ia,__tla as Ka}from"./index-ebedebc4.js";import Na,{__tla as Oa}from"./TaskUpdateAssigneeForm-b028e5d1.js";import $a,{__tla as Ja}from"./ProcessInstanceBpmnViewer-5d0d437b.js";import Qa,{__tla as Xa}from"./ProcessInstanceTaskList-2b036504.js";import Ya,{__tla as Ga}from"./TaskReturnDialogForm-fadee453.js";import La,{__tla as Ma}from"./TaskDelegateForm-8cc5e099.js";import Wa,{__tla as Za}from"./TaskAddSignDialogForm-23d718ab.js";import{u as ae,__tla as ee}from"./useMessage-170c1b43.js";import{__tla as te}from"./Dialog-987c90a1.js";import{__tla as re}from"./index-f465cbfa.js";import{__tla as le}from"./bpmn-embedded-6e9156b8.js";import{__tla as se}from"./XTextButton-5dd30649.js";import{__tla as oe}from"./XButton-9933c2d2.js";import{__tla as ne}from"./el-collapse-item-c60eb47f.js";import{__tla as _e}from"./el-link-3e92dcd8.js";import{__tla as ie}from"./el-drawer-3ec81ec6.js";import{__tla as ce}from"./dict-093d1dfa.js";import{__tla as ue}from"./formatTime-8a6f6c49.js";import{__tla as me}from"./el-timeline-item-4ef8f91a.js";import{__tla as fe}from"./DictTag-4a35e2b7.js";import"./color-6e929987.js";import{__tla as pe}from"./ProcessInstanceChildrenTaskList-1361b580.js";import{__tla as de}from"./TaskSubSignDialogForm-8112e60c.js";let M,ye=Promise.all([(()=>{try{return Va}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Za}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{}})()]).then(async()=>{let R,j,z,B,P;R={class:"el-icon-picture-outline"},j={style:{"margin-bottom":"20px","margin-left":"10%","font-size":"14px"}},z={class:"el-icon-document"},B={key:1},P=na({name:"BpmProcessInstanceDetail",__name:"index",setup(he){const{query:W}=_a(),S=ae(),{proxy:Z}=ia(),aa=ca().getUser.id,E=W.id,C=s(!1),o=s({}),q=s(""),F=s(!0),v=s([]),U=s([]),k=s([]),ea=ua({reason:[{required:!0,message:"\u5BA1\u6279\u5EFA\u8BAE\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),D=s(),w=s({rule:[],option:{},value:{}}),H=async(n,e)=>{const l=U.value.indexOf(n),b=Z.$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 qa(h),S.success("\u5BA1\u6279\u901A\u8FC7\u6210\u529F")):(await Ha(h),S.success("\u5BA1\u6279\u4E0D\u901A\u8FC7\u6210\u529F")),g()},I=s(),K=s(),N=s(),O=s(),g=()=>{ta(),ra()},$=s(null),ta=async()=>{try{C.value=!0;const n=await Ba(E);if(!n)return void S.error("\u67E5\u8BE2\u4E0D\u5230\u6D41\u7A0B\u4FE1\u606F\uFF01");o.value=n;const e=n.processDefinition;e.formType===10?(Ra(w,e.formConf,e.formFields,n.formVariables),ya().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)})):$.value=ha(n.processDefinition.formCustomViewPath),q.value=await ja(e.id)}finally{C.value=!1}},ra=async()=>{try{F.value=!0;const n=await Ia(E);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=[],J(v.value)}finally{F.value=!1}},J=n=>{n.forEach(e=>{va(e.children)||J(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,Q=Ta,X=Fa,la=fa("form-create"),sa=Sa,Y=Ua;return d(),x(sa,null,{default:r(()=>[(d(!0),G(da,null,pa(a(U),(i,p)=>L((d(),x(X,{key:p,class:"box-card"},{header:r(()=>[A("span",R,"\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(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})):V("",!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})):V("",!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"]),A("div",j,[t(m,{type:"success",onClick:c=>H(i,!0)},{default:r(()=>[t(u,{icon:"ep:select"}),f(" \u901A\u8FC7 ")]),_:2},1032,["onClick"]),t(m,{type:"danger",onClick:c=>H(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 I.value.open(_);var _}},{default:r(()=>[t(u,{icon:"ep:edit"}),f(" \u8F6C\u529E ")]),_:2},1032,["onClick"]),t(m,{type:"primary",onClick:c=>(async _=>{K.value.open(_.id)})(i)},{default:r(()=>[t(u,{icon:"ep:position"}),f(" \u59D4\u6D3E ")]),_:2},1032,["onClick"]),t(m,{type:"primary",onClick:c=>(async _=>{O.value.open(_.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(_.id)})(i)},{default:r(()=>[t(u,{icon:"ep:back"}),f(" \u56DE\u9000 ")]),_:2},1032,["onClick"])])]),_:2},1024)]),_:2},1024)),[[Y,a(C)]])),128)),L((d(),x(X,{class:"box-card"},{header:r(()=>[A("span",z,"\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(Q,{key:0,offset:6,span:16},{default:r(()=>[t(la,{ref_key:"fApi",ref:D,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})):V("",!0),((_=(c=a(o))==null?void 0:c.processDefinition)==null?void 0:_.formType)===20?(d(),G("div",B,[t(a($),{id:a(o).businessKey},null,8,["id"])])):V("",!0)]}),_:1})),[[Y,a(C)]]),t(Qa,{loading:a(F),tasks:a(v)},null,8,["loading","tasks"]),t($a,{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(Na,{ref_key:"taskUpdateAssigneeFormRef",ref:I,onSuccess:g},null,512),t(Ya,{ref_key:"taskReturnDialogRef",ref:N,onSuccess:g},null,512),t(La,{ref_key:"taskDelegateForm",ref:K,onSuccess:g},null,512),t(Wa,{ref_key:"taskAddSignDialogForm",ref:O,onSuccess:g},null,512)]),_:1})}}}),M=Da(P,[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/bpm/processInstance/detail/index.vue"]])});export{ye as __tla,M as default};
|