import{G as i,U as l,D as u,A as c}from"./api.fa968e5b.js";import{BaseColumn as d}from"./commonTabColumn.c5d53eee.js";import{p as m,X as h}from"./index.ad3efb29.js";import{B as p}from"./vue.adf17aba.js";import"./elementPlus.4833989a.js";import"./echarts.72dc8373.js";const R=function({crudExpose:f,context:r}){const a=async e=>{const t=m(r.value);return h.assign(e,t),await i(e)},s=async({form:e,row:t})=>(e.id=t.id,await l(e)),o=async({row:e})=>await u(e.id),n=async({form:e})=>await c(e);return p("$hasPermissions"),{crudOptions:{table:{height:800,headerCellStyle:{backgroundColor:"#f6f7fa",height:"20px",borderRight:"none"},cellStyle:{border:"none",borderBottom:"0.5px solid #ddd"},showSummary:!0,stripe:!1},container:{fixedHeight:!1},actionbar:{show:!1,buttons:{add:{show:!1}}},search:{show:!1},toolbar:{buttons:{search:{show:!0},compact:{show:!1}}},request:{pageRequest:a,addRequest:n,editRequest:s,delRequest:o},rowHandle:{fixed:"right",width:80,buttons:{view:{show:!1},edit:{iconRight:"Edit",type:"text",text:null},remove:{iconRight:"Delete",type:"text",text:null}}},columns:{id:{title:"ID",column:{show:!1},form:{show:!1}},campaignName:{title:"广告活动",column:{width:"210px",fixed:"left",align:"center"},search:{show:!0,component:{props:{clearable:!0}}},form:{rules:[{required:!0,message:"必填项"}]}},placement:{title:"广告位",column:{align:"center",width:"160px",formatter:e=>{switch(e.value){case"top":return"搜索结果顶部(首页)";case"rest_of_search":return"搜索结果的其余位置";case"product_page":return"商品页面";default:return"暂无数据"}}}},dynBidStrategy:{title:"竞价策略",column:{align:"center",width:"160px",formatter:e=>{switch(e.value){case"MANUAL":return"固定竞价";case"AUTO_FOR_SALES":return"动态竞价-提高和降低";case"LEGACY_FOR_SALES":return"动态竞价-仅降低";default:return"暂无数据"}}}},bidAdjustment:{title:"竞价调整",column:{align:"right",width:"100px",formatter:e=>e.value!=null?e.value:"--"}},...d}}}};export{R as createCrudOptions};
