index-fd6edbb7.js 7.8 KB

1
  1. import{d as na,N as _a,an as ia,ao as ca,r as s,g as ua,z as ma,h as fa,o as d,k as x,w as r,c as G,C as pa,D as H,a,j as I,t as T,i as t,l as f,S as V,F as da,ap as ya,aq as ha,ar as va,I as ka,am as ga,Y as ba,J as xa,n as Ca,s as wa,E as Ta,M as Da,_ as Ua,__tla as Va}from"./index-2f799233.js";import{_ as Sa,__tla as za}from"./ContentWrap-9da801df.js";import{E as Fa,__tla as Ia}from"./el-card-c64c83d1.js";import{b as Aa}from"./formCreate-a3356cdc.js";import{a as Ea,__tla as Pa}from"./index-80c424f4.js";import{g as qa,__tla as Ra}from"./index-4804615a.js";import{a as ja,r as Ba,g as Na,__tla as $a}from"./index-6627f2e4.js";import Ja,{__tla as Ka}from"./TaskUpdateAssigneeForm-4849a3d1.js";import Ma,{__tla as Oa}from"./ProcessInstanceBpmnViewer-f831c7a0.js";import Qa,{__tla as Ya}from"./ProcessInstanceTaskList-a5641cb3.js";import Za,{__tla as Ga}from"./TaskReturnDialogForm-771f7ecb.js";import Ha,{__tla as La}from"./TaskDelegateForm-db34bf4e.js";import Wa,{__tla as Xa}from"./TaskAddSignDialogForm-bc19e173.js";import{u as ae,__tla as ee}from"./useMessage-e567ad40.js";import{__tla as te}from"./Dialog-6fd39e06.js";import{__tla as re}from"./index-dd9c509d.js";import{__tla as le}from"./bpmn-embedded-81368235.js";import{__tla as se}from"./XTextButton-ca69ef35.js";import{__tla as oe}from"./XTextButton.vue_vue_type_style_index_0_scoped_bd4a9e34_lang-82a9ef41.js";import{__tla as ne}from"./XButton-12871131.js";import{__tla as _e}from"./el-collapse-item-086c9c49.js";import{__tla as ie}from"./el-link-23decf79.js";import{__tla as ce}from"./el-drawer-a8e04406.js";import{__tla as ue}from"./dict-20c916e2.js";import{__tla as me}from"./formatTime-2157894c.js";import{__tla as fe}from"./el-timeline-item-e925b025.js";import{__tla as pe}from"./DictTag-ea4c6cc2.js";import"./color-6e929987.js";import{__tla as de}from"./ProcessInstanceChildrenTaskList-aed7af79.js";import{__tla as ye}from"./TaskSubSignDialogForm-1449c9f5.js";let L,he=Promise.all([(()=>{try{return Va}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ga}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 A,E,P,q,R;A={class:"el-icon-picture-outline"},E={style:{"margin-bottom":"20px","margin-left":"10%","font-size":"14px"}},P={class:"el-icon-document"},q={key:1},R=na({name:"BpmProcessInstanceDetail",__name:"index",setup(ve){const{query:W}=_a(),S=ae(),{proxy:X}=ia(),aa=ca().getUser.id,z=W.id,C=s(!1),o=s({}),j=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(),w=s({rule:[],option:{},value:{}}),B=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 ja(h),S.success("\u5BA1\u6279\u901A\u8FC7\u6210\u529F")):(await Ba(h),S.success("\u5BA1\u6279\u4E0D\u901A\u8FC7\u6210\u529F")),g()},N=s(),$=s(),J=s(),K=s(),g=()=>{ta(),ra()},M=s(null),ta=async()=>{try{C.value=!0;const n=await qa(z);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?(Aa(w,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)})):M.value=ha(n.processDefinition.formCustomViewPath),j.value=await Ea(e.id)}finally{C.value=!1}},ra=async()=>{try{F.value=!0;const n=await Na(z);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=Ca,m=wa,Q=Ta,Y=Fa,la=fa("form-create"),sa=Sa,Z=Da;return d(),x(sa,null,{default:r(()=>[(d(!0),G(da,null,pa(a(D),(i,p)=>H((d(),x(Y,{key:p,class:"box-card"},{header:r(()=>[I("span",A,"\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"]),I("div",E,[t(m,{type:"success",onClick:c=>B(i,!0)},{default:r(()=>[t(u,{icon:"ep:select"}),f(" \u901A\u8FC7 ")]),_:2},1032,["onClick"]),t(m,{type:"danger",onClick:c=>B(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 N.value.open(_);var _}},{default:r(()=>[t(u,{icon:"ep:edit"}),f(" \u8F6C\u529E ")]),_:2},1032,["onClick"]),t(m,{type:"primary",onClick:c=>(async _=>{$.value.open(_.id)})(i)},{default:r(()=>[t(u,{icon:"ep:position"}),f(" \u59D4\u6D3E ")]),_:2},1032,["onClick"]),t(m,{type:"primary",onClick:c=>(async _=>{K.value.open(_.id)})(i)},{default:r(()=>[t(u,{icon:"ep:plus"}),f(" \u52A0\u7B7E ")]),_:2},1032,["onClick"]),t(m,{type:"warning",onClick:c=>(async _=>{J.value.open(_.id)})(i)},{default:r(()=>[t(u,{icon:"ep:back"}),f(" \u56DE\u9000 ")]),_:2},1032,["onClick"])])]),_:2},1024)]),_:2},1024)),[[Z,a(C)]])),128)),H((d(),x(Y,{class:"box-card"},{header:r(()=>[I("span",P,"\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(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",q,[t(a(M),{id:a(o).businessKey},null,8,["id"])])):V("",!0)]}),_:1})),[[Z,a(C)]]),t(Qa,{loading:a(F),tasks:a(v)},null,8,["loading","tasks"]),t(Ma,{id:`${a(z)}`,"bpmn-xml":a(j),loading:a(C),"process-instance":a(o),tasks:a(v)},null,8,["id","bpmn-xml","loading","process-instance","tasks"]),t(Ja,{ref_key:"taskUpdateAssigneeFormRef",ref:N,onSuccess:g},null,512),t(Za,{ref_key:"taskReturnDialogRef",ref:J,onSuccess:g},null,512),t(Ha,{ref_key:"taskDelegateForm",ref:$,onSuccess:g},null,512),t(Wa,{ref_key:"taskAddSignDialogForm",ref:K,onSuccess:g},null,512)]),_:1})}}}),L=Ua(R,[["__file","D:/zx/mall-newfeifan-zx-business/src/views/bpm/processInstance/detail/index.vue"]])});export{he as __tla,L as default};