1 |
- import{v as o,r,p as c,X as p}from"./index.b098562c.js";import{BaseColumn as h}from"./commonTabColumn.c5d53eee.js";import{aD as m,B as f}from"./vue.adf17aba.js";const a="/api/ad_manage/sd-ad-product/report/";function w(t){return t.adGroupId=o.currentRoute.value.query.adGroupId,r({url:a+"list",method:"get",params:t})}function g(t){return r({url:a,method:"post",data:t})}function b(t){return r({url:a+t.id+"/",method:"put",data:t})}function x(t){return r({url:a+t+"/",method:"delete",data:{id:t}})}function O(t){return console.log("router123",o.currentRoute.value.query),t.adGroupId=o.currentRoute.value.query.adGroupId,r({url:a+"amount",method:"GET",params:t})}function q(t){return t.adGroupId=o.currentRoute.value.query.adGroupId,r({url:a+"trend/daily",method:"GET",params:t})}const y=function({crudExpose:t,context:s}){m();const n=async e=>{const u=c(s.value);return p.assign(e,u),await w(e)},d=async({form:e,row:u})=>(e.id=u.id,await b(e)),i=async({row:e})=>await x(e.id),l=async({form:e})=>await g(e);return f("$hasPermissions"),{crudOptions:{table:{height:750,headerCellStyle:{backgroundColor:"#f6f7fa",height:"20px"},cellStyle:{border:"none",borderBottom:"0.5px solid #ddd"}},container:{fixedHeight:!1},actionbar:{show:!0,color:"#626aef",buttons:{add:{show:!1},create:{text:"添加广告",color:"#626aef",plain:!0,show:!0,click(){}}}},search:{show:!0,buttons:{search:{show:!1},reset:{show:!1}}},toolbar:{buttons:{search:{show:!0},compact:{show:!1}}},request:{pageRequest:n,addRequest:l,editRequest:d,delRequest:i},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:230,fixed:"left"}},state:{title:"状态",column:{width:"100px"}},...h}}}},I=Object.freeze(Object.defineProperty({__proto__:null,createCrudOptions:y},Symbol.toStringTag,{value:"Module"}));export{q as a,I as b,y as c,O as g};
|