import{_ as e}from"./index107.js?v=1764233927359";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1764233927359";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang7.js?v=1764233927359";import{d as l,c as n,h as i}from"./public.js?v=1764233927359";import{_ as s}from"./index.vue_vue_type_script_setup_true_lang8.js?v=1764233927359";import{f as o,e as p}from"./ftp.js?v=1764233927359";import{d,x as u,y as r}from"./page_layout.js?v=1764233927359";import{aC as m,da as c,dV as _}from"./naive.js?v=1764233927359";import{k as g,P as h,i as y,m as b,e as v,a2 as k,V as x,a3 as f,W as w,U as F,ak as j,j as U,a4 as R,r as L,R as W,p as T}from"./vue.js?v=1764233927359";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1764233927359";import"./common.js?v=1764233927359";import"./__commonjsHelpers__.js?v=1764233927359";const z=g({__name:"index",setup(e){const{t:p}=h(),c=y("ftpRowData"),{loading:_,setLoading:g}=l(),{keys:L,table:W,columns:T}=n([{key:"user",title:p("Public.Table.Username"),minWidth:110},{key:"ip",title:p("Ftp.Label.index_7"),minWidth:110},{key:"status",title:p("Ftp.Label.index_9"),minWidth:110,render:e=>b("span",{style:{color:"login succeeded"===e.status?"#67C23A":"#F56C6C"}},e.status)},{key:"in_time",title:p("Ftp.Label.index_14"),minWidth:110},{key:"out_time",title:p("Ftp.Label.index_10"),minWidth:110}]),z=v({p:1,limit:10,search:""}),C=async()=>{try{g(!0);const{message:e}=await o({user_name:c.name,...z});d(e)&&(W.data=u(e.data)?e.data:[],W.total=r(e.page))}finally{g(!1)}};return C(),(e,l)=>{const n=m,o=s,p=i,d=t,u=a;return x(),k(u,null,{toolsLeft:f(()=>[w(n,{onClick:C},{default:f(()=>[U(R(e.$t("Ftp.Analysis.Index_32")),1)]),_:1})]),toolsRight:f(()=>[w(o,{value:F(z).search,"onUpdate:value":l[0]||(l[0]=e=>F(z).search=e),width:"280",placeholder:e.$t("Ftp.Placeholder.Index_7"),onSearch:C},null,8,["value","placeholder"])]),table:f(()=>[w(p,{"checked-row-keys":F(L),"onUpdate:checkedRowKeys":l[1]||(l[1]=e=>j(L)?L.value=e:null),loading:F(_),data:F(W).data,columns:F(T)},null,8,["checked-row-keys","loading","data","columns"])]),pageRight:f(()=>[w(d,{page:F(z).p,"onUpdate:page":l[2]||(l[2]=e=>F(z).p=e),"page-size":F(z).limit,"onUpdate:pageSize":l[3]||(l[3]=e=>F(z).limit=e),"item-count":F(W).total,onRefresh:C},null,8,["page","page-size","item-count"])]),_:1})}}}),C=g({__name:"index",setup(e){const{t:o}=h(),{loading:g,setLoading:b}=l(),L=y("ftpRowData"),W=v([{label:o("Public.All"),value:"all"},{label:o("Ftp.Label.index_4"),value:"upload"},{label:o("Ftp.Label.index_11"),value:"download"},{label:o("Ftp.Table.index_10"),value:"delete"},{label:o("Ftp.Label.index_12"),value:"rename"}]),{keys:T,table:z,columns:C}=n([{key:"user",title:o("Public.Table.Username"),minWidth:110,render:e=>e.name?e.name:"--"},{key:"ip",title:o("Ftp.Table.index_9"),minWidth:110},{key:"file",title:o("Ftp.Table.index_19"),minWidth:110,ellipsis:{tooltip:{width:"trigger"}}},{key:"type",title:o("Ftp.Table.index_13"),minWidth:110},{key:"time",title:o("Ftp.Table.index_12"),minWidth:110}]),P=v({p:1,limit:10,search:"",type:"all"}),A=async()=>{try{b(!0);const{message:e}=await p({user_name:L.name,...P});d(e)&&(z.data=u(e.data)?e.data:[],z.total=r(e.page))}finally{b(!1)}};return A(),(e,l)=>{const n=m,o=_,p=s,d=c,u=i,r=t,h=a;return x(),k(h,null,{toolsLeft:f(()=>[w(n,{onClick:A},{default:f(()=>[U(R(e.$t("Ftp.Analysis.Index_32")),1)]),_:1})]),toolsRight:f(()=>[w(d,null,{default:f(()=>[w(o,{value:F(P).type,"onUpdate:value":[l[0]||(l[0]=e=>F(P).type=e),A],options:F(W),class:"w-120px"},null,8,["value","options"]),w(p,{value:F(P).search,"onUpdate:value":l[1]||(l[1]=e=>F(P).search=e),width:"280",placeholder:e.$t("Ftp.Placeholder.Index_7"),onSearch:A},null,8,["value","placeholder"])]),_:1})]),table:f(()=>[w(u,{"checked-row-keys":F(T),"onUpdate:checkedRowKeys":l[2]||(l[2]=e=>j(T)?T.value=e:null),loading:F(g),data:F(z).data,columns:F(C)},null,8,["checked-row-keys","loading","data","columns"])]),pageRight:f(()=>[w(r,{page:F(P).p,"onUpdate:page":l[3]||(l[3]=e=>F(P).p=e),"page-size":F(P).limit,"onUpdate:pageSize":l[4]||(l[4]=e=>F(P).limit=e),"item-count":F(z).total,onRefresh:A},null,8,["page","page-size","item-count"])]),_:1})}}}),P={class:"p-8 overflow-y-hidden"},A=g({__name:"index",props:{row:{}},setup(a){const{t:t}=h(),l=L(null),n=a,{row:i}=n;T("ftpRowData",i);const s=L("login"),o=[{key:"login",label:t("Ftp.Table.index_4"),component:z},{key:"action",label:t("Ftp.Table.index_5"),component:C}];return(a,t)=>{const n=e;return x(),W("div",P,[w(n,{ref_key:"logsTabs",ref:l,value:F(s),"onUpdate:value":t[0]||(t[0]=e=>j(s)?s.value=e:null),options:o},null,8,["value"])])}}});export{A as default};
