import{_ as e}from"./index107.js?v=1763625242172";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1763625242172";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang7.js?v=1763625242172";import{d as l,c as n,h as i}from"./public.js?v=1763625242172";import{_ as s}from"./index.vue_vue_type_script_setup_true_lang8.js?v=1763625242172";import{f as o,e as p}from"./ftp.js?v=1763625242172";import{c as d,x as u,y as r}from"./page_layout.js?v=1763625242172";import{aC as m,dV as c,d9 as _}from"./naive.js?v=1763625242172";import{k as g,P as h,i as y,m as b,e as v,R as x,a2 as f,a3 as k,X as w,j as F,a4 as j,V as R,aj as U,r as L,p as T,S as W}from"./vue.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";const z=g({__name:"index",setup(e){const{t:p}=h(),c=y("ftpRowData"),{loading:_,setLoading:g}=l(),{keys:L,table:T,columns:W}=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)&&(T.data=u(e.data)?e.data:[],T.total=r(e.page))}finally{g(!1)}};return C(),(e,l)=>{const n=m,o=s,p=i,d=t,u=a;return x(),f(u,null,{toolsLeft:k((()=>[w(n,{onClick:C},{default:k((()=>[F(j(e.$t("Ftp.Analysis.Index_32")),1)])),_:1})])),toolsRight:k((()=>[w(o,{value:R(z).search,"onUpdate:value":l[0]||(l[0]=e=>R(z).search=e),width:"280",placeholder:e.$t("Ftp.Placeholder.Index_7"),onSearch:C},null,8,["value","placeholder"])])),table:k((()=>[w(p,{"checked-row-keys":R(L),"onUpdate:checkedRowKeys":l[1]||(l[1]=e=>U(L)?L.value=e:null),loading:R(_),data:R(T).data,columns:R(W)},null,8,["checked-row-keys","loading","data","columns"])])),pageRight:k((()=>[w(d,{page:R(z).p,"onUpdate:page":l[2]||(l[2]=e=>R(z).p=e),"page-size":R(z).limit,"onUpdate:pageSize":l[3]||(l[3]=e=>R(z).limit=e),"item-count":R(T).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"),T=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:W,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"}),S=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 S(),(e,l)=>{const n=m,o=c,p=s,d=_,u=i,r=t,h=a;return x(),f(h,null,{toolsLeft:k((()=>[w(n,{onClick:S},{default:k((()=>[F(j(e.$t("Ftp.Analysis.Index_32")),1)])),_:1})])),toolsRight:k((()=>[w(d,null,{default:k((()=>[w(o,{value:R(P).type,"onUpdate:value":[l[0]||(l[0]=e=>R(P).type=e),S],options:R(T),class:"w-120px"},null,8,["value","options"]),w(p,{value:R(P).search,"onUpdate:value":l[1]||(l[1]=e=>R(P).search=e),width:"280",placeholder:e.$t("Ftp.Placeholder.Index_7"),onSearch:S},null,8,["value","placeholder"])])),_:1})])),table:k((()=>[w(u,{"checked-row-keys":R(W),"onUpdate:checkedRowKeys":l[2]||(l[2]=e=>U(W)?W.value=e:null),loading:R(g),data:R(z).data,columns:R(C)},null,8,["checked-row-keys","loading","data","columns"])])),pageRight:k((()=>[w(r,{page:R(P).p,"onUpdate:page":l[3]||(l[3]=e=>R(P).p=e),"page-size":R(P).limit,"onUpdate:pageSize":l[4]||(l[4]=e=>R(P).limit=e),"item-count":R(z).total,onRefresh:S},null,8,["page","page-size","item-count"])])),_:1})}}}),P={class:"p-8 overflow-y-hidden"},S=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:R(s),"onUpdate:value":t[0]||(t[0]=e=>U(s)?s.value=e:null),options:o},null,8,["value"])])}}});export{S as default};
