index-52f9348a.js 7.8 KB

1
  1. import{d as na,$ as _a,j as ia,ax as ca,r as s,x as ua,b as ma,av as fa,o as d,C as x,A as r,c as Z,R as pa,k as G,a,B as F,E as T,f as t,D as f,a3 as V,F as da,n as ya,ay as ha,az as va,V as ka,aw as ga,a9 as ba,W as xa,Q as Ca,J as wa,H as Ta,Z as Da,_ as Ua,__tla as Va}from"./index-286756b9.js";import{_ as za,__tla as Ba}from"./ContentWrap-83998678.js";import{E as Ea,__tla as Fa}from"./el-card-d3d5a654.js";import{b as Sa}from"./formCreate-a3356cdc.js";import{a as Aa,__tla as Ra}from"./index-564bb4c8.js";import{g as Pa,__tla as $a}from"./index-afd1ad44.js";import{a as ja,r as qa,g as Ia,__tla as Qa}from"./index-79b3dd94.js";import Ha,{__tla as Ja}from"./TaskUpdateAssigneeForm-6daae53a.js";import Ka,{__tla as Na}from"./ProcessInstanceBpmnViewer-50d40161.js";import Oa,{__tla as Wa}from"./ProcessInstanceTaskList-f32cabcc.js";import Ya,{__tla as Za}from"./TaskReturnDialogForm-57b0f9e5.js";import Ga,{__tla as La}from"./TaskDelegateForm-e677a58e.js";import Ma,{__tla as Xa}from"./TaskAddSignDialogForm-c3e35c19.js";import{u as ae,__tla as ee}from"./useMessage-084b1e70.js";import{__tla as te}from"./Dialog-4c2de357.js";import{__tla as re}from"./index-c725f8b2.js";import{__tla as le}from"./bpmn-embedded-51a4e805.js";import{__tla as se}from"./XTextButton-3e07ae17.js";import{__tla as oe}from"./XTextButton.vue_vue_type_style_index_0_scoped_bd4a9e34_lang-6af260a5.js";import{__tla as ne}from"./XButton-5a69f3c3.js";import{__tla as _e}from"./el-collapse-item-dbcbc3e1.js";import{__tla as ie}from"./el-link-c30faa98.js";import{__tla as ce}from"./el-drawer-e585879f.js";import{__tla as ue}from"./dict-82dca549.js";import{__tla as me}from"./formatTime-83e416ef.js";import{__tla as fe}from"./el-timeline-item-c7efc654.js";import{__tla as pe}from"./DictTag-f72b04ca.js";import"./color-6e929987.js";import{__tla as de}from"./ProcessInstanceChildrenTaskList-be9e541d.js";import{__tla as ye}from"./TaskSubSignDialogForm-8ebdc997.js";let L,he=Promise.all([(()=>{try{return Va}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Na}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 S,A,R,P,$;S={class:"el-icon-picture-outline"},A={style:{"margin-bottom":"20px","margin-left":"10%","font-size":"14px"}},R={class:"el-icon-document"},P={key:1},$=na({name:"BpmProcessInstanceDetail",__name:"index",setup(ve){const{query:M}=_a(),z=ae(),{proxy:X}=ia(),aa=ca().getUser.id,B=M.id,C=s(!1),o=s({}),j=s(""),E=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:{}}),q=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),z.success("\u5BA1\u6279\u901A\u8FC7\u6210\u529F")):(await qa(h),z.success("\u5BA1\u6279\u4E0D\u901A\u8FC7\u6210\u529F")),g()},I=s(),Q=s(),H=s(),J=s(),g=()=>{ta(),ra()},K=s(null),ta=async()=>{try{C.value=!0;const n=await Pa(B);if(!n)return void z.error("\u67E5\u8BE2\u4E0D\u5230\u6D41\u7A0B\u4FE1\u606F\uFF01");o.value=n;const e=n.processDefinition;e.formType===10?(Sa(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)})):K.value=ha(n.processDefinition.formCustomViewPath),j.value=await Aa(e.id)}finally{C.value=!1}},ra=async()=>{try{E.value=!0;const n=await Ia(B);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=[],N(v.value)}finally{E.value=!1}},N=n=>{n.forEach(e=>{va(e.children)||N(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,O=Ta,W=Ea,la=fa("form-create"),sa=za,Y=Da;return d(),x(sa,null,{default:r(()=>[(d(!0),Z(da,null,pa(a(D),(i,p)=>G((d(),x(W,{key:p,class:"box-card"},{header:r(()=>[F("span",S,"\u5BA1\u6279\u4EFB\u52A1\u3010"+T(i.name)+"\u3011",1)]),default:r(()=>[t(O,{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"]),F("div",A,[t(m,{type:"success",onClick:c=>q(i,!0)},{default:r(()=>[t(u,{icon:"ep:select"}),f(" \u901A\u8FC7 ")]),_:2},1032,["onClick"]),t(m,{type:"danger",onClick:c=>q(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 _=>{Q.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 _=>{H.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)),G((d(),x(W,{class:"box-card"},{header:r(()=>[F("span",R,"\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(O,{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(),Z("div",P,[t(a(K),{id:a(o).businessKey},null,8,["id"])])):V("",!0)]}),_:1})),[[Y,a(C)]]),t(Oa,{loading:a(E),tasks:a(v)},null,8,["loading","tasks"]),t(Ka,{id:`${a(B)}`,"bpmn-xml":a(j),loading:a(C),"process-instance":a(o),tasks:a(v)},null,8,["id","bpmn-xml","loading","process-instance","tasks"]),t(Ha,{ref_key:"taskUpdateAssigneeFormRef",ref:I,onSuccess:g},null,512),t(Ya,{ref_key:"taskReturnDialogRef",ref:H,onSuccess:g},null,512),t(Ga,{ref_key:"taskDelegateForm",ref:Q,onSuccess:g},null,512),t(Ma,{ref_key:"taskAddSignDialogForm",ref:J,onSuccess:g},null,512)]),_:1})}}}),L=Ua($,[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/bpm/processInstance/detail/index.vue"]])});export{he as __tla,L as default};