import{u as U,a as $,B as q,b as j}from"./index.373e4c1e.js";import"./elementPlus.c5b0e04f.js";import{d as E,r as p,al as b,am as F,j as G,w as O,a9 as r,o as f,c as w,a as A,M as s,u as l,t as J,G as a,F as h,a0 as y,B as K,a2 as W,E as z,J as H,K as d,L as t}from"./vue.65d9dadc.js";import{g as Q,a as X,b as Y,c as Z,d as ee}from"./crud.12f83834.js";import ae from"./dataTendency.375c730a.js";import{BaseColumn as se}from"./commonTabColumn.a4869ec6.js";import{D as le}from"./index.74ced524.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.0c3456ea.js";import{_ as oe}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.b537673d.js";import"./index.78cddcae.js";import"./index.4dc9403e.js";const re={class:"overview-tabs"},ne=E({__name:"index",setup(ce){const i=p("sp"),C=[{value:"sp/sb/sd",label:"SP/SB/SD"},{value:"sp",label:"SP"},{value:"sb",label:"SB"},{value:"sd",label:"SD"},{value:"dsp",label:"DSP",disabled:!0}],u=p("dataTendency"),k=U(),D=$(),{dateRange:n}=b(D),{profile:g}=b(k),m=p({dateRange:n,profileId:g.value.profile_id,campaignType:i.value}),{crudBinding:B,crudRef:S,crudExpose:v}=q({createCrudOptions:ee,context:m}),V=F(),x=p(!1);console.log(111,g.value.profile_id),G(async()=>{v.doRefresh()});const I=_=>{V.push({name:"CampaignDetail",query:{campaignId:_.campaignId,tagsViewName:_.campaignName}})};return O(m,async()=>{v.doRefresh()},{deep:!0}),(_,o)=>{const M=r("el-option"),L=r("el-select"),N=r("el-tabs"),T=r("el-progress"),P=r("el-link"),R=r("fs-crud");return f(),w(h,null,[A("div",re,[s(te,{modelValue:l(n),"onUpdate:modelValue":o[0]||(o[0]=e=>J(n)?n.value=e:null)},null,8,["modelValue"]),s(L,{modelValue:i.value,"onUpdate:modelValue":o[1]||(o[1]=e=>i.value=e),placeholder:"SP",style:{width:"200px"},"collapse-tags":"","collapse-tags-tooltip":"","max-collapse-tags":3},{default:a(()=>[(f(),w(h,null,y(C,e=>s(M,{label:e.label,value:e.value,disabled:e.disabled},null,8,["label","value","disabled"])),64))]),_:1},8,["modelValue"])]),s(l(j),{class:"fs-page-custom",style:{"margin-top":"-11px"}},{default:a(()=>[s(R,K({ref_key:"crudRef",ref:S},l(B)),W({"header-middle":a(()=>[s(N,{modelValue:u.value,"onUpdate:modelValue":o[2]||(o[2]=e=>u.value=e),class:"chart-tabs",type:"border-card"},{default:a(()=>[u.value==="dataTendency"?(f(),z(ae,{key:0,query:m.value,fetchCard:l(Q),fetchLine:l(X),"fetch-line-month":l(Y),"fetch-line-week":l(Z)},null,8,["query","fetchCard","fetchLine","fetch-line-month","fetch-line-week"])):H("",!0)]),_:1},8,["modelValue"])]),cell_percentTimeInBudget:a(e=>[s(T,{percentage:e.row.percentTimeInBudget>0?e.row.percentTimeInBudget*100:0},null,8,["percentage"])]),cell_campaignName:a(e=>[s(P,{type:"primary",underline:!1,onClick:c=>I(e.row)},{default:a(()=>[d(t(e.row.campaignName),1)]),_:2},1032,["onClick"])]),cell_MissedImpressions:a(e=>[d(t(e.row.MissedImpressionsLower??"0")+" ~ "+t(e.row.MissedImpressionsUpper??"0"),1)]),cell_MissedClicks:a(e=>[d(t(e.row.MissedClicksLower??"0")+" ~ "+t(e.row.MissedClicksUpper??"0"),1)]),cell_MissedSales:a(e=>[d(t(e.row.MissedSalesLower??"0")+" ~ "+t(e.row.MissedSalesUpper??"0"),1)]),_:2},[y(Object.keys(l(se)),e=>({name:`cell_${e}`,fn:a(c=>[s(le,{field:e,value:c.row[e],"prev-val":c.row[`prev${e}`],"gap-val":c.row[`gap${e}`],"date-range":l(n),"show-compare":x.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})],64)}}});const Ce=oe(ne,[["__scopeId","data-v-5bebcbe7"]]);export{Ce as default};
