var k=Object.defineProperty,C=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var h=(o,e,l)=>e in o?k(o,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):o[e]=l,j=(o,e)=>{for(var l in e||(e={}))B.call(e,l)&&h(o,l,e[l]);if(v)for(var l of v(e))$.call(e,l)&&h(o,l,e[l]);return o},_=(o,e)=>C(o,P(e));import{p as b}from"./api.16506206505703.js";import{_ as F}from"./index.1650620650570.js";import{y as S,a as q,F as A,o as N,t as U,d as p,q as r,e as c,j as s,k as n,I as g,J as y,G as E,f as I,i as V,ac as z}from"./vendor.1650620650570.js";const D=S({name:"ProjectEnvSelect",props:{visible:{type:Boolean},data:{type:Object},title:{type:String},machineId:{type:Number},isCommon:{type:Boolean}},setup(o,{emit:e}){const l=q({projects:[],envs:[],projectId:null,envId:null});A(o,(a,u)=>{}),N(async()=>{l.projects=await b.accountProjects.request(null)});const d=async a=>{e("update:projectId",a),e("changeProjectEnv",l.projectId,null),l.envId=null,l.envs=await b.projectEnvs.request({projectId:a})},i=a=>{e("update:envId",a),e("changeProjectEnv",l.projectId,a)};return _(j({},U(l)),{changeProject:d,changeEnv:i})}}),G={style:{float:"left"}},J={style:{float:"right",color:"#8492a6","font-size":"13px"}};function L(o,e,l,d,i,a){const u=p("el-option"),f=p("el-select"),m=p("el-form-item"),w=p("el-form");return r(),c("div",null,[s(w,{class:"search-form","label-position":"right",inline:!0,"label-width":"60px"},{default:n(()=>[s(m,{prop:"project",label:"\u9879\u76EE","label-width":"40px"},{default:n(()=>[s(f,{modelValue:o.projectId,"onUpdate:modelValue":e[0]||(e[0]=t=>o.projectId=t),placeholder:"\u8BF7\u9009\u62E9\u9879\u76EE",onChange:o.changeProject,filterable:""},{default:n(()=>[(r(!0),c(g,null,y(o.projects,t=>(r(),E(u,{key:t.id,label:`${t.name} [${t.remark}]`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),s(m,{prop:"env",label:"\u73AF\u5883","label-width":"40px"},{default:n(()=>[s(f,{style:{width:"100px"},modelValue:o.envId,"onUpdate:modelValue":e[1]||(e[1]=t=>o.envId=t),placeholder:"\u73AF\u5883",onChange:o.changeEnv,filterable:""},{default:n(()=>[(r(!0),c(g,null,y(o.envs,t=>(r(),E(u,{key:t.id,label:t.name,value:t.id},{default:n(()=>[I("span",G,V(t.name),1),I("span",J,V(t.remark),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),z(o.$slots,"default")]),_:3})])}var H=F(D,[["render",L]]);export{H as P};
