import{r}from"./index.ad3efb29.js";import{B as d}from"./vue.adf17aba.js";import"./elementPlus.4833989a.js";import"./echarts.72dc8373.js";const n="/api/ad_manage/portfolios/";function c(t){return r({url:n,method:"get",params:t})}function l(t){return r({url:n,method:"post",data:t})}function p(t){return r({url:n+t.id+"/",method:"put",data:t})}function m(t){return r({url:n+t+"/",method:"delete",data:{id:t}})}const q=function({crudExpose:t,context:h}){const i=async e=>await c(e),a=async({form:e,row:u})=>(e.id=u.id,await p(e)),o=async({row:e})=>await m(e.id),s=async({form:e})=>await l(e);return d("$hasPermissions"),{crudOptions:{table:{height:800,size:"small"},container:{fixedHeight:!1},request:{pageRequest:i,addRequest:s,editRequest:a,delRequest:o},rowHandle:{fixed:"right",width:80,buttons:{view:{show:!1},edit:{iconRight:"Edit",type:"text",text:null},remove:{iconRight:"Delete",type:"text",text:null}}},columns:{name:{title:"广告活动",column:{width:"150px"},search:{show:!0,component:{props:{clearable:!0}}},form:{rules:[{required:!0,message:"必填项"}]}}}}}};export{q as createCrudOptions};
