import{d as L,u as Q,Q as W,J as X,r as d,A as Z,dz as j,b as G,a1 as ee,o as s,c as m,k as a,B as t,a as l,F as c,i as w,g as i,a2 as M,a3 as ae,N as B,P as k,O as V,D as A,C as le,h as te,b9 as oe,$ as re,R as se,S as ne,a7 as ie,T as pe,W as de,X as ue,V as me,Y as ce,Z as fe}from"./index-CHTXMeh8.js";import{_ as be}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as we}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import{_ as ge}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as E,a as _e}from"./formatTime-DG99nHw2.js";import{d as ye,e as ve}from"./index-GzuMZCCW.js";import{C as he}from"./index-Dppb265m.js";import{g as ke}from"./index-DYclHsjD.js";import"./index-DVe591HI.js";import"./color-DXkOL5Tu.js";import"./el-card-Bdk9qx7q.js";const Ve=L({name:"BpmProcessInstanceManager",__name:"index",setup(xe){const R=Q(),Y=W(),{t:x}=X(),g=d(!0),S=d(0),U=d([]),o=Z({pageNo:1,pageSize:10,startUserId:void 0,name:"",processDefinitionId:void 0,category:void 0,status:void 0,createTime:[]}),z=d(),I=d([]),T=d([]),u=async()=>{g.value=!0;try{const _=await ye(o);U.value=_.list,S.value=_.total}finally{g.value=!1}},C=()=>{o.pageNo=1,u()};return j(()=>{u()}),G(async()=>{await u(),I.value=await he.getCategorySimpleList(),T.value=await ke()}),(_,r)=>{const y=re,v=se,p=ne,N=ie,q=pe,F=de,D=ge,n=ue,H=we,h=me,O=ce,$=be,P=ee("hasPermi"),K=fe;return s(),m(c,null,[a(D,null,{default:t(()=>[a(F,{class:"-mb-15px",model:l(o),ref_key:"queryFormRef",ref:z,inline:!0,"label-width":"68px"},{default:t(()=>[a(p,{label:"\u53D1\u8D77\u4EBA",prop:"startUserId"},{default:t(()=>[a(v,{modelValue:l(o).startUserId,"onUpdate:modelValue":r[0]||(r[0]=e=>l(o).startUserId=e),placeholder:"\u8BF7\u9009\u62E9\u53D1\u8D77\u4EBA",class:"!w-240px"},{default:t(()=>[(s(!0),m(c,null,w(l(T),e=>(s(),i(y,{key:e.id,label:e.nickname,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(p,{label:"\u6D41\u7A0B\u540D\u79F0",prop:"name"},{default:t(()=>[a(N,{modelValue:l(o).name,"onUpdate:modelValue":r[1]||(r[1]=e=>l(o).name=e),placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0",clearable:"",onKeyup:M(C,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u6240\u5C5E\u6D41\u7A0B",prop:"processDefinitionId"},{default:t(()=>[a(N,{modelValue:l(o).processDefinitionId,"onUpdate:modelValue":r[2]||(r[2]=e=>l(o).processDefinitionId=e),placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u5B9A\u4E49\u7684\u7F16\u53F7",clearable:"",onKeyup:M(C,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u6D41\u7A0B\u5206\u7C7B",prop:"category"},{default:t(()=>[a(v,{modelValue:l(o).category,"onUpdate:modelValue":r[3]||(r[3]=e=>l(o).category=e),placeholder:"\u8BF7\u9009\u62E9\u6D41\u7A0B\u5206\u7C7B",clearable:"",class:"!w-240px"},{default:t(()=>[(s(!0),m(c,null,w(l(I),e=>(s(),i(y,{key:e.code,label:e.name,value:e.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(p,{label:"\u6D41\u7A0B\u72B6\u6001",prop:"status"},{default:t(()=>[a(v,{modelValue:l(o).status,"onUpdate:modelValue":r[4]||(r[4]=e=>l(o).status=e),placeholder:"\u8BF7\u9009\u62E9\u6D41\u7A0B\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(s(!0),m(c,null,w(l(ae)(l(B).BPM_PROCESS_INSTANCE_STATUS),e=>(s(),i(y,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(p,{label:"\u53D1\u8D77\u65F6\u95F4",prop:"createTime"},{default:t(()=>[a(q,{modelValue:l(o).createTime,"onUpdate:modelValue":r[5]||(r[5]=e=>l(o).createTime=e),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-220px"},null,8,["modelValue","default-time"])]),_:1})]),_:1},8,["model"])]),_:1}),a(D,null,{default:t(()=>[k((s(),i(O,{data:l(U)},{default:t(()=>[a(n,{label:"\u6D41\u7A0B\u540D\u79F0",align:"center",prop:"name","min-width":"200px",fixed:"left"}),a(n,{label:"\u6D41\u7A0B\u5206\u7C7B",align:"center",prop:"categoryName","min-width":"100",fixed:"left"}),a(n,{label:"\u6D41\u7A0B\u53D1\u8D77\u4EBA",align:"center",prop:"startUser.nickname",width:"120"}),a(n,{label:"\u53D1\u8D77\u90E8\u95E8",align:"center",prop:"startUser.deptName",width:"120"}),a(n,{label:"\u6D41\u7A0B\u72B6\u6001",prop:"status",width:"120"},{default:t(e=>[a(H,{type:l(B).BPM_PROCESS_INSTANCE_STATUS,value:e.row.status},null,8,["type","value"])]),_:1}),a(n,{label:"\u53D1\u8D77\u65F6\u95F4",align:"center",prop:"startTime",width:"180",formatter:l(E)},null,8,["formatter"]),a(n,{label:"\u7ED3\u675F\u65F6\u95F4",align:"center",prop:"endTime",width:"180",formatter:l(E)},null,8,["formatter"]),a(n,{align:"center",label:"\u8017\u65F6",prop:"durationInMillis",width:"169"},{default:t(e=>[V(A(e.row.durationInMillis>0?l(_e)(e.row.durationInMillis):"-"),1)]),_:1}),a(n,{label:"\u5F53\u524D\u5BA1\u6279\u4EFB\u52A1",align:"center",prop:"tasks","min-width":"120px"},{default:t(e=>[(s(!0),m(c,null,w(e.row.tasks,f=>(s(),i(h,{type:"primary",key:f.id,link:""},{default:t(()=>[le("span",null,A(f.name),1)]),_:2},1024))),128))]),_:1}),a(n,{label:"\u6D41\u7A0B\u7F16\u53F7",align:"center",prop:"id","min-width":"320px"}),a(n,{label:"\u64CD\u4F5C",align:"center",fixed:"right",width:"180"},{default:t(e=>[k((s(),i(h,{link:"",type:"primary",onClick:f=>{return b=e.row,void R.push({name:"BpmProcessInstanceDetail",query:{id:b.id}});var b}},{default:t(()=>[V(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[P,["bpm:process-instance:cancel"]]]),e.row.status===1?k((s(),i(h,{key:0,link:"",type:"primary",onClick:f=>(async b=>{const{value:J}=await oe.prompt("\u8BF7\u8F93\u5165\u53D6\u6D88\u539F\u56E0","\u53D6\u6D88\u6D41\u7A0B",{confirmButtonText:x("common.ok"),cancelButtonText:x("common.cancel"),inputPattern:/^[\s\S]*.*\S[\s\S]*$/,inputErrorMessage:"\u53D6\u6D88\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"});await ve(b.id,J),Y.success("\u53D6\u6D88\u6210\u529F"),await u()})(e.row)},{default:t(()=>[V(" \u53D6\u6D88 ")]),_:2},1032,["onClick"])),[[P,["bpm:process-instance:query"]]]):te("",!0)]),_:1})]),_:1},8,["data"])),[[K,l(g)]]),a($,{total:l(S),page:l(o).pageNo,"onUpdate:page":r[6]||(r[6]=e=>l(o).pageNo=e),limit:l(o).pageSize,"onUpdate:limit":r[7]||(r[7]=e=>l(o).pageSize=e),onPagination:u},null,8,["total","page","limit"])]),_:1})],64)}}});export{Ve as default};
|