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