import{n as A,q as E}from"./elementPlus.58179425.js";import{u as P,a as j,B as O,b as J}from"./index.8a64ecdf.js";import{d as K,r as i,ak as k,an as W,al as F,j as H,w as Q,a8 as l,o as r,E as u,G as a,M as s,a1 as X,$ as Y,u as n,J as C,a as o,c as v,L as t,A as Z,K as y,B as ee,n as ae,ap as te,aq as se}from"./vue.95e072e2.js";import{a as oe,b as ne,c as le,d as re}from"./api.17cbb30d.js";import ce from"./adStruct.20a6dc4c.js";import{createCrudOptions as ie}from"./crud.9cd7ef6f.js";import{D as de}from"./index.eed780e8.js";import pe from"./dataTendency.391089b1.js";import{SbBaseColumn as ue}from"./commonTabColumn.00155e2b.js";import{_ as me}from"./_plugin-vue_export-helper.c27b6911.js";import"./echarts.72dc8373.js";import"./dropdowndisable.88660b16.js";import"./index.df979911.js";import"./enum.b537673d.js";import"./index.9f6b84b8.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"},Be={class:"campare-switch"},Ne=_e(()=>o("span",null,"数据对比 ",-1)),Te=K({__name:"index",setup(d,{expose:S}){const c=i("dataTendency"),B=P(),N=j(),{dateRange:w}=k(N),{profile:T}=k(B),m=i({profileId:T.value.profile_id,dateRange:w}),{crudBinding:M,crudRef:L,crudExpose:b}=O({createCrudOptions:ie,context:m});W(),F();const V=i(),D=i(),_=i(!1);H(()=>{b.doRefresh()});const x=()=>{c.value==="dataTendency"?D.value.resizeChart():c.value==="adStruct"&&V.value.resizeChart()},I=()=>{ae(()=>{x()})};return S({resizeTabChart:x}),Q(m,async()=>{b.doRefresh()},{deep:!0}),(Me,p)=>{const f=l("el-tab-pane"),R=l("el-tabs"),$=l("el-icon"),z=l("el-image"),g=l("el-tooltip"),G=l("el-link"),q=l("el-switch"),U=l("fs-crud");return r(),u(n(J),{class:"fs-page-custom"},{default:a(()=>[s(U,ee({ref_key:"crudRef",ref:L},n(M)),X({"header-middle":a(()=>[s(R,{modelValue:c.value,"onUpdate:modelValue":p[0]||(p[0]=e=>c.value=e),class:"chart-tabs",type:"border-card",onTabChange:I},{default:a(()=>[s(f,{label:"数据趋势",name:"dataTendency"},{default:a(()=>[c.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(()=>[c.value==="adStruct"?(r(),u(ce,{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(z,{key:1,class:"img-part"},{error:a(()=>[o("div",he,[s($,null,{default:a(()=>[s(n(A))]),_: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(E),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",Be,[Ne,s(q,{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 Je=me(Te,[["__scopeId","data-v-326b0a0d"]]);export{Je as default};
