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