import{v as j,A as O}from"./elementPlus.4833989a.js";import{u as E,a as K,B as F,b as J}from"./index.ad3efb29.js";import{d as W,r as i,ay as S,aD as H,az as Q,j as X,w as Y,ai as l,o as u,M as y,O as a,U as t,aa as Z,a8 as ee,u as n,R as ae,a as s,c as te,T as o,S as d,J as se,K as oe,n as ne,aF as le,aG as ce}from"./vue.adf17aba.js";import{g as re,a as ie,b as de,c as me,d as pe}from"./crud.07f6a8a3.js";import{D as ue}from"./index.04a874bc.js";import _e from"./dataTendency.8f9547e4.js";import{SdBaseColumn as fe}from"./commonTabColumn.c5d53eee.js";import{_ as he}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.e566fd6e.js";import"./index.7f1f4491.js";import"./index.05a2d588.js";const ge=m=>(le("data-v-d08eacf3"),m=m(),ce(),m),ve={style:{display:"flex"}},ye=["src"],ke={class:"image-slot"},Ce={class:"list-item-title"},we={class:"list-item-label"},be={class:"list-item-value"},Ne={class:"list-item-label"},Se={class:"list-item-value"},xe={class:"en-text"},Ie={class:"en-text"},Te={class:"campare-switch"},De=ge(()=>s("span",null,"数据对比 ",-1)),Me=W({__name:"index",setup(m,{expose:x}){const c=i("dataTendency"),I=E(),T=K(),{dateRange:k}=S(T),{profile:D}=S(I),_=i({profileId:D.value.profile_id,dateRange:k}),{crudBinding:M,crudRef:V,crudExpose:C}=F({createCrudOptions:pe,context:_});H();const B=Q(),R=i(),L=i(),f=i(!1);X(()=>{C.doRefresh()});const w=h=>{B.push({name:"CampaignDetail",query:{campaignId:h.campaignId,tagsViewName:h.campaignName}})},b=()=>{c.value==="dataTendency"?L.value.resizeChart():c.value==="adStruct"&&R.value.resizeChart()},z=()=>{ne(()=>{b()})};return x({resizeTabChart:b}),Y(_,async()=>{C.doRefresh()},{deep:!0}),(h,p)=>{const N=l("el-tab-pane"),U=l("el-tabs"),G=l("el-icon"),P=l("el-image"),g=l("el-link"),v=l("el-tooltip"),$=l("el-progress"),q=l("el-switch"),A=l("fs-crud");return u(),y(n(J),{class:"fs-page-custom"},{default:a(()=>[t(A,oe({ref_key:"crudRef",ref:V},n(M)),Z({"header-middle":a(()=>[t(U,{modelValue:c.value,"onUpdate:modelValue":p[0]||(p[0]=e=>c.value=e),class:"chart-tabs",type:"border-card",onTabChange:z},{default:a(()=>[t(N,{label:"数据趋势",name:"dataTendency"},{default:a(()=>[c.value==="dataTendency"?(u(),y(_e,{key:0,query:_.value,fetchCard:n(re),"fetch-line-month":n(ie),"fetch-line-week":n(de),fetchLine:n(me)},null,8,["query","fetchCard","fetch-line-month","fetch-line-week","fetchLine"])):ae("",!0)]),_:1}),t(N,{label:"散点视图",name:"scatterView"})]),_:1},8,["modelValue"])]),cell_commodity:a(({row:e})=>[s("div",ve,[e.image?(u(),te("img",{key:0,class:"img-part",src:e.image},null,8,ye)):(u(),y(P,{key:1,class:"img-part"},{error:a(()=>[s("div",ke,[t(G,null,{default:a(()=>[t(n(j))]),_:1})])]),_:1})),t(v,{effect:"dark",placement:"top"},{content:a(()=>[s("p",null,o(e.itemName),1)]),default:a(()=>[s("div",null,[s("div",Ce,o(e.itemName?e.itemName:"--"),1),s("span",null,[s("div",we,[d(" ASIN: "),s("span",be,o(e.promotedAsin),1),s("span",null,[t(g,{href:e.amazon_url,target:"_blank",disabled:!e.amazon_url,underline:!1,icon:n(O),style:se({marginLeft:"8px",color:e.amazon_url?"#3a83f7":"#c0c4cc"})},null,8,["href","disabled","icon","style"])])]),s("div",Ne,[d(" SKU: "),s("span",Se,o(e.promotedSku?e.promotedSku:"--"),1)])])])]),_:2},1024)])]),cell_percentTimeInBudget:a(e=>[t($,{percentage:e.row.percentTimeInBudget>0?e.row.percentTimeInBudget*100:0},null,8,["percentage"])]),cell_campaignName:a(e=>[t(v,{effect:"dark",content:e.row.campaignName,placement:"top"},{default:a(()=>[t(g,{type:"primary",underline:!1,onClick:r=>w(e.row)},{default:a(()=>[s("div",xe,o(e.row.campaignName?e.row.campaignName:"--"),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),cell_adGroupName:a(e=>[t(v,{effect:"dark",content:e.row.adGroupName,placement:"top"},{default:a(()=>[t(g,{type:"primary",underline:!1,onClick:r=>w(e.row)},{default:a(()=>[s("div",Ie,o(e.row.adGroupName),1)]),_:2},1032,["onClick"])]),_:2},1032,["content"])]),cell_MissedImpressions:a(e=>[d(o(e.row.MissedImpressionsLower??"0")+" ~ "+o(e.row.MissedImpressionsUpper??"0"),1)]),cell_MissedClicks:a(e=>[d(o(e.row.MissedClicksLower??"0")+" ~ "+o(e.row.MissedClicksUpper??"0"),1)]),cell_MissedSales:a(e=>[d(o(e.row.MissedSalesLower??"0")+" ~ "+o(e.row.MissedSalesUpper??"0"),1)]),"toolbar-left":a(()=>[s("div",Te,[De,t(q,{modelValue:f.value,"onUpdate:modelValue":p[1]||(p[1]=e=>f.value=e),size:"small"},null,8,["modelValue"])])]),_:2},[ee(Object.keys(n(fe)),e=>({name:`cell_${e}`,fn:a(r=>[t(ue,{field:e,value:r.row[e],"prev-val":r.row[`prev${e}`],"gap-val":r.row[`gap${e}`],"date-range":n(k),"show-compare":f.value},null,8,["field","value","prev-val","gap-val","date-range","show-compare"])])}))]),1040)]),_:1})}}});const Oe=he(Me,[["__scopeId","data-v-d08eacf3"]]);export{Oe as default};
