import{l as e,Y as a,a4 as s,$ as t,a3 as l,x as o,a0 as i,z as r,dw as n,q as p,a1 as u,a2 as d}from"./utils-lib.js?v=20260328163632";import{B as m}from"./index91.js?v=20260328163632";import{u as c,s as f}from"./index115.js?v=20260328163632";import{r as g,k as h,o as x,J as v,V as _,_ as j,a3 as k,O as b,Y as z,N as C,X as w,Z as y}from"./base-lib.js?v=20260328163632";import{au as S}from"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index88.js?v=20260328163632";const{refreshFilesList:R}=c();g(null);const V=g(""),q=g({columns:[{title:e("分享名称"),key:"ps"},{title:e("文件地址"),key:"filename"},{title:e("过期时间"),key:"expire",render:e=>a(e.expire)},s([{onClick:e=>f({...e,refresh:J},!0),title:e("详情")},{onClick:async a=>{await r({title:e("取消分享"),content:e("是否取消分享该文件【{0}】，是否继续？",[a.ps])}),o({loading:e("正在取消文件分享，请稍后..."),request:n({id:a.id}),message:!0,success:e=>{J(),R()}})},title:e("关闭")}])],data:[]}),O=g({page:1,pageSize:10,itemCount:0,pageSlot:5}),[Y,B]=t(q),[F]=l(O),H=()=>{O.value.page=1,J()},J=async()=>{o({loading:e("正在获取分享列表，请稍候..."),request:i({table:"download_token",p:O.value.page,search:V.value,limit:O.value.pageSize}),success:e=>{q.value.data=e.data.data,O.value.itemCount=e.data.page.total}})},L=()=>{N(),J()},N=()=>{q.value.data=[],V.value="",q.value.data=[],Object.assign(O.value,{page:1,itemCount:0})},U={class:"text-14px text-[var(--text-color-2)]"},X=h({__name:"index",setup:a=>(x(L),v(N),(a,s)=>{const t=S;return _(),j(z(d),{class:"p-20px"},{"header-left":k((()=>s[1]||(s[1]=[]))),"header-right":k((()=>[b(t,{class:"!gap-10px"},{default:k((()=>[b(z(p),{modelValue:z(V),"onUpdate:modelValue":s[0]||(s[0]=e=>C(V)?V.value=e:null),placeholder:z(e)("请搜索分享名称"),class:"!w-[220px]",onSearch:z(H)},null,8,["modelValue","placeholder","onSearch"]),b(z(m),{onRefresh:z(J)},null,8,["onRefresh"])])),_:1})])),content:k((()=>[b(z(Y),{"max-height":300})])),"footer-left":k((()=>s[2]||(s[2]=[]))),"footer-right":k((()=>[b(z(F),{"show-size-picker":"","page-sizes":z(u)([10,20,50,100]),onRefresh:z(J)},{suffix:k((()=>[w("span",U,y(z(e)("共 {0} 条",[z(O).itemCount])),1)])),_:1},8,["page-sizes","onRefresh"])])),_:1})})});export{X as default};
