import{G as i,U as n,D as u,A as d}from"./api.3faa3eba.js";import{H as c,p as h,X as m}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{BaseColumn as p}from"./commonTabColumn.c5d53eee.js";import{B as w}from"./vue.adf17aba.js";import"./echarts.72dc8373.js";const v=function({crudExpose:f,context:s}){const a=async e=>{const t=h(s.value);return m.assign(e,t),await i(e)},o=async({form:e,row:t})=>(e.id=t.id,await n(e)),r=async({row:e})=>await u(e.id),l=async({form:e})=>await d(e);return w("$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:l,editRequest:o,delRequest:r},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}},keywordText:{title:"关键词",column:{fixed:"left",width:180,sortable:!0}},state:{title:"状态",column:{width:90,align:"center"},type:"dict-select",search:{show:!0},dict:c({data:[{value:"PAUSED",label:"已暂停",color:"warning"},{value:"ENABLED",label:"投放中",color:"success"}]})},campaignName:{title:"广告活动名称",column:{width:200,align:"left"},search:{show:!0,component:{props:{clearable:!0}}},form:{rules:[{required:!0,message:"必填项"}]}},adGroupName:{title:"广告组名称",column:{width:200,align:"left"}},suggestedBid:{title:"建议竞价",column:{width:130,align:"right"}},bid:{title:"出价",column:{width:80,align:"center",sortable:!0,formatter:e=>"$"+e.value}},suggestedBid_lower:{column:{show:!1}},suggestedBid_upper:{column:{show:!1}},...p}}}};export{v as createCrudOptions};
