← Back
Editing: index169.js
import{u as e,aa as a,K as t,gw as l,bT as s,p as o,n,L as i,at as r,gx as p,aM as u,a6 as c,R as m,a7 as d,A as _,a8 as v,k as f,W as g,al as b}from"./utils-lib.js?v=VERSION_NUMBER";import{r as y,k as x,c as h,s as P,e as w,w as T,p as C,G as j,q as F,M as D,A as k,y as V,x as E,z as I,B,H as L,v as R,P as A,aA as S,a9 as O,D as z,a7 as q,al as M}from"./base-lib.js?v=VERSION_NUMBER";import{B as U}from"./index140.js?v=VERSION_NUMBER";import{_ as H}from"./index103.js?v=VERSION_NUMBER";import{_ as W}from"./index104.js?v=VERSION_NUMBER";import{S as G,_ as Z}from"./index.vue_vue_type_script_setup_true_lang7.js?v=VERSION_NUMBER";import{S as K,_ as N}from"./index.vue_vue_type_script_setup_true_lang8.js?v=VERSION_NUMBER";import{u as J,a as Q,c as X,d as Y,e as $,f as ee,g as ae,h as te,b as le,i as se,j as oe,k as ne,s as ie}from"./useStore8.js?v=VERSION_NUMBER";import{a as re,i as pe,b as ue,j as ce,d as me,k as de,g as _e,u as ve}from"./column.js?v=VERSION_NUMBER";import{u as fe}from"./index141.js?v=VERSION_NUMBER";import{D as ge,p as be}from"./validator.js?v=VERSION_NUMBER";import"./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang.js?v=VERSION_NUMBER";import"./__commonjsHelpers__.js?v=VERSION_NUMBER";import"./ace.js?v=VERSION_NUMBER";import"./index124.js?v=VERSION_NUMBER";const{payment:ye,getGlobalInfo:xe}=e(),{ftpPort:he,rowData:Pe}=J(),{isEdit:we}=Q(),Te=G(),Ce=K(),je=y("service"),Fe=y({}),De=y(!1),ke=y(),Ve=x({port:he.value}),Ee=x({port:[a()]}),Ie=async()=>{await ke.value.validate(),await t({loading:"正在修改FTP端口,请稍后...",request:l({port:Ve.port}),data:{status:Boolean},message:!0})},Be=y(!1),Le=y(""),Re=[{content:"此处为pure-ftpd主配置文件,若您不了解配置规则,请勿随意修改"}],Ae=async()=>{await t({loading:"正在保存配置,请稍后...",request:s({path:"/www/server/pure-ftpd/etc/pure-ftpd.conf",data:Le.value,encoding:"utf-8"}),message:!0})},Se=y(""),Oe=y([]),ze=y(!1),qe=async e=>{await o({title:"".concat(e?"开启":"关闭","pure-ftpd日志管理"),content:"".concat(e?"开启":"关闭","pure-ftpd日志管理后,将").concat(e?"":"无法","记录所有FTP用户的登录、操作记录,是否继续操作?")}),await t({loading:"正在".concat(e?"开启":"关闭",",请稍后..."),request:ge({exec_name:e?"start":"stop"}),message:!0,success:Me})},Me=async()=>{await t({loading:"正在获取日志状态,请稍后...",request:ge({exec_name:"getlog"}),success:e=>{ze.value="start"===e.msg}})},Ue=async e=>{switch(je.value=e,e){case"manger":De.value=!0;break;case"service":case"portConfig":He();break;case"config":(async()=>{await t({loading:Be,request:p({path:"/www/server/pure-ftpd/etc/pure-ftpd.conf"}),data:{data:[String,Le]}})})();break;case"logs":Me()}},He=e=>{e.id&&(Fe.value=e);const a={...Fe.value,name:"pure-ftpd"};Te.init(a),Ce.init(a),Se.value=Fe.value.version,Oe.value=Fe.value.versions,(async()=>{try{await xe()}catch(e){r(e)}})()},We=e=>(Pe.value=e,we.value=!!e,n({title:"".concat(e?"修改FTP用户【".concat(e.name,"】"):"添加FTP用户"),area:50,btn:"保存",compData:e||{},component:()=>i((()=>import("./index302.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})),Ge=e=>{Pe.value=e,n({title:"快速连接",area:48,compData:e,component:()=>i((()=>import("./index308.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})},Ze=e=>{"ltd"===ye.value.authType?Ke(e):be({sourceId:52})},Ke=e=>{Pe.value=e,n({title:"【".concat(e.name,"】FTP配额容量"),area:50,btn:!0,compData:e,component:()=>i((()=>import("./index304.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})},Ne=e=>{Pe.value=e,n({title:"修改FTP权限配置-[".concat(e.name,"]"),area:72,btn:"保存",compData:e,component:()=>i((()=>import("./index307.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})},Je=async e=>{Pe.value=e,n({title:"查看FTP日志【"+e.name+"】",area:[70,58],compData:e,component:()=>i((()=>import("./index310.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})},Qe={class:"my-[10px]"},Xe={class:"flex items-center mb-[20px]"},Ye=h({__name:"index",props:{compData:{default:{}}},setup(a){const t=a,{serverIp:l}=e(),{rowData:s,ftpPort:o,isRefreshFtpList:r,pluginInfo:p}=J(),{compData:x}=P(G()),h=y([]),K=fe({key:"type_id",name:"FTP分类",options:()=>[{label:"全部分类",value:"all"}],event:{get:async()=>{const e=await X();return h.value=e,e},add:Y,update:$,delete:ee}}),{BtOperation:Q}=u({options:[{type:"button",label:"添加FTP",active:!0,onClick:()=>We()}]}),ge=v([{label:"启用FTP",value:"start",event:ne},{label:"停用FTP",value:"stop",event:ne},{label:"改密FTP",value:"exitPaw",event:async(e,a,t,l,o)=>{s.value={selectedList:t,clearSelection:o},await n({title:"批量修改FTP密码",area:"auto",btn:!0,compData:{selectedList:t,clearSelection:o},component:()=>i((()=>import("./index309.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})}},{label:"设置分类",value:"setClass",event:async(e,a,t,l,s,o)=>{ie(t,s,h,o)}},{label:"删除FTP",value:"delete",event:ne}]),{BtTable:be,BtPage:ye,BtSearch:xe,BtRefresh:he,BtColumn:Pe,BtBatch:we,BtTableCategory:Te,refresh:Ce}=c({request:e=>"manger"!==je.value?Promise.resolve({data:[],total:0}):("all"===e.type_id&&(e.type_id=""),ae(e)),columns:[re(),{label:"用户名",prop:"name",minWidth:100},pe(),ue({event:te,data:["已停用","已启用"],width:80}),ce({label:"快速连接",width:80,isCustom:!1,title:"复制快速连接信息",text:"点击查看",event:Ge}),me(),{label:"密码有效期",minWidth:100,isCustom:!1,title:"设置密码有效期",prop:"end_time",render:e=>{let{isOrange:a,isEnd:t}=le(e);return w("span",{onClick:()=>{s.value=e,(e=>{n({title:"设置密码有效期",area:46,btn:!0,compData:e,component:()=>i((()=>import("./index303.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})})(e)},title:"设置密码有效期",style:"color:#".concat(t?"ef0808":a?"f0ad4e":"20a53a",";cursor:pointer")},["0"!==e.end_time?m(Number(e.end_time),"yyyy-MM-dd"):"永久"])}},de({isCustom:!1,event:Ze}),_e({table:"ftps",width:100}),ve([{onClick:Ne,title:"配置"},{onClick:We,title:"修改"},{onClick:Je,title:"日志"},{onClick:se,title:"删除"}])],extension:[K,ge,d(r)]});return T((()=>De.value),(e=>{e&&Ce()})),T((()=>r.value),(e=>{Ce()}),{immediate:!0,deep:!0}),C((()=>{t.compData&&(p.value=t.compData),He(p.value),je.value="service",x.value.refreshEvent=oe})),(e,a)=>{const t=W,s=S,n=H,i=f,r=O,p=z,u=q,c=U,m=g,d=M,v=b,y=j("bt-loading");return F(),D(v,{modelValue:E(je),"onUpdate:modelValue":a[4]||(a[4]=e=>A(je)?je.value=e:null),type:"left-bg-card",position:"left",class:"h-full",onChange:E(Ue)},{default:k((()=>[w(s,{label:"服务",name:"service",lazy:!0},{default:k((()=>[V("div",null,[w(Z),w(t,{direction:"horizontal"}),a[5]||(a[5]=V("span",null," 当前FTP地址为: ",-1)),V("span",{class:"cursor-pointer",title:"点击复制FTP路径",onClick:a[0]||(a[0]=e=>E(_)({value:"ftp://".concat(E(l)||"IP地址",":").concat(E(o)||"端口")}))}," ftp://"+I(E(l)||"IP地址")+":"+I(E(o)||"端口"),1),w(t),a[6]||(a[6]=V("span",{class:"bt-link"},[V("a",{target:"_self",href:"https://download.bt.cn/win/filezilla/FileZilla-setup.exe"}," 下载FTP连接工具(FileZilla, 免费开源) ")],-1)),w(N)])])),_:1}),w(s,{label:"用户管理",name:"manger",lazy:!0},{default:k((()=>[w(n,null,{"header-left":k((()=>[w(E(Q))])),"header-right":k((()=>[w(E(Te),{class:"!w-[140px] mr-[10px]"}),w(E(xe),{class:"!w-[20rem] mr-[10px]",placeholder:"请输入用户名"}),w(E(he),{class:"mr-[10px]"}),w(E(Pe))])),content:k((()=>[w(E(be),{"max-height":420})])),"footer-left":k((()=>[w(E(we))])),"footer-right":k((()=>[w(E(ye))])),_:1})])),_:1}),w(s,{label:"端口配置",name:"portConfig",lazy:!0},{default:k((()=>[w(u,{ref_key:"portFormRef",ref:ke,model:E(Ve),rules:E(Ee),"label-width":"80px",class:"-ml-2rem"},{default:k((()=>[w(r,{label:"默认端口"},{default:k((()=>[w(i,{type:"number",modelValue:E(Ve).port,"onUpdate:modelValue":a[1]||(a[1]=e=>E(Ve).port=e),placeholder:"请输入端口",width:"14rem"},null,8,["modelValue"])])),_:1}),w(r,{label:" "},{default:k((()=>[w(p,{type:"primary",onClick:E(Ie)},{default:k((()=>a[7]||(a[7]=[B("保存")]))),_:1},8,["onClick"])])),_:1})])),_:1},8,["model","rules"])])),_:1}),w(s,{label:"配置文件",name:"config",lazy:!0},{default:k((()=>[L((F(),R("div",null,[a[9]||(a[9]=V("span",{class:"my-[4px] text-[#666]"}," 提示:Ctrl+F 搜索关键字,Ctrl+S 保存,Ctrl+H 查找替换 ",-1)),V("div",Qe,[w(c,{class:"!h-[40rem] !w-full",modelValue:E(Le),"onUpdate:modelValue":a[2]||(a[2]=e=>A(Le)?Le.value=e:null),id:"configContent",onSave:E(Ae)},null,8,["modelValue","onSave"])]),w(p,{type:"primary",onClick:E(Ae)},{default:k((()=>a[8]||(a[8]=[B("保存")]))),_:1},8,["onClick"]),w(m,{options:E(Re),class:"mt-1rem"},null,8,["options"])])),[[y,E(Be)]])])),_:1}),w(s,{label:"日志管理",name:"logs",lazy:!0},{default:k((()=>[V("div",null,[V("div",Xe,[a[10]||(a[10]=V("span",{class:"mr-[8px]"},"日志管理开关",-1)),w(d,{modelValue:E(ze),"onUpdate:modelValue":a[3]||(a[3]=e=>A(ze)?ze.value=e:null),onChange:E(qe)},null,8,["modelValue","onChange"])]),a[11]||(a[11]=V("ul",{class:"leading-8 text-[1.2rem] list-disc ml-[20px]"},[V("li",null,"开启后,将记录所有FTP用户的登录、操作记录")],-1))])])),_:1})])),_:1},8,["modelValue","onChange"])}}});export{Ye as default}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }
Save File
Cancel