import{G as l,U as c,D as u,A as d}from"./api.325c96cf.js";import{H as h,p as m,X as p}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{az as w,B as f}from"./vue.adf17aba.js";import{SdBaseColumn as b}from"./commonTabColumn.c5d53eee.js";import"./echarts.72dc8373.js";const O=function({crudExpose:g,context:a}){const s=async e=>{const t=m(a.value);return p.assign(e,t),await l(e)},r=async({form:e,row:t})=>(e.id=t.id,await c(e)),o=async({row:e})=>await u(e.id),i=async({form:e})=>await d(e),n=w();return f("$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:!0,buttons:{add:{show:!1},create:{text:"新建广告活动",type:"primary",show:!0,color:"#626aef",plain:!0,click(){n.push({name:"SdCreateCampaigns",query:{campaignId:123,tagsViewName:"新建广告活动"}})}}}},search:{show:!1},toolbar:{buttons:{search:{show:!0},compact:{show:!1}}},request:{pageRequest:s,addRequest:i,editRequest:r,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:"广告活动名称",column:{fixed:"left",width:340,sortable:!0}},tactic:{title:"投放类型",column:{width:120,align:"center",formatter:e=>{switch(e.value){case"T00030":return"受众";case"T00020":return"商品";default:return"--"}}}},state:{title:"状态",sortable:!0,column:{width:90,align:"center"},type:"dict-select",search:{show:!0},dict:h({data:[{value:"paused",label:"已暂停",color:"warning"},{value:"enabled",label:"投放中",color:"success"}]})},budget:{title:"每日预算",column:{sortable:!0,width:130,align:"right"}},...b}}}};export{O as createCrudOptions};
