import{u as L,a as R,B as G,b as M,v as $}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{g as j,a as q,b as K,c as A,d as E}from"./crud.d34faba3.js";import z from"./dataTendency.69ca86c9.js";import{d as F,B as u,r as _,ay as C,j as W,w as H,ai as n,o as J,M as Q,O as a,U as t,aa as X,a8 as Y,u as o,a as r,T as c,K as Z,aF as ee,aG as ae}from"./vue.adf17aba.js";import{o as te}from"./enum.e566fd6e.js";import{SpCampaignPuchasedOtherProductsColumn as oe}from"./commonTabColumn.c5d53eee.js";import{D as re}from"./index.04a874bc.js";import{_ as ne}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./index.7f1f4491.js";import"./index.05a2d588.js";const se=l=>(ee("data-v-2994f314"),l=l(),ae(),l),ce={class:"en-text"},le={class:"en-text"},de={class:"campare-switch"},ie=se(()=>r("span",null,"数据对比 ",-1)),pe=F({__name:"index",setup(l){const b=u("topSearchItem"),k=u("searchType"),I=u("searchItem"),f=_("dataTendency"),S=L(),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:"其它商品销量"}],i=_(!1),p=_({profileId:x.value.profile_id,dateRange:h,searchItem:b,searchType:k,filterItem:I}),{crudBinding:N,crudRef:O,crudExpose:v}=G({createCrudOptions:E,context:p}),g=m=>{$.push({name:"CampaignDetail",query:{campaignId:m.campaignId,tagsViewName:m.campaignName}})};return W(async()=>{v.doRefresh()}),H(p,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"),U=n("fs-crud");return J(),Q(o(M),{class:"fs-page-custom"},{default:a(()=>[t(U,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:p.value,fetchCard:o(j),fetchLine:o(q),"fetch-line-month":o(K),"fetch-line-week":o(A),"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,[ie,t(B,{modelValue:i.value,"onUpdate:modelValue":d[1]||(d[1]=e=>i.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":i.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});const Ie=ne(pe,[["__scopeId","data-v-2994f314"]]);export{Ie as default};
