import{c as e,g as l,q as a,a6 as s,v as t,N as o,B as r,e as d,y as p,$ as n,z as i,C as u,D as m,ab as c,aS as _,U as f,G as b}from"./base-lib.js?v=1761009159";import{K as h,c5 as V,ar as w,d as y,L as k,k as v,ax as x,e as j}from"./utils-lib.js?v=1761009159";import{n as g,i as C,a as U,b as N,$ as q,c as B,o as $,v as z,g as D,d as F}from"./index74.js?v=1761009159";const G={class:"flex items-center"},I={class:"flex items-center"},K={class:"flex items-center custom-refresh-select"},L={class:"el-input-group__append !h-3rem !flex items-center"},S={class:"flex items-center"},A=e({__name:"index",setup(e,{expose:A}){const{BtForm:E,submit:H,param:J}=h({data:g.value,options:e=>l(()=>[{type:"input",label:"项目名称",key:"project_name",attrs:{class:"!w-[32rem]",placeholder:"请输入项目名称"},rules:[V({message:"请输入项目名称"})]},{type:"slots",key:"project_path",rules:{project_path:[V({message:"请输入项目路径"})]}},{type:"input",label:"启动命令",key:"project_cmd",attrs:{class:"!w-[32rem]",placeholder:"请输入项目的启动命令",onInput:e=>C()},rules:[V({message:"请输入项目执行命令"})]},{type:"slots",key:"port",rules:{port:[w()]}},{type:"slots",key:"dotnet_version",rules:{dotnet_version:[V({message:"请选择Net版本"})]}},{type:"slots",key:"other"}]),submit:U});return a(N),s(q),A({onConfirm:H,init:N}),(e,l)=>{const a=y,s=k,h=v,V=c,w=_,g=f,C=x,U=j,N=b;return t(),o(p(E),{class:"p-[20px]","label-width":"100px"},{project_path:r(()=>[d(V,{label:"运行路径",prop:"project_path"},{default:r(()=>[d(h,{width:"32rem",disabled:p(B),modelValue:p(J).project_path,"onUpdate:modelValue":l[0]||(l[0]=e=>p(J).project_path=e),placeholder:"项目的运行路径"},n({_:2},[p(B)?void 0:{name:"append",fn:r(()=>[d(s,{onClick:p($)},{default:r(()=>[d(a,{icon:"el-folder-opened",class:"cursor-pointer"})]),_:1},8,["onClick"])]),key:"0"}]),1032,["disabled","modelValue"])]),_:1})]),port:r(()=>[d(V,{label:"项目端口",prop:"port"},{default:r(()=>[i("div",G,[d(h,{width:"20rem",type:"number",class:"mr-[12px]",modelValue:p(J).port,"onUpdate:modelValue":l[1]||(l[1]=e=>p(J).port=e),placeholder:"项目真实端口"},null,8,["modelValue"]),p(B)?m("",!0):(t(),o(g,{key:0,modelValue:p(J).release_firewall,"onUpdate:modelValue":l[2]||(l[2]=e=>p(J).release_firewall=e)},{default:r(()=>[l[9]||(l[9]=u(" 放行端口 ",-1)),d(w,{class:"item",effect:"dark",content:"选中将在防火墙安全组放行监听端口，放行后该项目可在外网访问",placement:"right"},{default:r(()=>l[8]||(l[8]=[i("i",{class:"svgtofont-el-question-filled text-warning"},null,-1)])),_:1,__:[8]})]),_:1,__:[9]},8,["modelValue"]))])]),_:1})]),dotnet_version:r(()=>[d(V,{label:"Net版本",prop:"dotnet_version"},{default:r(()=>[i("div",I,[i("div",K,[d(C,{modelValue:p(J).dotnet_version,"onUpdate:modelValue":l[3]||(l[3]=e=>p(J).dotnet_version=e),disabled:!p(z).length||p(B),options:p(z),class:"!w-[16rem]"},null,8,["modelValue","disabled","options"]),i("div",L,[d(s,{title:"刷新Net版本",class:"!flex",onClick:l[4]||(l[4]=e=>p(D)(!0))},{default:r(()=>[d(a,{icon:"el-refresh",class:"!text-base"})]),_:1})])]),d(U,{class:"ml-[8px]",onClick:p(F)},{default:r(()=>l[10]||(l[10]=[u("版本管理",-1)])),_:1,__:[10]},8,["onClick"])])]),_:1})]),other:r(()=>[d(V,{label:"开机启动"},{default:r(()=>[d(g,{modelValue:p(J).is_power_on,"onUpdate:modelValue":l[5]||(l[5]=e=>p(J).is_power_on=e)},{default:r(()=>l[11]||(l[11]=[u(" 是否设置开机自动启动（默认自带守护进程每120秒检测一次） ",-1)])),_:1,__:[11]},8,["modelValue"])]),_:1}),d(V,{label:"启动用户"},{default:r(()=>[i("div",S,[d(C,{modelValue:p(J).run_user,"onUpdate:modelValue":l[6]||(l[6]=e=>p(J).run_user=e),class:"mr-[8px] !w-[16rem]",options:[{label:"www",value:"www"},{label:"root",value:"root"}]},null,8,["modelValue"])])]),_:1}),d(V,{label:"项目备注"},{default:r(()=>[d(h,{width:"32rem",modelValue:p(J).project_ps,"onUpdate:modelValue":l[7]||(l[7]=e=>p(J).project_ps=e),placeholder:"输入项目备注，非必填"},null,8,["modelValue"])]),_:1}),p(B)?(t(),o(V,{key:0,label:" "},{default:r(()=>[d(N,{type:"primary",onClick:p(H)},{default:r(()=>l[12]||(l[12]=[u("保存配置",-1)])),_:1,__:[12]},8,["onClick"])]),_:1})):m("",!0)]),_:1})}}});export{A as _};
