import{_ as h}from"./index.vue_vue_type_script_setup_true_lang.3fa6db13.js";import{a as C}from"./index.ad3efb29.js";import{d as F,ay as S,B as y,r as c,w as P,j as T,A as U,ai as d,o as i,c as m,U as p,O as x,F as B,a8 as b,M as k,u as w,D}from"./vue.adf17aba.js";import{e as L}from"./api.ac18b8be.js";import{e as a}from"./emitter.bff31cdd.js";import{_ as N}from"./_plugin-vue_export-helper.c27b6911.js";import"./elementPlus.4833989a.js";import"./echarts.72dc8373.js";const A={class:"filters"},R=F({__name:"TopFilter",setup(j){const _=C(),{dateRange:n}=S(_),f=y("profile"),l=c(""),r=c([]),s=c("");async function u(){try{const e=await L({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()}),P(l,()=>{a.emit("TopFilters-selectValue",{selectValue:l.value})}),T(()=>{u()}),U(()=>{a.all.clear()}),(e,t)=>{const V=d("el-input"),g=d("el-option"),I=d("el-select");return i(),m("div",A,[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:x(()=>[(i(!0),m(B,null,b(r.value,o=>(i(),k(g,{key:o.productlineId,label:o.productlineName,value:o.productlineId},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),p(h,{modelValue:w(n),"onUpdate:modelValue":t[2]||(t[2]=o=>D(n)?n.value=o:null)},null,8,["modelValue"])])}}});const H=N(R,[["__scopeId","data-v-29df1a0d"]]);export{H as default};
