import{r as V,a as B,B as C,b as I}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{createCrudOptions as P}from"./crud.10390eef.js";import{d as R,ay as k,r as m,j as S,w as $,ai as d,aq as O,P as U,o as j,M as q,O as r,U as n,aa as G,a8 as L,u as s,D as M,a as f,K as N,aF as T,aG as z}from"./vue.adf17aba.js";import{_ as E}from"./index.vue_vue_type_script_setup_true_lang.3fa6db13.js";import{BaseColumn as F}from"./commonTabColumn.c5d53eee.js";import{D as K}from"./index.04a874bc.js";import{_ as A}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.e566fd6e.js";const H="/api/ad_manage/spcampaigndetail/placement/";function J(e){return V({url:H,method:"get",params:e})}const Q=e=>(T("data-v-5fbfcec0"),e=e(),z(),e),W=Q(()=>f("span",null,"数据对比 ",-1)),X=R({name:"Placement",__name:"index",props:{campaignId:{}},setup(e){const _=B(),{dateRange:t}=k(_),v=e,l=m(!0),c=m(!1),p=async()=>{l.value=!0;const i=await J({campaignId:v.campaignId,startDate:t.value[0],endDate:t.value[1]});D.setTableData(i.data),l.value=!1},g={fetchData:p},{crudBinding:w,crudRef:h,crudExpose:D}=C({createCrudOptions:P,context:g});return S(async()=>{await p()}),$(t,async()=>await p()),(i,o)=>{const x=d("el-switch"),b=d("fs-crud"),y=O("loading");return U((j(),q(s(I),{class:"fs-page-custom"},{default:r(()=>[n(b,N({ref_key:"crudRef",ref:h},s(w)),G({"search-left":r(()=>[n(E,{modelValue:s(t),"onUpdate:modelValue":o[0]||(o[0]=a=>M(t)?t.value=a:null)},null,8,["modelValue"])]),"toolbar-left":r(()=>[f("div",null,[W,n(x,{modelValue:c.value,"onUpdate:modelValue":o[1]||(o[1]=a=>c.value=a),size:"small"},null,8,["modelValue"])])]),_:2},[L(Object.keys(s(F)),a=>({name:`cell_${a}`,fn:r(u=>[n(K,{field:a,value:u.row[a],"prev-val":u.row[`prev${a}`],"gap-val":u.row[`gap${a}`],"date-range":s(t),"show-compare":c.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})),[[y,l.value]])}}});const ca=A(X,[["__scopeId","data-v-5fbfcec0"]]);export{ca as default};
