HEX
Server: nginx/1.28.3
System: Linux ip-172-31-12-242 6.17.0-1007-aws #7~24.04.1-Ubuntu SMP Thu Jan 22 21:04:49 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/server/panel/BTPanel/static/js/index420.js
import{aI as A,aJ as D,r as g,H as h,V as L,e as n,c as S,I as q,j as H,k as J,v as r,q as p,L as y,p as s,J as w,K as F,aV as N,ad as O,z as W,ab as $}from"./base-lib.js?v=1777008528";import{dm as v,Q as x,w as j,k as z,M,db as U,d3 as K,b as Q,cZ as Z}from"./utils-lib.js?v=1777008528";import{_ as G}from"./index116.js?v=1777008528";import{u as C,J as X}from"./useStore15.js?v=1777008528";import{a as Y,c as ee,v as te}from"./index3.js?v=1777008528";import"./__commonjsHelpers__.js?v=1777008528";import"./index119.js?v=1777008528";const se=D("FTP-BATCH-EDIT-PAW",()=>{const e=g(),t=h({type:"0",password:v(12)}),a=g([{label:"所有密码一致",value:"0"},{label:"所有密码不一致",value:"1"}]);return{updateFtpInfoRef:e,ftpForm:t,typeOptions:a}}),B=()=>A(se()),{rowData:u,isRefreshFtpList:ae}=C(),{ftpForm:c,updateFtpInfoRef:oe}=B(),le=h({password:[{validator:(e,t,a)=>{t.length>=6||c.value.type!=="0"?a():a(new Error("FTP密码长度不能少于6位!"))},trigger:["blur"]}]}),ne=()=>{c.value.password=v(12)},re=()=>{x({value:c.value.password})},pe=()=>{var e;u.value.selectedList.length>0&&x({value:(e=u.value.selectedList.map(t=>"".concat(t.name,"--").concat(t.password)))==null?void 0:e.join("\n")})},ue=()=>{u.value.selectedList.forEach(t=>{t.password=v(12)});const e=document.querySelector(".refreshAllBtn");e==null||e.blur()},ce=()=>{const e=u.value.selectedList.map(t=>({id:t.id,ftp_username:t.name,new_password:c.value.type=="0"?c.value.password:t.password}));return{ftp_list:JSON.stringify(e)}},ie=async e=>{try{await oe.value.validate(),await j({title:"提示",width:"35rem",content:"修改FTP密码后,旧密码将无法登录FTP账号,是否继续操作?"});const{config:t}=u.value,{enable:a,exclude:o}=t,d=Y(!1,o,a,{params:ce()}),m=await z({loading:"正在修改FTP密码,请稍候...",request:X(d),data:Array});let{data:i}=ee(m);i=i.map(l=>({...l,name:l.ftp_username})),te(i,{title:"修改FTP密码"}),u.value.clearSelection(),ae.value=!0,e&&e()}catch(t){}},de=L([{label:"用户名",prop:"name",fixed:!0,minWidth:100,width:120},{label:"密码",fixed:!0,width:190,isCustom:!0,render:e=>{const t={lt:"<",gt:">",nbsp:" ",amp:"&",quot:'"'};return e.password=e.password.replace(/&(lt|gt|nbsp|amp|quot);/gi,function(a,o){return t[o]}),n("input",{type:"text",value:e.password,class:"bt-table-input !w-[18rem]",placeholder:"点击编辑密码",title:"点击编辑密码",onBlur:a=>{if(a.target.value.length<6&&(M.error("FTP密码长度不能少于6位!"),a.target.value=e.password),e.password===a.target.value)return!1;e.password=a.target.value}},null)}}]),me={class:"mt-[1.6rem] flex"},fe={class:"flex items-center"},_e=S({__name:"index",setup(e,{expose:t}){const{rowData:a}=C(),{ftpForm:o,typeOptions:d,updateFtpInfoRef:m}=B();return t({onConfirm:ie}),(i,l)=>{const P=N,T=U,f=O,k=K,b=W,I=G,E=Q,R=$,V=q("bt-loading");return H(),J("div",{class:y(s(o).type=="1"?"pt-2rem pr-2rem":"p-2rem")},[n(P,{class:y(["!w-full",s(o).type=="1"?"warn":""]),icon:"svgtofont-el-warning",type:"warning",closable:!1},{title:r(()=>[...l[2]||(l[2]=[p("span",null,"批量改密已选FTP用户,默认自动化改密,支持自定义",-1)])]),_:1},8,["class"]),n(R,{ref_key:"updateFtpInfoRef",ref:m,rules:s(le),model:s(o),class:"bt-custom-form"},{default:r(()=>[n(f,{label:"类型",class:"typeClass"},{default:r(()=>[n(T,{type:"button",class:"!flex",modelValue:s(o).type,"onUpdate:modelValue":l[0]||(l[0]=_=>s(o).type=_),options:s(d)},null,8,["modelValue","options"])]),_:1}),w(n(f,{label:" ",class:"typeClass"},{default:r(()=>[w(n(k,{"max-height":200,ref:"showFtpTableRef",column:s(de),data:s(a).selectedList,description:"FTP列表为空"},null,8,["column","data"]),[[V,"正在加载FTP列表,请稍后...","title"]]),p("div",me,[n(b,{type:"default",onClick:s(pe),class:"inline-block flex items-center"},{default:r(()=>[...l[3]||(l[3]=[p("i",{class:"svgtofont-icon-copy"},null,-1),p("span",{class:"mb-[2px] ml-[4px]"},"复制所有",-1)])]),_:1},8,["onClick"]),n(b,{type:"default",onClick:s(ue),class:"refreshAllBtn"},{default:r(()=>[...l[4]||(l[4]=[p("i",{class:"svgtofont-el-refresh"},null,-1),p("span",{class:"mb-[2px] ml-[4px]"},"刷新所有",-1)])]),_:1},8,["onClick"])])]),_:1},512),[[F,s(o).type==="1"]]),w(n(f,{label:"密码",class:"relative mt-[16px] typeClass",prop:"password"},{default:r(()=>[p("div",fe,[n(I,{modelValue:s(o).password,"onUpdate:modelValue":l[1]||(l[1]=_=>s(o).password=_),style:{width:"26rem"},name:"password",icon:"el-refresh",onIconClick:s(ne)},null,8,["modelValue","onIconClick"]),n(E,{icon:"icon-copy",class:"w-1.8rem h-1.8rem cursor-pointer ml-[1rem]",onClick:s(re)},null,8,["onClick"])])]),_:1},512),[[F,s(o).type=="0"]])]),_:1},8,["rules","model"])],2)}}}),xe=Z(_e,[["__scopeId","data-v-3012681d"]]);export{xe as default};