import{u as T,a as $,B as j}from"./index.8a64ecdf.js";import{j as g}from"./elementPlus.58179425.js";import{d as V,ak as b,r as l,j as E,p as M,a8 as c,o as f,c as y,M as a,G as t,B as U,u as o,a1 as A,$ as z,t as O,E as G,J as w,a as k,ap as J,aq as W}from"./vue.95e072e2.js";import{g as F,b as H,c as K,d as Q}from"./api.0100ebbc.js";import X from"./dataTendency.0febd28b.js";import{createCrudOptions as Y}from"./crud.b1e956b6.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.8dd19552.js";import{D as ee}from"./index.eed780e8.js";import{e as _}from"./emitter.c997c4ad.js";import{SdBaseColumn as ae}from"./commonTabColumn.00155e2b.js";import{_ as te}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.b537673d.js";import"./index.9f6b84b8.js";import"./index.df979911.js";const oe=d=>(J("data-v-f20b9e5a"),d=d(),W(),d),se={class:"asj-container"},ne={key:0},re={class:"compare-switch"},le=oe(()=>k("span",null,"数据对比 ",-1)),ce=V({name:"Portfolios"}),de=V({...ce,setup(d){const x=T(),B=$(),{dateRange:n}=b(B),m=l("dataTendency"),{profile:C}=b(x),{crudBinding:D,crudRef:R,crudExpose:I}=j({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 S=l({profileId:C.value.profile_id,dateRange:v,name:h});return E(()=>{I.doRefresh()}),M(()=>{_.all.clear()}),(r,s)=>{const u=c("el-tab-pane"),q=c("el-tabs"),L=c("el-switch"),N=c("fs-crud"),P=c("fs-page");return f(),y("div",se,[a(P,{class:"fs-page-custom"},{default:t(()=>[a(N,U({ref_key:"crudRef",ref:R},o(D)),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(q,{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:S.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(),y("div",ne,"散点视图")):w("",!0)]),_:1})]),_:1},8,["modelValue"])]),"toolbar-left":t(()=>[k("div",re,[le,a(L,{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 Be=te(de,[["__scopeId","data-v-f20b9e5a"]]);export{Be as default};
