import{u as B}from"./usePagination.8bd548a4.js";import{u as P}from"./useElTableData.5df992c8.js";import{g as F}from"./api.2ac1119c.js";import{e as w}from"./emitter.ca07dcc1.js";import{d as x,q as M,r as R,v as U,p as W,a9 as i,af as j,o as k,E as D,G as t,M as a,H as E,u as c,a as l,L as p,t as S}from"./vue.65d9dadc.js";const N={class:"font-semibold"},V={class:"font-semibold line-clamp-1 text-ellipsis"},G={class:"font-semibold"},H={class:"font-semibold"},L={class:"font-semibold"},Q={class:"font-semibold"},A={class:"mt-3.5 flex justify-end"},$=x({__name:"FeatureWordTable",setup(J){const{tableData:r,total:h,currentPage:f,pageSize:u,handlePageChange:T}=B(b),_=M("filter"),v=R(!1);w.on("QueryPage-query",()=>{b()}),U(()=>{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 P(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"),C=i("el-pagination"),y=i("el-card"),q=j("loading");return k(),D(y,{shadow:"hover",style:{border:"none","margin-bottom":"10px"}},{default:t(()=>[a(n,{title:"/ 反查关键词 /"}),a(y,{shadow:"never"},{default:t(()=>[E((k(),D(s,{data:c(r),"span-method":z,height:"800",stripe:"",style:{width:"100%"}},{default:t(()=>[a(o,{align:"center",label:"特征词",prop:"feature_word"},{default:t(({row:e})=>[l("span",N,p(e.feature_word),1)]),_:1}),a(o,{align:"center",label:"关键词",prop:"searchTerm"},{default:t(({row:e})=>[a(m,{content:e.searchTerm,"show-after":500,effect:"dark",placement:"top-start"},{default:t(()=>[l("span",V,p(e.searchTerm),1)]),_:2},1032,["content"])]),_:1}),a(o,{align:"center",label:"权重值",prop:"weight_value"},{default:t(({row:e})=>[l("span",G,p(e.weight_value),1)]),_:1}),a(o,{align:"center",label:"搜索频次",prop:"searchFrequencyRank"},{default:t(({row:e})=>[l("span",H,p(e.searchFrequencyRank),1)]),_:1}),a(o,{align:"center",label:"点击分享",prop:"clickShare"},{default:t(({row:e})=>[l("span",L,p(e.clickShare),1)]),_:1}),a(o,{align:"center",label:"转化分享",prop:"conversionShare"},{default:t(({row:e})=>[l("span",Q,p(e.conversionShare),1)]),_:1})]),_:1},8,["data"])),[[q,c(v)]]),l("div",A,[a(C,{"current-page":c(f),"onUpdate:currentPage":d[0]||(d[0]=e=>S(f)?f.value=e:null),"page-size":c(u),"onUpdate:pageSize":d[1]||(d[1]=e=>S(u)?u.value=e:null),"page-sizes":[10,20,30,50,100,200],total:c(h),layout:"sizes, prev, pager, next, total",onChange:c(T)},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})}}});export{$ as _};
