import{a as B,B as V,b as C}from"./index.ae7ce77b.js";import"./elementPlus.346c766a.js";import{createCrudOptions as R}from"./crud.cb54df05.js";import{d as x,al as b,r as p,j as y,w as k,a9 as m,o as D,E as G,G as r,M as t,a2 as $,a0 as I,u as o,t as P,a as d,B as j}from"./vue.6daa721c.js";import{BaseColumn as E}from"./commonTabColumn.9307c435.js";import{D as M}from"./index.1b30f184.js";import{_ as N}from"./index.vue_vue_type_script_setup_true_lang.c5131d55.js";const O={class:"campare-switch"},U=d("span",null,"数据对比 ",-1),J=x({__name:"index",props:{adGroupId:{}},setup(f){const i=f,_=B(),{dateRange:a}=b(_),u=p({adGroupId:i.adGroupId,dateRange:a}),{crudBinding:v,crudRef:w,crudExpose:c}=V({createCrudOptions:R,context:u}),n=p(!1);return y(async()=>{c.doRefresh()}),k(u,async()=>{c.doRefresh()},{deep:!0}),(q,s)=>{const h=m("el-switch"),g=m("fs-crud");return D(),G(o(C),{class:"fs-page-custom"},{default:r(()=>[t(g,j({ref_key:"crudRef",ref:w},o(v)),$({"search-left":r(()=>[t(N,{modelValue:o(a),"onUpdate:modelValue":s[0]||(s[0]=e=>P(a)?a.value=e:null)},null,8,["modelValue"])]),"toolbar-left":r(()=>[d("div",O,[U,t(h,{modelValue:n.value,"onUpdate:modelValue":s[1]||(s[1]=e=>n.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[I(Object.keys(o(E)),e=>({name:`cell_${e}`,fn:r(l=>[t(M,{field:e,value:l.row[e],"prev-val":l.row[`prev${e}`],"gap-val":l.row[`gap${e}`],"date-range":o(a),"show-compare":n.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});export{J as _};
