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