|
@@ -467,68 +467,26 @@ export default function RecallResultTable({
|
|
|
const articleOnlyCols: ColumnsType<RowItem> = [
|
|
const articleOnlyCols: ColumnsType<RowItem> = [
|
|
|
{
|
|
{
|
|
|
title: '来源',
|
|
title: '来源',
|
|
|
- key: 'article.channelName',
|
|
|
|
|
- width: 140,
|
|
|
|
|
- render: (_v, item) => textOrDash(item.articleDetail?.channelName),
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '作者',
|
|
|
|
|
- key: 'article.channelAccountName',
|
|
|
|
|
- width: 140,
|
|
|
|
|
- render: (_v, item) => textOrDash(item.articleDetail?.channelAccountName),
|
|
|
|
|
|
|
+ key: 'article.source',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ render: (_v, item) => textOrDash(item.articleDetail?.source ?? undefined),
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: '阅读量',
|
|
|
|
|
- key: 'article.readCount',
|
|
|
|
|
- width: 110,
|
|
|
|
|
- align: 'right',
|
|
|
|
|
- onHeaderCell: () => ({ style: METRIC_HEADER_STYLE }),
|
|
|
|
|
- onCell: () => ({ style: METRIC_CELL_STYLE }),
|
|
|
|
|
- sorter: (a, b) => {
|
|
|
|
|
- const av = parseNum(a.articleDetail?.readCount)
|
|
|
|
|
- const bv = parseNum(b.articleDetail?.readCount)
|
|
|
|
|
- if (av == null && bv == null) return 0
|
|
|
|
|
- if (av == null) return 1
|
|
|
|
|
- if (bv == null) return -1
|
|
|
|
|
- return av - bv
|
|
|
|
|
- },
|
|
|
|
|
- sortDirections: ['descend', 'ascend'],
|
|
|
|
|
- render: (_v, item) => (
|
|
|
|
|
- <span style={{ fontVariantNumeric: 'tabular-nums', fontSize: 12 }}>
|
|
|
|
|
- {formatNumber(item.articleDetail?.readCount)}
|
|
|
|
|
- </span>
|
|
|
|
|
- ),
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '点赞',
|
|
|
|
|
- key: 'article.likeCount',
|
|
|
|
|
- width: 100,
|
|
|
|
|
- align: 'right',
|
|
|
|
|
- render: (_v, item) => (
|
|
|
|
|
- <span style={{ fontVariantNumeric: 'tabular-nums', fontSize: 12 }}>
|
|
|
|
|
- {formatNumber(item.articleDetail?.likeCount)}
|
|
|
|
|
- </span>
|
|
|
|
|
- ),
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '在看',
|
|
|
|
|
- key: 'article.lookingCount',
|
|
|
|
|
- width: 100,
|
|
|
|
|
- align: 'right',
|
|
|
|
|
- render: (_v, item) => (
|
|
|
|
|
- <span style={{ fontVariantNumeric: 'tabular-nums', fontSize: 12 }}>
|
|
|
|
|
- {formatNumber(item.articleDetail?.lookingCount)}
|
|
|
|
|
- </span>
|
|
|
|
|
- ),
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '字数',
|
|
|
|
|
- key: 'article.wordCount',
|
|
|
|
|
- width: 90,
|
|
|
|
|
- align: 'right',
|
|
|
|
|
|
|
+ title: '标签',
|
|
|
|
|
+ key: 'article.tags',
|
|
|
|
|
+ width: 200,
|
|
|
render: (_v, item) => {
|
|
render: (_v, item) => {
|
|
|
- const n = item.articleDetail?.wordCount
|
|
|
|
|
- return <span style={{ fontVariantNumeric: 'tabular-nums', fontSize: 12 }}>{n ?? '--'}</span>
|
|
|
|
|
|
|
+ const tags = item.articleDetail?.tags
|
|
|
|
|
+ if (!tags) return <Text type="secondary">--</Text>
|
|
|
|
|
+ return (
|
|
|
|
|
+ <Space size={[4, 4]} wrap>
|
|
|
|
|
+ {tags.split(',').map((t, i) => (
|
|
|
|
|
+ <Tag key={i} color="geekblue" style={{ margin: 0, fontSize: 11 }}>
|
|
|
|
|
+ {t.trim()}
|
|
|
|
|
+ </Tag>
|
|
|
|
|
+ ))}
|
|
|
|
|
+ </Space>
|
|
|
|
|
+ )
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -548,19 +506,13 @@ export default function RecallResultTable({
|
|
|
)
|
|
)
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- title: '发布时间',
|
|
|
|
|
- key: 'article.publishTime',
|
|
|
|
|
- width: 150,
|
|
|
|
|
- render: (_v, item) => textOrDash(item.articleDetail?.publishTime),
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
title: '原文',
|
|
title: '原文',
|
|
|
- key: 'article.htmlUrl',
|
|
|
|
|
|
|
+ key: 'article.url',
|
|
|
width: 80,
|
|
width: 80,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
render: (_v, item) => {
|
|
render: (_v, item) => {
|
|
|
- const url = item.articleDetail?.htmlUrl
|
|
|
|
|
|
|
+ const url = item.articleDetail?.url
|
|
|
if (!url) return <Text type="secondary">--</Text>
|
|
if (!url) return <Text type="secondary">--</Text>
|
|
|
return (
|
|
return (
|
|
|
<a href={toHttps(url)} target="_blank" rel="noopener noreferrer">
|
|
<a href={toHttps(url)} target="_blank" rel="noopener noreferrer">
|