import{u as U,a as q,B as P,b as $}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{d as j,r as _,ay as y,az as z,j as O,w as A,ai as r,o as f,M as h,O as a,U as t,aa as G,a8 as E,u as o,R as C,a as w,T as s,S as v,K as F,aF as K,aG as W}from"./vue.adf17aba.js";import{createCrudOptions as H}from"./crud.30fc2435.js";import J from"./dataTendency.8fe14a29.js";import Q from"./adStruct.fb26addf.js";import{a as X,c as Y,d as Z,b as ee}from"./api.4758178e.js";import{SbBaseColumn as ae}from"./commonTabColumn.c5d53eee.js";import{D as te}from"./index.04a874bc.js";import{_ as oe}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.e566fd6e.js";import"./index.7f1f4491.js";import"./index.05a2d588.js";import"./api.fa968e5b.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=U(),S=q(),{dateRange:b}=y(S),{profile:I}=y(k),p=_({profileId:I.value.profile_id,dateRange:b}),{crudBinding:M,crudRef:V,crudExpose:g}=P({createCrudOptions:H,context:p}),x=z(),m=_(!1),D=c=>{x.push({name:"CampaignDetail",query:{id:c.id,campaignId:c.campaignId,tagsViewName:c.campaignName}})};return O(()=>{g.doRefresh()}),A(p,()=>{g.doRefresh()},{deep:!0}),(c,d)=>{const u=r("el-tab-pane"),N=r("el-tabs"),L=r("el-link"),R=r("el-tooltip"),B=r("el-switch"),T=r("fs-crud");return f(),h(o($),{class:"fs-page-custom"},{default:a(()=>[t(T,F({ref_key:"crudRef",ref:V},o(M)),G({"header-middle":a(()=>[t(N,{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(J,{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(R,{effect:"dark",content:e.row.campaignName,placement:"top"},{default:a(()=>[t(L,{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(B,{modelValue:m.value,"onUpdate:modelValue":d[1]||(d[1]=e=>m.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[E(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};
