import{a as y,B as k,b as D}from"./index.373e4c1e.js";import"./elementPlus.c5b0e04f.js";import{createCrudOptions as G}from"./crud.d77c10d5.js";import{d as $,al as j,r as d,j as I,w as O,a9 as i,o as u,E as P,G as r,M as l,a2 as T,a0 as f,u as a,t as F,a as w,c as _,L as v,F as L,B as M}from"./vue.65d9dadc.js";import{BaseColumn as N}from"./commonTabColumn.a4869ec6.js";import{D as S}from"./index.74ced524.js";import{_ as U}from"./index.vue_vue_type_script_setup_true_lang.0c3456ea.js";import{T as q}from"./enum.b537673d.js";const z={class:"campare-switch"},A=w("span",null,"数据对比 ",-1),ae=$({__name:"index",props:{adGroupId:{}},setup(g){const h=g,x=y(),{dateRange:s}=j(x),p=d({adGroupId:h.adGroupId,dateRange:s}),{crudBinding:B,crudRef:V,crudExpose:c}=k({createCrudOptions:G,context:p}),n=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(()=>[l(C,M({ref_key:"crudRef",ref:V},a(B)),T({"search-left":r(()=>[l(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,l(b,{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=e=>n.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=>[l(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":n.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});export{ae as _};
