import{u as z,a as M,B as P,b as A}from"./index.0d411246.js";import"./elementPlus.0e5067e4.js";import{d as E,q as f,r as h,al as I,ao as O,am as U,j as J,w as W,a9 as n,o as g,E as v,G as a,M as t,a2 as F,a0 as H,u as o,J as x,a as r,L as l,B as K,aq as Q,ar as X}from"./vue.3f733908.js";import{createCrudOptions as Y}from"./crud.959126d2.js";import Z from"./dataTendency.dec8f4f1.js";import ee from"./adStruct.69976566.js";import{a as ae,b as te,c as oe,d as ne}from"./api.89728bf9.js";import{SbBaseColumn as re}from"./commonTabColumn.9973d424.js";import{D as se}from"./index.1c622692.js";import{_ as le}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.b537673d.js";import"./index.69303a66.js";import"./index.8a84e60c.js";import"./dropdowndisable.88660b16.js";const ce=c=>(Q("data-v-8c462888"),c=c(),X(),c),de={class:"en-text"},pe={class:"en-text"},me={class:"text-range"},ue={class:"campare-switch"},ie=ce(()=>r("span",null,"数据对比 ",-1)),_e=E({__name:"index",setup(c){const B=f("topSearchItem"),N=f("searchType"),D=f("searchItem"),d=h("dataTendency"),S=z(),V=M(),{dateRange:w}=I(V),{profile:R}=I(S),m=h({profileId:R.value.profile_id,dateRange:w,searchType:N,searchItem:B,filterItem:D}),{crudBinding:T,crudRef:$,crudExpose:y}=P({createCrudOptions:Y,context:m});O();const L=U(),u=h(!1),C=i=>{L.push({name:"CampaignDetail",query:{campaignId:i.campaignId,tagsViewName:i.campaignName}})};return J(()=>{y.doRefresh()}),W(m,async()=>{y.doRefresh()},{deep:!0}),(i,p)=>{const _=n("el-tab-pane"),q=n("el-tabs"),b=n("el-link"),k=n("el-tooltip"),G=n("el-switch"),j=n("fs-crud");return g(),v(o(A),{class:"fs-page-custom"},{default:a(()=>[t(j,K({ref_key:"crudRef",ref:$},o(T)),F({"header-middle":a(()=>[t(q,{modelValue:d.value,"onUpdate:modelValue":p[0]||(p[0]=e=>d.value=e),class:"chart-tabs",type:"border-card"},{default:a(()=>[t(_,{label:"数据趋势",name:"dataTendency"},{default:a(()=>[d.value==="dataTendency"?(g(),v(Z,{key:0,query:m.value,fetchCard:o(ae),"fetch-line-month":o(te),"fetch-line-week":o(oe),fetchLine:o(ne)},null,8,["query","fetchCard","fetch-line-month","fetch-line-week","fetchLine"])):x("",!0)]),_:1}),t(_,{label:"广告结构",name:"adStruct",lazy:!0},{default:a(()=>[d.value==="adStruct"?(g(),v(ee,{key:0})):x("",!0)]),_:1}),t(_,{label:"散点视图",name:"scatterView",lazy:!0})]),_:1},8,["modelValue"])]),cell_campaignName:a(e=>[t(k,{effect:"dark",content:e.row.campaignName,placement:"top"},{default:a(()=>[t(b,{type:"primary",underline:!1,onClick:s=>C(e.row)},{default:a(()=>[r("div",de,l(e.row.campaignName),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),cell_adGroupName:a(e=>[t(k,{effect:"dark",content:e.row.adGroupName,placement:"top"},{default:a(()=>[t(b,{type:"primary",underline:!1,onClick:s=>C(e.row)},{default:a(()=>[r("div",pe,l(e.row.adGroupName),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),cell_suggestedBid:a(e=>[r("div",null,"$"+l(e.row.suggestedBid),1),r("div",me,"$"+l(e.row.suggestedBid_lower)+" ~ $"+l(e.row.suggestedBid_upper),1)]),"toolbar-left":a(()=>[r("div",ue,[ie,t(G,{modelValue:u.value,"onUpdate:modelValue":p[1]||(p[1]=e=>u.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[H(Object.keys(o(re)),e=>({name:`cell_${e}`,fn:a(s=>[t(se,{field:e,value:s.row[e],"prev-val":s.row[`prev${e}`],"gap-val":s.row[`gap${e}`],"date-range":o(w),"show-compare":u.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});const Ve=le(_e,[["__scopeId","data-v-8c462888"]]);export{Ve as default};
