import{d as J,Q as K,u as Q,J as W,r as _,A as X,w as Z,b as j,a1 as G,o as s,c as h,k as a,B as t,a as l,F as S,i as M,a3 as Y,N as v,g as i,a2 as ee,O as m,P as y,h as ae,b9 as le,$ as te,R as re,S as oe,T as se,a7 as ne,U as pe,V as ue,W as ie,X as me,Y as de,Z as ce}from"./index-CHTXMeh8.js";import{_ as fe}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as _e}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import{_ as ve}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as V}from"./formatTime-DG99nHw2.js";import{a as ye}from"./index-BV2p1r3n.js";import{c as be}from"./index-GzuMZCCW.js";import"./index-DVe591HI.js";import"./color-DXkOL5Tu.js";import"./el-card-Bdk9qx7q.js";const ge=J({name:"BpmOALeave",__name:"index",setup(we){const D=K(),f=Q(),{t:C}=W(),b=_(!0),x=_(0),P=_([]),r=X({pageNo:1,pageSize:10,type:void 0,status:void 0,reason:void 0,createTime:[]}),A=_(),d=async()=>{b.value=!0;try{const w=await ye(r);P.value=w.list,x.value=w.total}finally{b.value=!1}},g=()=>{r.pageNo=1,d()},I=()=>{A.value.resetFields(),g()};return Z(()=>f.currentRoute.value,()=>{d()}),j(()=>{d()}),(w,o)=>{const E=te,B=re,c=oe,L=se,q=ne,k=pe,u=ue,R=ie,N=ve,n=me,U=_e,z=de,F=fe,T=G("hasPermi"),H=ce;return s(),h(S,null,[a(N,null,{default:t(()=>[a(R,{ref_key:"queryFormRef",ref:A,inline:!0,model:l(r),class:"-mb-15px","label-width":"68px"},{default:t(()=>[a(c,{label:"\u8BF7\u5047\u7C7B\u578B",prop:"type"},{default:t(()=>[a(B,{modelValue:l(r).type,"onUpdate:modelValue":o[0]||(o[0]=e=>l(r).type=e),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8BF7\u5047\u7C7B\u578B"},{default:t(()=>[(s(!0),h(S,null,M(l(Y)(l(v).BPM_OA_LEAVE_TYPE),e=>(s(),i(E,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(c,{label:"\u7533\u8BF7\u65F6\u95F4",prop:"createTime"},{default:t(()=>[a(L,{modelValue:l(r).createTime,"onUpdate:modelValue":o[1]||(o[1]=e=>l(r).createTime=e),"default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px","end-placeholder":"\u7ED3\u675F\u65E5\u671F","start-placeholder":"\u5F00\u59CB\u65E5\u671F",type:"daterange","value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue","default-time"])]),_:1}),a(c,{label:"\u5BA1\u6279\u7ED3\u679C",prop:"status"},{default:t(()=>[a(B,{modelValue:l(r).status,"onUpdate:modelValue":o[2]||(o[2]=e=>l(r).status=e),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6279\u7ED3\u679C"},{default:t(()=>[(s(!0),h(S,null,M(l(Y)(l(v).BPM_PROCESS_INSTANCE_STATUS),e=>(s(),i(E,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(c,{label:"\u539F\u56E0",prop:"reason"},{default:t(()=>[a(q,{modelValue:l(r).reason,"onUpdate:modelValue":o[3]||(o[3]=e=>l(r).reason=e),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u539F\u56E0",onKeyup:ee(g,["enter"])},null,8,["modelValue"])]),_:1}),a(c,null,{default:t(()=>[a(u,{onClick:g},{default:t(()=>[a(k,{class:"mr-5px",icon:"ep:search"}),m(" \u641C\u7D22 ")]),_:1}),a(u,{onClick:I},{default:t(()=>[a(k,{class:"mr-5px",icon:"ep:refresh"}),m(" \u91CD\u7F6E ")]),_:1}),a(u,{plain:"",type:"primary",onClick:o[4]||(o[4]=e=>{f.push({name:"OALeaveCreate"})})},{default:t(()=>[a(k,{class:"mr-5px",icon:"ep:plus"}),m(" \u53D1\u8D77\u8BF7\u5047 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(N,null,{default:t(()=>[y((s(),i(z,{data:l(P)},{default:t(()=>[a(n,{align:"center",label:"\u7533\u8BF7\u7F16\u53F7",prop:"id"}),a(n,{align:"center",label:"\u72B6\u6001",prop:"status"},{default:t(e=>[a(U,{type:l(v).BPM_PROCESS_INSTANCE_STATUS,value:e.row.status},null,8,["type","value"])]),_:1}),a(n,{formatter:l(V),align:"center",label:"\u5F00\u59CB\u65F6\u95F4",prop:"startTime",width:"180"},null,8,["formatter"]),a(n,{formatter:l(V),align:"center",label:"\u7ED3\u675F\u65F6\u95F4",prop:"endTime",width:"180"},null,8,["formatter"]),a(n,{align:"center",label:"\u8BF7\u5047\u7C7B\u578B",prop:"type"},{default:t(e=>[a(U,{type:l(v).BPM_OA_LEAVE_TYPE,value:e.row.type},null,8,["type","value"])]),_:1}),a(n,{align:"center",label:"\u539F\u56E0",prop:"reason"}),a(n,{formatter:l(V),align:"center",label:"\u7533\u8BF7\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),a(n,{align:"center",label:"\u64CD\u4F5C",width:"200"},{default:t(e=>[y((s(),i(u,{link:"",type:"primary",onClick:O=>{return p=e.row,void f.push({name:"OALeaveDetail",query:{id:p.id}});var p}},{default:t(()=>[m(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[T,["bpm:oa-leave:query"]]]),y((s(),i(u,{link:"",type:"primary",onClick:O=>{return p=e.row,void f.push({name:"BpmProcessInstanceDetail",query:{id:p.processInstanceId}});var p}},{default:t(()=>[m(" \u8FDB\u5EA6 ")]),_:2},1032,["onClick"])),[[T,["bpm:oa-leave:query"]]]),e.row.result===1?y((s(),i(u,{key:0,link:"",type:"danger",onClick:O=>(async p=>{const{value:$}=await le.prompt("\u8BF7\u8F93\u5165\u53D6\u6D88\u539F\u56E0","\u53D6\u6D88\u6D41\u7A0B",{confirmButtonText:C("common.ok"),cancelButtonText:C("common.cancel"),inputPattern:/^[\s\S]*.*\S[\s\S]*$/,inputErrorMessage:"\u53D6\u6D88\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"});await be(p.id,$),D.success("\u53D6\u6D88\u6210\u529F"),await d()})(e.row)},{default:t(()=>[m(" \u53D6\u6D88 ")]),_:2},1032,["onClick"])),[[T,["bpm:oa-leave:create"]]]):ae("",!0)]),_:1})]),_:1},8,["data"])),[[H,l(b)]]),a(F,{limit:l(r).pageSize,"onUpdate:limit":o[5]||(o[5]=e=>l(r).pageSize=e),page:l(r).pageNo,"onUpdate:page":o[6]||(o[6]=e=>l(r).pageNo=e),total:l(x),onPagination:d},null,8,["limit","page","total"])]),_:1})],64)}}});export{ge as default};