1 |
- import{r as a,H as d,p as c,X as p}from"./index.34b03be2.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/sbcampaigndetail/sbgroups/";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 D(t){return a({url:r+"total/",method:"GET",params:t})}function E(t){return a({url:r+"daily/",method:"GET",params:t})}const x=function({crudExpose:t,context:s}){const n=async e=>{const o=c(s.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:n,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:"必填项"}]}},creative_type:{title:"投放类型",type:"dict-select",column:{align:"center",width:"130px"},dict:d({data:[{label:"商品集",value:"PRODUCT_COLLECTION"},{label:"品牌视频",value:"BRAND_VIDEO"},{label:"视频",value:"VIDEO"}]})},state:{title:"状态",column:{width:100}},...m}}}},R=Object.freeze(Object.defineProperty({__proto__:null,createCrudOptions:x},Symbol.toStringTag,{value:"Module"}));export{E as a,R as b,x as c,D as g};
|