import{u as U,a as $,B as q,b as j}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{d as O,r as p,ay as v,az as E,j as F,w as z,ai as r,o as f,c as w,a as A,U as s,u as t,D as G,O as a,F as b,a8 as h,K as H,aa as K,M as W,R as J,S as d,T as l}from"./vue.adf17aba.js";import{g as Q,a as X,b as Y,c as Z,d as ee}from"./crud.91f756cd.js";import ae from"./dataTendency.15d7161f.js";import{BaseColumn as se}from"./commonTabColumn.c5d53eee.js";import{D as te}from"./index.04a874bc.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.3fa6db13.js";import{_ as oe}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.e566fd6e.js";import"./index.7f1f4491.js";import"./index.05a2d588.js";const re={class:"overview-tabs"},ne=O({__name:"index",setup(ce){const i=p("sp"),y=[{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"),C=U(),k=$(),{dateRange:n}=v(k),{profile:D}=v(C),m=p({dateRange:n,profileId:D.value.profile_id,campaignType:i.value}),{crudBinding:S,crudRef:V,crudExpose:g}=q({createCrudOptions:ee,context:m}),x=E(),B=p(!1),I=_=>{x.push({name:"CampaignDetail",query:{campaignId:_.campaignId,tagsViewName:_.campaignName}})};return F(async()=>{g.doRefresh()}),z(m,async()=>{g.doRefresh()},{deep:!0}),(_,o)=>{const M=r("el-option"),T=r("el-select"),L=r("el-tabs"),N=r("el-progress"),R=r("el-link"),P=r("fs-crud");return f(),w(b,null,[A("div",re,[s(le,{modelValue:t(n),"onUpdate:modelValue":o[0]||(o[0]=e=>G(n)?n.value=e:null)},null,8,["modelValue"]),s(T,{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(b,null,h(y,e=>s(M,{label:e.label,value:e.value,disabled:e.disabled},null,8,["label","value","disabled"])),64))]),_:1},8,["modelValue"])]),s(t(j),{class:"fs-page-custom",style:{"margin-top":"-11px"}},{default:a(()=>[s(P,H({ref_key:"crudRef",ref:V},t(S)),K({"header-middle":a(()=>[s(L,{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(),W(ae,{key:0,query:m.value,fetchCard:t(Q),fetchLine:t(X),"fetch-line-month":t(Y),"fetch-line-week":t(Z)},null,8,["query","fetchCard","fetchLine","fetch-line-month","fetch-line-week"])):J("",!0)]),_:1},8,["modelValue"])]),cell_percentTimeInBudget:a(e=>[s(N,{percentage:e.row.percentTimeInBudget>0?e.row.percentTimeInBudget*100:0},null,8,["percentage"])]),cell_campaignName:a(e=>[s(R,{type:"primary",underline:!1,onClick:c=>I(e.row)},{default:a(()=>[d(l(e.row.campaignName),1)]),_:2},1032,["onClick"])]),cell_MissedImpressions:a(e=>[d(l(e.row.MissedImpressionsLower??"0")+" ~ "+l(e.row.MissedImpressionsUpper??"0"),1)]),cell_MissedClicks:a(e=>[d(l(e.row.MissedClicksLower??"0")+" ~ "+l(e.row.MissedClicksUpper??"0"),1)]),cell_MissedSales:a(e=>[d(l(e.row.MissedSalesLower??"0")+" ~ "+l(e.row.MissedSalesUpper??"0"),1)]),_:2},[h(Object.keys(t(se)),e=>({name:`cell_${e}`,fn:a(c=>[s(te,{field:e,value:c.row[e],"prev-val":c.row[`prev${e}`],"gap-val":c.row[`gap${e}`],"date-range":t(n),"show-compare":B.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})],64)}}});const Ce=oe(ne,[["__scopeId","data-v-ac86430e"]]);export{Ce as default};
