1 |
- import{d as na,K as _a,an as ia,e as ca,r as s,f as ua,l as ma,al as fa,o as d,x,w as r,c as Z,v as pa,y as H,a,h as q,t as T,g as t,n as f,Q as V,F as da,ao as ya,ap as ha,aq as va,B as ka,am as ga,W as ba,G as xa,q as wa,D as Ca,E as Ta,J as Da,_ as Ua,__tla as Va}from"./index-3fb48822.js";import{_ as Sa,__tla as Ea}from"./ContentWrap-afa47a64.js";import{E as Fa,__tla as qa}from"./el-card-8960fd94.js";import{b as za}from"./formCreate-a3356cdc.js";import{a as Aa,__tla as Ba}from"./index-9cf1364c.js";import{g as Pa,__tla as Ra}from"./index-8774ccdd.js";import{a as Ia,r as Ka,g as $a,__tla as ja}from"./index-23e2bf51.js";import Ga,{__tla as Ja}from"./TaskUpdateAssigneeForm-5cf1703b.js";import Na,{__tla as Oa}from"./ProcessInstanceBpmnViewer-5d0d60d8.js";import Qa,{__tla as Wa}from"./ProcessInstanceTaskList-a8e9b552.js";import Ya,{__tla as Za}from"./TaskReturnDialogForm-8c91463b.js";import Ha,{__tla as La}from"./TaskDelegateForm-8c64ddd4.js";import Ma,{__tla as Xa}from"./TaskAddSignDialogForm-d989f9eb.js";import{u as ae,__tla as ee}from"./useMessage-b6c78c26.js";import{__tla as te}from"./Dialog-7d4425a0.js";import{__tla as re}from"./index-c00dcc25.js";import{__tla as le}from"./bpmn-embedded-50d2ec4b.js";import{__tla as se}from"./XTextButton-b9fe366b.js";import{__tla as oe}from"./XTextButton.vue_vue_type_style_index_0_scoped_bd4a9e34_lang-09ae687c.js";import{__tla as ne}from"./XButton-14042d98.js";import{__tla as _e}from"./el-collapse-item-b8b77673.js";import{__tla as ie}from"./el-link-e95fdc47.js";import{__tla as ce}from"./el-drawer-f7d5f704.js";import{__tla as ue}from"./dict-51415be4.js";import{__tla as me}from"./formatTime-1803573a.js";import{__tla as fe}from"./el-timeline-item-e5735e88.js";import{__tla as pe}from"./DictTag-ec8c74d3.js";import"./color-6e929987.js";import{__tla as de}from"./ProcessInstanceChildrenTaskList-f4d090bd.js";import{__tla as ye}from"./TaskSubSignDialogForm-5ee26d38.js";let L,he=Promise.all([(()=>{try{return Va}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return La}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{}})()]).then(async()=>{let z,A,B,P,R;z={class:"el-icon-picture-outline"},A={style:{"margin-bottom":"20px","margin-left":"10%","font-size":"14px"}},B={class:"el-icon-document"},P={key:1},R=na({name:"BpmProcessInstanceDetail",__name:"index",setup(ve){const{query:M}=_a(),S=ae(),{proxy:X}=ia(),aa=ca().getUser.id,E=M.id,w=s(!1),o=s({}),I=s(""),F=s(!0),v=s([]),D=s([]),k=s([]),ea=ua({reason:[{required:!0,message:"\u5BA1\u6279\u5EFA\u8BAE\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),U=s(),C=s({rule:[],option:{},value:{}}),K=async(n,e)=>{const l=D.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 Ia(h),S.success("\u5BA1\u6279\u901A\u8FC7\u6210\u529F")):(await Ka(h),S.success("\u5BA1\u6279\u4E0D\u901A\u8FC7\u6210\u529F")),g()},$=s(),j=s(),G=s(),J=s(),g=()=>{ta(),ra()},N=s(null),ta=async()=>{try{w.value=!0;const n=await Pa(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?(za(C,e.formConf,e.formFields,n.formVariables),ya().then(()=>{var l,b,y,h,u,m;(b=(l=U.value)==null?void 0:l.fapi)==null||b.btn.show(!1),(h=(y=U.value)==null?void 0:y.fapi)==null||h.resetBtn.show(!1),(m=(u=U.value)==null?void 0:u.fapi)==null||m.disabled(!0)})):N.value=ha(n.processDefinition.formCustomViewPath),I.value=await Aa(e.id)}finally{w.value=!1}},ra=async()=>{try{F.value=!0;const n=await $a(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),D.value=[],k.value=[],O(v.value)}finally{F.value=!1}},O=n=>{n.forEach(e=>{va(e.children)||O(e.children),e.result!==1&&e.result!==6||e.assigneeUser&&e.assigneeUser.id===aa&&(D.value.push({...e}),k.value.push({reason:""}))})};return ma(()=>{g()}),(n,e)=>{const l=ka,b=ga,y=ba,h=xa,u=wa,m=Ca,Q=Ta,W=Fa,la=fa("form-create"),sa=Sa,Y=Da;return d(),x(sa,null,{default:r(()=>[(d(!0),Z(da,null,pa(a(D),(i,p)=>H((d(),x(W,{key:p,class:"box-card"},{header:r(()=>[q("span",z,"\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"]),q("div",A,[t(m,{type:"success",onClick:c=>K(i,!0)},{default:r(()=>[t(u,{icon:"ep:select"}),f(" \u901A\u8FC7 ")]),_:2},1032,["onClick"]),t(m,{type:"danger",onClick:c=>K(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 _=>{J.value.open(_.id)})(i)},{default:r(()=>[t(u,{icon:"ep:plus"}),f(" \u52A0\u7B7E ")]),_:2},1032,["onClick"]),t(m,{type:"warning",onClick:c=>(async _=>{G.value.open(_.id)})(i)},{default:r(()=>[t(u,{icon:"ep:back"}),f(" \u56DE\u9000 ")]),_:2},1032,["onClick"])])]),_:2},1024)]),_:2},1024)),[[Y,a(w)]])),128)),H((d(),x(W,{class:"box-card"},{header:r(()=>[q("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(Q,{key:0,offset:6,span:16},{default:r(()=>[t(la,{ref_key:"fApi",ref:U,modelValue:a(C).value,"onUpdate:modelValue":e[0]||(e[0]=oa=>a(C).value=oa),option:a(C).option,rule:a(C).rule},null,8,["modelValue","option","rule"])]),_:1})):V("",!0),((_=(c=a(o))==null?void 0:c.processDefinition)==null?void 0:_.formType)===20?(d(),Z("div",P,[t(a(N),{id:a(o).businessKey},null,8,["id"])])):V("",!0)]}),_:1})),[[Y,a(w)]]),t(Qa,{loading:a(F),tasks:a(v)},null,8,["loading","tasks"]),t(Na,{id:`${a(E)}`,"bpmn-xml":a(I),loading:a(w),"process-instance":a(o),tasks:a(v)},null,8,["id","bpmn-xml","loading","process-instance","tasks"]),t(Ga,{ref_key:"taskUpdateAssigneeFormRef",ref:$,onSuccess:g},null,512),t(Ya,{ref_key:"taskReturnDialogRef",ref:G,onSuccess:g},null,512),t(Ha,{ref_key:"taskDelegateForm",ref:j,onSuccess:g},null,512),t(Ma,{ref_key:"taskAddSignDialogForm",ref:J,onSuccess:g},null,512)]),_:1})}}}),L=Ua(R,[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/bpm/processInstance/detail/index.vue"]])});export{he as __tla,L as default};
|