更新Company页面的UI为FUI风格

This commit is contained in:
2025-12-18 00:24:11 +08:00
parent 9623b08183
commit 028869aa0c
4 changed files with 21 additions and 18 deletions

View File

@@ -14,7 +14,6 @@ import {
VStack,
HStack,
Spinner,
useColorModeValue,
Tag,
Center,
List,
@@ -29,15 +28,15 @@ export function SearchBar(props) {
const navigate = useNavigate();
const containerRef = useRef(null);
// 颜色配置
const searchIconColor = useColorModeValue("gray.500", "gray.400");
const inputBg = useColorModeValue("white", "whiteAlpha.100");
const dropdownBg = useColorModeValue("white", "#1a1a2e");
const borderColor = useColorModeValue("gray.200", "whiteAlpha.200");
const hoverBg = useColorModeValue("gray.50", "whiteAlpha.100");
const textColor = useColorModeValue("gray.800", "white");
const subTextColor = useColorModeValue("gray.500", "whiteAlpha.600");
const accentColor = useColorModeValue("blue.500", "#D4AF37");
// 颜色配置 - 固定使用深色主题
const searchIconColor = "gray.400";
const inputBg = "whiteAlpha.100";
const dropdownBg = "#1a1a2e";
const borderColor = "rgba(212, 175, 55, 0.3)";
const hoverBg = "whiteAlpha.100";
const textColor = "white";
const subTextColor = "whiteAlpha.600";
const accentColor = "#D4AF37";
// 使用搜索 Hook
const {

View File

@@ -22,9 +22,10 @@ import type { ActualControl } from "../../types";
import { THEME } from "../../BasicInfoTab/config";
// 格式化工具函数
// 注意API 返回的数据单位已经是 %,无需再乘 100
const formatPercentage = (value: number | null | undefined): string => {
if (value === null || value === undefined) return "-";
return `${(value * 100).toFixed(2)}%`;
return `${value.toFixed(2)}%`;
};
const formatShares = (value: number | null | undefined): string => {

View File

@@ -21,9 +21,10 @@ import type { Concentration } from "../../types";
import { THEME } from "../../BasicInfoTab/config";
// 格式化工具函数
// 注意API 返回的数据单位已经是 %,无需再乘 100
const formatPercentage = (value: number | null | undefined): string => {
if (value === null || value === undefined) return "-";
return `${(value * 100).toFixed(2)}%`;
return `${value.toFixed(2)}%`;
};
const formatDate = (dateStr: string | null | undefined): string => {
@@ -66,6 +67,7 @@ const ConcentrationCard: React.FC<ConcentrationCardProps> = ({ concentration = [
}, [concentration]);
// 计算饼图数据
// 注意API 返回的数据单位已经是 %,无需再乘 100
const pieData = useMemo(() => {
if (groupedData.length === 0) return [];
@@ -76,11 +78,11 @@ const ConcentrationCard: React.FC<ConcentrationCardProps> = ({ concentration = [
const top10 = items["前10大股东"]?.holding_ratio || 0;
return [
{ name: "前1大股东", value: Number((top1 * 100).toFixed(2)) },
{ name: "第2-3大股东", value: Number(((top3 - top1) * 100).toFixed(2)) },
{ name: "第4-5大股东", value: Number(((top5 - top3) * 100).toFixed(2)) },
{ name: "第6-10大股东", value: Number(((top10 - top5) * 100).toFixed(2)) },
{ name: "其他股东", value: Number(((1 - top10) * 100).toFixed(2)) },
{ name: "前1大股东", value: Number(top1.toFixed(2)) },
{ name: "第2-3大股东", value: Number((top3 - top1).toFixed(2)) },
{ name: "第4-5大股东", value: Number((top5 - top3).toFixed(2)) },
{ name: "第6-10大股东", value: Number((top10 - top5).toFixed(2)) },
{ name: "其他股东", value: Number((100 - top10).toFixed(2)) },
].filter(item => item.value > 0);
}, [groupedData]);

View File

@@ -28,9 +28,10 @@ const TABLE_THEME = {
};
// 格式化工具函数
// 注意API 返回的数据单位已经是 %,无需再乘 100
const formatPercentage = (value: number | null | undefined): string => {
if (value === null || value === undefined) return "-";
return `${(value * 100).toFixed(2)}%`;
return `${value.toFixed(2)}%`;
};
const formatShares = (value: number | null | undefined): string => {