import{c as U}from"./api.6446cc6a.js";import{u as V}from"./usePagination.8bd548a4.js";import{e as b}from"./emitter.ca07dcc1.js";import{d as B,q as j,r as C,p as q,n as A,a9 as s,af as E,H as I,o as L,E as N,G as o,a as n,M as t,u as i,K as R,L as r,t as T}from"./vue.65d9dadc.js";const $={class:"relative flex gap-5 mb-5"},G=n("span",{class:"absolute left-7 font-bold text-xl mb-4 text-center",style:{color:"#464646"}},"搜索词-分析页-Query汇总",-1),H={class:"flex justify-center w-full items-center"},K=n("span",{class:"font-medium mr-1.5"},"类型 ",-1),M={style:{height:"100%",overflow:"auto"}},F={class:"font-medium"},J={class:"font-medium"},O={class:"font-medium"},W={class:"font-medium"},X={class:"font-medium"},Y={class:"mt-3.5 flex justify-end"},ne=B({__name:"QuerySummary",setup(Z){const{tableData:h,total:g,currentPage:c,pageSize:_,handlePageChange:w}=V(f),u=j("filter"),p=C(!1),m=C("positive");q(()=>{b.all.clear()}),b.on("QueryCondition-sendRequest",()=>{f()});async function f(){p.value=!0;const d={date_start:u.value.reportDate[0],date_end:u.value.reportDate[1],report_range:u.value.reportType,layer_type:u.value.layerType,searchTerm_type:m.value,page:c.value,limit:_.value};try{const a=await U(d);g.value=a.total,h.value=a.data}catch(a){console.log("error=>",a)}finally{p.value=!1,await A(),window.dispatchEvent(new Event("resize"))}}function x(){f()}function k(d){return`${window.location.origin}/apiLogin/?next=/#/searchTerm/targetingSearchTerm?searchRoot=${d}`}return(d,a)=>{const v=s("el-option"),S=s("el-select"),l=s("el-table-column"),D=s("el-link"),z=s("el-table"),P=s("el-pagination"),y=s("el-card"),Q=E("loading");return I((L(),N(y,{style:{border:"none"}},{default:o(()=>[n("div",$,[G,n("div",H,[K,t(S,{modelValue:m.value,"onUpdate:modelValue":a[0]||(a[0]=e=>m.value=e),onChange:x,style:{width:"130px"}},{default:o(()=>[t(v,{label:"positive",value:"positive"}),t(v,{label:"negative",value:"negative"})]),_:1},8,["modelValue"])])]),t(y,{shadow:"never"},{default:o(()=>[n("div",M,[t(z,{data:i(h),height:"600",stripe:"",style:{width:"100%"}},{default:o(()=>[t(l,{type:"index",width:"55"}),t(l,{prop:"Search_Query",label:"搜索词","min-width":"200"},{default:o(({row:e})=>[t(D,{underline:!1,href:k(e.Search_Query),target:"_blank",style:{color:"#5a6fc0"}},{default:o(()=>[R(r(e.Search_Query),1)]),_:2},1032,["href"])]),_:1}),t(l,{prop:"count",label:"出现次数",align:"center","min-width":"200",sortable:""},{default:o(({row:e})=>[n("span",F,r(e.count),1)]),_:1}),t(l,{prop:"Impressions_Total_Count",label:"曝光次数",align:"center","min-width":"200",sortable:""},{default:o(({row:e})=>[n("span",J,r(e.Impressions_Total_Count?e.Impressions_Total_Count:"--"),1)]),_:1}),t(l,{prop:"Clicks_Total_Count",label:"点击次数",align:"center","min-width":"200",sortable:""},{default:o(({row:e})=>[n("span",O,r(e.Clicks_Total_Count?e.Clicks_Total_Count:"--"),1)]),_:1}),t(l,{prop:"Cart_Adds_Total_Count",label:"加购次数",align:"center","min-width":"200",sortable:""},{default:o(({row:e})=>[n("span",W,r(e.Cart_Adds_Total_Count?e.Cart_Adds_Total_Count:"--"),1)]),_:1}),t(l,{prop:"Purchases_Total_Count",label:"购买次数",align:"center","min-width":"200",sortable:""},{default:o(({row:e})=>[n("span",X,r(e.Purchases_Total_Count?e.Purchases_Total_Count:"--"),1)]),_:1})]),_:1},8,["data"])]),n("div",Y,[t(P,{"current-page":i(c),"onUpdate:currentPage":a[1]||(a[1]=e=>T(c)?c.value=e:null),"page-size":i(_),"onUpdate:pageSize":a[2]||(a[2]=e=>T(_)?_.value=e:null),"page-sizes":[10,20,30,50,100,200],layout:"total, sizes, prev, pager, next",total:i(g),onChange:i(w)},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})),[[Q,p.value]])}}});export{ne as _};
