import{u as P,a as A,B as G,b as O}from"./index.8a64ecdf.js";import"./elementPlus.58179425.js";import{d as z,q as f,r as h,ak as I,al as J,j as K,w as W,a8 as s,o as i,E as g,G as a,M as t,a1 as F,$ as H,u as o,J as w,c as Q,a as y,L as r,K as v,B as X,ap as Y,aq as Z}from"./vue.95e072e2.js";import{createCrudOptions as ee}from"./crud.dbf9a1e8.js";import ae from"./adStruct.ce85cb97.js";import te from"./dataTendency.ab62b4f1.js";import{a as oe,d as se,b as re,c as ne}from"./api.77b99954.js";import{BaseColumn as ce}from"./commonTabColumn.00155e2b.js";import{D as le}from"./index.eed780e8.js";import{_ as pe}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.b537673d.js";import"./index.df979911.js";import"./dropdowndisable.88660b16.js";import"./index.9f6b84b8.js";const ie=c=>(Y("data-v-ca77ce48"),c=c(),Z(),c),de={key:0},me={class:"en-text"},ue={class:"campare-switch"},_e=ie(()=>y("span",null,"数据对比",-1)),fe=z({__name:"index",setup(c){const b=f("topSearchItem"),S=f("searchType"),V=f("searchItem"),n=h("dataTendency"),B=P(),M=A(),{dateRange:k}=I(M),{profile:x}=I(B),d=h({profileId:x.value.profile_id,dateRange:k,searchItem:b,searchType:S,filterItem:V}),{crudBinding:D,crudRef:T,crudExpose:C}=G({createCrudOptions:ee,context:d}),L=J(),m=h(!1),N=u=>{L.push({name:"SpCampaignDetail",query:{campaignId:u.campaignId,tagsViewName:u.campaignName}})};return K(async()=>{C.doRefresh()}),W(d,async()=>{C.doRefresh()},{deep:!0}),(u,l)=>{const _=s("el-tab-pane"),R=s("el-tabs"),q=s("el-progress"),U=s("el-link"),$=s("el-tooltip"),j=s("el-switch"),E=s("fs-crud");return i(),g(o(O),{class:"fs-page-custom"},{default:a(()=>[t(E,X({ref_key:"crudRef",ref:T},o(D)),F({"header-middle":a(()=>[t(R,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=e=>n.value=e),class:"chart-tabs",type:"border-card"},{default:a(()=>[t(_,{label:"数据趋势",name:"dataTendency"},{default:a(()=>[n.value==="dataTendency"?(i(),g(te,{key:0,query:d.value,fetchCard:o(oe),fetchLine:o(se),"fetch-line-month":o(re),"fetch-line-week":o(ne)},null,8,["query","fetchCard","fetchLine","fetch-line-month","fetch-line-week"])):w("",!0)]),_:1}),t(_,{label:"广告结构",name:"adStruct"},{default:a(()=>[n.value==="adStruct"?(i(),g(ae,{key:0})):w("",!0)]),_:1}),t(_,{label:"散点视图",name:"scatterView"},{default:a(()=>[n.value==="scatterView"?(i(),Q("div",de,"散点视图")):w("",!0)]),_:1})]),_:1},8,["modelValue"])]),cell_percentTimeInBudget:a(e=>[t(q,{percentage:e.row.percentTimeInBudget>0?e.row.percentTimeInBudget*100:0},null,8,["percentage"])]),cell_campaignName:a(e=>[t($,{effect:"dark",content:e.row.campaignName,placement:"top"},{default:a(()=>[t(U,{type:"primary",underline:!1,onClick:p=>N(e.row)},{default:a(()=>[y("div",me,r(e.row.campaignName),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),cell_MissedImpressions:a(e=>[v(r(e.row.MissedImpressionsLower??"0")+" ~ "+r(e.row.MissedImpressionsUpper??"0"),1)]),cell_MissedClicks:a(e=>[v(r(e.row.MissedClicksLower??"0")+" ~ "+r(e.row.MissedClicksUpper??"0"),1)]),cell_MissedSales:a(e=>[v(r(e.row.MissedSalesLower??"0")+" ~ "+r(e.row.MissedSalesUpper??"0"),1)]),"toolbar-left":a(()=>[y("div",ue,[_e,t(j,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=e=>m.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[H(Object.keys(o(ce)),e=>({name:`cell_${e}`,fn:a(p=>[t(le,{field:e,value:p.row[e],"prev-val":p.row[`prev${e}`],"gap-val":p.row[`gap${e}`],"date-range":o(k),"show-compare":m.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});const Te=pe(fe,[["__scopeId","data-v-ca77ce48"]]);export{Te as default};
