import{r as n,H as m,p as F,X as g}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{BaseColumn as h}from"./commonTabColumn.c5d53eee.js";import{B as C,U as e,ai as a,S as o}from"./vue.adf17aba.js";const r="/api/ad_manage/sdgroups/report/trend/";function f(u){return n({url:"/api/ad_manage/sdgroups/",method:"get",params:u})}function E(u){return n({url:r,method:"post",data:u})}function b(u){return n({url:r+u.id+"/",method:"put",data:u})}function x(u){return n({url:r+u+"/",method:"delete",data:{id:u}})}function v(u){return n({url:"/api/ad_manage/sdgroups/report/amount",method:"GET",params:u})}function P(u){return n({url:r+"daily",method:"GET",params:u})}function H(u){return n({url:r+"weekly",method:"GET",params:u})}function O(u){return n({url:r+"monthly",method:"GET",params:u})}const D=function({crudExpose:u,context:i}){const s=async t=>{const l=F(i.value);return g.assign(t,l),await f(t)},d=async({form:t,row:l})=>(t.id=l.id,await b(t)),p=async({row:t})=>await x(t.id),c=async({form:t})=>await E(t);return C("$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:c,editRequest:d,delRequest:p},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:"必填项"}]}},state:{title:"状态",sortable:!0,column:{width:90,align:"center"},type:"dict-select",search:{show:!0},dict:m({data:[{value:"paused",label:"已暂停",color:"warning"},{value:"enabled",label:"投放中",color:"success"}]})},...h,ViewImpression:{title:"可见曝光量",column:{align:"right",sortable:!0,width:"140px",border:"0.5px solid #ddd",renderHeader(){return e("span",null,[e(a("el-tooltip"),{placement:"top",content:"来自亚马逊广告API，符合媒体评级委员会(Media Ratings Council)可见标准的曝光量"},{default:()=>[e("span",null,[e(a("el-icon"),{size:"14",style:"display:inline-block; padding-top:2px; margin-right:3px;"},{default:()=>[e(a("InfoFilled"),null,null)]})])]}),e("span",null,[o("可见曝光量")])])},formatter:t=>t.value!=null?t.value:"--"}},VCPM:{title:"千次可见曝光成本",column:{align:"right",sortable:!0,width:"180px",border:"0.5px solid #ddd",renderHeader(){return e("span",null,[e(a("el-tooltip"),{placement:"top",content:"千次可见曝光成本，系统计算，花费/可见曝光量*1000"},{default:()=>[e("span",null,[e(a("el-icon"),{size:"14",style:"display:inline-block; padding-top:2px; margin-right:3px;"},{default:()=>[e(a("InfoFilled"),null,null)]})])]}),e("span",null,[o("千次可见曝光成本")])])},formatter:t=>t.value!=null?t.value:"--"}},DPV:{title:"商品详情页浏览次数",column:{align:"right",sortable:!0,width:"200px",border:"0.5px solid #ddd",renderHeader(){return e("span",null,[e(a("el-tooltip"),{placement:"top",content:"商品详情页浏览次数，来自亚马逊广告API。<br /> 在点击广告后的14天内（品牌推广）、浏览或点击广告后的14天内（展示型推广）的商品详情页浏览次数","raw-content":!0},{default:()=>[e("span",null,[e(a("el-icon"),{size:"14",style:"display:inline-block; padding-top:2px; margin-right:3px;"},{default:()=>[e(a("InfoFilled"),null,null)]})])]}),e("span",null,[o("商品详情页浏览次数")])])}}}}}}},R=Object.freeze(Object.defineProperty({__proto__:null,createCrudOptions:D},Symbol.toStringTag,{value:"Module"}));export{P as a,O as b,H as c,D as d,R as e,v as g};
