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