import{a as y,B as C,b as D}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{createCrudOptions as V}from"./crud.8ca73b35.js";import{d as B,ay as R,r as d,j as x,w as b,ai as m,o as k,M as $,O as r,U as s,aa as q,a8 as G,u as a,D as I,a as p,K as O}from"./vue.adf17aba.js";import{BaseColumn as P}from"./commonTabColumn.c5d53eee.js";import{D as U}from"./index.04a874bc.js";import{_ as j}from"./index.vue_vue_type_script_setup_true_lang.3fa6db13.js";import{g as L,a as M}from"./api.078a5dae.js";import N from"./dataTendency.69ca86c9.js";const T={class:"campare-switch"},z=p("span",null,"数据对比 ",-1),Y=B({__name:"index",props:{adGroupId:{}},setup(f){const i=f,_=y(),{dateRange:o}=R(_),n=d({adGroupId:i.adGroupId,dateRange:o}),{crudBinding:h,crudRef:v,crudExpose:u}=C({createCrudOptions:V,context:n}),l=d(!1);return x(async()=>{u.doRefresh()}),b(n,async()=>{u.doRefresh()},{deep:!0}),(E,t)=>{const g=m("el-switch"),w=m("fs-crud");return k(),$(a(D),{class:"fs-page-custom"},{default:r(()=>[s(w,O({ref_key:"crudRef",ref:v},a(h)),q({"search-left":r(()=>[s(j,{modelValue:a(o),"onUpdate:modelValue":t[0]||(t[0]=e=>I(o)?o.value=e:null)},null,8,["modelValue"])]),"header-middle":r(()=>[s(N,{query:n.value,"fetch-card":a(L),"fetch-line":a(M)},null,8,["query","fetch-card","fetch-line"])]),"toolbar-left":r(()=>[p("div",T,[z,s(g,{modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=e=>l.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[G(Object.keys(a(P)),e=>({name:`cell_${e}`,fn:r(c=>[s(U,{field:e,value:c.row[e],"prev-val":c.row[`prev${e}`],"gap-val":c.row[`gap${e}`],"date-range":a(o),"show-compare":l.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});export{Y as _};
