import{P as e,$ as a,b as l}from"./utils-lib.js?v=1761009159";import{c as s,r as t,o,q as r,v as u,x as i,e as n,B as c,y as p,F as m,b0 as d,N as f,ak as v,al as P,ab as _,a9 as b}from"./base-lib.js?v=1761009159";import{h as j,i as h,o as y}from"./validator.js?v=1761009159";import{batchPhpVersion as V,getPhpVersion as g}from"./site.js?v=1761009159";import{u as x}from"./useStore4.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";const H={class:"p-2rem"},w=s({__name:"index",props:{compData:{default:()=>{}}},setup(s,{expose:w}){const D=l(),k=s,{isRefreshList:q,batchConfig:C}=x(),M=t(),O=o({selectValue:""}),R=o({selectValue:[{required:!0,message:"请选择PHP版本",trigger:"change"}]}),A=t([]);return w({onConfirm:async e=>{let a;try{await M.value.validate(),a=D.load("正在调整php版本，请稍后...");let l=[];const s=k.compData.filter(e=>{var a;return"PHPMOD"!==(null==(a=null==e?void 0:e.project_config)?void 0:a.type)});k.compData.forEach(e=>{var a;"PHPMOD"===(null==(a=null==e?void 0:e.project_config)?void 0:a.type)&&l.push({name:e.name,msg:"异步项目不支持",status:!1})});const{enable:t,exclude:o}=C.value,r=j(s,o,t,{params:{project_type:"PHP",version:O.selectValue}}),u=await V(r),{data:i}=h(u.data);y(i,{title:"设置php版本"}),e(),q.value=!0}catch(l){}finally{null==a||a.close()}}}),r(()=>{(async()=>{var a;await e({request:g(),data:[Array,A]}),O.selectValue=(null==(a=A.value[0])?void 0:a.version)||""})()}),(e,l)=>{const s=v,t=P,o=_,r=b,j=a;return u(),i("div",H,[n(r,{ref_key:"formRef",ref:M,model:p(O),"label-width":"80px",rules:p(R)},{default:c(()=>[n(o,{label:"PHP版本",prop:"selectValue"},{default:c(()=>[n(t,{modelValue:p(O).selectValue,"onUpdate:modelValue":l[0]||(l[0]=e=>p(O).selectValue=e),placeholder:"请选择PHP版本",class:"!w-24rem"},{default:c(()=>[(u(!0),i(m,null,d(p(A),e=>(u(),f(s,{key:e.version,label:e.name,value:e.version},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"]),n(j,{options:[{content:"请根据您的程序需求选择版本"}],class:"pl-4rem"})])}}});export{w as default};
