import{v as j,x as E}from"./elementPlus.c5b0e04f.js";import{u as K,a as O,B as J,b as W}from"./index.373e4c1e.js";import{d as F,r as i,al as x,ao as H,am as Q,j as X,w as Y,a9 as l,o as u,E as y,G as a,M as t,a2 as Z,a0 as ee,u as n,J as ae,a as s,c as te,L as o,K as d,A as se,B as oe,n as ne,aq as le,ar as re}from"./vue.65d9dadc.js";import{g as ce,a as ie,b as de,c as me,d as pe}from"./crud.1753e61c.js";import{D as ue}from"./index.74ced524.js";import _e from"./dataTendency.3fe686ee.js";import{SdBaseColumn as fe}from"./commonTabColumn.a4869ec6.js";import{_ as he}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./enum.b537673d.js";import"./index.78cddcae.js";import"./index.4dc9403e.js";const ge=m=>(le("data-v-d08eacf3"),m=m(),re(),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"},xe={class:"list-item-value"},Se={class:"en-text"},Ie={class:"en-text"},Te={class:"campare-switch"},Be=ge(()=>s("span",null,"数据对比 ",-1)),Me=F({__name:"index",setup(m,{expose:S}){const r=i("dataTendency"),I=K(),T=O(),{dateRange:k}=x(T),{profile:B}=x(I),_=i({profileId:B.value.profile_id,dateRange:k}),{crudBinding:M,crudRef:V,crudExpose:C}=J({createCrudOptions:pe,context:_});H();const D=Q(),L=i(),R=i(),f=i(!1);X(()=>{C.doRefresh()});const w=h=>{D.push({name:"CampaignDetail",query:{campaignId:h.campaignId,tagsViewName:h.campaignName}})},b=()=>{r.value==="dataTendency"?R.value.resizeChart():r.value==="adStruct"&&L.value.resizeChart()},z=()=>{ne(()=>{b()})};return S({resizeTabChart:b}),Y(_,async()=>{C.doRefresh()},{deep:!0}),(h,p)=>{const N=l("el-tab-pane"),U=l("el-tabs"),q=l("el-icon"),G=l("el-image"),g=l("el-link"),v=l("el-tooltip"),P=l("el-progress"),$=l("el-switch"),A=l("fs-crud");return u(),y(n(W),{class:"fs-page-custom"},{default:a(()=>[t(A,oe({ref_key:"crudRef",ref:V},n(M)),Z({"header-middle":a(()=>[t(U,{modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=e=>r.value=e),class:"chart-tabs",type:"border-card",onTabChange:z},{default:a(()=>[t(N,{label:"数据趋势",name:"dataTendency"},{default:a(()=>[r.value==="dataTendency"?(u(),y(_e,{key:0,query:_.value,fetchCard:n(ce),"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(G,{key:1,class:"img-part"},{error:a(()=>[s("div",ke,[t(q,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(E),style:se({marginLeft:"8px",color:e.amazon_url?"#3a83f7":"#c0c4cc"})},null,8,["href","disabled","icon","style"])])]),s("div",Ne,[d(" SKU: "),s("span",xe,o(e.promotedSku?e.promotedSku:"--"),1)])])])]),_:2},1024)])]),cell_percentTimeInBudget:a(e=>[t(P,{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:c=>w(e.row)},{default:a(()=>[s("div",Se,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:c=>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,[Be,t($,{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(c=>[t(ue,{field:e,value:c.row[e],"prev-val":c.row[`prev${e}`],"gap-val":c.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 Ee=he(Me,[["__scopeId","data-v-d08eacf3"]]);export{Ee as default};
