import{u as T,a as j,B as E}from"./index.373e4c1e.js";import{j as g}from"./elementPlus.c5b0e04f.js";import{d as M,al as y,r as l,j as P,p as U,a9 as c,o as f,c as b,M as a,G as t,B as $,u as o,a2 as A,a0 as z,t as O,E as G,J as w,a as V,aq as J,ar as W}from"./vue.65d9dadc.js";import{g as F,b as H,c as K,d as Q}from"./api.8949c93c.js";import X from"./dataTendency.427bf03a.js";import{createCrudOptions as Y}from"./crud.ea2597da.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.0c3456ea.js";import{D as ee}from"./index.74ced524.js";import{e as _}from"./emitter.ca07dcc1.js";import{SdBaseColumn as ae}from"./commonTabColumn.a4869ec6.js";import{_ as te}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.b537673d.js";import"./index.78cddcae.js";import"./index.4dc9403e.js";const oe=d=>(J("data-v-a8f71c30"),d=d(),W(),d),se={class:"asj-container"},ne={key:0},re={class:"compare-switch"},le=oe(()=>V("span",null,"数据对比 ",-1)),ce=M({__name:"index",setup(d){const x=T(),k=j(),{dateRange:n}=y(k),m=l("dataTendency"),{profile:B}=y(x),{crudBinding:C,crudRef:D,crudExpose:R}=E({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:B.value.profile_id,dateRange:v,name:h});return P(()=>{R.doRefresh()}),U(()=>{_.all.clear()}),(r,s)=>{const u=c("el-tab-pane"),S=c("el-tabs"),q=c("el-switch"),L=c("fs-crud"),N=c("fs-page");return f(),b("div",se,[a(N,{class:"fs-page-custom"},{default:t(()=>[a(L,$({ref_key:"crudRef",ref:D},o(C)),A({"search-left":t(()=>[a(Z,{modelValue:o(n),"onUpdate:modelValue":s[0]||(s[0]=e=>O(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(),G(X,{key:0,query:I.value,"fetch-card":o(F),"fetch-line":o(H),"fetch-line-month":o(K),"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(q,{modelValue:p.value,"onUpdate:modelValue":s[2]||(s[2]=e=>p.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[z(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 ke=te(ce,[["__scopeId","data-v-a8f71c30"]]);export{ke as default};
