import{u as P}from"./usePagination.26f71951.js";import{u as q}from"./useElTableData.076dc1a9.js";import{g as F}from"./api.f7e03949.js";import{e as w}from"./emitter.bff31cdd.js";import{d as U,B as x,r as M,E as R,A as W,ai as i,aq as j,o as D,M as k,O as a,U as t,P as E,u as c,a as l,T as p,D as T}from"./vue.adf17aba.js";const N={class:"font-semibold"},V={class:"font-semibold line-clamp-1 text-ellipsis"},A={class:"font-semibold"},O={class:"font-semibold"},Q={class:"font-semibold"},G={class:"font-semibold"},H={class:"mt-3.5 flex justify-end"},$=U({__name:"FeatureWordTable",setup(J){const{tableData:r,total:h,currentPage:f,pageSize:u,handlePageChange:S}=P(b),_=x("filter"),v=M(!1);w.on("QueryPage-query",()=>{b()}),R(()=>{u.value=20}),W(()=>{w.all.clear()});async function b(){const g={search_term:_.value.searchTerm,marketplace_Ids:_.value.marketIds,report_type:_.value.reportType,date_start:_.value.reportDate[0],date_end:_.value.reportDate[1],page:f.value,limit:u.value};await q(F,g,r,h,v)}function z({row:g,column:d,rowIndex:n,columnIndex:o}){if(o===0){const m=r.value[n].feature_word;let s=1;for(;n+s<r.value.length&&r.value[n+s].feature_word===m;)s++;return n===0||r.value[n-1].feature_word!==m?[s,1]:[0,0]}return[1,1]}return(g,d)=>{const n=i("el-descriptions"),o=i("el-table-column"),m=i("el-tooltip"),s=i("el-table"),B=i("el-pagination"),y=i("el-card"),C=j("loading");return D(),k(y,{shadow:"hover",style:{border:"none","margin-bottom":"10px"}},{default:a(()=>[t(n,{title:"/ 反查关键词 /"}),t(y,{shadow:"never"},{default:a(()=>[E((D(),k(s,{data:c(r),"span-method":z,height:"800",stripe:"",style:{width:"100%"}},{default:a(()=>[t(o,{align:"center",label:"特征词",prop:"feature_word"},{default:a(({row:e})=>[l("span",N,p(e.feature_word),1)]),_:1}),t(o,{align:"center",label:"关键词",prop:"searchTerm"},{default:a(({row:e})=>[t(m,{content:e.searchTerm,"show-after":500,effect:"dark",placement:"top-start"},{default:a(()=>[l("span",V,p(e.searchTerm),1)]),_:2},1032,["content"])]),_:1}),t(o,{align:"center",label:"权重值",prop:"weight_value"},{default:a(({row:e})=>[l("span",A,p(e.weight_value),1)]),_:1}),t(o,{align:"center",label:"搜索频次",prop:"searchFrequencyRank"},{default:a(({row:e})=>[l("span",O,p(e.searchFrequencyRank),1)]),_:1}),t(o,{align:"center",label:"点击分享",prop:"clickShare"},{default:a(({row:e})=>[l("span",Q,p(e.clickShare),1)]),_:1}),t(o,{align:"center",label:"转化分享",prop:"conversionShare"},{default:a(({row:e})=>[l("span",G,p(e.conversionShare),1)]),_:1})]),_:1},8,["data"])),[[C,c(v)]]),l("div",H,[t(B,{"current-page":c(f),"onUpdate:currentPage":d[0]||(d[0]=e=>T(f)?f.value=e:null),"page-size":c(u),"onUpdate:pageSize":d[1]||(d[1]=e=>T(u)?u.value=e:null),"page-sizes":[10,20,30,50,100,200],total:c(h),layout:"sizes, prev, pager, next, total",onChange:c(S)},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})}}});export{$ as _};
