import{a as y,B as C,b as x}from"./index.0d411246.js";import"./elementPlus.0e5067e4.js";import{createCrudOptions as B}from"./crud.39976736.js";import V from"./dataTendency.dec8f4f1.js";import{g as D,a as R}from"./api.1e7d3b8a.js";import{d as b,al as k,r as c,j as G,w as $,a9 as m,o as q,E as I,G as r,M as t,a2 as P,a0 as j,u as a,t as E,a as p,B as L}from"./vue.3f733908.js";import{_ as M}from"./index.vue_vue_type_script_setup_true_lang.d1494dfe.js";import{BaseColumn as N}from"./commonTabColumn.9973d424.js";import{D as O}from"./index.1c622692.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:B,context:l});return G(()=>{d.doRefresh()}),$(l,async()=>{d.doRefresh()},{deep:!0}),(U,s)=>{const g=m("el-switch"),w=m("fs-crud");return q(),I(a(x),{class:"fs-page-custom"},{default:r(()=>[t(w,L({ref_key:"crudRef",ref:h},a(v)),P({"search-left":r(()=>[t(M,{modelValue:a(o),"onUpdate:modelValue":s[0]||(s[0]=e=>E(o)?o.value=e:null)},null,8,["modelValue"])]),"header-middle":r(()=>[t(V,{query:l.value,"fetch-card":a(D),"fetch-line":a(R)},null,8,["query","fetch-card","fetch-line"])]),"toolbar-left":r(()=>[p("div",null,[T,t(g,{modelValue:n.value,"onUpdate:modelValue":s[1]||(s[1]=e=>n.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[j(Object.keys(a(N)),e=>({name:`cell_${e}`,fn:r(u=>[t(O,{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 _};
