import{d as A,B as b,ay as S,r as a,A as C,ai as h,o as T,M as _,O as k,U as O,u as l}from"./vue.adf17aba.js";import{g as P,a as D,b as L,c as g}from"./api.1f097846.js";import{a as I}from"./index.ad3efb29.js";import{e as n}from"./emitter.bff31cdd.js";import U from"./index.bef75118.js";const B=[{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=A({__name:"TrendOverview",emits:["updateList"],setup(R,{emit:c}){const r=b("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 f(e){m.value=e,v("updateList",e)}return C(()=>{n.all.clear()}),(e,y)=>{const p=h("el-card");return T(),_(p,null,{default:k(()=>[O(U,{metricEnum:l(B),query:d.value,fetchCard:l(P),fetchLine:l(D),"fetch-line-month":l(L),"fetch-line-week":l(g),onChangeStatDim:f},null,8,["metricEnum","query","fetchCard","fetchLine","fetch-line-month","fetch-line-week"])]),_:1})}}});export{M as _};
