import{u as A,a as E,B as O,b as U}from"./index.8a64ecdf.js";import"./elementPlus.58179425.js";import{d as J,q as v,r as i,ak as b,an as W,al as F,j as H,w as K,a8 as s,o as x,E as I,G as a,M as t,a1 as Q,$ as X,u as o,J as Y,a as r,L as g,B as Z,n as ee,ap as ae,aq as te}from"./vue.95e072e2.js";import{createCrudOptions as oe}from"./crud.4d37b20c.js";import ne from"./dataTendency.ab62b4f1.js";import{a as se,b as re,c as ce,d as le}from"./api.77b99954.js";import{SbBaseColumn as de}from"./commonTabColumn.00155e2b.js";import{D as ie}from"./index.eed780e8.js";import{_ as pe}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./api.b3169660.js";import"./enum.b537673d.js";import"./index.9f6b84b8.js";import"./index.df979911.js";const me=c=>(ae("data-v-4d8a5f41"),c=c(),te(),c),ue={class:"en-text"},_e={class:"en-text"},fe={class:"en-text"},he={class:"campare-switch"},ve=me(()=>r("span",null,"数据对比 ",-1)),ge=J({__name:"index",setup(c,{expose:T}){const N=v("topSearchItem"),D=v("searchType"),V=v("searchItem"),l=i("dataTendency"),R=A(),B=E(),{dateRange:w}=b(B),{profile:S}=b(R),p=i({profileId:S.value.profile_id,dateRange:w,filterItem:V,searchType:D,searchItem:N}),{crudBinding:L,crudRef:$,crudExpose:y}=O({createCrudOptions:oe,context:p});W();const q=F(),G=i(),m=i(!1),u=_=>{q.push({name:"CampaignDetail",query:{campaignId:_.campaignId,tagsViewName:_.campaignName}})};H(()=>{y.doRefresh()});const C=()=>{l.value==="dataTendency"&&G.value.resizeChart()},j=()=>{ee(()=>{C()})};return T({resizeTabChart:C}),K(p,async()=>{y.doRefresh()},{deep:!0}),(_,d)=>{const k=s("el-tab-pane"),z=s("el-tabs"),f=s("el-link"),h=s("el-tooltip"),P=s("el-switch"),M=s("fs-crud");return x(),I(o(U),{class:"fs-page-custom"},{default:a(()=>[t(M,Z({ref_key:"crudRef",ref:$},o(L)),Q({"header-middle":a(()=>[t(z,{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=e=>l.value=e),class:"chart-tabs",type:"border-card",onTabChange:j},{default:a(()=>[t(k,{label:"数据趋势",name:"dataTendency"},{default:a(()=>[l.value==="dataTendency"?(x(),I(ne,{key:0,query:p.value,fetchCard:o(se),"fetch-line-month":o(re),"fetch-line-week":o(ce),fetchLine:o(le)},null,8,["query","fetchCard","fetch-line-month","fetch-line-week","fetchLine"])):Y("",!0)]),_:1}),t(k,{label:"散点视图",name:"scatterView",lazy:!0})]),_:1},8,["modelValue"])]),cell_asin:a(e=>[t(h,{effect:"dark",content:e.row.asin,placement:"top"},{default:a(()=>[t(f,{underline:!1,onClick:n=>u(e.row)},{default:a(()=>[r("div",ue,g(e.row.asin),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),cell_campaignName:a(e=>[t(h,{effect:"dark",content:e.row.campaignName,placement:"top"},{default:a(()=>[t(f,{type:"primary",underline:!1,onClick:n=>u(e.row)},{default:a(()=>[r("div",_e,g(e.row.campaignName),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),cell_adGroupName:a(e=>[t(h,{effect:"dark",content:e.row.adGroupName,placement:"top"},{default:a(()=>[t(f,{type:"primary",underline:!1,onClick:n=>u(e.row)},{default:a(()=>[r("div",fe,g(e.row.adGroupName),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),"toolbar-left":a(()=>[r("div",he,[ve,t(P,{modelValue:m.value,"onUpdate:modelValue":d[1]||(d[1]=e=>m.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[X(Object.keys(o(de)),e=>({name:`cell_${e}`,fn:a(n=>[t(ie,{field:e,value:n.row[e],"prev-val":n.row[`prev${e}`],"gap-val":n.row[`gap${e}`],"date-range":o(w),"show-compare":m.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});const Le=pe(ge,[["__scopeId","data-v-4d8a5f41"]]);export{Le as default};
