import{K as e}from"./utils-lib.js?v=1761009159";import{c as a,g as s,e as l,C as r,U as t,q as o,v as m,x as i,y as u}from"./base-lib.js?v=1761009159";import{i as p,j as c,b as d,d as n,h as v,f as j}from"./form-item.js?v=1761009159";import{t as _,u as w,j as b,i as f,g,a as x,b as h}from"./index363.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";import"./index105.js?v=1761009159";import"./index126.js?v=1761009159";import"./index103.js?v=1761009159";import"./column.js?v=1761009159";import"./site.js?v=1761009159";import"./validator.js?v=1761009159";const T={class:"p-2rem"},q=a({__name:"install-tomcat",setup(a,{expose:q}){const{BtForm:y,submit:P,param:V}=e({data:()=>({install_type:"global",user:"www",release_firewall:!1,auto_start:!1}),options:e=>s(()=>[p(" ","install_type",[{label:"全局安装",value:"global"},{label:"独立安装",value:"custom"}]),..."global"===e.value.install_type?[c("版本","base_version",_.value,{attrs:{class:"!w-[30rem]",placeholder:"请选择Tomcat版本",onChange:a=>{_.value.find(e=>e.value===a).port&&(e.value.port=_.value.find(e=>e.value===a).port)}},rules:[{required:!0,message:"请选择Tomcat版本"}]})]:[c("版本","base_version",_.value,{attrs:{class:"!w-[30rem]",placeholder:"请选择Tomcat版本"},rules:[{required:!0,message:"请选择Tomcat版本"}]}),d("名称","name",{attrs:{class:"!w-[30rem]",placeholder:"请输入Tomcat名称"},rules:[{required:!0,message:"请输入Tomcat名称",trigger:"blur"}]}),c("启动用户","user",w.value,{attrs:{class:"!w-[30rem]"}})],n([d("端口","port",{attrs:{class:"!w-[30rem]",placeholder:"请输入端口"},rules:[{required:!0,message:"请输入端口",trigger:"blur"},{validator:(e,a)=>a?[80,443,21,20,8080,8443,8081,888,8888,3306,5432,6379,27017,27018,27019,11211].includes(+a)?Promise.reject("端口号不能为特殊端口"):a<1||a>65535?Promise.reject("端口号范围为1-65535"):Promise.resolve():Promise.reject("请输入端口")}]}),v("",()=>l(t,{class:"!ml-10px",modelValue:e.value.release_firewall,"onUpdate:modelValue":a=>e.value.release_firewall=a},{default:()=>[r("端口放行")]}),"release_firewall")]),c("JDK版本","jdk_path",b.value,{attrs:{class:"!w-[30rem]",placeholder:"请选择jdk版本"},rules:[{required:!0,message:"请选择JDK版本"}]}),v("开机自启",()=>l(t,{modelValue:e.value.auto_start,"onUpdate:modelValue":a=>e.value.auto_start=a},null),"auto_start",{attrs:{class:"!ml-[10px] !w-[10rem]"}}),d("备注","ps",{attrs:{class:"!w-[30rem]",placeholder:"请输入备注"}}),j("",[{content:"【全局安装】所有指定使用该版本的项目将共用Tomcat"},{content:"【独立安装】可根据项目编排需要为某一个项目独立使用"}])]),submit:async(e,a)=>(await a(),await f(e.value))});return q({onConfirm:P}),o(()=>{g(),x(),h(V)}),(e,a)=>(m(),i("div",T,[l(u(y))]))}});export{q as default};
