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