import{r as v}from"./index.ad3efb29.js";import{d as w,r as u,w as c,ai as p,o as r,M as d,O as V,c as C,a8 as q,F as I,J as b}from"./vue.adf17aba.js";function k(o){return v({url:"/api/ad_manage/ad_tree/campaign",method:"get",params:o})}const B=w({__name:"index",props:{modelValue:{},query:{},width:{default:""}},emits:["update:modelValue","change"],setup(o,{emit:g}){const e=o,t=u(e.modelValue),s=g,m=u([]),i=async a=>{const n=await k(a);m.value=n.data},y=async a=>{a&&await i({profileId:e.query.profileId,campaignType:e.query.campaignType,campaignName:a})},_=()=>{s("update:modelValue",t.value),s("change",t.value)};return c(()=>e.query.campaignType,async()=>{await i(e.query)},{immediate:!0}),c(()=>e.modelValue,()=>{t.value=e.modelValue}),(a,n)=>{const h=p("el-option"),f=p("el-select");return r(),d(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=l=>t.value=l),filterable:"",remote:"","remote-method":y,style:b({width:a.width}),clearable:"",onChange:_,placeholder:"请选择广告活动"},{default:V(()=>[(r(!0),C(I,null,q(m.value,l=>(r(),d(h,{key:l.campaignId,label:l.campaignName,value:l.campaignId},null,8,["label","value"]))),128))]),_:1},8,["modelValue","style"])}}});export{B as _};
