import{_ as h}from"./index.vue_vue_type_script_setup_true_lang.c5131d55.js";import{a as C}from"./index.ae7ce77b.js";import{d as F,al as S,q as P,r as c,w as T,j as x,p as y,a9 as d,o as i,c as m,M as p,G as U,F as b,a0 as k,E as w,u as B,t as L}from"./vue.6daa721c.js";import{e as N}from"./api.d42607bf.js";import{e as a}from"./emitter.d780df30.js";import{_ as D}from"./_plugin-vue_export-helper.c27b6911.js";import"./elementPlus.346c766a.js";import"./echarts.72dc8373.js";const R={class:"filters"},j=F({__name:"TopFilter",setup(A){const _=C(),{dateRange:n}=S(_),f=P("profile"),l=c(""),r=c([]),s=c("");async function u(){try{const e=await N({profileId:f.value.profile_id});r.value=e.data,l.value=r.value[0].productlineId}catch(e){console.log("error:",e)}}function v(){a.emit("TopFilters-searchItem",{searchItem:s.value})}return a.on("ProductSelectCard-cardId",e=>{l.value=e.productlineId}),a.on("ProductLineDialog-reloading",e=>{e.reloading&&u()}),a.on("ProductSelectCard-reloading",e=>{e.reloading&&u()}),T(l,()=>{a.emit("TopFilters-selectValue",{selectValue:l.value})}),x(()=>{u()}),y(()=>{a.all.clear()}),(e,t)=>{const V=d("el-input"),g=d("el-option"),I=d("el-select");return i(),m("div",R,[p(V,{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=o=>s.value=o),onChange:v,placeholder:"ASIN/父ASIN/标题/SKU"},null,8,["modelValue"]),p(I,{modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=o=>l.value=o),class:"filter-select"},{default:U(()=>[(i(!0),m(b,null,k(r.value,o=>(i(),w(g,{key:o.productlineId,label:o.productlineName,value:o.productlineId},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),p(h,{modelValue:B(n),"onUpdate:modelValue":t[2]||(t[2]=o=>L(n)?n.value=o:null)},null,8,["modelValue"])])}}});const J=D(j,[["__scopeId","data-v-29df1a0d"]]);export{J as default};
