diff --git a/src/mocks/data/company.js b/src/mocks/data/company.js index 9d5477c6..7836ae59 100644 --- a/src/mocks/data/company.js +++ b/src/mocks/data/company.js @@ -361,8 +361,8 @@ export const PINGAN_BANK_DATA = { { shareholder_rank: 4, shareholder_name: '中国证券金融股份有限公司', holding_shares: 298654200, circulation_share_ratio: 1.54, shareholder_type: '券商', end_date: '2024-09-30' }, { shareholder_rank: 5, shareholder_name: '中央汇金资产管理有限责任公司', holding_shares: 267842100, circulation_share_ratio: 1.38, shareholder_type: '法人', end_date: '2024-09-30' }, { shareholder_rank: 6, shareholder_name: '全国社保基金一零三组合', holding_shares: 156234500, circulation_share_ratio: 0.80, shareholder_type: '社保', end_date: '2024-09-30' }, - { shareholder_rank: 7, shareholder_name: '华夏上证50交易型开放式指数证券投资基金', holding_shares: 142356700, circulation_share_ratio: 0.73, shareholder_type: '基金', end_date: '2024-09-30' }, - { shareholder_rank: 8, shareholder_name: '中国人寿保险股份有限公司-分红-个人分红-005L-FH002深', holding_shares: 128945600, circulation_share_ratio: 0.66, shareholder_type: '保险', end_date: '2024-09-30' }, + { shareholder_rank: 7, shareholder_name: '华夏上证50交易型开放式指数证券投资基金', holding_shares: 142356700, circulation_share_ratio: 0.73, shareholder_type: '资产管理公司资产管理计划', end_date: '2024-09-30' }, + { shareholder_rank: 8, shareholder_name: '中国人寿保险股份有限公司-分红-个人分红-005L-FH002深', holding_shares: 128945600, circulation_share_ratio: 0.66, shareholder_type: '保险资产管理产品', end_date: '2024-09-30' }, { shareholder_rank: 9, shareholder_name: '易方达沪深300交易型开放式指数发起式证券投资基金', holding_shares: 98765400, circulation_share_ratio: 0.51, shareholder_type: '基金', end_date: '2024-09-30' }, { shareholder_rank: 10, shareholder_name: '嘉实沪深300交易型开放式指数证券投资基金', holding_shares: 87654300, circulation_share_ratio: 0.45, shareholder_type: '基金', end_date: '2024-09-30' } ], @@ -375,8 +375,8 @@ export const PINGAN_BANK_DATA = { { shareholder_rank: 4, shareholder_name: '中国证券金融股份有限公司', holding_shares: 298654200, total_share_ratio: 1.54, shareholder_type: '券商', share_nature: '流通A股', end_date: '2024-09-30' }, { shareholder_rank: 5, shareholder_name: '中央汇金资产管理有限责任公司', holding_shares: 267842100, total_share_ratio: 1.38, shareholder_type: '法人', share_nature: '流通A股', end_date: '2024-09-30' }, { shareholder_rank: 6, shareholder_name: '全国社保基金一零三组合', holding_shares: 156234500, total_share_ratio: 0.80, shareholder_type: '社保', share_nature: '流通A股', end_date: '2024-09-30' }, - { shareholder_rank: 7, shareholder_name: '华夏上证50交易型开放式指数证券投资基金', holding_shares: 142356700, total_share_ratio: 0.73, shareholder_type: '基金', share_nature: '流通A股', end_date: '2024-09-30' }, - { shareholder_rank: 8, shareholder_name: '中国人寿保险股份有限公司-分红-个人分红-005L-FH002深', holding_shares: 128945600, total_share_ratio: 0.66, shareholder_type: '保险', share_nature: '流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 7, shareholder_name: '华夏上证50交易型开放式指数证券投资基金', holding_shares: 142356700, total_share_ratio: 0.73, shareholder_type: '资产管理公司资产管理计划', share_nature: '限售流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 8, shareholder_name: '中国人寿保险股份有限公司-分红-个人分红-005L-FH002深', holding_shares: 128945600, total_share_ratio: 0.66, shareholder_type: '保险资产管理产品', share_nature: '限售流通A股、质押股份', end_date: '2024-09-30' }, { shareholder_rank: 9, shareholder_name: '易方达沪深300交易型开放式指数发起式证券投资基金', holding_shares: 98765400, total_share_ratio: 0.51, shareholder_type: '基金', share_nature: '流通A股', end_date: '2024-09-30' }, { shareholder_rank: 10, shareholder_name: '嘉实沪深300交易型开放式指数证券投资基金', holding_shares: 87654300, total_share_ratio: 0.45, shareholder_type: '基金', share_nature: '流通A股', end_date: '2024-09-30' } ], diff --git a/src/views/Company/components/CompanyOverview/components/shareholder/ShareholdersTable.tsx b/src/views/Company/components/CompanyOverview/components/shareholder/ShareholdersTable.tsx index 3cceaca5..454e57ad 100644 --- a/src/views/Company/components/CompanyOverview/components/shareholder/ShareholdersTable.tsx +++ b/src/views/Company/components/CompanyOverview/components/shareholder/ShareholdersTable.tsx @@ -4,6 +4,7 @@ import React, { useMemo, memo } from "react"; import { Box, HStack, Heading, Badge, Icon, useBreakpointValue } from "@chakra-ui/react"; import { Table, Tag, Tooltip, ConfigProvider } from "antd"; +import zhCN from "antd/locale/zh_CN"; import type { ColumnsType } from "antd/es/table"; import { Users, LineChart } from "lucide-react"; import type { Shareholder } from "../../types"; @@ -133,10 +134,13 @@ const ShareholdersTable: React.FC = ({ title: "股东名称", dataIndex: "shareholder_name", key: "name", - ellipsis: true, + width: 200, + ellipsis: { + showTitle: false, + }, render: (name: string) => ( - - {name} + + {name} ), }, @@ -144,10 +148,9 @@ const ShareholdersTable: React.FC = ({ title: "股东类型", dataIndex: "shareholder_type", key: "type", - width: 90, responsive: ["md"], render: (shareholderType: string) => ( - {shareholderType || "-"} + {shareholderType || "-"} ), }, { @@ -158,6 +161,7 @@ const ShareholdersTable: React.FC = ({ align: "right", responsive: ["md"], sorter: (a: Shareholder, b: Shareholder) => (a.holding_shares || 0) - (b.holding_shares || 0), + sortDirections: ["descend", "ascend"], render: (shares: number) => ( {formatShares(shares)} ), @@ -173,6 +177,7 @@ const ShareholdersTable: React.FC = ({ const bVal = (b[config.ratioField] as number) || 0; return aVal - bVal; }, + sortDirections: ["descend", "ascend"], defaultSortOrder: "descend", render: (ratio: number) => ( @@ -188,10 +193,9 @@ const ShareholdersTable: React.FC = ({ title: "股份性质", dataIndex: "share_nature", key: "nature", - width: 80, responsive: ["lg"], render: (nature: string) => ( - {nature || "流通股"} + {nature || "流通股"} ), }); } @@ -211,14 +215,15 @@ const ShareholdersTable: React.FC = ({ {config.title} {reportDate && {formatDate(reportDate)}} - + `${record.shareholder_name}-${record.shareholder_rank ?? ''}-${record.end_date ?? ''}`} pagination={false} size={isMobile ? "small" : "middle"} - scroll={{ x: isMobile ? 400 : undefined }} + scroll={{ x: 'max-content' }} + showSorterTooltip={{ title: '点击切换排序' }} />