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