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