import{u as U,a as $,B as j,b as E}from"./index.ae7ce77b.js";import"./elementPlus.346c766a.js";import{d as P,r as f,al as b,am as A,j as G,w as O,a9 as s,o as d,E as h,G as a,M as t,a2 as z,a0 as H,u as o,J as g,c as J,a as v,L as n,K as w,B as K,aq as W,ar as F}from"./vue.6daa721c.js";import{createCrudOptions as Q}from"./crud.02d19be9.js";import X from"./adStruct.132e839f.js";import Y from"./dataTendency.fdb6f7b4.js";import{a as Z,b as ee,c as ae,d as te,e as oe}from"./api.b0d3db9e.js";import{SdBaseColumn as se}from"./commonTabColumn.9307c435.js";import{D as ne}from"./index.1b30f184.js";import{_ as re}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./index.abe7750b.js";import"./dropdowndisable.88660b16.js";import"./enum.b537673d.js";import"./index.c2be63e9.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"),k=U(),I=$(),{dateRange:y}=b(I),{profile:S}=b(k),m=f({profileId:S.value.profile_id,dateRange:y}),{crudBinding:V,crudRef:B,crudExpose:C}=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()=>{C.doRefresh()}),O(m,async()=>{C.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};
