import{G as n,U as u,D as c,A as d}from"./api.4758178e.js";import{H as m,p as h,X as p}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{az as f,B as w}from"./vue.adf17aba.js";import{SbBaseColumn as b}from"./commonTabColumn.c5d53eee.js";import"./echarts.72dc8373.js";const E=function({crudExpose:g,context:a}){const r=async e=>{const t=h(a.value);return p.assign(e,t),await n(e)},s=async({form:e,row:t})=>(e.id=t.id,await u(e)),o=async({row:e})=>await c(e.id),l=async({form:e})=>await d(e),i=f();return w("$hasPermissions"),{crudOptions:{table:{height:800,headerCellStyle:{backgroundColor:"#f6f7fa",height:"20px",borderRight:"none"},cellStyle:{border:"none",borderBottom:"0.5px solid #ddd"},stripe:!1,showSummary:!0},container:{fixedHeight:!1},actionbar:{show:!0,buttons:{add:{show:!1},create:{text:"新建广告活动",type:"primary",show:!0,color:"#626aef",plain:!0,click(){i.push({name:"SbCreateCampaigns",query:{campaignId:123,tagsViewName:"新建广告活动"}})}}}},search:{show:!1},toolbar:{buttons:{search:{show:!0},compact:{show:!1}}},request:{pageRequest:r,addRequest:l,editRequest:s,delRequest:o},rowHandle:{fixed:"right",width:100,align:"center",buttons:{view:{show:!1},edit:{iconRight:"Edit",type:"text",text:null},remove:{show:!1}}},columns:{id:{title:"ID",column:{show:!1},form:{show:!1}},campaignName:{title:"广告活动名称",sortable:!0,column:{fixed:"left",width:180}},state:{title:"状态",sortable:!0,column:{width:"90px",align:"center"},type:"dict-select",search:{show:!0},dict:m({data:[{value:"PAUSED",label:"已暂停",color:"warning"},{value:"ENABLED",label:"投放中",color:"success"}]})},bidOptimization:{title:"竞价",form:{show:!1},column:{width:"100px",sortable:!0,align:"center",formatter:e=>{switch(e.value){case 1:return"自动竞价";case 0:return"自定义竞价";default:return"-"}}}},startDate:{title:"开始日期",column:{width:"120px",align:"center",sortable:!0}},endDate:{title:"结束日期",column:{width:"120px",align:"center",sortable:!0,formatter:e=>e.value!==null?e.value:"--"}},portfolioName:{title:"广告组合",type:"text",column:{width:"120px",align:"center",formatter:e=>e.value!==null?e.value:"--"}},dailyBudget:{title:"预算",column:{sortable:!0,width:"120px",align:"right"}},...b}}}};export{E as createCrudOptions};
