import{d as b,q as A,al as S,r as a,p as C,a9 as h,o as T,E as _,G as k,M as P,u as l}from"./vue.3f733908.js";import{g as O,a as D,b as L,c as g}from"./api.36998a26.js";import{a as I}from"./index.0d411246.js";import{e as n}from"./emitter.9d098494.js";import R from"./index.45610499.js";const U=[{label:"曝光量",value:"Impression"},{label:"点击量",value:"Click"},{label:"花费",value:"Spend"},{label:"总订单数",value:"TotalOrderItems"},{label:"总销售额",value:"TotalSales"},{label:"单均价",value:"SAP"},{label:"广告订单数",value:"TotalAdPurchases"},{label:"广告销售额",value:"TotalAdSales"},{label:"广告销量",value:"TotalAdUnitOrdered"},{label:"本商品广告销售额",value:"TotalAdSalesSameSKU"},{label:"本商品广告订单数",value:"TotalAdPurchasesSameSKU"},{label:"本商品广告销量",value:"TotalAdUnitOrderedSameSKU"},{label:"ACOS",value:"ACOS"},{label:"ROAS",value:"ROAS"},{label:"TACOS",value:"TACOS"},{label:"转化率",value:"CR"},{label:"点击率",value:"CTR"},{label:"点击成本",value:"CPC"},{label:"总订单成本",value:"CPO"},{label:"广告订单成本",value:"CPA"}],M=b({__name:"TrendOverview",emits:["updateList"],setup(B,{emit:c}){const r=A("profile"),i=I(),{dateRange:u}=S(i),m=a([]),t=a(""),s=a(""),o=a("");n.on("useSelectItem-clickParentAsinBtn",e=>{t.value=e.selectedParentAsin}),n.on("useSelectItem-clickAsinBtn",e=>{t.value=e.selectedParentAsin,s.value=e.selectedAsin}),n.on("useSelectItem-clickSkuItem",e=>{t.value=e.selectedParentAsin,s.value=e.selectedAsin,o.value=e.selectedSku});const d=a({profileId:r.value.profile_id,dateRange:u,parentAsin:t,childAsin:s,sku:o}),v=c;function p(e){m.value=e,v("updateList",e)}return C(()=>{n.all.clear()}),(e,q)=>{const f=h("el-card");return T(),_(f,null,{default:k(()=>[P(R,{metricEnum:l(U),query:d.value,fetchCard:l(O),fetchLine:l(D),"fetch-line-month":l(L),"fetch-line-week":l(g),onChangeStatDim:p},null,8,["metricEnum","query","fetchCard","fetchLine","fetch-line-month","fetch-line-week"])]),_:1})}}});export{M as _};
