import{a as B,B as V,b as C}from"./index.8a64ecdf.js";import"./elementPlus.58179425.js";import{createCrudOptions as R}from"./crud.8f518df0.js";import{d as x,ak as b,r as c,j as k,w as y,a8 as m,o as $,E as D,G as r,M as t,a1 as G,$ as I,u as o,t as P,a as d,B as j}from"./vue.95e072e2.js";import{BaseColumn as E}from"./commonTabColumn.00155e2b.js";import{D as M}from"./index.eed780e8.js";import{_ as N}from"./index.vue_vue_type_script_setup_true_lang.8dd19552.js";import"./echarts.72dc8373.js";import"./_plugin-vue_export-helper.c27b6911.js";const O={class:"campare-switch"},U=d("span",null,"数据对比 ",-1),Q=x({__name:"index",props:{adGroupId:{}},setup(f){const i=f,_=B(),{dateRange:a}=b(_),u=c({adGroupId:i.adGroupId,dateRange:a}),{crudBinding:v,crudRef:w,crudExpose:p}=V({createCrudOptions:R,context:u}),n=c(!1);return k(async()=>{p.doRefresh()}),y(u,async()=>{p.doRefresh()},{deep:!0}),(q,s)=>{const h=m("el-switch"),g=m("fs-crud");return $(),D(o(C),{class:"fs-page-custom"},{default:r(()=>[t(g,j({ref_key:"crudRef",ref:w},o(v)),G({"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{Q as default};
