import{_ as e}from"./index102.js?v=1753954525509";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang4.js?v=1753954525509";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1753954525509";import{c as l,b as n,f as i}from"./public.js?v=1753954525509";import{_ as s}from"./index.vue_vue_type_script_setup_true_lang6.js?v=1753954525509";import{f as o,e as p}from"./ftp2.js?v=1753954525509";import{c as d,w as u,x as r}from"./page_layout.js?v=1753954525509";import{ay as c,cG as m,bY as _}from"./naive.js?v=1753954525509";import{k as g,P as h,i as y,m as b,e as v,U as f,a1 as x,a2 as k,Q as w,j as F,a3 as j,X as U,ah as L,r as R,p as T,V as W}from"./vue.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";const z=g({__name:"index",setup(e){const{t:p}=h(),m=y("ftpRowData"),{loading:_,setLoading:g}=l(),{keys:R,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:""}),P=async()=>{try{g(!0);const{message:e}=await o({user_name:m.name,...z});d(e)&&(T.data=u(e.data)?e.data:[],T.total=r(e.page))}finally{g(!1)}};return P(),(e,l)=>{const n=c,o=s,p=i,d=t,u=a;return f(),x(u,null,{toolsLeft:k((()=>[w(n,{onClick:P},{default:k((()=>[F(j(e.$t("Ftp.Analysis.Index_32")),1)])),_:1})])),toolsRight:k((()=>[w(o,{value:U(z).search,"onUpdate:value":l[0]||(l[0]=e=>U(z).search=e),width:"280",placeholder:e.$t("Ftp.Placeholder.Index_7"),onSearch:P},null,8,["value","placeholder"])])),table:k((()=>[w(p,{"checked-row-keys":U(R),"onUpdate:checkedRowKeys":l[1]||(l[1]=e=>L(R)?R.value=e:null),loading:U(_),data:U(T).data,columns:U(W)},null,8,["checked-row-keys","loading","data","columns"])])),pageRight:k((()=>[w(d,{page:U(z).p,"onUpdate:page":l[2]||(l[2]=e=>U(z).p=e),"page-size":U(z).limit,"onUpdate:pageSize":l[3]||(l[3]=e=>U(z).limit=e),"item-count":U(T).total,onRefresh:P},null,8,["page","page-size","item-count"])])),_:1})}}}),P=g({__name:"index",setup(e){const{t:o}=h(),{loading:g,setLoading:b}=l(),R=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:P}=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}]),C=v({p:1,limit:10,search:"",type:"all"}),A=async()=>{try{b(!0);const{message:e}=await p({user_name:R.name,...C});d(e)&&(z.data=u(e.data)?e.data:[],z.total=r(e.page))}finally{b(!1)}};return A(),(e,l)=>{const n=c,o=m,p=s,d=_,u=i,r=t,h=a;return f(),x(h,null,{toolsLeft:k((()=>[w(n,{onClick:A},{default:k((()=>[F(j(e.$t("Ftp.Analysis.Index_32")),1)])),_:1})])),toolsRight:k((()=>[w(d,null,{default:k((()=>[w(o,{value:U(C).type,"onUpdate:value":[l[0]||(l[0]=e=>U(C).type=e),A],options:U(T),class:"w-120px"},null,8,["value","options"]),w(p,{value:U(C).search,"onUpdate:value":l[1]||(l[1]=e=>U(C).search=e),width:"280",placeholder:e.$t("Ftp.Placeholder.Index_7"),onSearch:A},null,8,["value","placeholder"])])),_:1})])),table:k((()=>[w(u,{"checked-row-keys":U(W),"onUpdate:checkedRowKeys":l[2]||(l[2]=e=>L(W)?W.value=e:null),loading:U(g),data:U(z).data,columns:U(P)},null,8,["checked-row-keys","loading","data","columns"])])),pageRight:k((()=>[w(r,{page:U(C).p,"onUpdate:page":l[3]||(l[3]=e=>U(C).p=e),"page-size":U(C).limit,"onUpdate:pageSize":l[4]||(l[4]=e=>U(C).limit=e),"item-count":U(z).total,onRefresh:A},null,8,["page","page-size","item-count"])])),_:1})}}}),C={class:"p-8 overflow-y-hidden"},A=g({__name:"index",props:{row:{}},setup(a){const{t:t}=h(),l=R(null),n=a,{row:i}=n;T("ftpRowData",i);const s=R("login"),o=[{key:"login",label:t("Ftp.Table.index_4"),component:z},{key:"action",label:t("Ftp.Table.index_5"),component:P}];return(a,t)=>{const n=e;return f(),W("div",C,[w(n,{ref_key:"logsTabs",ref:l,value:U(s),"onUpdate:value":t[0]||(t[0]=e=>L(s)?s.value=e:null),options:o},null,8,["value"])])}}});export{A as default};
