import{u as U,a as q,B as A}from"./index.ad3efb29.js";import{E as g}from"./elementPlus.4833989a.js";import{d as E,ay as y,r as l,j as M,A as P,ai as c,o as f,c as b,U as a,O as t,K as $,u as o,aa as j,a8 as O,D as z,M as F,R as w,a as V,aF as G,aG as K}from"./vue.adf17aba.js";import{g as W,b as H,c as J,d as Q}from"./api.7e8ee3c4.js";import X from"./dataTendency.7482f5be.js";import{createCrudOptions as Y}from"./crud.c7548160.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.3fa6db13.js";import{D as ee}from"./index.04a874bc.js";import{e as _}from"./emitter.bff31cdd.js";import{SdBaseColumn as ae}from"./commonTabColumn.c5d53eee.js";import{_ as te}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.e566fd6e.js";import"./index.7f1f4491.js";import"./index.05a2d588.js";const oe=d=>(G("data-v-a8f71c30"),d=d(),K(),d),se={class:"asj-container"},ne={key:0},re={class:"compare-switch"},le=oe(()=>V("span",null,"数据对比 ",-1)),ce=E({__name:"index",setup(d){const x=U(),D=q(),{dateRange:n}=y(D),m=l("dataTendency"),{profile:k}=y(x),{crudBinding:C,crudRef:B,crudExpose:R}=A({createCrudOptions:Y,context:{}}),p=l(!1),v=l([]),h=l("");_.on("protfolios-update",r=>{r.update!=1&&(v.value=n.value,h.value=r.query.name)}),_.on("protfolios-createProtfolios",r=>{r.data.msg=="success"?g.success("创建成功"):g.error("创建失败")});const I=l({profileId:k.value.profile_id,dateRange:v,name:h});return M(()=>{R.doRefresh()}),P(()=>{_.all.clear()}),(r,s)=>{const u=c("el-tab-pane"),S=c("el-tabs"),L=c("el-switch"),N=c("fs-crud"),T=c("fs-page");return f(),b("div",se,[a(T,{class:"fs-page-custom"},{default:t(()=>[a(N,$({ref_key:"crudRef",ref:B},o(C)),j({"search-left":t(()=>[a(Z,{modelValue:o(n),"onUpdate:modelValue":s[0]||(s[0]=e=>z(n)?n.value=e:null),timezone:"America/Los_Angeles",style:{"margin-right":"15px"}},null,8,["modelValue"])]),"header-middle":t(()=>[a(S,{modelValue:m.value,"onUpdate:modelValue":s[1]||(s[1]=e=>m.value=e),class:"chart-tabs",type:"border-card"},{default:t(()=>[a(u,{label:"数据趋势",name:"dataTendency"},{default:t(()=>[m.value==="dataTendency"?(f(),F(X,{key:0,query:I.value,"fetch-card":o(W),"fetch-line":o(H),"fetch-line-month":o(J),"fetch-line-week":o(Q)},null,8,["query","fetch-card","fetch-line","fetch-line-month","fetch-line-week"])):w("",!0)]),_:1}),a(u,{label:"广告结构",name:"adStruct"}),a(u,{label:"散点视图",name:"scatterView"},{default:t(()=>[m.value==="scatterView"?(f(),b("div",ne,"散点视图")):w("",!0)]),_:1})]),_:1},8,["modelValue"])]),"toolbar-left":t(()=>[V("div",re,[le,a(L,{modelValue:p.value,"onUpdate:modelValue":s[2]||(s[2]=e=>p.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[O(Object.keys(o(ae)),e=>({name:`cell_${e}`,fn:t(i=>[a(ee,{field:e,value:i.row[e],"prev-val":i.row[`prev${e}`],"gap-val":i.row[`gap${e}`],"date-range":o(n),"show-compare":p.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})])}}});const De=te(ce,[["__scopeId","data-v-a8f71c30"]]);export{De as default};
