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