import{r as a,H as d,p as c,X as p}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{BaseColumn as m}from"./commonTabColumn.c5d53eee.js";import{B as h}from"./vue.adf17aba.js";const r="/api/ad_manage/spcampaigndetail/spgroups/";function f(t){return a({url:r+"list/",method:"get",params:t})}function g(t){return a({url:r,method:"post",data:t})}function b(t){return a({url:r+t.id+"/",method:"put",data:t})}function w(t){return a({url:r+t+"/",method:"delete",data:{id:t}})}function R(t){return a({url:r+"total/",method:"GET",params:t})}function j(t){return a({url:r+"daily/",method:"GET",params:t})}const y=function({crudExpose:t,context:n}){const s=async e=>{const o=c(n.value);return p.assign(e,o),await f(e)},i=async({form:e,row:o})=>(e.id=o.id,await b(e)),l=async({row:e})=>await w(e.id),u=async({form:e})=>await g(e);return h("$hasPermissions"),{crudOptions:{table:{height:750,headerCellStyle:{backgroundColor:"#f6f7fa",height:"20px"},cellStyle:{border:"none",borderBottom:"0.5px solid #ddd"}},container:{fixedHeight:!1},request:{pageRequest:s,addRequest:u,editRequest:i,delRequest:l},toolbar:{buttons:{search:{show:!0},compact:{show:!1}}},rowHandle:{fixed:"right",width:80,buttons:{view:{show:!1},edit:{iconRight:"Edit",type:"text",text:null},remove:{iconRight:"Delete",type:"text",text:null}}},columns:{adGroupName:{title:"广告组名称",column:{width:"150px"},search:{show:!0,component:{props:{clearable:!0}}},form:{rules:[{required:!0,message:"必填项"}]}},targetingType:{title:"投放类型",type:"dict-select",column:{align:"center",width:"110px"},dict:d({data:[{label:"自动定向",value:"automatic"},{label:"商品定向",value:"product"},{label:"关键词投放",value:"keyword"}]})},state:{title:"状态",column:{width:100}},defaultBid:{title:"默认竞价",column:{width:100}},...m}}}},C=Object.freeze(Object.defineProperty({__proto__:null,createCrudOptions:y},Symbol.toStringTag,{value:"Module"}));export{j as a,C as b,y as c,R as g};
