ReportSelectionCard.tsx 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import React from 'react'
  2. import { EyeOutlined } from '@ant-design/icons'
  3. import { IReportSelectionItem } from 'Newest/Newest.service'
  4. import styles from '../css/ItemComponent.module.scss'
  5. export interface IReportSelectionCardProps {
  6. item: IReportSelectionItem
  7. title?: string // 标红的标题
  8. }
  9. /**重点公司展示样式卡片组件 */
  10. const ReportSelectionCard: React.FC<IReportSelectionCardProps> = props => {
  11. const { item, title } = props
  12. const handleToDetail = () => {
  13. window.open(`/recent/${item.ArticleId}`)
  14. }
  15. if (!item) return null
  16. return (
  17. <div className={styles['item-article']} onClick={handleToDetail}>
  18. <div className="item-article-title">
  19. <div
  20. className="item-article-title-content"
  21. dangerouslySetInnerHTML={{
  22. __html: title || item.Title
  23. }}
  24. />
  25. </div>
  26. <div className={`item-article-annotation line-seven`}>
  27. <div dangerouslySetInnerHTML={{ __html: item.MarketStrategy }} />
  28. </div>
  29. <div className="item-time-right item-article-flex">
  30. <div className="item-article-pv">
  31. <EyeOutlined size={14} className="pv-icon" />
  32. <span>{item.Pv || 0}</span>
  33. </div>
  34. <div className="item-article-publistdate">{item.PublishDate}</div>
  35. </div>
  36. </div>
  37. )
  38. }
  39. export default ReportSelectionCard