import{a as k,B as y,b as D}from"./index.8a64ecdf.js";import"./elementPlus.58179425.js";import{createCrudOptions as $}from"./crud.486c833f.js";import{d as G,ak as j,r as d,j as I,w as O,a8 as i,o as u,E as P,G as r,M as n,a1 as T,$ as f,u as a,t as F,a as w,c as _,L as v,F as L,B as M}from"./vue.95e072e2.js";import{BaseColumn as N}from"./commonTabColumn.00155e2b.js";import{D as S}from"./index.eed780e8.js";import{_ as U}from"./index.vue_vue_type_script_setup_true_lang.8dd19552.js";import{T as q}from"./enum.b537673d.js";const z={class:"campare-switch"},A=w("span",null,"数据对比 ",-1),ae=G({__name:"index",props:{adGroupId:{}},setup(g){const h=g,x=k(),{dateRange:s}=j(x),p=d({adGroupId:h.adGroupId,dateRange:s}),{crudBinding:B,crudRef:V,crudExpose:c}=y({createCrudOptions:$,context:p}),l=d(!1);return I(async()=>{c.doRefresh()}),O(p,async()=>{c.doRefresh()},{deep:!0}),(H,t)=>{const b=i("el-switch"),C=i("fs-crud");return u(),P(a(D),{class:"fs-page-custom"},{default:r(()=>[n(C,M({ref_key:"crudRef",ref:V},a(B)),T({"search-left":r(()=>[n(U,{modelValue:a(s),"onUpdate:modelValue":t[0]||(t[0]=e=>F(s)?s.value=e:null)},null,8,["modelValue"])]),"toolbar-left":r(()=>[w("div",z,[A,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),_(L,null,f(Object.entries(e.row.resolvedExpression),([o,E])=>{var m;return u(),_("p",null,v((m=a(q).find(R=>R.value===o))==null?void 0:m.label)+"："+v(E),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 _};
