import{u as O,a as U,B as A,b as E}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{d as F,B as v,r as i,ay as b,aD as K,az as W,j as H,w as J,ai as s,o as x,M as T,O as a,U as t,aa as Q,a8 as X,u as o,R as Y,a as r,T as y,K as Z,n as ee,aF as ae,aG as te}from"./vue.adf17aba.js";import{createCrudOptions as oe}from"./crud.f9064ec3.js";import ne from"./dataTendency.69ca86c9.js";import{a as se,b as re,c as ce,d as le}from"./api.8b835e6e.js";import{SbBaseColumn as de}from"./commonTabColumn.c5d53eee.js";import{D as ie}from"./index.04a874bc.js";import{_ as pe}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./api.5436d480.js";import"./enum.e566fd6e.js";import"./index.7f1f4491.js";import"./index.05a2d588.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)),ye=F({__name:"index",setup(c,{expose:I}){const D=v("topSearchItem"),N=v("searchType"),V=v("searchItem"),l=i("dataTendency"),R=O(),B=U(),{dateRange:g}=b(B),{profile:S}=b(R),p=i({profileId:S.value.profile_id,dateRange:g,filterItem:V,searchType:N,searchItem:D}),{crudBinding:L,crudRef:$,crudExpose:w}=A({createCrudOptions:oe,context:p});K();const z=W(),G=i(),m=i(!1),u=_=>{z.push({name:"CampaignDetail",query:{campaignId:_.campaignId,tagsViewName:_.campaignName}})};H(()=>{w.doRefresh()});const C=()=>{l.value==="dataTendency"&&G.value.resizeChart()},j=()=>{ee(()=>{C()})};return I({resizeTabChart:C}),J(p,async()=>{w.doRefresh()},{deep:!0}),(_,d)=>{const k=s("el-tab-pane"),q=s("el-tabs"),f=s("el-link"),h=s("el-tooltip"),P=s("el-switch"),M=s("fs-crud");return x(),T(o(E),{class:"fs-page-custom"},{default:a(()=>[t(M,Z({ref_key:"crudRef",ref:$},o(L)),Q({"header-middle":a(()=>[t(q,{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(),T(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,y(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,y(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,y(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(g),"show-compare":m.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});const Le=pe(ye,[["__scopeId","data-v-4d8a5f41"]]);export{Le as default};
