import{c as Q}from"./api.3f733443.js";import{u as V}from"./usePagination.26f71951.js";import{e as b}from"./emitter.bff31cdd.js";import{d as B,B as A,r as C,A as j,n as q,ai as s,aq as I,P as N,o as R,M as E,O as o,a as n,U as t,u as r,S as L,T as i,D as T}from"./vue.adf17aba.js";const $={class:"relative flex gap-5 mb-5"},M=n("span",{class:"absolute left-7 font-bold text-xl mb-4 text-center",style:{color:"#464646"}},"搜索词-分析页-Query汇总",-1),O={class:"flex justify-center w-full items-center"},F=n("span",{class:"font-medium mr-1.5"},"类型 ",-1),G={style:{height:"100%",overflow:"auto"}},H={class:"font-medium"},J={class:"font-medium"},K={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=A("filter"),p=C(!1),m=C("positive");j(()=>{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 Q(d);g.value=a.total,h.value=a.data}catch(a){console.log("error=>",a)}finally{p.value=!1,await q(),window.dispatchEvent(new Event("resize"))}}function x(){f()}function S(d){return`${window.location.origin}/apiLogin/?next=/#/searchTerm/targetingSearchTerm?searchRoot=${d}`}return(d,a)=>{const v=s("el-option"),k=s("el-select"),l=s("el-table-column"),D=s("el-link"),P=s("el-table"),z=s("el-pagination"),y=s("el-card"),U=I("loading");return N((R(),E(y,{style:{border:"none"}},{default:o(()=>[n("div",$,[M,n("div",O,[F,t(k,{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",G,[t(P,{data:r(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:S(e.Search_Query),target:"_blank",style:{color:"#5a6fc0"}},{default:o(()=>[L(i(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",H,i(e.count),1)]),_:1}),t(l,{prop:"Impressions_Total_Count",label:"曝光次数",align:"center","min-width":"200",sortable:""},{default:o(({row:e})=>[n("span",J,i(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",K,i(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,i(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,i(e.Purchases_Total_Count?e.Purchases_Total_Count:"--"),1)]),_:1})]),_:1},8,["data"])]),n("div",Y,[t(z,{"current-page":r(c),"onUpdate:currentPage":a[1]||(a[1]=e=>T(c)?c.value=e:null),"page-size":r(_),"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:r(g),onChange:r(w)},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})),[[U,p.value]])}}});export{ne as _};
