import{u as q,a as R,B as U,b as $,v as G}from"./index.8a64ecdf.js";import"./elementPlus.58179425.js";import{g as M,a as j,b as A,c as E,d as K}from"./crud.cef7917c.js";import z from"./dataTendency.ab62b4f1.js";import{d as W,q as u,r as _,ak as C,j as F,w as H,a8 as n,o as J,E as Q,G as a,M as t,a1 as X,$ as Y,u as o,a as r,L as c,B as Z,ap as ee,aq as ae}from"./vue.95e072e2.js";import{o as te}from"./enum.b537673d.js";import{SpCampaignPuchasedOtherProductsColumn as oe}from"./commonTabColumn.00155e2b.js";import{D as re}from"./index.eed780e8.js";import{_ as ne}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./index.9f6b84b8.js";import"./index.df979911.js";const se=l=>(ee("data-v-2994f314"),l=l(),ae(),l),ce={class:"en-text"},le={class:"en-text"},de={class:"campare-switch"},pe=se(()=>r("span",null,"数据对比 ",-1)),ie=W({__name:"index",setup(l){const b=u("topSearchItem"),k=u("searchType"),I=u("searchItem"),f=_("dataTendency"),S=q(),P=R(),{dateRange:h}=C(P),{profile:x}=C(S),D=[{metric:"TotalPurchasesOtherSKU",color:"#0085ff",label:"其它商品订单数"},{metric:"TotalSalesOtherSKU",color:"#3fd4cf",label:"其它商品销售额"},{metric:"TotalUnitOrderedOtherSKU",color:"#ff9500",label:"其它商品销量"}],p=_(!1),i=_({profileId:x.value.profile_id,dateRange:h,searchItem:b,searchType:k,filterItem:I}),{crudBinding:N,crudRef:O,crudExpose:v}=U({createCrudOptions:K,context:i}),g=m=>{G.push({name:"CampaignDetail",query:{campaignId:m.campaignId,tagsViewName:m.campaignName}})};return F(async()=>{v.doRefresh()}),H(i,async()=>{v.doRefresh()},{deep:!0}),(m,d)=>{const T=n("el-tab-pane"),V=n("el-tabs"),w=n("el-link"),y=n("el-tooltip"),B=n("el-switch"),L=n("fs-crud");return J(),Q(o($),{class:"fs-page-custom"},{default:a(()=>[t(L,Z({ref_key:"crudRef",ref:O},o(N)),X({"header-middle":a(()=>[t(V,{modelValue:f.value,"onUpdate:modelValue":d[0]||(d[0]=e=>f.value=e),class:"chart-tabs",type:"border-card"},{default:a(()=>[t(T,{label:"数据趋势",name:"dataTendency"},{default:a(()=>[t(z,{query:i.value,fetchCard:o(M),fetchLine:o(j),"fetch-line-month":o(A),"fetch-line-week":o(E),"init-metric":D,"metric-enum":o(te)},null,8,["query","fetchCard","fetchLine","fetch-line-month","fetch-line-week","metric-enum"])]),_:1})]),_:1},8,["modelValue"])]),cell_adProduct:a(e=>[r("p",null,c(e.row.advertisedAsin),1),r("p",null,c(e.row.advertisedSku),1)]),cell_purchasedProduct:a(e=>[r("p",null,c(e.row.purchasedAsin),1)]),cell_campaignName:a(e=>[t(y,{effect:"dark",content:e.row.campaignName,placement:"top"},{default:a(()=>[t(w,{type:"primary",underline:!1,onClick:s=>g(e.row)},{default:a(()=>[r("div",ce,c(e.row.campaignName),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),cell_adGroupName:a(e=>[t(y,{effect:"dark",content:e.row.adGroupName,placement:"top"},{default:a(()=>[t(w,{type:"primary",underline:!1,onClick:s=>g(e.row)},{default:a(()=>[r("div",le,c(e.row.adGroupName),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),"toolbar-left":a(()=>[r("div",de,[pe,t(B,{modelValue:p.value,"onUpdate:modelValue":d[1]||(d[1]=e=>p.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[Y(Object.keys(o(oe)),e=>({name:`cell_${e}`,fn:a(s=>[t(re,{field:e,value:s.row[e],"prev-val":s.row[`prev${e}`],"gap-val":s.row[`gap${e}`],"date-range":o(h),"show-compare":p.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});const Ie=ne(ie,[["__scopeId","data-v-2994f314"]]);export{Ie as default};
