import{H as a,p as m,X as h}from"./index.ad3efb29.js";import{i as n}from"./elementPlus.4833989a.js";import{az as f,B as g,U as e,ai as u,S as s}from"./vue.adf17aba.js";import{G as w,U as F,D as E,A as B}from"./api.8b835e6e.js";import{BaseColumn as x}from"./commonTabColumn.c5d53eee.js";import{f as y}from"./enum.e566fd6e.js";import"./echarts.72dc8373.js";const R=function({crudExpose:C,context:i}){const r=async t=>{const l=m(i.value);return h.assign(t,l),await w(t)},o=async({form:t,row:l})=>(t.id=l.id,await F(t)),d=async({row:t})=>await E(t.id),c=async({form:t})=>await B(t),p=f();return g("$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,click(){p.push({name:"SpCreateCampaigns",query:{campaignId:123,tagsViewName:"新建广告活动"}})}}}},search:{show:!1},toolbar:{buttons:{search:{show:!0},compact:{show:!1}}},request:{pageRequest:r,addRequest:c,editRequest:o,delRequest:d},rowHandle:{fixed:"right",width:80,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:{width:"200px",fixed:"left",align:"left",renderHeader(){return e("span",null,[e(u("el-tooltip"),{placement:"top",content:"广告活动是一组使用共同广告预算的广告组。广告组用于组织商品（广告），以便您实现所需的业务目标。"},{default:()=>[e("span",null,[e(u("el-icon"),{size:"14",style:"display:inline-block; padding-top:2px; margin-right:3px;"},{default:()=>[e(n,null,null)]})])]}),e("span",null,[s("广告活动名称")])])}},search:{show:!0,component:{props:{clearable:!0}}},form:{rules:[{required:!0,message:"必填项"}]}},targetingType:{title:"投放类型",column:{width:"100px",align:"center"},type:"dict-select",search:{show:!0},dict:a({data:[{value:"AUTO",label:"自动"},{value:"MANUAL",label:"手动"}]})},state:{title:"状态",column:{width:"90px",align:"center"},type:"dict-select",search:{show:!0},dict:a({data:[{value:"PAUSED",label:"已暂停",color:"warning"},{value:"ENABLED",label:"投放中",color:"success"}]})},dynBidStrategy:{title:"竞价策略",form:{show:!1},column:{width:"160px"},type:"dict-select",dict:a({data:y})},startDate:{title:"开始日期",column:{width:"100px",align:"center"}},endDate:{title:"结束日期",column:{width:"100px",align:"center",formatter:t=>t.value!==null?t.value:"--"}},portfolioName:{title:"广告组合",column:{width:"130px",align:"center"}},dailyBudget:{title:"预算",column:{width:"100px",align:"center",formatter:t=>t.value!==null?t.value:"--"}},suggestedBudget:{title:"建议预算",form:{show:!1},column:{width:"100px",align:"center"}},percentTimeInBudget:{title:"预算活跃时间均值",column:{minWidth:160,renderHeader(){return e("span",null,[e(u("el-tooltip"),{placement:"top",content:"预算覆盖每天投放时长占比的平均值。"},{default:()=>[e("span",null,[e(u("el-icon"),{size:"14",style:"display:inline-block; padding-top:2px; margin-right:3px;"},{default:()=>[e(n,null,null)]})])]}),e("span",null,[s("预算活跃时间均值")])])}},form:{show:!1}},MissedImpressions:{title:"预计错过的曝光",form:{show:!1},column:{width:180,align:"center",renderHeader(){return e("span",null,[e(u("el-tooltip"),{placement:"top",content:"平均每笔订单的花费，系统计算，花费/广告订单量"},{default:()=>[e("span",null,[e(u("el-icon"),{size:"14",style:"display:inline-block; padding-top:2px; margin-right:3px;"},{default:()=>[e(n,null,null)]})])]}),e("span",null,[s("预计错过的曝光")])])}}},MissedClicks:{title:"预计错过的点击",form:{show:!1},column:{width:180}},MissedSales:{title:"预计错过的销售",form:{show:!1},column:{width:180}},...x}}}};export{R as createCrudOptions};
