import{u as j,a as $,B as E,b as P}from"./index.0d411246.js";import"./elementPlus.0e5067e4.js";import{d as A,r as f,al as k,q as G,am as O,j as z,w as J,a9 as s,o as p,E as g,G as a,M as t,a2 as K,a0 as W,u as o,J as h,c as F,a as v,L as r,K as w,B as H,aq as Q,ar as X}from"./vue.3f733908.js";import{createCrudOptions as Y}from"./crud.1023427f.js";import Z from"./adStruct.9fe2b13b.js";import ee from"./dataTendency.fe148213.js";import{a as ae,b as te,c as oe,d as se}from"./api.b0259c0f.js";import{SbBaseColumn as re}from"./commonTabColumn.9973d424.js";import{D as ne}from"./index.1c622692.js";import{_ as le}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./dropdowndisable.88660b16.js";import"./index.8a84e60c.js";import"./enum.b537673d.js";import"./index.69303a66.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=A({__name:"index",setup(l){const n=f("dataTendency"),b=j(),I=$(),{dateRange:y}=k(I),{profile:S}=k(b),V=G("filterItem"),d=f({profileId:S.value.profile_id,dateRange:y,filterItem:V}),{crudBinding:B,crudRef:M,crudExpose:C}=E({createCrudOptions:Y,context:d}),x=O(),m=f(!1),D=u=>{x.push({name:"SbCampaignDetail",query:{campaignId:u.campaignId,tagsViewName:u.campaignName}})};return z(async()=>{C.doRefresh()}),J(d,async()=>{C.doRefresh()},{deep:!0}),(u,c)=>{const _=s("el-tab-pane"),L=s("el-tabs"),N=s("el-progress"),T=s("el-link"),R=s("el-tooltip"),q=s("el-switch"),U=s("fs-crud");return p(),g(o(P),{class:"fs-page-custom"},{default:a(()=>[t(U,H({ref_key:"crudRef",ref:M},o(B)),K({"header-middle":a(()=>[t(L,{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(),F("div",ie,"散点视图")):h("",!0)]),_:1})]),_:1},8,["modelValue"])]),cell_percentTimeInBudget:a(e=>[t(N,{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(T,{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(q,{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};
