import{u as z,a as M,B as O,b as P}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{d as U,B as f,r as h,ay as I,aD as A,az as E,j as F,w as K,ai as n,o as g,M as v,O as a,U as t,aa as W,a8 as H,u as o,R as x,a as s,T as l,K as J,aF as Q,aG as X}from"./vue.adf17aba.js";import{createCrudOptions as Y}from"./crud.32a529f5.js";import Z from"./dataTendency.69ca86c9.js";import ee from"./adStruct.64288315.js";import{a as ae,b as te,c as oe,d as ne}from"./api.0c2b52c8.js";import{SbBaseColumn as se}from"./commonTabColumn.c5d53eee.js";import{D as re}from"./index.04a874bc.js";import{_ as le}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.e566fd6e.js";import"./index.7f1f4491.js";import"./index.05a2d588.js";import"./dropdowndisable.88660b16.js";const ce=c=>(Q("data-v-8c462888"),c=c(),X(),c),de={class:"en-text"},pe={class:"en-text"},ie={class:"text-range"},me={class:"campare-switch"},ue=ce(()=>s("span",null,"数据对比 ",-1)),_e=U({__name:"index",setup(c){const B=f("topSearchItem"),D=f("searchType"),N=f("searchItem"),d=h("dataTendency"),S=z(),V=M(),{dateRange:w}=I(V),{profile:R}=I(S),i=h({profileId:R.value.profile_id,dateRange:w,searchType:D,searchItem:B,filterItem:N}),{crudBinding:T,crudRef:$,crudExpose:y}=O({createCrudOptions:Y,context:i});A();const L=E(),m=h(!1),C=u=>{L.push({name:"CampaignDetail",query:{campaignId:u.campaignId,tagsViewName:u.campaignName}})};return F(()=>{y.doRefresh()}),K(i,async()=>{y.doRefresh()},{deep:!0}),(u,p)=>{const _=n("el-tab-pane"),G=n("el-tabs"),b=n("el-link"),k=n("el-tooltip"),j=n("el-switch"),q=n("fs-crud");return g(),v(o(P),{class:"fs-page-custom"},{default:a(()=>[t(q,J({ref_key:"crudRef",ref:$},o(T)),W({"header-middle":a(()=>[t(G,{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:i.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:r=>C(e.row)},{default:a(()=>[s("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:r=>C(e.row)},{default:a(()=>[s("div",pe,l(e.row.adGroupName),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),cell_suggestedBid:a(e=>[s("div",null,"$"+l(e.row.suggestedBid),1),s("div",ie,"$"+l(e.row.suggestedBid_lower)+" ~ $"+l(e.row.suggestedBid_upper),1)]),"toolbar-left":a(()=>[s("div",me,[ue,t(j,{modelValue:m.value,"onUpdate:modelValue":p[1]||(p[1]=e=>m.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[H(Object.keys(o(se)),e=>({name:`cell_${e}`,fn:a(r=>[t(re,{field:e,value:r.row[e],"prev-val":r.row[`prev${e}`],"gap-val":r.row[`gap${e}`],"date-range":o(w),"show-compare":m.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};
