import{u as q,a as $,B as O,b as P}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{d as z,r as f,ay as k,B as A,az as E,j as G,w as F,ai as s,o as p,M as g,O as a,U as t,aa as K,a8 as W,u as o,R as h,c as H,a as v,T as r,S as w,K as J,aF as Q,aG as X}from"./vue.adf17aba.js";import{createCrudOptions as Y}from"./crud.3e12bb75.js";import Z from"./adStruct.729b77e4.js";import ee from"./dataTendency.8fe14a29.js";import{a as ae,b as te,c as oe,d as se}from"./api.4758178e.js";import{SbBaseColumn as re}from"./commonTabColumn.c5d53eee.js";import{D as ne}from"./index.04a874bc.js";import{_ as le}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./dropdowndisable.88660b16.js";import"./index.05a2d588.js";import"./enum.e566fd6e.js";import"./index.7f1f4491.js";const ce=l=>(Q("data-v-5fefaea9"),l=l(),X(),l),ie={key:0},pe={class:"en-text"},de={class:"compare-switch"},me=ce(()=>v("span",null,"数据对比 ",-1)),ue=z({__name:"index",setup(l){const n=f("dataTendency"),b=q(),I=$(),{dateRange:y}=k(I),{profile:S}=k(b),V=A("filterItem"),d=f({profileId:S.value.profile_id,dateRange:y,filterItem:V}),{crudBinding:B,crudRef:M,crudExpose:C}=O({createCrudOptions:Y,context:d}),x=E(),m=f(!1),D=u=>{x.push({name:"SbCampaignDetail",query:{campaignId:u.campaignId,tagsViewName:u.campaignName}})};return G(async()=>{C.doRefresh()}),F(d,async()=>{C.doRefresh()},{deep:!0}),(u,c)=>{const _=s("el-tab-pane"),N=s("el-tabs"),T=s("el-progress"),L=s("el-link"),R=s("el-tooltip"),U=s("el-switch"),j=s("fs-crud");return p(),g(o(P),{class:"fs-page-custom"},{default:a(()=>[t(j,J({ref_key:"crudRef",ref:M},o(B)),K({"header-middle":a(()=>[t(N,{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=e=>n.value=e),class:"chart-tabs",type:"border-card"},{default:a(()=>[t(_,{label:"数据趋势",name:"dataTendency"},{default:a(()=>[n.value==="dataTendency"?(p(),g(ee,{key:0,query:d.value,fetchCard:o(ae),fetchLine:o(te),"fetch-line-month":o(oe),"fetch-line-week":o(se)},null,8,["query","fetchCard","fetchLine","fetch-line-month","fetch-line-week"])):h("",!0)]),_:1}),t(_,{label:"广告结构",name:"adStruct"},{default:a(()=>[n.value==="adStruct"?(p(),g(Z,{key:0})):h("",!0)]),_:1}),t(_,{label:"散点视图",name:"scatterView"},{default:a(()=>[n.value==="scatterView"?(p(),H("div",ie,"散点视图")):h("",!0)]),_:1})]),_:1},8,["modelValue"])]),cell_percentTimeInBudget:a(e=>[t(T,{percentage:e.row.percentTimeInBudget>0?e.row.percentTimeInBudget*100:0},null,8,["percentage"])]),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(()=>[v("div",pe,r(e.row.campaignName),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),cell_MissedImpressions:a(e=>[w(r(e.row.MissedImpressionsLower??"0")+" ~ "+r(e.row.MissedImpressionsUpper??"0"),1)]),cell_MissedClicks:a(e=>[w(r(e.row.MissedClicksLower??"0")+" ~ "+r(e.row.MissedClicksUpper??"0"),1)]),cell_MissedSales:a(e=>[w(r(e.row.MissedSalesLower??"0")+" ~ "+r(e.row.MissedSalesUpper??"0"),1)]),"toolbar-left":a(()=>[v("div",de,[me,t(U,{modelValue:m.value,"onUpdate:modelValue":c[1]||(c[1]=e=>m.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[W(Object.keys(o(re)),e=>({name:`cell_${e}`,fn:a(i=>[t(ne,{field:e,value:i.row[e],"prev-val":i.row[`prev${e}`],"gap-val":i.row[`gap${e}`],"date-range":o(y),"show-compare":m.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});const xe=le(ue,[["__scopeId","data-v-5fefaea9"]]);export{xe as default};
