import{V as q,d as O,e as X,dW as J,r as v,a as b,aw as Q,c as u,o as i,w as n,j as s,W as Y,x as Z,l as t,h as L,F as ee,a9 as ae,ib as te,p as d,A as p,ds as ne,eC as se,aG as oe,D as C,O as le,gE as ie,H as ce,i as w,ae as re,B as ue,N as pe,ig as _e,ef as de,cC as me,X as ge,g2 as fe,hn as ye,ih as ve,v as be}from"./index-9PRMimni.js";import{T as Ce}from"./tabsView-BuQA2jOW.js";import{_ as he}from"./VirtualList-CyTw9HCK.js";import"./vuedraggable.umd-Co2xEC3p.js";import"./element-resize-detector-D6t9qRKJ.js";import"./Render.vue_vue_type_script_lang-DKUYY0Zw.js";const{t:N}=q();function ze(){return{firstTabList:[{value:0,label:N("system.messageManagement.tabPendingTask")},{value:1,label:N("system.messageManagement.tabApprovalHistory")}]}}const xe=["onClick"],Te={class:"font-medium text-base"},ke={class:"text-gray-400"},Le=O({__name:"index",setup(S){const V=X(),K=J(),m=v(!1),g=v([]),o=b({page:1,pageSize:10,itemCount:0}),{firstTabList:h}=ze(),c=b({tabsList:h,activeKey:h[0]?.value}),r=b({tabsList:[],activeKey:""}),I=v(window.innerHeight-275);function $(l){if(!l.redirectLink)return;const{params:a,path:f}=fe(l.redirectLink);V.push({path:f,query:a})}async function _(l){try{l&&(o.page=1,o.pageSize=10),m.value=!0,g.value=[];const a=await ye({moduleCategory:r.activeKey,isHandled:c.activeKey,category:2,pageNum:o.page,pageSize:o.pageSize});g.value=a?.list||[],o.itemCount=a?.total||0,m.value=!1}catch{m.value=!1}}function B(l){o.page=l,_(!1)}function H(l){o.pageSize=l,_(!1)}function P(){z(),_(!0)}async function z(){const l=await ve({isHandled:c.activeKey});r.tabsList=(l||[]).map(a=>({...a,value:a.moduleCategory,label:a.moduleName}))}async function D(){await z(),r.activeKey=r.tabsList?.[0]?.value||"",await _(!0)}return Q(()=>{D()}),(l,a)=>{const f=te,F=Z,M=se,x=ie,T=le,U=re,A=ue,y=ce,j=pe,E=he,G=de,k=Y,R=me,W=ge;return i(),u(W,{loading:t(m)},{default:n(()=>[s(k,{bordered:!1,class:"proCard"},{default:n(()=>[s(F,{value:t(c).activeKey,"onUpdate:value":[a[0]||(a[0]=e=>t(c).activeKey=e),P],type:"card",size:"small",class:"mb-2"},{default:n(()=>[(i(!0),L(ee,null,ae(t(c).tabsList,e=>(i(),u(f,{key:e.value,name:e.value},{default:n(()=>[d(p(e.label),1)]),_:2},1032,["name"]))),128))]),_:1},8,["value"]),s(t(Ce),{modelValue:t(r),"onUpdate:modelValue":a[1]||(a[1]=e=>ne(r)?r.value=e:null),onChangeTab:a[2]||(a[2]=e=>_(!0))},{labelSlot:n(({element:e})=>[s(M,{value:e.count,offset:[10,-5],color:"#f37306"},{default:n(()=>[d(p(e.label),1)]),_:2},1032,["value"])]),_:1},8,["modelValue"]),t(g)?.length?(i(),u(k,{key:0,bordered:!1,"content-style":"padding: 0",size:"small",class:"proCard"},{default:n(()=>[s(E,{style:oe(`max-height: ${t(I)}px`),"item-size":60,items:t(g),"item-resizable":""},{default:n(({item:e})=>[(i(),L("div",{class:"flex items-center border-b pt-[15px] pb-[15px] cursor-pointer",key:e.id,onClick:we=>$(e)},[+t(c).activeKey==0?(i(),u(T,{key:0,style:{color:"#fff",backgroundColor:"#2d8cf0"},round:"",size:"large",class:"mr-[16px]"},{default:n(()=>[s(x,{iconName:"log",iconType:"lineIcon"})]),_:1})):C("",!0),+t(c).activeKey==1?(i(),u(T,{key:1,style:{color:"#fff",backgroundColor:"#0EC06A"},round:"",size:"large",class:"mr-[16px]"},{default:n(()=>[s(x,{iconName:"approve",iconType:"lineIcon"})]),_:1})):C("",!0),s(y,{class:"flex-1 overflow-hidden",vertical:""},{default:n(()=>[w("span",Te,p(e.genContent),1),s(y,null,{default:n(()=>[w("span",ke,p(e.createTime),1),e.clearTag?(i(),u(U,{key:0,type:"info",class:"rounded-[3px]"},{default:n(()=>[d(p(e.clearTag),1)]),_:2},1024)):C("",!0),s(A,{secondary:"",size:"small",type:+e.msgType==1?"success":e.msgType===2?"info":"warning",class:"cursor-default"},{default:n(()=>[d(p(e.moduleName),1)]),_:2},1032,["type"])]),_:2},1024)]),_:2},1024),s(j,{component:t(_e),color:t(K).primaryColor,size:"32"},null,8,["component","color"])],8,xe))]),_:1},8,["style","items"]),s(y,{justify:"end",class:"mt-3"},{default:n(()=>[s(G,{page:t(o).page,"onUpdate:page":[a[3]||(a[3]=e=>t(o).page=e),B],"page-size":t(o).pageSize,"onUpdate:pageSize":[a[4]||(a[4]=e=>t(o).pageSize=e),H],"show-size-picker":"","page-sizes":[10,20,30,40,50,60,70,80],"item-count":t(o).itemCount,"show-quick-jumper":""},{prefix:n(({itemCount:e})=>[d(p(`Total: ${e} `),1)]),_:1},8,["page","page-size","item-count"])]),_:1})]),_:1})):(i(),u(R,{key:1,size:"large",description:"No Data",class:"mt-[100px] mb-[100px]"}))]),_:1})]),_:1},8,["loading"])}}}),Be=be(Le,[["__scopeId","data-v-3ab564ce"]]);export{Be as default};
