import{r as V,a as y,B as C,b as I}from"./index.373e4c1e.js";import"./elementPlus.c5b0e04f.js";import{createCrudOptions as P}from"./crud.c8e287ea.js";import{d as R,al as k,r as m,j as S,w as $,a9 as d,af as j,H as q,o as E,E as G,G as r,M as n,a2 as L,a0 as M,u as s,t as N,a as f,B as O,aq as T,ar as U}from"./vue.65d9dadc.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.0c3456ea.js";import{BaseColumn as H}from"./commonTabColumn.a4869ec6.js";import{D as A}from"./index.74ced524.js";import{_ as F}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.b537673d.js";const J="/api/ad_manage/spcampaigndetail/placement/";function K(e){return V({url:J,method:"get",params:e})}const Q=e=>(T("data-v-5fbfcec0"),e=e(),U(),e),W=Q(()=>f("span",null,"数据对比 ",-1)),X=R({name:"Placement",__name:"index",props:{campaignId:{}},setup(e){const _=y(),{dateRange:t}=k(_),v=e,l=m(!0),c=m(!1),p=async()=>{l.value=!0;const i=await K({campaignId:v.campaignId,startDate:t.value[0],endDate:t.value[1]});x.setTableData(i.data),l.value=!1},g={fetchData:p},{crudBinding:w,crudRef:h,crudExpose:x}=C({createCrudOptions:P,context:g});return S(async()=>{await p()}),$(t,async()=>await p()),(i,o)=>{const D=d("el-switch"),b=d("fs-crud"),B=j("loading");return q((E(),G(s(I),{class:"fs-page-custom"},{default:r(()=>[n(b,O({ref_key:"crudRef",ref:h},s(w)),L({"search-left":r(()=>[n(z,{modelValue:s(t),"onUpdate:modelValue":o[0]||(o[0]=a=>N(t)?t.value=a:null)},null,8,["modelValue"])]),"toolbar-left":r(()=>[f("div",null,[W,n(D,{modelValue:c.value,"onUpdate:modelValue":o[1]||(o[1]=a=>c.value=a),size:"small"},null,8,["modelValue"])])]),_:2},[M(Object.keys(s(H)),a=>({name:`cell_${a}`,fn:r(u=>[n(A,{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})),[[B,l.value]])}}});const ca=F(X,[["__scopeId","data-v-5fbfcec0"]]);export{ca as default};
