File: /www/server/panel/BTPanel/static/js/index59.js
import{u as X}from"./index123.js?v=1777008528";import{u as Y,a as ee,f as te,i as ae,n as ne,g as se,b as le,c as oe,d as ie,h as ue,o as re,j as me,k as ce,l as T,s as pe,p as _e}from"./useStore15.js?v=1777008528";import{c as de,dc as fe,da as ve,R as Te,cT as be,dd as Pe,de as he,Q as Fe,e as i,_ as u,cU as ge,c7 as ke,M as ye}from"./utils-lib.js?v=1777008528";import{_ as Ee}from"./index118.js?v=1777008528";import{_ as Ce}from"./index122.js?v=1777008528";import{_ as Be}from"./index119.js?v=1777008528";import{u as xe}from"./index151.js?v=1777008528";import{_ as y}from"./index175.js?v=1777008528";import{r as Ie,aw as Re,c as b,e as t,F as B,o as De,j as x,k as Le,p as n,v as r,q as E,s as C,x as Se,a8 as Ae,C as Oe}from"./base-lib.js?v=1777008528";import{e as $e,u as Ve,y as Me,ac as qe,F as we,I as Qe,E as He,g as Ne,k as Ue}from"./index3.js?v=1777008528";import{B as je}from"./index218.js?v=1777008528";import"./index124.js?v=1777008528";import"./index212.js?v=1777008528";import"./__commonjsHelpers__.js?v=1777008528";import"./index152.js?v=1777008528";import"./index.vue_vue_type_style_index_0_scoped_cdc7f4d3_lang.js?v=1777008528";import"./index116.js?v=1777008528";const Ge=a=>{if(!a.request&&!a.options)throw new Error("请传入request或者options参数");const l=Ie({name:"",version:"",setup:!1,status:!1,title:a.name||""}),c=Re("_".concat(a.name,"_mask"),!1),f=async()=>{if(!a.request)return;const m=await a.request();l.value=m,c.value=!l.value.setup};return a!=null&&a.extension&&a.extension.length&&(a==null||a.extension.forEach(m=>{m.install(l.value)})),a!=null&&a.options&&(l.value=a.options,c.value=!l.value.setup),{init:async()=>(await f(),{BtSoftInstallMask:b(()=>()=>l.value.setup?null:t(y,{options:l.value},null))}),checkInstallRequest:f,BtSoftInstallMask:()=>t(B,null,[c.value?t(y,{options:l.value},null):null])}},Ze=b({__name:"index",setup(a){const{serverIp:l,mainHeight:c,payment:f,adHideInfo:m}=de(),{ftpPort:P,rowData:p,pluginInfo:I,isRefreshFtpList:R}=Y(),{isEdit:D}=ee(),h=e=>(p.value=e,D.value=!!e,i({title:"".concat(e?"修改FTP用户【".concat(e.name,"】"):"添加FTP用户"),area:50,btn:"".concat(e?"保存":"确认"),compData:e||{},component:()=>u(()=>import("./index415.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})),L=e=>{i({title:"设置密码有效期",area:46,btn:!0,compData:e,component:()=>u(()=>import("./index416.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},F=(e,s=!1)=>{if(f.value.authType!=="ltd"){Ue({sourceId:s?260:52});return}S(e)},S=e=>{p.value=e,i({title:"【".concat(e.name,"】FTP配额容量"),area:50,btn:!0,compData:e,component:()=>u(()=>import("./index417.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},A=()=>{i({title:"修改FTP端口",area:40,btn:!0,component:()=>u(()=>import("./index328.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},g=(e=!0)=>{ne.value=e,i({title:"FTP日志扫描工具",area:[70,52],component:()=>u(()=>import("./index377.js?v=1777008528").then(s=>s.k),__vite__mapDeps([]),import.meta.url)})},O=xe({key:"type_id",name:"FTP分类",options:()=>[{label:"全部分类",value:"all"}],event:{get:se,add:le,update:oe,delete:ie}}),$=[{name:"容量限制",callback:()=>{if(k.data.length===0)return ye.error("暂无FTP用户,请先添加FTP用户");F(k.data[0],!0)}},{name:"FTP日志分析",callback:g}],{BtOperation:V}=fe({options:[{type:"button",label:"添加FTP",active:!0,onClick:()=>h()},{type:"button",label:"修改FTP端口",onClick:A},...m.value.ftpLog?[]:[{type:"button",label:"FTP日志分析",onClick:()=>g(!1)}],{type:"divider"},{type:"custom",render:()=>t(je,{class:"ml-1rem",isRequest:!1,pluginInfo:I.value},null)}]}),M=e=>{p.value=e,i({title:"修改FTP权限配置-[".concat(e.name,"]"),area:72,btn:"保存",compData:e,component:()=>u(()=>import("./index418.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},q=e=>{p.value=e,i({title:"快速连接",area:48,compData:e,component:()=>u(()=>import("./index329.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},w=ge([{label:"启用FTP",value:"start",event:T},{label:"停用FTP",value:"stop",event:T},{label:"改密FTP",value:"exitPaw",event:async(e,s,o,v,_,d)=>{p.value={selectedList:o,clearSelection:_,config:d},await i({title:"批量修改FTP密码",area:"auto",btn:!0,compData:{selectedList:o,clearSelection:_,config:d},component:()=>u(()=>import("./index420.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})}},{label:"设置分类",value:"setClass",event:async(e,s,o,v,_,d)=>{pe(o,_,W,d)}},{label:"删除FTP",value:"delete",event:T}]),{BtTable:Q,BtPage:H,BtRecommendSearch:N,BtRefresh:U,BtColumn:j,BtBatch:G,BtTableCategory:Z,BtErrorMask:z,tableRef:ze,classList:W,refresh:We,config:k}=ve({request:e=>(e.type_id==="all"&&(e.type_id=""),te(e)),columns:[$e({type:"page",key:"id"}),{label:"用户名",prop:"name",minWidth:120},Ve({width:160}),Me({event:ue,data:["已停用","已启用"]}),qe({label:"快速连接",width:80,title:"复制快速连接信息",text:"点击查看",event:q}),we(),{label:"密码有效期",isCustom:!0,width:120,title:"设置密码有效期",prop:"end_time",render:e=>{let{isOrange:s,isEnd:o}=ae(e);return t("span",{onClick:()=>{p.value=e,L(e)},title:"设置密码有效期",style:"color:#".concat(o?"ef0808":s?"f0ad4e":"20a53a",";cursor:pointer")},[e.end_time!=="0"?Te(Number(e.end_time),"yyyy-MM-dd"):"永久"])}},...m.value.ftpTableQuota?[]:[Qe({event:F,width:100})],He({table:"ftps",width:"auto"}),Ne([{onClick:M,title:"配置"},{onClick:h,title:"修改"},{onClick:re,title:"日志",isHide:()=>m.value.ftpTableLog},{onClick:me,title:"删除"}])],extension:[O,w,be(R),Pe("search",{name:"ftps",list:$}),he()]}),{BtSoftInstallMask:J,checkInstallRequest:K}=Ge({request:ce,name:"Pure-FTPd",extension:[]});return De(K),(e,s)=>{const o=Be,v=ke,_=Ce,d=Ee;return x(),Le(B,null,[t(n(J)),t(n(z)),t(_,{class:"!mb-[12px]",closable:!1,type:"info","show-icon":""},{title:r(()=>[s[2]||(s[2]=E("span",null,"当前FTP地址为:",-1)),E("span",{class:"cursor-pointer",title:"点击复制FTP路径",onClick:s[0]||(s[0]=Je=>n(Fe)({value:"ftp://".concat(n(l),":").concat(n(P))}))}," ftp://"+C(n(l)||"IP地址")+":"+C(n(P)||"端口"),1),t(o),t(v,{target:"_blank",class:"bt-link",href:"https://download.bt.cn/win/filezilla/FileZilla-setup.exe"},{default:r(()=>[...s[1]||(s[1]=[Se(" 下载FTP连接工具(FileZilla, 免费开源) ",-1)])]),_:1})]),_:1}),t(d,null,{"header-left":r(()=>[t(n(V))]),"header-right":r(()=>[t(n(Z),{class:"!w-[140px] mr-[10px]"}),t(n(N),{type:"ftps",placeholder:"请输入FTP用户/备注",class:"!w-[270px] mr-[10px]"}),t(n(U),{class:"mr-[10px]"}),t(n(j))]),content:r(()=>[t(n(Q),{"min-height":n(c)},null,8,["min-height"])]),"footer-left":r(()=>[t(n(G))]),"footer-right":r(()=>[t(n(H))]),_:1})],64)}}}),dt=b({__name:"index",setup(a){const{BtRouterTabs:l}=X({level:!0});return Ae(()=>{_e()}),(c,f)=>(x(),Oe(n(l),null,{default:r(()=>[t(Ze)]),_:1}))}});export{dt as default};
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = []
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}