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