import{u as q,a as $,B as j,b as O}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{d as P,r as f,ay as b,az as z,j as A,w as E,ai as s,o as d,M as h,O as a,U as t,aa as G,a8 as F,u as o,R as g,c as H,a as v,T as n,S as w,K,aF as W,aG as J}from"./vue.adf17aba.js";import{createCrudOptions as Q}from"./crud.8784f634.js";import X from"./adStruct.f1b7fcd5.js";import Y from"./dataTendency.8f9547e4.js";import{a as Z,b as ee,c as ae,d as te,e as oe}from"./api.325c96cf.js";import{SdBaseColumn as se}from"./commonTabColumn.c5d53eee.js";import{D as ne}from"./index.04a874bc.js";import{_ as re}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./index.05a2d588.js";import"./dropdowndisable.88660b16.js";import"./enum.e566fd6e.js";import"./index.7f1f4491.js";const le=c=>(W("data-v-c00ab5e7"),c=c(),J(),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=q(),I=$(),{dateRange:y}=b(I),{profile:S}=b(k),m=f({profileId:S.value.profile_id,dateRange:y}),{crudBinding:V,crudRef:D,crudExpose:C}=j({createCrudOptions:Q,context:m}),M=z(),u=f(!1),x=l=>{M.push({name:"SdCampaignDetail",query:{campaignId:l.campaignId,tagsViewName:l.campaignName,row:l}}),console.log("row",l)};return A(async()=>{C.doRefresh()}),E(m,async()=>{C.doRefresh()},{deep:!0}),(l,i)=>{const _=s("el-tab-pane"),B=s("el-tabs"),L=s("el-progress"),N=s("el-link"),T=s("el-tooltip"),R=s("el-switch"),U=s("fs-crud");return d(),h(o(O),{class:"fs-page-custom"},{default:a(()=>[t(U,K({ref_key:"crudRef",ref:D},o(V)),G({"header-middle":a(()=>[t(B,{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(),H("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=>x(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},[F(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 Me=re(me,[["__scopeId","data-v-c00ab5e7"]]);export{Me as default};
